Skip to content

Commit a988330

Browse files
committed
fix(Dashboard): fixed correlation navigation to their outcome
Signed-off-by: Jean-Baptiste Bianchi <[email protected]>
1 parent 8572bde commit a988330

File tree

20 files changed

+244
-55
lines changed

20 files changed

+244
-55
lines changed

src/api/Synapse.Api.Server/Program.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@
144144
{
145145
app.MapFallbackToFile("index.html");
146146
app.MapFallbackToFile("/workflows/details/{namespace}/{name}/{version?}/{instanceName?}", "index.html");
147+
app.MapFallbackToFile("/workflow-intances/{instanceName?}", "index.html");
147148
}
148149

149150
await app.RunAsync();

src/dashboard/Synapse.Dashboard/App.razor

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
1-
@implements IDisposable
1+
@*
2+
Copyright © 2024-Present The Synapse Authors
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*@
16+
17+
@implements IDisposable
218
@inject IApplicationLayout Layout
319

420
<CascadingAuthenticationState>

src/dashboard/Synapse.Dashboard/Components/ResourceEditor/ResourceEditor.razor

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
1-
@namespace Synapse.Dashboard.Components
1+
@*
2+
Copyright © 2024-Present The Synapse Authors
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*@
16+
17+
@namespace Synapse.Dashboard.Components
218
@using Synapse.Dashboard.Components.ResourceEditorStateManagement
319
@typeparam TResource where TResource : Resource, new()
420
@inherits StatefulComponent<ResourceEditor<TResource>, ResourceEditorStore<TResource>, ResourceEditorState<TResource>>

src/dashboard/Synapse.Dashboard/Components/ResourceManagement/NamespacedResourceManagementComponentStore.cs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,10 @@ public void SetNamespace(string? @namespace)
6969
/// <returns>A new awaitable <see cref="Task"/></returns>
7070
public virtual async Task ListNamespaceAsync()
7171
{
72-
this.Reduce(state => state with
73-
{
74-
Loading = true
75-
});
76-
var namespaceList = new EquatableList<Namespace>(await (await this.ApiClient.Namespaces.ListAsync().ConfigureAwait(false)).ToListAsync().ConfigureAwait(false));
72+
var namespaceList = new EquatableList<Namespace>(await (await this.ApiClient.Namespaces.ListAsync().ConfigureAwait(false)).OrderBy(ns => ns.GetQualifiedName()).ToListAsync().ConfigureAwait(false));
7773
this.Reduce(s => s with
7874
{
79-
Namespaces = namespaceList,
80-
Loading = false
75+
Namespaces = namespaceList
8176
});
8277
}
8378

src/dashboard/Synapse.Dashboard/Components/ResourceManagement/ResourceManagementComponentStoreBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ public override async Task InitializeAsync()
133133
onCompletedAsync: () => Task.CompletedTask,
134134
cancellationToken: this.CancellationTokenSource.Token
135135
);
136-
this.Filter.Throttle(TimeSpan.FromMilliseconds(100)).SubscribeAsync(
136+
this.Filter.Throttle(TimeSpan.FromMilliseconds(10)).SubscribeAsync(
137137
onNextAsync: this.ListResourcesAsync,
138138
onErrorAsync: ex => Task.Run(() => Console.WriteLine(ex)),
139139
onCompletedAsync: () => Task.CompletedTask,

src/dashboard/Synapse.Dashboard/Components/WorkflowDetails/WorkflowDetails.razor

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
1-
@namespace Synapse.Dashboard.Components
1+
@*
2+
Copyright © 2024-Present The Synapse Authors
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*@
16+
17+
@namespace Synapse.Dashboard.Components
218

319
<WorkflowDiagram WorkflowDefinition="Workflow.Spec.Versions.GetLatest()" Orientation="WorkflowDiagramOrientation.TopToBottom" />
420

src/dashboard/Synapse.Dashboard/Components/WorkflowInstancesList/WorkflowInstancesList.razor

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
@Title
2626
<span>@(WorkflowInstances?.Count() ?? 0) items</span>
2727
<div class="d-flex">
28-
@if (Workflows != null && Workflows.Count() > 1) {
28+
@if (Workflows != null && Workflows.Count() > 0) {
2929
<select class="form-select m-2" @onchange="OnSelectWorkflowChangedAsync">
3030
<option value="">All workflows</option>
3131
@foreach (var workflowResource in Workflows)
@@ -150,7 +150,7 @@
150150
</div>
151151
break;
152152
case "Delete":
153-
<a class="dropdown-item text-danger" href="#" @onclick="async _ => await OnDeleteClickedAsync(instance)" @onclick:preventDefault="true" @onclick:stopPropagation="true"><Icon Name="IconName.Trash" /></a>
153+
<a class="dropdown-item text-danger" href="#" @onclick="async _ => await OnDeleteClickedAsync(instance)" @onclick:stopPropagation="true"><Icon Name="IconName.Trash" /></a>
154154
break;
155155
default:
156156
break;

src/dashboard/Synapse.Dashboard/Pages/Authentication/Bearer/Login.razor

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
1-
@page "/authentication/bearer/login"
1+
@*
2+
Copyright © 2024-Present The Synapse Authors
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*@
16+
17+
@page "/authentication/bearer/login"
218
@layout EmptyLayout
319
@inject ISecurityTokenManager SecurityTokenManager
420
@inject IJSRuntime JsRuntime

src/dashboard/Synapse.Dashboard/Pages/Authentication/Oidc/Oidc.razor

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
1-
@page "/authentication/oidc/{action}"
1+
@*
2+
Copyright © 2024-Present The Synapse Authors
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*@
16+
17+
@page "/authentication/oidc/{action}"
218
@layout EmptyLayout
319

420
<RemoteAuthenticatorView Action="@Action" />

src/dashboard/Synapse.Dashboard/Pages/Authentication/View.razor

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
1-
@page "/authentication"
1+
@*
2+
Copyright © 2024-Present The Synapse Authors
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*@
16+
17+
@page "/authentication"
218
@inject IOptions<ApplicationOptions> Options
319

420
<ApplicationTitle>Authentication</ApplicationTitle>

0 commit comments

Comments
 (0)