Skip to content

Commit

Permalink
fix: add tab for shell
Browse files Browse the repository at this point in the history
- tentative name not actuall webshell
  • Loading branch information
18alantom committed Oct 17, 2024
1 parent 98ebd45 commit 01a2ac6
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
15 changes: 14 additions & 1 deletion dashboard/src2/objects/bench.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Tooltip from 'frappe-ui/src/components/Tooltip/Tooltip.vue';
import LucideAppWindow from '~icons/lucide/app-window';
import LucideTerminal from '~icons/lucide/terminal';
import type { VNode } from 'vue';
import { defineAsyncComponent, h } from 'vue';
import { getTeam, switchToTeam } from '../data/team';
Expand Down Expand Up @@ -84,7 +85,8 @@ function getTabs() {
getJobsTab('Bench'),
getProcessesTab(),
getLogsTab(false),
getPatchesTab(true)
getPatchesTab(true),
getShellTab()
] satisfies Tab[] as Tab[];
}

Expand Down Expand Up @@ -307,6 +309,17 @@ export function getProcessesTab() {
} satisfies Tab as Tab;
}

function getShellTab() {
return {
label: 'Shell',
icon: icon(LucideTerminal),
route: 'shell',
type: 'Component',
component: defineAsyncComponent(() => import('../pages/BenchShell.vue')),
props: bench => ({ bench: bench.name })
} satisfies Tab as Tab;
}

export function getProcessesColumns() {
const processStatusColorMap = {
Starting: 'blue',
Expand Down
12 changes: 12 additions & 0 deletions dashboard/src2/pages/BenchShell.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<template>
<div>
{{ message }}
{{ props }}
</div>
</template>
<script setup lang="ts">
import { ref } from 'vue';
const props = defineProps({ bench: String });
const message = ref('still to be built');
</script>

0 comments on commit 01a2ac6

Please sign in to comment.