-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
69 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<template> | ||
<v-container> | ||
<v-card> | ||
<v-card-item> | ||
<v-card-title>Worker #{{ worker.worker_id }}</v-card-title> | ||
<v-card-subtitle>{{ worker.hostname }}</v-card-subtitle> | ||
</v-card-item> | ||
<v-card-text> | ||
Architecture: {{ worker.arch }} | ||
<p></p> | ||
Git commit: {{ worker.git_commit }} | ||
<p></p> | ||
Memory size: {{ worker.memory_bytes }} | ||
<p></p> | ||
Logical cores: {{ worker.logical_cores }} | ||
<p></p> | ||
Last heartbeat time: {{ worker.last_heartbeat_time }} | ||
<p></p> | ||
Running job id: {{ worker.running_job_id }} | ||
<p></p> | ||
Built job count: {{ worker.built_job_count }} | ||
</v-card-text> | ||
</v-card> | ||
</v-container> | ||
</template> | ||
|
||
<script lang="ts" setup> | ||
// | ||
</script> | ||
|
||
<script lang="ts"> | ||
import axios from 'axios'; | ||
import { hostname } from '@/common'; | ||
interface WorkerInfoResponse { | ||
worker_id: number; | ||
hostname: String; | ||
arch: string; | ||
git_commit: string; | ||
memory_bytes: number; | ||
logical_cores: number; | ||
last_heartbeat_time: string; | ||
running_job_id: number; | ||
built_job_count: number; | ||
} | ||
export default { | ||
mounted() { | ||
this.fetchData(); | ||
}, | ||
data: () => ({ | ||
worker: {} as WorkerInfoResponse | ||
}), | ||
methods: { | ||
async fetchData() { | ||
let worker_id = (this.$route.params as { id: string }).id; | ||
this.worker = (await axios.get(hostname + `/api/worker/info?worker_id=${worker_id}`)).data; | ||
} | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters