mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-04-28 15:39:46 +00:00
Added a process component to visualize processes
This commit is contained in:
parent
397b4e48de
commit
a78a2ea1fe
@ -0,0 +1,11 @@
|
|||||||
|
@typeparam T
|
||||||
|
|
||||||
|
@if (this.ShowProgressAnimation)
|
||||||
|
{
|
||||||
|
<div class="pa-1">
|
||||||
|
<MudProgressLinear Color="Color.Primary" Indeterminate="true"/>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
<div class="pa-6">
|
||||||
|
<MudSlider T="int" Disabled="@true" Value="@this.StepValue" Min="@this.process.Min" Max="@this.process.Max" TickMarks="@true" Size="Size.Large" Variant="Variant.Filled" TickMarkLabels="@this.process.Labels" Class="mb-12"/>
|
||||||
|
</div>
|
@ -0,0 +1,16 @@
|
|||||||
|
using AIStudio.Tools;
|
||||||
|
|
||||||
|
using Microsoft.AspNetCore.Components;
|
||||||
|
|
||||||
|
namespace AIStudio.Components.Blocks;
|
||||||
|
|
||||||
|
public partial class ProcessComponent<T> : ComponentBase where T : struct, Enum
|
||||||
|
{
|
||||||
|
[Parameter]
|
||||||
|
public bool ShowProgressAnimation { get; set; }
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public ProcessStepValue StepValue { get; set; }
|
||||||
|
|
||||||
|
private readonly Process<T> process = Process<T>.INSTANCE;
|
||||||
|
}
|
@ -11,12 +11,7 @@
|
|||||||
</MudStack>
|
</MudStack>
|
||||||
@if (this.AgentIsRunning)
|
@if (this.AgentIsRunning)
|
||||||
{
|
{
|
||||||
<div class="pa-1">
|
<ProcessComponent T="ReadWebContentSteps" StepValue="@this.processStep" ShowProgressAnimation="@true"/>
|
||||||
<MudProgressLinear Color="Color.Primary" Indeterminate="true" Class=""/>
|
|
||||||
</div>
|
|
||||||
<div class="pa-6">
|
|
||||||
<MudSlider T="int" Disabled="@true" Value="@this.processStep" Min="@this.process.Min" Max="@this.process.Max" TickMarks="@true" Size="Size.Large" Variant="Variant.Filled" TickMarkLabels="@this.process.Labels" Class="mb-12"/>
|
|
||||||
</div>
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</MudPaper>
|
</MudPaper>
|
Loading…
Reference in New Issue
Block a user