feat(ui/events,settings): give the event, source, trigger, model, credential and extension lists the original layout (#2023)
Tables use fixed column widths and the ghost add button. The models page keeps the aliases section with one inline row per alias.
This commit is contained in:
7 files changed
+134
-168
No files matched your search
@@ -21,13 +21,13 @@ export interface WorkflowRow {
|
||||
const time = (at?: string) => (at ? Date.parse(at) : 0);
|
||||
|
||||
/** "24h0m0s" as the server prints a Go duration, "24h" as a person reads it. */
|
||||
function every(duration: string): string {
|
||||
export function interval(duration: string): string {
|
||||
return duration.replace(/(?<=\D)0s$/, "").replace(/(?<=\D)0m$/, "");
|
||||
}
|
||||
|
||||
/** How a trigger starts its workflow, in words. */
|
||||
export function startedBy(trigger: Trigger): string {
|
||||
return trigger.every ? `Every ${every(trigger.every)}` : `${trigger.source} ${trigger.event_type}`;
|
||||
return trigger.every ? `Every ${interval(trigger.every)}` : `${trigger.source} ${trigger.event_type}`;
|
||||
}
|
||||
|
||||
/** Running workflows first, then by how recently they ran, then by name. */
|
||||
|
||||
Reference in new issue
Block a user