From e24285172fe4ffb943e47ca35dce6153760faea8 Mon Sep 17 00:00:00 2001 From: Assem Hafez Date: Fri, 14 Jul 2023 16:05:01 +0200 Subject: [PATCH 1/6] enhance no workflow messages --- client/components/workflow-grid.vue | 4 ++-- client/containers/workflow-list/component.vue | 16 +++++++++++++--- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/client/components/workflow-grid.vue b/client/components/workflow-grid.vue index 0b2f2e95b..d90a5ca50 100644 --- a/client/components/workflow-grid.vue +++ b/client/components/workflow-grid.vue @@ -25,7 +25,7 @@ import NoResults from './no-results'; export default { name: 'workflow-grid', - props: ['workflows', 'loading'], + props: ['workflows', 'loading','noResultsText'], data() { return { nextPageToken: undefined, @@ -63,7 +63,7 @@ export default {
End Time
- + Date: Fri, 14 Jul 2023 16:08:57 +0200 Subject: [PATCH 2/6] revert changes spacing --- client/containers/workflow-list/component.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client/containers/workflow-list/component.vue b/client/containers/workflow-list/component.vue index 625f99fdf..7232f915f 100644 --- a/client/containers/workflow-list/component.vue +++ b/client/containers/workflow-list/component.vue @@ -196,10 +196,10 @@ export default { } return query.startTime && query.endTime - ? { - startTime: moment(query.startTime), - endTime: moment(query.endTime), - } + ? { + startTime: moment(query.startTime), + endTime: moment(query.endTime), + } : query.range; }, startTime() { From 49575a3f85be49dbc6a0d9e2815fab17e7946271 Mon Sep 17 00:00:00 2001 From: Assem Hafez Date: Fri, 14 Jul 2023 16:12:17 +0200 Subject: [PATCH 3/6] revert changes spacing --- client/containers/workflow-list/component.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/containers/workflow-list/component.vue b/client/containers/workflow-list/component.vue index 7232f915f..e49b8f555 100644 --- a/client/containers/workflow-list/component.vue +++ b/client/containers/workflow-list/component.vue @@ -196,7 +196,7 @@ export default { } return query.startTime && query.endTime - ? { + ? { startTime: moment(query.startTime), endTime: moment(query.endTime), } From d919522a5291a4164246c944894dadd87b497e68 Mon Sep 17 00:00:00 2001 From: Assem Hafez Date: Mon, 17 Jul 2023 09:37:29 +0000 Subject: [PATCH 4/6] fix linting issues --- client/components/workflow-grid.vue | 2 +- client/containers/workflow-list/component.vue | 22 ++++++++++++++----- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/client/components/workflow-grid.vue b/client/components/workflow-grid.vue index d90a5ca50..26c3842aa 100644 --- a/client/components/workflow-grid.vue +++ b/client/components/workflow-grid.vue @@ -25,7 +25,7 @@ import NoResults from './no-results'; export default { name: 'workflow-grid', - props: ['workflows', 'loading','noResultsText'], + props: ['workflows', 'loading', 'noResultsText'], data() { return { nextPageToken: undefined, diff --git a/client/containers/workflow-list/component.vue b/client/containers/workflow-list/component.vue index e49b8f555..d007e4e19 100644 --- a/client/containers/workflow-list/component.vue +++ b/client/containers/workflow-list/component.vue @@ -212,12 +212,22 @@ export default { return getStartTimeIsoString(range, startTime); }, noResultsMessageText() { - const { status, workflowId, workflowName, startTime,endTime} = this.$route.query || {}; + const { status, workflowId, workflowName, startTime, endTime } = + this.$route.query || {}; - if (status !== STATUS_ALL || workflowId || workflowName) return `No workflows for the selected filters`; - if (typeof this.range === "string") return `No workflows within ${lowerCase(this.range)}`; - if (startTime && endTime) return `No workflows within selected period`; - return "No Results" + if (status !== STATUS_ALL || workflowId || workflowName) { + return `No workflows for the selected filters`; + } + + if (typeof this.range === 'string') { + return `No workflows within ${lowerCase(this.range)}`; + } + + if (startTime && endTime) { + return `No workflows within selected period`; + } + + return 'No Results'; }, crossRegionProps() { const { clusterName, domain } = this; @@ -606,7 +616,7 @@ export default { Date: Thu, 20 Jul 2023 09:32:37 +0000 Subject: [PATCH 5/6] take empty status in account while creating the empty list message --- client/containers/workflow-list/component.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/containers/workflow-list/component.vue b/client/containers/workflow-list/component.vue index d007e4e19..4f319b730 100644 --- a/client/containers/workflow-list/component.vue +++ b/client/containers/workflow-list/component.vue @@ -214,8 +214,8 @@ export default { noResultsMessageText() { const { status, workflowId, workflowName, startTime, endTime } = this.$route.query || {}; - - if (status !== STATUS_ALL || workflowId || workflowName) { + console.log(this.$route.query) + if ((status && status !== STATUS_ALL) || workflowId || workflowName) { return `No workflows for the selected filters`; } From 5baa5551a5f1a42dd7b9795c0eec9d2672a95575 Mon Sep 17 00:00:00 2001 From: Assem Hafez Date: Thu, 20 Jul 2023 09:36:39 +0000 Subject: [PATCH 6/6] remove debugging log --- client/containers/workflow-list/component.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/containers/workflow-list/component.vue b/client/containers/workflow-list/component.vue index 4f319b730..233b6c086 100644 --- a/client/containers/workflow-list/component.vue +++ b/client/containers/workflow-list/component.vue @@ -214,7 +214,7 @@ export default { noResultsMessageText() { const { status, workflowId, workflowName, startTime, endTime } = this.$route.query || {}; - console.log(this.$route.query) + if ((status && status !== STATUS_ALL) || workflowId || workflowName) { return `No workflows for the selected filters`; }