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 16, 2024
1 parent b28fe1e commit d3f02fe
Show file tree
Hide file tree
Showing 2 changed files with 38 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
24 changes: 24 additions & 0 deletions dashboard/src2/pages/BenchShell.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<template>
<div>
{{ message }}
{{ props }}
<!-- <ObjectList class="mt-3" :options="listOptions" />
<Dialog
v-model="showAppVersionDialog"
:options="{
title: `Apps in ${$releaseGroup.getAppVersions.params?.args.bench}`,
size: '6xl'
}"
>
<template #body-content>
<ObjectList :options="appVersionOptions" />
</template>
</Dialog> -->
</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 d3f02fe

Please sign in to comment.