forked from tbnobody/OpenDTU
-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature: show task details in system info view
shows whether or not known tasks are alive, and in particular shows how much of the respective stack is still available.
- Loading branch information
1 parent
f760520
commit c483347
Showing
6 changed files
with
102 additions
and
0 deletions.
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
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,40 @@ | ||
<template> | ||
<CardElement :text="$t('taskdetails.TaskDetails')" textVariant="text-bg-primary"> | ||
<div class="table-responsive"> | ||
<table class="table table-hover table-condensed"> | ||
<tbody> | ||
<tr> | ||
<th>{{ $t('taskdetails.Name') }}</th> | ||
<th>{{ $t('taskdetails.StackFree') }}</th> | ||
<th>{{ $t('taskdetails.Priority') }}</th> | ||
</tr> | ||
<tr v-for="task in taskDetails" v-bind:key="task.name"> | ||
<td>{{ $te(taskLangToken(task.name)) ? $t(taskLangToken(task.name)) : task.name }}</td> | ||
<td>{{ $n(task.stack_watermark, 'byte') }}</td> | ||
<td>{{ task.priority }}</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
</CardElement> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import CardElement from '@/components/CardElement.vue'; | ||
import type { TaskDetail } from '@/types/SystemStatus'; | ||
import { defineComponent, type PropType } from 'vue'; | ||
export default defineComponent({ | ||
components: { | ||
CardElement, | ||
}, | ||
props: { | ||
taskDetails: { type: Array as PropType<TaskDetail[]>, required: true }, | ||
}, | ||
methods: { | ||
taskLangToken(rawTask: string) { | ||
return 'taskdetails.Task_' + rawTask.replace(/[^A-Za-z0-9]/g, '').toLowerCase(); | ||
}, | ||
}, | ||
}); | ||
</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
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
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
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