Skip to content

Commit ae365a1

Browse files
committed
WIP show queued pipeline jobs
1 parent b9ce509 commit ae365a1

File tree

1 file changed

+24
-5
lines changed
  • client/platform/desktop/frontend/components

1 file changed

+24
-5
lines changed

client/platform/desktop/frontend/components/Jobs.vue

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,20 @@
11
<script lang="ts">
22
import { shell } from 'electron';
33
import moment, { utc } from 'moment';
4-
import { defineComponent, ref, onBeforeUnmount } from 'vue';
4+
import {
5+
defineComponent,
6+
ref,
7+
onBeforeUnmount,
8+
watch,
9+
} from 'vue';
510
6-
import { DesktopJob } from 'platform/desktop/constants';
11+
import {
12+
DesktopJob,
13+
isRunPipeline,
14+
RunPipeline,
15+
// isRunTraining,
16+
RunTraining,
17+
} from 'platform/desktop/constants';
718
819
import BrowserLink from './BrowserLink.vue';
920
import NavigationBar from './NavigationBar.vue';
@@ -37,11 +48,19 @@ export default defineComponent({
3748
if (job.workingDir) shell.openPath(job.workingDir);
3849
}
3950
51+
let queuedPipelineJobs: (RunPipeline | RunTraining)[] = [];
52+
function updatePendingJobs() {
53+
queuedPipelineJobs = gpuJobQueue.jobSpecs.filter((spec) => isRunPipeline(spec));
54+
}
55+
56+
watch(recentHistory, updatePendingJobs);
57+
4058
return {
4159
clockDriver,
4260
datasets,
4361
recentHistory,
4462
gpuJobQueue,
63+
queuedPipelineJobs,
4564
moment,
4665
utc,
4766
visibleOutput,
@@ -238,10 +257,10 @@ export default defineComponent({
238257
Upcoming Jobs ({{ gpuJobQueue.length() }})
239258
</h1>
240259
<v-card
241-
v-for="jobSpec in gpuJobQueue.jobSpecs"
242-
:key="jobSpec.datasetId?"
260+
v-for="jobSpec in queuedPipelineJobs"
261+
:key="jobSpec.datasetId"
243262
>
244-
{{ jobSpec.datasetId? }}
263+
{{ jobSpec.datasetId }}
245264
</v-card>
246265
</v-col>
247266
</v-row>

0 commit comments

Comments
 (0)