diff --git a/components/ReadOnlyAutoComplete.vue b/components/ReadOnlyAutoComplete.vue new file mode 100644 index 00000000..fa777b64 --- /dev/null +++ b/components/ReadOnlyAutoComplete.vue @@ -0,0 +1,28 @@ + + + diff --git a/nuxt.config.ts b/nuxt.config.ts index 083010c7..14c33770 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -29,6 +29,7 @@ export default defineNuxtConfig({ '@nuxtjs/tailwindcss', '@primevue/nuxt-module', '@pinia/nuxt', + '@vueuse/nuxt', 'nuxt-icons', ], css: [ 'primeicons/primeicons.css', '~/assets/css/base.css', '~/assets/css/global.css' ], diff --git a/package.json b/package.json index f49a5158..79a966e8 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,8 @@ "@pinia/nuxt": "^0.5.4", "@primevue/nuxt-module": "^4.0.7", "@primevue/themes": "^4.0.7", + "@vueuse/core": "^11.1.0", + "@vueuse/nuxt": "^11.1.0", "chart.js": "^4.4.4", "eslint-plugin-import": "^2.30.0", "lodash": "^4.17.21", diff --git a/pages/probes.vue b/pages/probes.vue index 59ade52a..ccce6f4d 100644 --- a/pages/probes.vue +++ b/pages/probes.vue @@ -57,14 +57,16 @@ @@ -235,8 +237,20 @@ } }); - // PROBE DETAILS + const getAllTags = (probe: Probe) => { + const systemTags = probe.systemTags; + const userTags = probe.tags.map(({ prefix, value }) => `u-${prefix}-${value}`); + const allTags = userTags.concat(systemTags); + return { id: probe.id, allTags }; + }; + // Calculate the number of tags to show, based on the expected average tag width <= 200px. + const tagsHeaderContentRef = ref(null); + const tagsHeaderRef = useParentElement(tagsHeaderContentRef); + const { width: tagsColumnWidth } = useElementSize(tagsHeaderRef); + const numberOfTagsToShow = computed(() => Math.max(Math.floor(tagsColumnWidth.value / 100), 1)); + + // PROBE DETAILS onMounted(async () => { const probeId = route.params.id as string; diff --git a/pages/probes/[id].vue b/pages/probes/[id].vue index 36cbc346..131ebc24 100644 --- a/pages/probes/[id].vue +++ b/pages/probes/[id].vue @@ -52,14 +52,9 @@
-

@@ -82,7 +77,24 @@ City where the probe is located. If the auto-detected value is wrong, you can adjust it here.

- + +
+ + +
+

+ Public tags that can be used to target the probe in measurements. +

+ +
@@ -123,35 +135,29 @@ />
-

- Public tags that can be used to target the probe in measurements. + Public user-defined tags that can be used to target the probe in measurements. Each tag must be prefixed by your GitHub username or organization. E.g., for a user with username jimaek and tag home-1 the final tag would be u-jimaek-home-1. diff --git a/pages/settings.vue b/pages/settings.vue index 6a15fa3b..3a39e21e 100644 --- a/pages/settings.vue +++ b/pages/settings.vue @@ -59,20 +59,14 @@

-