Skip to content

Commit

Permalink
update the layout of RunsView.vue
Browse files Browse the repository at this point in the history
  • Loading branch information
TaiSakuma committed Sep 8, 2023
1 parent 930a5d4 commit 93fbc8a
Showing 1 changed file with 35 additions and 73 deletions.
108 changes: 35 additions & 73 deletions src/views/db/RunsView.vue
Original file line number Diff line number Diff line change
@@ -1,53 +1,41 @@
<template>
<div class="g-container">
<v-card
flat
class="overflow-auto"
rounded="lg"
max-width="1200"
style="height: min-content"
<div class="pt-5 px-5 pb-16" style="max-width: 960px; margin: auto">
<v-data-table
:headers="headers"
:items="nodes"
item-key="runNo"
:items-per-page="10"
:hide-default-footer="false"
:sort-by="sortBy"
:sort-desc="true"
@click:row="onClickRow"
>
<v-card-text>
<v-data-table
:headers="headers"
:items="nodes"
item-key="runNo"
:items-per-page="10"
:hide-default-footer="false"
:sort-by="sortBy"
:sort-desc="true"
@click:row="onClickRow"
<template v-slot:item.runNo="{ item }">
<span class="font-weight-bold primary--text">
{{ item.selectable.runNo }}
</span>
</template>
<template v-slot:item.state="{ item }">
<v-chip
:color="stateChipColor[item.selectable.state]"
class="text-capitalize"
>
<template v-slot:item.runNo="{ item }">
<span class="font-weight-bold primary--text">
{{ item.selectable.runNo }}
</span>
</template>
<template v-slot:item.state="{ item }">
<v-chip
:color="stateChipColor[item.selectable.state]"
class="text-capitalize"
>
{{ item.selectable.state }}
</v-chip>
</template>
<template v-slot:item.startedAt="{ item }">
{{ formatDateTime(item.selectable.startedAt) }}
</template>
<template v-slot:item.endedAt="{ item }">
{{ formatDateTime(item.selectable.endedAt) }}
</template>
<template v-slot:item.exception="{ item }">
<v-icon v-if="!item.selectable.exception" color="teal">
mdi-check
</v-icon>
<v-icon v-else color="red">mdi-close</v-icon>
</template>
</v-data-table>
<!-- <pre> {{ runs }} </pre> -->
</v-card-text>
</v-card>
<pre></pre>
{{ item.selectable.state }}
</v-chip>
</template>
<template v-slot:item.startedAt="{ item }">
{{ formatDateTime(item.selectable.startedAt) }}
</template>
<template v-slot:item.endedAt="{ item }">
{{ formatDateTime(item.selectable.endedAt) }}
</template>
<template v-slot:item.exception="{ item }">
<v-icon v-if="!item.selectable.exception" color="teal">
mdi-check
</v-icon>
<v-icon v-else color="red">mdi-close</v-icon>
</template>
</v-data-table>
</div>
</template>

Expand Down Expand Up @@ -117,29 +105,3 @@ function formatDateTime(dateTime: string) {
return format.format(sinceEpoch);
}
</script>

<style>
/* .v-data-table {
width: 100%;
}
tbody {
width: 100%;
}
.v-data-table__wrapper {
width: 100%;
overflow-x: hidden !important;
} */
</style>

<style scoped>
.g-container {
display: grid;
margin: 12px;
height: calc(100% - 2 * 12px);
width: calc(100% - 2 * 12px);
justify-content: center;
grid-template-columns: minmax(min-content, 80%);
}
</style>

0 comments on commit 93fbc8a

Please sign in to comment.