Skip to content

Commit 3c254fd

Browse files
core: frontend: views: ZenohInspectorView: Add ZenohNetwork
Signed-off-by: Patrick José Pereira <[email protected]>
1 parent 67dd49f commit 3c254fd

File tree

1 file changed

+50
-1
lines changed

1 file changed

+50
-1
lines changed
Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,65 @@
11
<template>
2-
<zenoh-inspector />
2+
<v-card
3+
height="100%"
4+
>
5+
<v-tabs
6+
v-model="page_selected"
7+
centered
8+
icons-and-text
9+
show-arrows
10+
>
11+
<v-tabs-slider />
12+
<v-tab
13+
v-for="page in pages"
14+
:key="page.value"
15+
>
16+
{{ page.title }}
17+
<v-icon>{{ page.icon }}</v-icon>
18+
</v-tab>
19+
</v-tabs>
20+
<v-tabs-items v-model="page_selected">
21+
<v-tab-item
22+
v-for="page in pages"
23+
:key="page.value"
24+
>
25+
<zenoh-inspector v-if="page.value === 'topics'" />
26+
<zenoh-network v-else-if="page.value === 'network'" />
27+
</v-tab-item>
28+
</v-tabs-items>
29+
</v-card>
330
</template>
431

532
<script lang="ts">
633
import Vue from 'vue'
734
835
import ZenohInspector from '@/components/zenoh-inspector/ZenohInspector.vue'
36+
import ZenohNetwork from '@/components/zenoh-inspector/ZenohNetwork.vue'
37+
38+
export interface Item {
39+
title: string,
40+
icon: string,
41+
value: string,
42+
}
943
1044
export default Vue.extend({
1145
name: 'ZenohInspectorView',
1246
components: {
1347
'zenoh-inspector': ZenohInspector,
48+
'zenoh-network': ZenohNetwork,
49+
},
50+
data() {
51+
return {
52+
items: [
53+
{ title: 'Topics', icon: 'mdi-message-text', value: 'topics' },
54+
{ title: 'Network', icon: 'mdi-lan', value: 'network' },
55+
] as Item[],
56+
page_selected: 'topics',
57+
}
58+
},
59+
computed: {
60+
pages(): Item[] {
61+
return this.items
62+
},
1463
},
1564
})
1665
</script>

0 commit comments

Comments
 (0)