diff --git a/src/dashboard/Synapse.Dashboard/Components/DocumentDetails/Store.cs b/src/dashboard/Synapse.Dashboard/Components/DocumentDetails/Store.cs
index 4c9ebd52f..7c851094d 100644
--- a/src/dashboard/Synapse.Dashboard/Components/DocumentDetails/Store.cs
+++ b/src/dashboard/Synapse.Dashboard/Components/DocumentDetails/Store.cs
@@ -372,7 +372,7 @@ public async Task OnCopyToClipboard()
try
{
await this.JSRuntime.InvokeVoidAsync("navigator.clipboard.writeText", text);
- this.ToastService.Notify(new(ToastType.Success, "Definition copied to the clipboard!"));
+ this.ToastService.Notify(new(ToastType.Success, "Copied to the clipboard!"));
}
catch (Exception ex)
{
diff --git a/src/dashboard/Synapse.Dashboard/Components/MonacoEditor/Store.cs b/src/dashboard/Synapse.Dashboard/Components/MonacoEditor/Store.cs
index 306c234cf..d9af967b3 100644
--- a/src/dashboard/Synapse.Dashboard/Components/MonacoEditor/Store.cs
+++ b/src/dashboard/Synapse.Dashboard/Components/MonacoEditor/Store.cs
@@ -290,7 +290,7 @@ public async Task OnCopyToClipboard()
try
{
await this.JSRuntime.InvokeVoidAsync("navigator.clipboard.writeText", text);
- this.ToastService.Notify(new(ToastType.Success, "Definition copied to the clipboard!"));
+ this.ToastService.Notify(new(ToastType.Success, "Copied to the clipboard!"));
}
catch (Exception ex)
{
diff --git a/src/dashboard/Synapse.Dashboard/Components/ResourceEditor/ResourceEditor.razor b/src/dashboard/Synapse.Dashboard/Components/ResourceEditor/ResourceEditor.razor
index b2b5566c6..ddaf0ec71 100644
--- a/src/dashboard/Synapse.Dashboard/Components/ResourceEditor/ResourceEditor.razor
+++ b/src/dashboard/Synapse.Dashboard/Components/ResourceEditor/ResourceEditor.razor
@@ -256,7 +256,7 @@
try
{
await this.JSRuntime.InvokeVoidAsync("navigator.clipboard.writeText", text);
- this.ToastService.Notify(new(ToastType.Success, "Definition copied to the clipboard!"));
+ this.ToastService.Notify(new(ToastType.Success, "Copied to the clipboard!"));
}
catch (Exception ex)
{
diff --git a/src/dashboard/Synapse.Dashboard/Components/WorkflowInstanceCreation/WorkflowInstanceCreation.razor b/src/dashboard/Synapse.Dashboard/Components/WorkflowInstanceCreation/WorkflowInstanceCreation.razor
index 109f4b97e..441b77bbb 100644
--- a/src/dashboard/Synapse.Dashboard/Components/WorkflowInstanceCreation/WorkflowInstanceCreation.razor
+++ b/src/dashboard/Synapse.Dashboard/Components/WorkflowInstanceCreation/WorkflowInstanceCreation.razor
@@ -19,7 +19,7 @@
@inject MonacoInterop MonacoInterop
@inject IJsonSerializer Serializer
-
+
break;
+ case "Replay":
+
+ break;
case "Delete":
break;
@@ -204,6 +207,7 @@
[Parameter] public EventCallback OnShowDetails { get; set; }
[Parameter] public EventCallback OnToggleSelected { get; set; }
[Parameter] public EventCallback OnDelete { get; set; }
+ [Parameter] public EventCallback OnReplay { get; set; }
[Parameter] public EventCallback OnDeleteSelected { get; set; }
IEnumerable knownColumns = [
@@ -217,6 +221,7 @@
"Duration",
"Operator",
"Actions",
+ "Replay",
"Delete"
];
@@ -391,7 +396,7 @@
}
///
- /// Handles the clikc on the delete button
+ /// Handles the click on the delete button
///
///
///
@@ -402,4 +407,17 @@
await this.OnDelete.InvokeAsync(instance);
}
}
+
+ ///
+ /// Handles the click on the replay button
+ ///
+ ///
+ ///
+ protected async Task OnReplayClickedAsync(WorkflowInstance instance)
+ {
+ if (this.OnReplay.HasDelegate)
+ {
+ await this.OnReplay.InvokeAsync(instance);
+ }
+ }
}
\ No newline at end of file
diff --git a/src/dashboard/Synapse.Dashboard/Pages/Functions/Create/Store.cs b/src/dashboard/Synapse.Dashboard/Pages/Functions/Create/Store.cs
index c376a6fe2..7f77639c6 100644
--- a/src/dashboard/Synapse.Dashboard/Pages/Functions/Create/Store.cs
+++ b/src/dashboard/Synapse.Dashboard/Pages/Functions/Create/Store.cs
@@ -334,9 +334,10 @@ async Task SetTextEditorValueAsync()
{
return;
}
- await this.TextEditor.SetValue(document);
try
{
+ await this.TextEditor.SetValue(document);
+ await Task.Delay(10);
await this.TextEditor.Trigger("", "editor.action.formatDocument");
}
catch (Exception ex)
diff --git a/src/dashboard/Synapse.Dashboard/Pages/Workflows/Create/Store.cs b/src/dashboard/Synapse.Dashboard/Pages/Workflows/Create/Store.cs
index 9ce8fc9ea..6d7cf7507 100644
--- a/src/dashboard/Synapse.Dashboard/Pages/Workflows/Create/Store.cs
+++ b/src/dashboard/Synapse.Dashboard/Pages/Workflows/Create/Store.cs
@@ -338,9 +338,10 @@ async Task SetTextEditorValueAsync()
{
return;
}
- await this.TextEditor.SetValue(document);
try
{
+ await this.TextEditor.SetValue(document);
+ await Task.Delay(10);
await this.TextEditor.Trigger("", "editor.action.formatDocument");
}
catch (Exception ex)
@@ -357,6 +358,7 @@ async Task SetTextEditorValueAsync()
public async Task OnDidChangeModelContent(ModelContentChangedEvent e)
{
if (this.TextEditor == null) return;
+
var document = await this.TextEditor.GetValue();
this.Reduce(state => state with
{
diff --git a/src/dashboard/Synapse.Dashboard/Pages/Workflows/Details/Store.cs b/src/dashboard/Synapse.Dashboard/Pages/Workflows/Details/Store.cs
index fa1c1952c..8bff87e2a 100644
--- a/src/dashboard/Synapse.Dashboard/Pages/Workflows/Details/Store.cs
+++ b/src/dashboard/Synapse.Dashboard/Pages/Workflows/Details/Store.cs
@@ -309,7 +309,7 @@ public async Task OnCopyToClipboard()
try
{
await this.JSRuntime.InvokeVoidAsync("navigator.clipboard.writeText", text);
- this.ToastService.Notify(new(ToastType.Success, "Definition copied to the clipboard!"));
+ this.ToastService.Notify(new(ToastType.Success, "Copied to the clipboard!"));
}
catch (Exception ex)
{
@@ -322,13 +322,14 @@ public async Task OnCopyToClipboard()
/// Displays the modal used to provide the new workflow input
///
/// A awaitable task
- public async Task OnShowCreateInstanceAsync(WorkflowDefinition workflowDefinition)
+ public async Task OnShowCreateInstanceAsync(WorkflowDefinition workflowDefinition, EquatableDictionary? input = null)
{
if (this.Modal != null)
{
var parameters = new Dictionary
{
{ nameof(WorkflowInstanceCreation.WorkflowDefinition), workflowDefinition },
+ { nameof(WorkflowInstanceCreation.Input), input! },
{ nameof(WorkflowInstanceCreation.OnCreate), EventCallback.Factory.Create(this, CreateInstanceAsync) }
};
await this.Modal.ShowAsync(title: "Start a new worklfow", parameters: parameters);
diff --git a/src/dashboard/Synapse.Dashboard/Pages/Workflows/Details/View.razor b/src/dashboard/Synapse.Dashboard/Pages/Workflows/Details/View.razor
index bcdf324b5..90d274868 100644
--- a/src/dashboard/Synapse.Dashboard/Pages/Workflows/Details/View.razor
+++ b/src/dashboard/Synapse.Dashboard/Pages/Workflows/Details/View.razor
@@ -37,6 +37,7 @@
OnSearchInput="Store.SetSearchTerm"
OnShowDetails="OnShowInstanceDetails"
OnDelete="OnDeleteWorkflowInstanceAsync"
+ OnReplay="async instance => await Store.OnShowCreateInstanceAsync(workflowDefinition, instance.Spec?.Input)"
OnToggleSelected="Store.ToggleResourceSelection"
OnDeleteSelected="OnDeleteSelectedResourcesAsync" />