Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<Project>
<PropertyGroup>
<GemstoneVersion>1.0.181</GemstoneVersion>
<GemstoneVersion>1.0.182</GemstoneVersion>
</PropertyGroup>
</Project>
22 changes: 9 additions & 13 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,9 @@ pipeline {
env.GIT_COMMIT = bat(script: '@git rev-parse HEAD', returnStdout: true).trim()
}
powershell "powershell.exe -File .\\Scripts\\Versioning.ps1 -VersionFile './Scripts/PQBrowser.version' -Commit false"
powershell "powershell.exe -File .\\Scripts\\PackageVersioning.ps1 -VersionFile './PQBrowser/package.json'"
bat(script: "@git add Scripts/PQBrowser.version")
bat(script: "@git add PQBrowser/package.json")
bat(script: "git diff --cached --quiet || git commit -m \"Updated Version Number\"")
}
}
Expand Down Expand Up @@ -180,10 +182,10 @@ pipeline {
}
}

stage('Install UI Dependencies') {
stage('Build Production UI') {
steps {
dir('PQBrowser') {
bat(script: 'npm ci')
bat(script: 'npm run build')
}
}
}
Expand All @@ -206,14 +208,6 @@ pipeline {
}
}

stage('Build Production UI') {
steps {
dir('PQBrowser') {
bat(script: 'npm run build')
}
}
}

stage('Build Docker Images') {
when {
anyOf {
Expand All @@ -227,17 +221,19 @@ pipeline {
}
steps {
script {
env.pqBrowserDockerTag = env.CHANGE_BRANCH == "${env.devBranch}" ? "${env.pqBrowserVersion}a" : env.pqBrowserVersion
println("Building PQBrowser Docker image tag: pqbrowser:${env.pqBrowserDockerTag}")
//env.pqBrowserDockerTag = env.CHANGE_BRANCH == "${env.devBranch}" ? "${env.pqBrowserVersion}a" : env.pqBrowserVersion
//println("Building PQBrowser Docker image tag: pqbrowser:${env.pqBrowserDockerTag}")
println("Skipping docker stage intentionally")
}

powershell """
/*powershell """
dotnet publish '.\\PQBrowser\\PQBrowser.csproj' `
--configuration Release `
'-p:PublishProfile=Docker Release Profile PQBrowser'
"""

powershell "docker build --build-arg CONFIGURATION=Release -f .\\PQBrowser.dockerfile -t pqbrowser:${env.pqBrowserDockerTag} ."
*/
}
}

Expand Down
461 changes: 300 additions & 161 deletions PQBrowser/Controllers/OpenXDAController.cs

Large diffs are not rendered by default.

6 changes: 1 addition & 5 deletions PQBrowser/PQBrowser.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,7 @@
<Content Update="wwwroot\Scripts\PQBrowser.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Update="package.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</Content>
</ItemGroup>
</ItemGroup>

<ItemGroup>
<Compile Remove="DynamicAssemblies\**" />
Expand Down
8 changes: 4 additions & 4 deletions PQBrowser/Scripts/TSX/Components/EventSearch/EventSearch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,11 @@ const EventSearch = () => {
}, [referenceDataReady]);

const getEventData = React.useCallback((query: IDynamicEventSearchQuery) =>
GetDynamicEventSearchData({ ...eventRequest, sortKey: query?.SortField, ascending: query?.Ascending ?? true }, `${homePath}api/OpenXDA/GetEventSearchData`)
GetDynamicEventSearchData({ ...eventRequest, sortKey: query?.SortField, ascending: query?.Ascending ?? true }, `${homePath}api/OpenXDA/${(showMagDur ? 'GetMagDurChartData' : 'GetEventSearchData')}`)
.done((data) => {
localStorage.setItem('SEbrowser.EventSearch.EventIDs', data.map(d => d.EventID).join(','));
}),
[eventRequest]);
[eventRequest, showMagDur]);

// Effect to load the selected event's record directly by ID (e.g. deep-linked from the URL) so selection does not depend on the current filter results
React.useEffect(() => {
Expand Down Expand Up @@ -149,7 +149,7 @@ const EventSearch = () => {

const magDurWidgetView = React.useMemo<EventWidget.IWidgetView>(() => ({
ID: 0,
Name: DynamicMagDurChart.Name,
Name: 'Magnitude Duration Chart',
Type: DynamicMagDurChart.Name,
Setting: JSON.stringify({
...DynamicMagDurChart.DefaultSettings,
Expand All @@ -160,7 +160,7 @@ const EventSearch = () => {

const eventSearchWidgetView = React.useMemo<EventWidget.IWidgetView>(() => ({
ID: 1,
Name: DynamicEventSearch.Name,
Name: 'Eventsearch Results Table',
Type: DynamicEventSearch.Name,
Setting: JSON.stringify({
...DynamicEventSearch.DefaultSettings,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,10 @@ export function BuildDynamicEventSearchRequest(
},
transientMin: characteristics.transientMin ?? 0,
transientMax: characteristics.transientMax ?? 0,
transientType: characteristics.transientType,
sagMin: characteristics.sagMin ?? 0,
sagMax: characteristics.sagMax ?? 0,
sagType: characteristics.sagType,
swellMin: characteristics.swellMin ?? 0,
swellMax: characteristics.swellMax ?? 0,
swellType: characteristics.swellType,
curveID: characteristics.curveID,
curveInside: characteristics.curveInside,
curveOutside: characteristics.curveOutside,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,20 +232,6 @@ const EventSearchNavbar = () => {
</div>
</div>
</div>
<div className="row justify-content-md-center">
<RadioButtons<PQBrowser.IEventCharacteristicFilters>
Record={newEventCharacteristicFilter}
Label=''
Field='sagType'
Setter={handleSetEventCharacteristicFilter}
Options={[
{ Label: 'LL', Value: 'LL' },
{ Label: 'LN', Value: 'LN' },
{ Label: 'Both', Value: 'both' }
]}
Style={{ marginBottom: 0 }}
/>
</div>
</div>
</form>
</div>
Expand Down Expand Up @@ -308,20 +294,6 @@ const EventSearchNavbar = () => {
</div>
</div>
</div>
<div className="row justify-content-md-center">
<RadioButtons<PQBrowser.IEventCharacteristicFilters>
Record={newEventCharacteristicFilter}
Label=''
Field='transientType'
Setter={handleSetEventCharacteristicFilter}
Options={[
{ Label: 'LL', Value: 'LL' },
{ Label: 'LN', Value: 'LN' },
{ Label: 'Both', Value: 'both' }
]}
Style={{ marginBottom: 0 }}
/>
</div>
</div>
</form>
</div>
Expand Down Expand Up @@ -362,20 +334,6 @@ const EventSearchNavbar = () => {
</div>
</div>
</div>
<div className="row justify-content-md-center">
<RadioButtons<PQBrowser.IEventCharacteristicFilters>
Record={newEventCharacteristicFilter}
Label=''
Field='swellType'
Setter={handleSetEventCharacteristicFilter}
Options={[
{ Label: 'LL', Value: 'LL' },
{ Label: 'LN', Value: 'LN' },
{ Label: 'Both', Value: 'both' }
]}
Style={{ marginBottom: 0 }}
/>
</div>
</div>
</form>
</div>
Expand Down
16 changes: 1 addition & 15 deletions PQBrowser/Scripts/TSX/Store/EventSearchSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,6 @@ const initialState: Redux.EventSearchState = {
sagMax: null,
swellMin: null,
swellMax: null,
sagType: 'both',
swellType: 'both',
transientType: 'both',
curveID: 1,
curveInside: true,
curveOutside: true
Expand Down Expand Up @@ -138,10 +135,6 @@ export const EventSearchsSlice = createSlice({
state.EventCharacteristic.swellMax = parseOptionalNumber(action.payload.query['swellMax']);
state.EventCharacteristic.swellMin = parseOptionalNumber(action.payload.query['swellMin']);

state.EventCharacteristic.sagType = (action.payload.query['sagType'] ?? 'both') as ('both' | 'LL' | 'LN');
state.EventCharacteristic.swellType = (action.payload.query['swellType'] ?? 'both') as ('both' | 'LL' | 'LN');
state.EventCharacteristic.transientType = (action.payload.query['transientType'] ?? 'both') as ('both' | 'LL' | 'LN');

state.EventCharacteristic.curveID = parseInt(action.payload.query['curveID']?.toString() ?? '1');
state.EventCharacteristic.curveInside = (action.payload.query['curveInside'] ?? 'true') == 'true';
state.EventCharacteristic.curveOutside = (action.payload.query['curveOutside'] ?? 'true') == 'true';
Expand Down Expand Up @@ -183,7 +176,7 @@ export const EventSearchsSlice = createSlice({
state.EventCharacteristic = {
durationMax: null, durationMin: null,
phases: { AN: true, BN: true, CN: true, AB: true, BC: true, CA: true, ABG: true, BCG: true, ABC: true, ABCG: true },
transientMin: null, transientMax: null, sagMin: null, sagMax: null, swellMin: null, swellMax: null, sagType: 'both', swellType: 'both', transientType: 'both',
transientMin: null, transientMax: null, sagMin: null, sagMax: null, swellMin: null, swellMax: null,
curveID: 1, curveInside: true, curveOutside: true
};

Expand Down Expand Up @@ -329,13 +322,6 @@ export function GenerateQueryParams(
if (event.swellMin != 0)
result['swellMin'] = event.swellMin

if (event.sagType != 'both')
result['sagType'] = event.sagType
if (event.swellType != 'both')
result['swellType'] = event.swellType
if (event.transientType != 'both')
result['transientType'] = event.transientType

if (event.curveID != 1)
result['curveID'] = event.curveID
if (!event.curveInside)
Expand Down
3 changes: 0 additions & 3 deletions PQBrowser/Scripts/TSX/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,10 @@ export namespace PQBrowser {
phases: IPhaseFilters,
transientMin: number | null,
transientMax: number | null,
transientType: ('LL'|'LN'|'both'),
sagMin: number | null,
sagMax: number | null,
sagType: ('LL' | 'LN' | 'both'),
swellMin: number | null,
swellMax: number | null,
swellType: ('LL' | 'LN' | 'both'),
curveID: number,
curveInside: boolean,
curveOutside: boolean
Expand Down
5 changes: 0 additions & 5 deletions PQBrowser/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
using PQBrowser.Security;
using System;
using System.IO;
using System.Text.Json;
namespace PQBrowser;

public class Startup
Expand All @@ -52,9 +51,6 @@ public Startup(IConfiguration configuration, IWebHostEnvironment env)
SetupTempPath();
Configuration = configuration;
Env = env;

using JsonDocument package = JsonDocument.Parse(File.ReadAllText(Path.Combine(env.ContentRootPath, "package.json")));
UIVersion = package.RootElement.GetProperty("version").GetString()!;
}

public static class Policies
Expand All @@ -65,7 +61,6 @@ public static class Policies

public IWebHostEnvironment Env { get; set; }
public IConfiguration Configuration { get; }
public static string UIVersion { get; private set; } = "";

public void ConfigureServices(IServiceCollection services)
{
Expand Down
6 changes: 5 additions & 1 deletion PQBrowser/Views/Home/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
//*******************************************************************************************************@
@using Gemstone.Data
@using Gemstone.Configuration;
@using Gemstone.Reflection
@using Microsoft.AspNetCore.Antiforgery
@using Microsoft.AspNetCore.Authentication.Cookies
@using Microsoft.Extensions.Options
Expand All @@ -40,6 +41,9 @@
@{
Layout = "";

Version assemblyVersionInfo = AssemblyInfo.EntryAssembly.Version;
string applicationVersion = assemblyVersionInfo.Major + "." + assemblyVersionInfo.Minor + "." + assemblyVersionInfo.Build;

try {
using (AdoDataConnection connection = new AdoDataConnection(Settings.Default))
{
Expand Down Expand Up @@ -123,6 +127,6 @@

<script src="@Url.Content("~/js/jquery-3.6.0.min.js")"></script>
<script src="@Url.Content("~/js/moment.min.js")"></script>
<script src="@Url.Content($"~/Scripts/PQBrowser.js?v={PQBrowser.Startup.UIVersion}")"></script>
<script src="@Url.Content($"~/Scripts/PQBrowser.js?v={applicationVersion}")"></script>
</body>
</html>
2 changes: 1 addition & 1 deletion PQBrowser/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "3.1.0",
"version": "3.1.2",
"name": "pqbrowser",
"private": true,
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion Scripts/PQBrowser.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.1.1
3.1.2
Loading