mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-07-19 07:57:35 +00:00
set default length
This commit is contained in:
parent
457a105644
commit
c18b0507af
@ -53,8 +53,9 @@ limitations under the License. -->
|
|||||||
>
|
>
|
||||||
<Icon
|
<Icon
|
||||||
class="cp mr-5"
|
class="cp mr-5"
|
||||||
v-show="
|
v-if="
|
||||||
index === states.metrics.length - 1 && states.metrics.length < 5
|
index === states.metrics.length - 1 &&
|
||||||
|
states.metrics.length < defaultLen
|
||||||
"
|
"
|
||||||
iconName="add_circle_outlinecontrol_point"
|
iconName="add_circle_outlinecontrol_point"
|
||||||
size="middle"
|
size="middle"
|
||||||
@ -84,7 +85,7 @@ limitations under the License. -->
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { reactive } from "vue";
|
import { reactive, ref } from "vue";
|
||||||
import { Option } from "@/types/app";
|
import { Option } from "@/types/app";
|
||||||
import { useDashboardStore } from "@/store/modules/dashboard";
|
import { useDashboardStore } from "@/store/modules/dashboard";
|
||||||
import {
|
import {
|
||||||
@ -128,6 +129,7 @@ const states = reactive<{
|
|||||||
});
|
});
|
||||||
|
|
||||||
states.isList = ListChartTypes.includes(graph.type);
|
states.isList = ListChartTypes.includes(graph.type);
|
||||||
|
const defaultLen = ref<number>(states.isList ? 5 : 10);
|
||||||
states.visTypes = setVisTypes();
|
states.visTypes = setVisTypes();
|
||||||
|
|
||||||
setDashboards();
|
setDashboards();
|
||||||
@ -241,10 +243,12 @@ function changeChartType(item: Option) {
|
|||||||
});
|
});
|
||||||
states.metrics = [""];
|
states.metrics = [""];
|
||||||
states.metricTypes = [""];
|
states.metricTypes = [""];
|
||||||
|
defaultLen.value = 5;
|
||||||
}
|
}
|
||||||
setMetricType();
|
setMetricType();
|
||||||
setDashboards();
|
setDashboards();
|
||||||
states.dashboardName = "";
|
states.dashboardName = "";
|
||||||
|
defaultLen.value = 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
function changeMetrics(
|
function changeMetrics(
|
||||||
|
Loading…
Reference in New Issue
Block a user