diff --git a/src/assets/icons/control.svg b/src/assets/icons/control.svg
new file mode 100644
index 00000000..250d63bf
--- /dev/null
+++ b/src/assets/icons/control.svg
@@ -0,0 +1,15 @@
+
+
\ No newline at end of file
diff --git a/src/hooks/useProcessor.ts b/src/hooks/useProcessor.ts
index b1ed0e9c..de90ab08 100644
--- a/src/hooks/useProcessor.ts
+++ b/src/hooks/useProcessor.ts
@@ -68,7 +68,7 @@ export function useQueryProcessor(config: any) {
normal: selectorStore.currentService
? selectorStore.currentService.normal
: true,
- scope: config.catalog || dashboardStore.entity,
+ scope: config.catalog,
topN: c.topN || 10,
order: c.sortOrder || "DES",
};
diff --git a/src/styles/reset.scss b/src/styles/reset.scss
index e414df03..cbb3cacc 100644
--- a/src/styles/reset.scss
+++ b/src/styles/reset.scss
@@ -141,3 +141,15 @@ pre {
.el-icon.menu-icons {
margin-top: -3px !important;
}
+
+.el-switch__label--left {
+ margin-right: 5px;
+}
+
+.el-switch__label--right {
+ margin-left: 5px;
+}
+
+.switch {
+ margin: 0 5px;
+}
diff --git a/src/views/dashboard/configuration/Widget.vue b/src/views/dashboard/configuration/Widget.vue
index 6e60c63c..ad7c7344 100644
--- a/src/views/dashboard/configuration/Widget.vue
+++ b/src/views/dashboard/configuration/Widget.vue
@@ -16,10 +16,12 @@ limitations under the License. -->
@@ -31,7 +33,11 @@ limitations under the License. -->
v-model="currentMetric.label"
size="small"
placeholder="Please input a name"
- @change="changeConfigs(index, { label: currentMetric.label })"
+ @change="
+ updateConfig(index, {
+ label: encodeURIComponent(currentMetric.label),
+ })
+ "
/>
@@ -42,7 +48,9 @@ limitations under the License. -->
size="small"
placeholder="auto"
@change="
- changeConfigs(index, { labelsIndex: currentMetric.labelsIndex })
+ updateConfig(index, {
+ labelsIndex: encodeURIComponent(currentMetric.labelsIndex),
+ })
"
/>
@@ -108,13 +116,21 @@ const metricType = ref(metricTypes[props.index]);
const isTopn = computed(() =>
["sortMetrics", "readSampledRecords"].includes(metricTypes[props.index])
);
+function updateConfig(index: number, param: { [key: string]: string }) {
+ const key = Object.keys(param)[0];
+ if (!key) {
+ return;
+ }
+ changeConfigs(index, { key: decodeURIComponent(param[key]) });
+}
function changeConfigs(
index: number,
param: { [key: string]: string | number }
) {
const metricConfig = dashboardStore.selectedGrid.metricConfig || [];
- metricConfig[index] = { ...metricConfig[index], ...param };
+ metricConfig[index] = { ...metricConfig[index], ...param };
+ currentMetric.value = metricConfig[index];
dashboardStore.selectWidget({
...dashboardStore.selectedGrid,
metricConfig,
diff --git a/src/views/dashboard/data.ts b/src/views/dashboard/data.ts
index e1b0d4f5..d5e578c0 100644
--- a/src/views/dashboard/data.ts
+++ b/src/views/dashboard/data.ts
@@ -174,17 +174,15 @@ export const AllTools = [
{ name: "device_hub", content: "Add Topology", id: "addTopology" },
{ name: "merge", content: "Add Trace", id: "addTrace" },
{ name: "assignment", content: "Add Log", id: "addLog" },
- { name: "save", content: "Apply", id: "apply" },
];
export const ServiceTools = [
- { name: "playlist_add", content: "Add Widget", id: "addWidget" },
- { name: "all_inbox", content: "Add Tab", id: "addTab" },
- { name: "library_books", content: "Add Text", id: "addText" },
- { name: "device_hub", content: "Add Topology", id: "addTopology" },
- { name: "merge", content: "Add Trace", id: "addTrace" },
- { name: "timeline", content: "Add Profile", id: "addProfile" },
- { name: "assignment", content: "Add Log", id: "addLog" },
- { name: "save", content: "Apply", id: "apply" },
+ { name: "playlist_add", content: "Widget", id: "addWidget" },
+ { name: "all_inbox", content: "Tab", id: "addTab" },
+ { name: "library_books", content: "Text", id: "addText" },
+ { name: "device_hub", content: "Topology", id: "addTopology" },
+ { name: "merge", content: "Trace", id: "addTrace" },
+ { name: "timeline", content: "Profile", id: "addProfile" },
+ { name: "assignment", content: "Log", id: "addLog" },
];
export const InstanceTools = [
{ name: "playlist_add", content: "Add Widget", id: "addWidget" },
@@ -192,7 +190,6 @@ export const InstanceTools = [
{ name: "library_books", content: "Add Text", id: "addText" },
{ name: "merge", content: "Add Trace", id: "addTrace" },
{ name: "assignment", content: "Add Log", id: "addLog" },
- { name: "save", content: "Apply", id: "apply" },
];
export const EndpointTools = [
{ name: "playlist_add", content: "Add Widget", id: "addWidget" },
@@ -201,28 +198,24 @@ export const EndpointTools = [
{ name: "device_hub", content: "Add Topology", id: "addTopology" },
{ name: "merge", content: "Add Trace", id: "addTrace" },
{ name: "assignment", content: "Add Log", id: "addLog" },
- { name: "save", content: "Apply", id: "apply" },
];
export const ServiceRelationTools = [
{ name: "playlist_add", content: "Add Widget", id: "addWidget" },
{ name: "all_inbox", content: "Add Tab", id: "addTab" },
{ name: "library_books", content: "Add Text", id: "addText" },
{ name: "device_hub", content: "Add Topology", id: "addTopology" },
- { name: "save", content: "Apply", id: "apply" },
];
export const EndpointRelationTools = [
{ name: "playlist_add", content: "Add Widget", id: "addWidget" },
{ name: "all_inbox", content: "Add Tab", id: "addTab" },
{ name: "library_books", content: "Add Text", id: "addText" },
- { name: "save", content: "Apply", id: "apply" },
];
export const InstanceRelationTools = [
{ name: "playlist_add", content: "Add Widget", id: "addWidget" },
{ name: "all_inbox", content: "Add Tab", id: "addTab" },
{ name: "library_books", content: "Add Text", id: "addText" },
{ name: "device_hub", content: "Add Topology", id: "addTopology" },
- { name: "save", content: "Apply", id: "apply" },
];
export const ScopeType = [
diff --git a/src/views/dashboard/graphs/Card.vue b/src/views/dashboard/graphs/Card.vue
index 2c33eaf0..241dacc1 100644
--- a/src/views/dashboard/graphs/Card.vue
+++ b/src/views/dashboard/graphs/Card.vue
@@ -22,13 +22,14 @@ limitations under the License. -->
>
{{ singleVal.toFixed(2) }}
- {{ metricConfig[0]?.unit }}
+ {{ decodeURIComponent(unit) }}
- No Data
+ {{ t("noData") }}