Skip to content

Commit eb11c2e

Browse files
author
Samar Adel
authored
Increase loading node details dialog height (#4181)
1 parent 54c57e9 commit eb11c2e

1 file changed

Lines changed: 87 additions & 30 deletions

File tree

packages/playground/src/components/node_details.vue

Lines changed: 87 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,23 @@
11
<template>
22
<v-dialog
33
v-model="$props.openDialog"
4-
@update:modelValue="(val:boolean) => closeDialog(val)"
5-
@click:outside="() => $emit('close-dialog', false)"
64
transition="dialog-bottom-transition"
75
hide-overlay
86
attach="#modals"
7+
min-height="95%"
8+
@update:model-value="(val: boolean) => closeDialog(val)"
9+
@click:outside="() => $emit('close-dialog', false)"
910
>
1011
<v-toolbar color="primary">
1112
<div class="d-flex justify-center">
12-
<v-btn icon dark @click="() => $emit('close-dialog', false)">
13-
<v-icon color="anchor">mdi-close</v-icon>
13+
<v-btn
14+
icon
15+
dark
16+
@click="() => $emit('close-dialog', false)"
17+
>
18+
<v-icon color="anchor">
19+
mdi-close
20+
</v-icon>
1421
</v-btn>
1522
</div>
1623
</v-toolbar>
@@ -25,37 +32,87 @@
2532
<template v-else-if="isError">
2633
<v-card class="d-flex justify-center align-center h-screen">
2734
<div class="text-center w-100 pa-3">
28-
<v-icon variant="tonal" color="error" style="font-size: 50px" icon="mdi-close-circle-outline" />
35+
<v-icon
36+
variant="tonal"
37+
color="error"
38+
style="font-size: 50px"
39+
icon="mdi-close-circle-outline"
40+
/>
2941
<p class="mt-4 mb-4 font-weight-bold text-error">
3042
{{ errorMessage }}
3143
</p>
32-
<v-btn class="mr-4" @click="requestNode" text="Try Again" />
33-
<v-btn @click="(val:boolean) => closeDialog(val)" color="error" text="Cancel" />
44+
<v-btn
45+
class="mr-4"
46+
text="Try Again"
47+
@click="requestNode"
48+
/>
49+
<v-btn
50+
color="error"
51+
text="Cancel"
52+
@click="(val: boolean) => closeDialog(val)"
53+
/>
3454
</div>
3555
</v-card>
3656
</template>
3757

3858
<template v-else>
3959
<v-card>
40-
<node-resources-charts :node="node" :is-live-stats="isLiveStats" :hint-message="errorLoadingStatsMessage" />
41-
<v-row class="pa-8 mt-5" justify-md="start" justify-sm="center">
42-
<v-col cols="12" md="6" sm="12">
60+
<node-resources-charts
61+
:node="node"
62+
:is-live-stats="isLiveStats"
63+
:hint-message="errorLoadingStatsMessage"
64+
/>
65+
<v-row
66+
class="pa-8 mt-5"
67+
justify-md="start"
68+
justify-sm="center"
69+
>
70+
<v-col
71+
cols="12"
72+
md="6"
73+
sm="12"
74+
>
4375
<node-details-card :node="node" />
44-
<farm-details-card class="mt-5" :node="node" />
45-
<interfaces-details-card class="mt-5" :node="node" />
76+
<farm-details-card
77+
class="mt-5"
78+
:node="node"
79+
/>
80+
<interfaces-details-card
81+
class="mt-5"
82+
:node="node"
83+
/>
4684
<public-config-details-card
4785
v-if="node.publicConfig && node.publicConfig.domain"
4886
class="mt-5"
4987
:node="node"
5088
/>
5189

52-
<cpu-benchmark-card v-if="hasActiveProfile && node.healthy" class="mt-5" :node="node" />
90+
<cpu-benchmark-card
91+
v-if="hasActiveProfile && node.healthy"
92+
class="mt-5"
93+
:node="node"
94+
/>
5395
</v-col>
54-
<v-col cols="12" md="6" sm="12">
96+
<v-col
97+
cols="12"
98+
md="6"
99+
sm="12"
100+
>
55101
<country-details-card :node="node" />
56-
<twin-details-card class="mt-3" :node="node" />
57-
<gpu-details-card class="mt-3" v-if="node.gpus?.length" :node="node" />
58-
<i-perf-card class="mt-3" v-if="hasActiveProfile && node.healthy" :node="node" />
102+
<twin-details-card
103+
class="mt-3"
104+
:node="node"
105+
/>
106+
<gpu-details-card
107+
v-if="node.gpus?.length"
108+
class="mt-3"
109+
:node="node"
110+
/>
111+
<i-perf-card
112+
v-if="hasActiveProfile && node.healthy"
113+
class="mt-3"
114+
:node="node"
115+
/>
59116
</v-col>
60117
</v-row>
61118
</v-card>
@@ -85,6 +142,19 @@ import { getNode, getNodeStatusColor } from "@/utils/get_nodes";
85142
import IPerfCard from "./node_details_cards/iperf_details_card.vue";
86143
import NodeResourcesCharts from "./node_resources_charts.vue";
87144
export default {
145+
146+
components: {
147+
NodeResourcesCharts,
148+
NodeDetailsCard,
149+
FarmDetailsCard,
150+
CountryDetailsCard,
151+
InterfacesDetailsCard,
152+
TwinDetailsCard,
153+
GpuDetailsCard,
154+
PublicConfigDetailsCard,
155+
IPerfCard,
156+
cpuBenchmarkCard,
157+
},
88158
props: {
89159
openDialog: {
90160
type: Boolean,
@@ -100,19 +170,6 @@ export default {
100170
},
101171
},
102172
103-
components: {
104-
NodeResourcesCharts,
105-
NodeDetailsCard,
106-
FarmDetailsCard,
107-
CountryDetailsCard,
108-
InterfacesDetailsCard,
109-
TwinDetailsCard,
110-
GpuDetailsCard,
111-
PublicConfigDetailsCard,
112-
IPerfCard,
113-
cpuBenchmarkCard,
114-
},
115-
116173
setup(props, { emit }) {
117174
const loading = ref<boolean>(false);
118175
const isError = ref<boolean>(false);

0 commit comments

Comments
 (0)