feat: add modal dialog, paged results, scan status, and trend value table components
- Introduced ModalDialog component for displaying modal dialogs with accessibility features. - Added PagedResults component to handle pagination of items with customizable rendering. - Created ScanStatus component to display the status of a scan with elapsed time. - Implemented TrendValueTable component for displaying trend data in a paginated table format. - Added measurement utility functions for formatting and validating measurement values. - Included tests for measurement functions and trend series fetching logic to ensure correctness.
This commit is contained in:
1 parent
c19c77334f
commit
a8b6cd4061
23 files changed
+1479
-2157
No files matched your search
@@ -109,31 +109,42 @@ namespace SeLtd.Setup
|
||||
return true;
|
||||
}
|
||||
|
||||
internal void Prepare(string folder, Action<string> progress)
|
||||
internal void Prepare(string folder, Action<string> progress, CancellationToken cancellation = default(CancellationToken))
|
||||
{
|
||||
Folder = Path.GetFullPath(folder);
|
||||
Legacy = Remote = false;
|
||||
foreach (var step in Config.prepare)
|
||||
for (int index = 0; index < Config.prepare.Length; index++)
|
||||
{
|
||||
progress(step.label);
|
||||
cancellation.ThrowIfCancellationRequested();
|
||||
var step = Config.prepare[index];
|
||||
progress(StepLabel(step, index, Config.prepare.Length));
|
||||
if (step.action == "checkout") Checkout();
|
||||
else if (step.action == "template") LoadTemplate();
|
||||
else if (step.action == "command") RunStep(step);
|
||||
else throw new InvalidDataException("Unbekannter Vorbereitungsschritt: " + step.action);
|
||||
}
|
||||
cancellation.ThrowIfCancellationRequested();
|
||||
}
|
||||
|
||||
internal void Install(Action<string> progress)
|
||||
internal void Install(Action<string> progress, CancellationToken cancellation = default(CancellationToken))
|
||||
{
|
||||
foreach (var step in Config.install)
|
||||
for (int index = 0; index < Config.install.Length; index++)
|
||||
{
|
||||
progress(step.label);
|
||||
cancellation.ThrowIfCancellationRequested();
|
||||
var step = Config.install[index];
|
||||
progress(StepLabel(step, index, Config.install.Length));
|
||||
if (step.action == "dockerReady") WaitForDocker(TimeoutFor(step, 180), progress);
|
||||
else if (step.action == "writeSetup") WriteSetup();
|
||||
else if (step.action == "command") RunStep(step);
|
||||
else if (step.action == "http") CheckHttp(Expand(step.url), TimeoutFor(step, 45));
|
||||
else throw new InvalidDataException("Unbekannter Installationsschritt: " + step.action);
|
||||
}
|
||||
cancellation.ThrowIfCancellationRequested();
|
||||
}
|
||||
|
||||
private static string StepLabel(Step step, int index, int count)
|
||||
{
|
||||
return string.Format("Schritt {0} von {1}: {2}", index + 1, count, step.label);
|
||||
}
|
||||
|
||||
internal string LocalOrigin
|
||||
|
||||
Reference in new issue
Block a user