-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
56c59e2
commit 1c43ec5
Showing
6 changed files
with
113 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
@using aoww.Services | ||
@inject GraphqlClient GraphqlClient | ||
@inject NavigationManager NavigationManager | ||
|
||
<MudPaper Elevation="2" Class="pa-4"> | ||
<MudText Typo="Typo.h6">Actions</MudText> | ||
<MudText>List of common actions for this process:</MudText> | ||
|
||
@if (actions == null) | ||
{ | ||
<MudProgressCircular Color="Color.Default" Indeterminate="true" /> | ||
} | ||
else if (actions.Count == 0) | ||
{ | ||
<MudText>No actions found.</MudText> | ||
} | ||
else | ||
{ | ||
<MudList T="string"> | ||
@foreach (var action in actions) | ||
{ | ||
<MudListItem OnClick="@(() => NavigateToActionBuilder(action.Name))"> | ||
@action.Name | ||
</MudListItem> | ||
} | ||
</MudList> | ||
} | ||
</MudPaper> | ||
|
||
@code { | ||
[Parameter] | ||
public required string ProcessId { get; set; } | ||
|
||
private List<AoActionInfo>? actions; | ||
|
||
protected override async Task OnParametersSetAsync() | ||
{ | ||
actions = null; | ||
actions = await GraphqlClient.GetActionsForProcess(ProcessId); | ||
StateHasChanged(); | ||
} | ||
|
||
private void NavigateToActionBuilder(string? actionName = null) | ||
{ | ||
string? action = actionName; | ||
if (!string.IsNullOrEmpty(action)) | ||
{ | ||
NavigationManager.NavigateTo($"/action-builder?processId={ProcessId}&actionName={Uri.EscapeDataString(action)}"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
@using ArweaveAO.Models | ||
@inject AODataClient aoDataClient | ||
|
||
<MudPaper Class="pa-4"> | ||
<MudText Typo="Typo.h6">Handlers</MudText> | ||
@if (handlers == null) | ||
{ | ||
<MudProgressCircular Color="Color.Default" Indeterminate="true" /> | ||
} | ||
else if (handlers.Count == 0) | ||
{ | ||
<MudText>No handlers found.</MudText> | ||
} | ||
else | ||
{ | ||
<MudList T="string"> | ||
@foreach (var handler in handlers) | ||
{ | ||
<MudListItem>@handler</MudListItem> | ||
} | ||
</MudList> | ||
} | ||
</MudPaper> | ||
|
||
@code { | ||
[Parameter] | ||
public required string ProcessId { get; set; } | ||
|
||
[Parameter] | ||
public required string OwnerId { get; set; } | ||
|
||
private List<string>? handlers; | ||
|
||
protected override async Task OnParametersSetAsync() | ||
{ | ||
handlers = null; | ||
handlers = await aoDataClient.GetHandlers(ProcessId, OwnerId); | ||
StateHasChanged(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters