forked from tbnobody/OpenDTU
-
-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature: webapp: show hardware UART allocations
- Loading branch information
1 parent
7f62362
commit dbb3421
Showing
9 changed files
with
104 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
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,45 @@ | ||
<template> | ||
<CardElement :text="$t('uartallocations.Allocations')" textVariant="text-bg-primary" table> | ||
<div class="table-responsive"> | ||
<table class="table table-hover table-condensed"> | ||
<thead> | ||
<tr> | ||
<th>{{ $t('uartallocations.Owner') }}</th> | ||
<th>{{ $t('uartallocations.Port') }}</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr v-for="(allocation, idx) in allocations" :key="idx"> | ||
<td> | ||
<template v-if="allocation.owner.length === 0">{{ $t('uartallocations.Free') }}</template> | ||
<template v-else>{{ allocation.owner }}</template> | ||
</td> | ||
<td> | ||
<span v-if="allocation.port >= 0" class="badge text-bg-success"> | ||
UART {{ allocation.port }} | ||
</span> | ||
<span v-else class="badge text-bg-danger"> | ||
{{ $t('uartallocations.Rejected') }} | ||
</span> | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
</CardElement> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import CardElement from '@/components/CardElement.vue'; | ||
import type { UartAllocation } from '@/types/SystemStatus'; | ||
import { defineComponent, type PropType } from 'vue'; | ||
export default defineComponent({ | ||
components: { | ||
CardElement, | ||
}, | ||
props: { | ||
allocations: { type: Object as PropType<UartAllocation[]>, required: true }, | ||
}, | ||
}); | ||
</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
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