From 2d48c244a1527af9ff26cdfbd761c88ed61b64b0 Mon Sep 17 00:00:00 2001 From: chiayin Date: Mon, 17 Apr 2023 13:38:28 +0800 Subject: [PATCH] Discover: sidebarFilter Funnel to be decided. --- src/components/Discover/sidebarFilter.vue | 128 ++++++++++++++++++---- src/components/Loading.vue | 2 +- src/main.js | 3 + src/stores/allMapData.js | 7 +- 4 files changed, 119 insertions(+), 21 deletions(-) diff --git a/src/components/Discover/sidebarFilter.vue b/src/components/Discover/sidebarFilter.vue index 386e7d4..3d810cc 100644 --- a/src/components/Discover/sidebarFilter.vue +++ b/src/components/Discover/sidebarFilter.vue @@ -83,7 +83,7 @@
- +
@@ -94,7 +94,55 @@ -
temporaryData:{{ temporaryData }}
+
+
+
+ No Filter. +
+
+ temporaryData:{{ temporaryData }} + + + + + +
+
+ +
+
+ + +
+
+
@@ -102,6 +150,7 @@ @@ -422,4 +502,14 @@ export default { #searchFiles::-webkit-search-cancel-button{ appearance: none; } + +/* TimeLine */ +:deep(.p-timeline-event-marker) { + @apply !bg-primary !border-primary !h-2 !w-2 + /* @apply !bg-primary !border-primary */ +} +:deep(.p-timeline-event-connector) { + @apply !bg-primary my-2 !w-[1px] + /* @apply !bg-primary my-2 */ +} diff --git a/src/components/Loading.vue b/src/components/Loading.vue index 445c6f0..2398e4c 100644 --- a/src/components/Loading.vue +++ b/src/components/Loading.vue @@ -1,5 +1,5 @@ diff --git a/src/main.js b/src/main.js index dfe597f..4da27fd 100644 --- a/src/main.js +++ b/src/main.js @@ -35,6 +35,7 @@ import ColumnGroup from 'primevue/columngroup'; // optional import Row from 'primevue/row'; // optional import RadioButton from 'primevue/radiobutton'; import PickList from 'primevue/picklist'; +import Timeline from 'primevue/timeline'; const emitter = mitt(); const app = createApp(App); @@ -60,6 +61,7 @@ app.use(pinia); app.use(router); app.use(VueAxios, axios); app.use(ToastPlugin, { // use `this.$toast` in Vue.js + position: 'bottom', duration: 5000, }); app.use(PrimeVue); @@ -76,6 +78,7 @@ app.component('ColumnGroup', ColumnGroup); app.component('Row', Row); app.component('RadioButton', RadioButton); app.component('PickList', PickList); +app.component('Timeline', Timeline); app.component('Draggable', draggable); // 拖曳 app.mount("#app"); diff --git a/src/stores/allMapData.js b/src/stores/allMapData.js index 76c988b..56529d3 100644 --- a/src/stores/allMapData.js +++ b/src/stores/allMapData.js @@ -14,6 +14,7 @@ export default defineStore('allMapDataStore', { state: () => ({ logId: null, traceId: 1, + tempFilterId: null, allProcessMap: {}, allBpmn: {}, allStats: {}, @@ -75,7 +76,11 @@ export default defineStore('allMapDataStore', { */ async getAllMapData() { let logId = this.logId; - const api = `/api/logs/${logId}/discover`; + let tempFilterId = this.tempFilterId; + let api = tempFilterId !== null ? `/api/temp-filters/${tempFilterId}/discover` : `/api/logs/${logId}/discover`; + console.log(tempFilterId); + console.log(logId); + // const api = `/api/logs/${logId}/discover`; try { const response = await this.$axios.get(api);