diff --git a/dashboard/src/components/StateLED.vue b/dashboard/src/components/StateLED.vue new file mode 100644 index 000000000..c2eae3172 --- /dev/null +++ b/dashboard/src/components/StateLED.vue @@ -0,0 +1,27 @@ + + + + + diff --git a/dashboard/src/style.css b/dashboard/src/style.css index 415f9c146..bf0dfad13 100644 --- a/dashboard/src/style.css +++ b/dashboard/src/style.css @@ -83,12 +83,6 @@ footer > .p { margin: 4px; } - -/* TODO use pankow has-error everywhere instead*/ -.text-danger { - color: var(--pankow-color-danger); -} - .content { max-width: 1280px; width: 100%; @@ -148,22 +142,22 @@ tr:hover .table-actions { /* status classes for circle indicators */ .status-active { - color: #27CE65; + color: #27CE65; } .status-inactive { - color: #7c7c7c; + color: #7c7c7c; } .status-starting { - color: #f0ad4e; + color: #f0ad4e; } .status-error { - color: #ec534f; + color: #ec534f; } -/* generic test modifiers */ +/* generic text modifiers */ .text-success { color: #5CB85C; } @@ -172,6 +166,10 @@ tr:hover .table-actions { color: #8a6d3b; } +.text-danger { + color: var(--pankow-color-danger); +} + .text-bold { font-weight: bold; } diff --git a/dashboard/src/views/BackupsView.vue b/dashboard/src/views/BackupsView.vue index abdf465ab..eb071c285 100644 --- a/dashboard/src/views/BackupsView.vue +++ b/dashboard/src/views/BackupsView.vue @@ -4,6 +4,7 @@ import { ref, onMounted, useTemplateRef } from 'vue'; import { marked } from 'marked'; import { Button } from 'pankow'; import Section from '../components/Section.vue'; +import StateLED from '../components/StateLED.vue'; import BackupDialog from '../components/BackupDialog.vue'; import BackupSchedule from '../components/BackupSchedule.vue'; import BackupList from '../components/BackupList.vue'; @@ -87,7 +88,7 @@ onMounted(async () => {
{{ editError }}
@@ -183,19 +200,7 @@ onMounted(async () => {{{ $t('support.remoteSupport.description') }}
{{ $t('support.remoteSupport.warning') }} diff --git a/dashboard/src/views/VolumesView.vue b/dashboard/src/views/VolumesView.vue index 5ed671648..272a5b52d 100644 --- a/dashboard/src/views/VolumesView.vue +++ b/dashboard/src/views/VolumesView.vue @@ -7,6 +7,7 @@ const t = i18n.t; import { computed, ref, useTemplateRef, onMounted } from 'vue'; import { Button, ButtonGroup, Checkbox, Dialog, Dropdown, FormGroup, InputDialog, NumberInput, PasswordInput, TableView, TextInput } from 'pankow'; import Section from '../components/Section.vue'; +import StateLED from '../components/StateLED.vue'; import VolumesModel from '../models/VolumesModel.js'; const volumesModel = VolumesModel.create(); @@ -86,14 +87,16 @@ async function refresh() { const [error, result] = await volumesModel.list(); if (error) return console.error(error); + result.forEach(v => { v.busy = true; }); volumes.value = result; busy.value = false; for (const v of volumes.value) { const status = await volumesModel.getStatus(v.id); - v.state = status.state; + v.state = status.state === 'inactive' ? 'danger' : (status.state === 'active' ? 'success' : ''); v.message = status.message; + v.busy = false; } }; @@ -285,8 +288,8 @@ onMounted(async () =>{ {{ (volume.mountType === 'mountpoint' || volume.mountType === 'filesystem') ? volume.hostPath : (volume.mountOptions.host || volume.mountOptions.diskPath || volume.hostPath) + (volume.mountOptions.remoteDir || '') }} -