mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-12 15:52:57 +00:00
feat: update tabs
This commit is contained in:
parent
16decafa1c
commit
2a9fde6805
2
src/types/dashboard.d.ts
vendored
2
src/types/dashboard.d.ts
vendored
@ -36,7 +36,7 @@ export interface LayoutConfig {
|
||||
expressions?: string[];
|
||||
metricTypes?: string[];
|
||||
typesOfMQE?: string[];
|
||||
children?: { name: string; children: LayoutConfig[]; expression?: string; enable: boolean }[];
|
||||
children?: { name: string; children: LayoutConfig[]; expression?: string; enable?: boolean }[];
|
||||
activedTabIndex?: number;
|
||||
metricConfig?: MetricConfigOpt[];
|
||||
id?: string;
|
||||
|
@ -20,6 +20,7 @@ limitations under the License. -->
|
||||
:key="idx"
|
||||
:class="{ active: activeTabIndex === idx }"
|
||||
@click="clickTabs($event, idx)"
|
||||
v-show="child.enable !== false"
|
||||
>
|
||||
<input
|
||||
@click="editTabName($event, idx)"
|
||||
@ -249,17 +250,20 @@ limitations under the License. -->
|
||||
|
||||
for (const child of tabsProps.children || []) {
|
||||
if (params.source[child.expression || ""]) {
|
||||
child.enable = !!Number(params.source[child.expression || ""]) || true;
|
||||
child.enable = !!Number(params.source[child.expression || ""]);
|
||||
} else {
|
||||
child.enable = true;
|
||||
}
|
||||
}
|
||||
console.log(tabsProps);
|
||||
dashboardStore.setConfigs(tabsProps);
|
||||
}
|
||||
|
||||
watch(
|
||||
() => (props.data.children || []).map((d: { name: string }) => d.name),
|
||||
() => {
|
||||
() => (props.data.children || []).map((d: any) => d.expression),
|
||||
(old: string[], data: string[]) => {
|
||||
if (JSON.stringify(data) === JSON.stringify(old)) {
|
||||
return;
|
||||
}
|
||||
queryExpressions();
|
||||
},
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user