mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-07-17 18:35:24 +00:00
fix config
This commit is contained in:
parent
63e2458cff
commit
75fd69b644
@ -118,6 +118,7 @@ function removeSelected() {
|
||||
}
|
||||
|
||||
.rk-opt-wrapper {
|
||||
color: #606266;
|
||||
position: absolute;
|
||||
top: 26px;
|
||||
left: 0;
|
||||
|
@ -56,7 +56,7 @@ limitations under the License. -->
|
||||
</span>
|
||||
</template>
|
||||
<Standard
|
||||
@update="queryMetrics"
|
||||
@update="queryListMetrics"
|
||||
:currentMetricConfig="currentMetricConfig"
|
||||
:index="index"
|
||||
/>
|
||||
@ -339,6 +339,12 @@ function changeMetricType(index: number, opt: Option[] | any) {
|
||||
}
|
||||
queryMetrics();
|
||||
}
|
||||
async function queryListMetrics(metricConfig: MetricConfigOpt[]) {
|
||||
dashboardStore.selectWidget({
|
||||
...dashboardStore.selectedGrid,
|
||||
metricConfig,
|
||||
});
|
||||
}
|
||||
async function queryMetrics() {
|
||||
if (states.isList) {
|
||||
return;
|
||||
|
@ -97,11 +97,8 @@ const metricType = ref<string>(
|
||||
function changeConfigs(index: number, param: { [key: string]: string }) {
|
||||
const metricConfig = dashboardStore.selectedGrid.metricConfig || [];
|
||||
metricConfig[index] = { ...metricConfig[index], ...param };
|
||||
dashboardStore.selectWidget({
|
||||
...dashboardStore.selectedGrid,
|
||||
metricConfig,
|
||||
});
|
||||
emit("update");
|
||||
|
||||
emit("update", metricConfig);
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
@ -157,7 +157,7 @@ async function queryEndpointMetrics(currentPods: Endpoint[]) {
|
||||
return;
|
||||
}
|
||||
const metricConfig = props.config.metricConfig || [];
|
||||
console.log(props.config.metricConfig);
|
||||
|
||||
endpoints.value = usePodsSource(currentPods, json, {
|
||||
...props.config,
|
||||
metricConfig: metricConfig,
|
||||
@ -193,9 +193,7 @@ async function searchList() {
|
||||
watch(
|
||||
() => [props.config.metricTypes, props.config.metrics],
|
||||
async () => {
|
||||
if (props.isEdit) {
|
||||
queryEndpointMetrics(endpoints.value);
|
||||
}
|
||||
// emit("changeOpt", false);
|
||||
}
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user