Skip to content

Commit 8949292

Browse files
committed
disable forms, when connected
1 parent 202960d commit 8949292

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

client/src/components/apps/console.vue

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@
99
:items=pods
1010
item-title="name"
1111
return-object
12+
:disabled="connected"
1213
></v-select>
1314
</v-col>
1415
<v-col cols="12" sm="3" md="3" lg="3">
1516
<v-select
1617
v-model="container"
1718
label="Container"
1819
class="pa-1"
20+
:disabled="connected"
1921
:items=pod.containers
2022
></v-select>
2123
</v-col>
@@ -24,6 +26,7 @@
2426
v-model="command"
2527
label="Command"
2628
class="pa-1"
29+
:disabled="connected"
2730
:items="commands"
2831
></v-combobox>
2932
</v-col>
@@ -101,8 +104,8 @@ export default defineComponent({
101104
commands: ['sh', 'bash'] as string[],
102105
command: 'sh' as string,
103106
container: "MISSING" as string,
104-
pods: [{name: 'kubectl-kuberoapp-web-786b847d9f-4dw96', containers: ['kubero-web', 'example']}] as Pod[],
105-
pod: {name: 'kubectl-kuberoapp-web-786b847d9f-4dw96', containers: ['kubero-web', 'example']} as Pod,
107+
pods: [] as Pod[],
108+
pod: {} as Pod,
106109
}),
107110
methods: {
108111
loadPods() {
@@ -112,6 +115,8 @@ export default defineComponent({
112115
const p = {name: pod.name, containers: pod.containers.map((c: any) => c.name)} as Pod;
113116
this.pods.push(p);
114117
}
118+
this.pod = this.pods[0];
119+
this.container = this.pod.containers[0];
115120
});
116121
},
117122
disconnect() {

0 commit comments

Comments
 (0)