diff --git a/src/hooks/useLegendProcessor.ts b/src/hooks/useLegendProcessor.ts new file mode 100644 index 00000000..366cda74 --- /dev/null +++ b/src/hooks/useLegendProcessor.ts @@ -0,0 +1,16 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ diff --git a/src/hooks/useProcessor.ts b/src/hooks/useMetricsProcessor.ts similarity index 100% rename from src/hooks/useProcessor.ts rename to src/hooks/useMetricsProcessor.ts diff --git a/src/store/modules/topology.ts b/src/store/modules/topology.ts index c72a452d..8b2205e3 100644 --- a/src/store/modules/topology.ts +++ b/src/store/modules/topology.ts @@ -23,7 +23,7 @@ import { useSelectorStore } from "@/store/modules/selectors"; import { useAppStoreWithOut } from "@/store/modules/app"; import { AxiosResponse } from "axios"; import query from "@/graphql/fetch"; -import { useQueryTopologyMetrics } from "@/hooks/useProcessor"; +import { useQueryTopologyMetrics } from "@/hooks/useMetricsProcessor"; import { ElMessage } from "element-plus"; interface MetricVal { diff --git a/src/views/dashboard/configuration/widget/metric/Index.vue b/src/views/dashboard/configuration/widget/metric/Index.vue index cdb31f0d..6c66f056 100644 --- a/src/views/dashboard/configuration/widget/metric/Index.vue +++ b/src/views/dashboard/configuration/widget/metric/Index.vue @@ -113,7 +113,7 @@ import { useQueryProcessor, useSourceProcessor, useGetMetricEntity, -} from "@/hooks/useProcessor"; +} from "@/hooks/useMetricsProcessor"; import { useI18n } from "vue-i18n"; import { DashboardItem, MetricConfigOpt } from "@/types/dashboard"; import Standard from "./Standard.vue"; diff --git a/src/views/dashboard/controls/Widget.vue b/src/views/dashboard/controls/Widget.vue index 8593d434..cccd42fb 100644 --- a/src/views/dashboard/controls/Widget.vue +++ b/src/views/dashboard/controls/Widget.vue @@ -86,7 +86,7 @@ import { useQueryProcessor, useSourceProcessor, useGetMetricEntity, -} from "@/hooks/useProcessor"; +} from "@/hooks/useMetricsProcessor"; import { EntityType, ListChartTypes } from "../data"; import { EventParams } from "@/types/dashboard"; import getDashboard from "@/hooks/useDashboardsSession"; diff --git a/src/views/dashboard/graphs/EndpointList.vue b/src/views/dashboard/graphs/EndpointList.vue index 138865c3..8209ee6b 100644 --- a/src/views/dashboard/graphs/EndpointList.vue +++ b/src/views/dashboard/graphs/EndpointList.vue @@ -66,7 +66,10 @@ import type { PropType } from "vue"; import { EndpointListConfig } from "@/types/dashboard"; import { Endpoint } from "@/types/selector"; import { useDashboardStore } from "@/store/modules/dashboard"; -import { useQueryPodsMetrics, usePodsSource } from "@/hooks/useProcessor"; +import { + useQueryPodsMetrics, + usePodsSource, +} from "@/hooks/useMetricsProcessor"; import { EntityType } from "../data"; import router from "@/router"; import getDashboard from "@/hooks/useDashboardsSession"; diff --git a/src/views/dashboard/graphs/InstanceList.vue b/src/views/dashboard/graphs/InstanceList.vue index 2963102d..ef171dda 100644 --- a/src/views/dashboard/graphs/InstanceList.vue +++ b/src/views/dashboard/graphs/InstanceList.vue @@ -95,7 +95,10 @@ import { useSelectorStore } from "@/store/modules/selectors"; import { useDashboardStore } from "@/store/modules/dashboard"; import { InstanceListConfig } from "@/types/dashboard"; import { Instance } from "@/types/selector"; -import { useQueryPodsMetrics, usePodsSource } from "@/hooks/useProcessor"; +import { + useQueryPodsMetrics, + usePodsSource, +} from "@/hooks/useMetricsProcessor"; import { EntityType } from "../data"; import router from "@/router"; import getDashboard from "@/hooks/useDashboardsSession"; diff --git a/src/views/dashboard/graphs/ServiceList.vue b/src/views/dashboard/graphs/ServiceList.vue index 3a597624..44091815 100644 --- a/src/views/dashboard/graphs/ServiceList.vue +++ b/src/views/dashboard/graphs/ServiceList.vue @@ -93,7 +93,10 @@ import { useSelectorStore } from "@/store/modules/selectors"; import { useDashboardStore } from "@/store/modules/dashboard"; import { useAppStoreWithOut } from "@/store/modules/app"; import { Service } from "@/types/selector"; -import { useQueryPodsMetrics, usePodsSource } from "@/hooks/useProcessor"; +import { + useQueryPodsMetrics, + usePodsSource, +} from "@/hooks/useMetricsProcessor"; import { EntityType } from "../data"; import router from "@/router"; import getDashboard from "@/hooks/useDashboardsSession"; diff --git a/src/views/dashboard/graphs/components/Legend.vue b/src/views/dashboard/graphs/components/Legend.vue new file mode 100644 index 00000000..5a9b1080 --- /dev/null +++ b/src/views/dashboard/graphs/components/Legend.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/views/dashboard/related/topology/components/Graph.vue b/src/views/dashboard/related/topology/components/Graph.vue index 6a319b53..29e7ce9a 100644 --- a/src/views/dashboard/related/topology/components/Graph.vue +++ b/src/views/dashboard/related/topology/components/Graph.vue @@ -111,9 +111,9 @@ import { Service } from "@/types/selector"; import { useAppStoreWithOut } from "@/store/modules/app"; import getDashboard from "@/hooks/useDashboardsSession"; import { MetricConfigOpt } from "@/types/dashboard"; -import { aggregation } from "@/hooks/useProcessor"; +import { aggregation } from "@/hooks/useMetricsProcessor"; import icons from "@/assets/img/icons"; -import { useQueryTopologyMetrics } from "@/hooks/useProcessor"; +import { useQueryTopologyMetrics } from "@/hooks/useMetricsProcessor"; /*global Nullable, defineProps */ const props = defineProps({ diff --git a/src/views/dashboard/related/topology/components/Sankey.vue b/src/views/dashboard/related/topology/components/Sankey.vue index afa86d1f..7c091fc6 100644 --- a/src/views/dashboard/related/topology/components/Sankey.vue +++ b/src/views/dashboard/related/topology/components/Sankey.vue @@ -21,7 +21,7 @@ import { computed, PropType } from "vue"; import { useTopologyStore } from "@/store/modules/topology"; import { Node, Call } from "@/types/topology"; import { MetricConfigOpt } from "@/types/dashboard"; -import { aggregation } from "@/hooks/useProcessor"; +import { aggregation } from "@/hooks/useMetricsProcessor"; /*global defineEmits, defineProps */ const props = defineProps({ diff --git a/src/views/dashboard/related/topology/components/Settings.vue b/src/views/dashboard/related/topology/components/Settings.vue index 0473510f..9af3022f 100644 --- a/src/views/dashboard/related/topology/components/Settings.vue +++ b/src/views/dashboard/related/topology/components/Settings.vue @@ -248,7 +248,7 @@ import { useTopologyStore } from "@/store/modules/topology"; import { ElMessage } from "element-plus"; import { MetricCatalog, ScopeType, MetricConditions } from "../../../data"; import { Option } from "@/types/app"; -import { useQueryTopologyMetrics } from "@/hooks/useProcessor"; +import { useQueryTopologyMetrics } from "@/hooks/useMetricsProcessor"; import { Node } from "@/types/topology"; import { DashboardItem, MetricConfigOpt } from "@/types/dashboard"; import { EntityType, LegendOpt, MetricsType } from "../../../data";