This commit is contained in:
2020-07-29 19:35:37 +00:00
parent 18c1a98cbb
commit e0ba70eb1d
3 changed files with 33 additions and 21 deletions

View File

@@ -15,7 +15,6 @@ ____________
##########################
todo: ops backup file list not in order by date, seems to be random or something, I want newest at top oldest at bottom
todo: any use of simple-table sb turned into data-table see how it's done in ops-notify-queue, pretty straightforward and you get responsiveness and sorting built in
todo: go over server logging and rethink it a bit, levels maybe need adjusting, more debug and less trace
need an intermediate mode where users can set it for diagnosing issues

View File

@@ -72,6 +72,8 @@
:disable-pagination="true"
:disable-filtering="true"
hide-default-footer
:sort-by="['created']"
:sort-desc="[true]"
>
<template v-slot:item.actions="{ item }">
<v-btn icon :href="item.url">

View File

@@ -2,28 +2,27 @@
<v-row v-if="this.formState.ready">
<gz-error :errorBoxMessage="formState.errorBoxMessage"></gz-error>
<v-col cols="12">
<v-btn @click="getDataFromApi">
<v-btn @click="getDataFromApi" class="mb-6">
<v-icon>fa-sync</v-icon>
</v-btn>
<v-simple-table>
<template v-slot:default>
<thead>
<tr>
<th class="text-left">{{ $ay.t("TimeStamp") }}</th>
<th class="text-left">{{ $ay.t("ID") }}</th>
<th class="text-left">{{ $ay.t("Status") }}</th>
</tr>
</thead>
<tbody>
<tr v-for="item in obj" :key="item.id">
<td>{{ item.created }}</td>
<td>{{ item.jobId }}</td>
<td>{{ item.status }}</td>
</tr>
</tbody>
</template>
</v-simple-table>
<!-- </v-col> -->
<v-data-table
:headers="headers"
:items="obj"
class="elevation-1"
:disable-pagination="true"
:disable-filtering="true"
hide-default-footer
:sort-by="['created']"
:sort-desc="[true]"
>
<template v-slot:item.actions="{ item }">
<v-btn icon :href="item.url">
<v-icon small class="mr-2">
fa-file-download
</v-icon>
</v-btn>
</template></v-data-table
>
</v-col>
</v-row>
</template>
@@ -237,6 +236,7 @@ function clickHandler(menuItem) {
//
async function initForm(vm) {
await fetchTranslatedText(vm);
await createTableHeaders(vm);
}
//////////////////////////////////////////////////////////
@@ -251,4 +251,15 @@ async function fetchTranslatedText(vm) {
"Status"
]);
}
//////////////////////
//
//
async function createTableHeaders(vm) {
vm.headers = [
{ text: vm.$ay.t("TimeStamp"), value: "created" },
{ text: vm.$ay.t("Status"), value: "status" },
{ text: vm.$ay.t("ID"), value: "jobId" }
];
}
</script>