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 {
|
.rk-opt-wrapper {
|
||||||
|
color: #606266;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 26px;
|
top: 26px;
|
||||||
left: 0;
|
left: 0;
|
||||||
|
@ -56,7 +56,7 @@ limitations under the License. -->
|
|||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<Standard
|
<Standard
|
||||||
@update="queryMetrics"
|
@update="queryListMetrics"
|
||||||
:currentMetricConfig="currentMetricConfig"
|
:currentMetricConfig="currentMetricConfig"
|
||||||
:index="index"
|
:index="index"
|
||||||
/>
|
/>
|
||||||
@ -339,6 +339,12 @@ function changeMetricType(index: number, opt: Option[] | any) {
|
|||||||
}
|
}
|
||||||
queryMetrics();
|
queryMetrics();
|
||||||
}
|
}
|
||||||
|
async function queryListMetrics(metricConfig: MetricConfigOpt[]) {
|
||||||
|
dashboardStore.selectWidget({
|
||||||
|
...dashboardStore.selectedGrid,
|
||||||
|
metricConfig,
|
||||||
|
});
|
||||||
|
}
|
||||||
async function queryMetrics() {
|
async function queryMetrics() {
|
||||||
if (states.isList) {
|
if (states.isList) {
|
||||||
return;
|
return;
|
||||||
|
@ -97,11 +97,8 @@ const metricType = ref<string>(
|
|||||||
function changeConfigs(index: number, param: { [key: string]: string }) {
|
function changeConfigs(index: number, param: { [key: string]: string }) {
|
||||||
const metricConfig = dashboardStore.selectedGrid.metricConfig || [];
|
const metricConfig = dashboardStore.selectedGrid.metricConfig || [];
|
||||||
metricConfig[index] = { ...metricConfig[index], ...param };
|
metricConfig[index] = { ...metricConfig[index], ...param };
|
||||||
dashboardStore.selectWidget({
|
|
||||||
...dashboardStore.selectedGrid,
|
emit("update", metricConfig);
|
||||||
metricConfig,
|
|
||||||
});
|
|
||||||
emit("update");
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
@ -157,7 +157,7 @@ async function queryEndpointMetrics(currentPods: Endpoint[]) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const metricConfig = props.config.metricConfig || [];
|
const metricConfig = props.config.metricConfig || [];
|
||||||
console.log(props.config.metricConfig);
|
|
||||||
endpoints.value = usePodsSource(currentPods, json, {
|
endpoints.value = usePodsSource(currentPods, json, {
|
||||||
...props.config,
|
...props.config,
|
||||||
metricConfig: metricConfig,
|
metricConfig: metricConfig,
|
||||||
@ -193,9 +193,7 @@ async function searchList() {
|
|||||||
watch(
|
watch(
|
||||||
() => [props.config.metricTypes, props.config.metrics],
|
() => [props.config.metricTypes, props.config.metrics],
|
||||||
async () => {
|
async () => {
|
||||||
if (props.isEdit) {
|
queryEndpointMetrics(endpoints.value);
|
||||||
queryEndpointMetrics(endpoints.value);
|
|
||||||
}
|
|
||||||
// emit("changeOpt", false);
|
// emit("changeOpt", false);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user