From c47eeba67e0bfe4a652155f2235bafa0affcbabb Mon Sep 17 00:00:00 2001 From: Hironsan Date: Thu, 3 Mar 2022 09:33:59 +0900 Subject: [PATCH] Change the prop name from labels to labelTypes --- .../metrics/CategoryDistribution.vue | 31 ------------------- .../components/metrics/LabelDistribution.vue | 4 +-- .../metrics/RelationDistribution.vue | 31 ------------------- .../components/metrics/SpanDistribution.vue | 31 ------------------- frontend/pages/projects/_id/metrics/index.vue | 6 ++-- 5 files changed, 5 insertions(+), 98 deletions(-) delete mode 100644 frontend/components/metrics/CategoryDistribution.vue delete mode 100644 frontend/components/metrics/RelationDistribution.vue delete mode 100644 frontend/components/metrics/SpanDistribution.vue diff --git a/frontend/components/metrics/CategoryDistribution.vue b/frontend/components/metrics/CategoryDistribution.vue deleted file mode 100644 index 81462285..00000000 --- a/frontend/components/metrics/CategoryDistribution.vue +++ /dev/null @@ -1,31 +0,0 @@ - - - diff --git a/frontend/components/metrics/LabelDistribution.vue b/frontend/components/metrics/LabelDistribution.vue index e484b69f..965a7217 100644 --- a/frontend/components/metrics/LabelDistribution.vue +++ b/frontend/components/metrics/LabelDistribution.vue @@ -45,7 +45,7 @@ export default Vue.extend({ type: Object as PropType, required: true }, - labels: { + labelTypes: { type: Array as PropType, default: () => [], required: true, @@ -54,7 +54,7 @@ export default Vue.extend({ computed: { colorMapping(): {[text: string]: string} { - return Object.fromEntries(this.labels.map((label) => [label.text, label.backgroundColor])) + return Object.fromEntries(this.labelTypes.map((labelType) => [labelType.text, labelType.backgroundColor])) }, chartJSFormat(): any { diff --git a/frontend/components/metrics/RelationDistribution.vue b/frontend/components/metrics/RelationDistribution.vue deleted file mode 100644 index a124bace..00000000 --- a/frontend/components/metrics/RelationDistribution.vue +++ /dev/null @@ -1,31 +0,0 @@ - - - diff --git a/frontend/components/metrics/SpanDistribution.vue b/frontend/components/metrics/SpanDistribution.vue deleted file mode 100644 index e2fa4876..00000000 --- a/frontend/components/metrics/SpanDistribution.vue +++ /dev/null @@ -1,31 +0,0 @@ - - - diff --git a/frontend/pages/projects/_id/metrics/index.vue b/frontend/pages/projects/_id/metrics/index.vue index e6f71fe2..3e5aaeff 100644 --- a/frontend/pages/projects/_id/metrics/index.vue +++ b/frontend/pages/projects/_id/metrics/index.vue @@ -7,21 +7,21 @@