feat(runs,events,ui): identify workflows by immutable UUID (#2125)
This commit is contained in:
46 files changed
+1284
-512
No files matched your search
@@ -43,7 +43,7 @@ interface TaskEntry {
|
||||
|
||||
const pages = computed(() => navEntries(props.hidden));
|
||||
const tasks = ref<TaskEntry[]>([]);
|
||||
const workflows = ref<string[]>([]);
|
||||
const workflows = ref<{ id: string; name: string }[]>([]);
|
||||
const shortcut = navigator.platform.startsWith("Mac") ? "⌘K" : "Ctrl K";
|
||||
const showWorkflows = computed(() => !props.hidden.includes("/workflows"));
|
||||
const showTasks = computed(() => !props.hidden.includes("/tasks"));
|
||||
@@ -63,7 +63,7 @@ async function loadEntries(): Promise<void> {
|
||||
tasksError.value = taskPage === null;
|
||||
tasks.value = taskPage?.tasks ?? [];
|
||||
workflowsError.value = workflowList === null;
|
||||
workflows.value = (workflowList ?? []).map(({ name }) => name);
|
||||
workflows.value = (workflowList ?? []).map(({ id, name }) => ({ id, name }));
|
||||
}
|
||||
|
||||
watch(open, (value) => {
|
||||
@@ -129,12 +129,12 @@ onUnmounted(() => document.removeEventListener("keydown", onGlobalKeydown));
|
||||
</CommandGroup>
|
||||
<CommandGroup v-else-if="workflows.length" heading="Workflows">
|
||||
<CommandItem
|
||||
v-for="id in workflows"
|
||||
:key="id"
|
||||
:value="`workflow:${id}`"
|
||||
@select="go(`/workflows/${encodeURIComponent(id)}`)"
|
||||
v-for="workflow in workflows"
|
||||
:key="workflow.id"
|
||||
:value="`workflow:${workflow.name}`"
|
||||
@select="go(`/workflows/${encodeURIComponent(workflow.id)}`)"
|
||||
>
|
||||
{{ id }}
|
||||
{{ workflow.name }}
|
||||
</CommandItem>
|
||||
</CommandGroup>
|
||||
<CommandGroup v-if="tasksError" heading="Tasks">
|
||||
|
||||
Reference in new issue
Block a user