mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-10-15 12:49:17 +00:00
feat: add a calculation and update selectors param (#53)
This commit is contained in:
@@ -38,12 +38,17 @@ limitations under the License. -->
|
||||
class="body"
|
||||
:style="{
|
||||
backgroundColor: TextColors[graph.backgroundColor],
|
||||
color: TextColors[graph.fontColor],
|
||||
fontSize: graph.fontSize + 'px',
|
||||
textAlign: graph.textAlign,
|
||||
}"
|
||||
>
|
||||
<a :href="graph.url" target="_blank">
|
||||
<a
|
||||
:href="graph.url"
|
||||
target="_blank"
|
||||
:style="{
|
||||
color: TextColors[graph.fontColor],
|
||||
fontSize: graph.fontSize + 'px',
|
||||
}"
|
||||
>
|
||||
{{ graph.content }}
|
||||
</a>
|
||||
</div>
|
||||
|
@@ -109,11 +109,14 @@ export default defineComponent({
|
||||
const selectorStore = useSelectorStore();
|
||||
const graph = computed(() => props.data.graph || {});
|
||||
const widget = computed(() => props.data.widget || {});
|
||||
const isList = ListChartTypes.includes(
|
||||
(props.data.graph && props.data.graph.type) || ""
|
||||
const isList = computed(() =>
|
||||
ListChartTypes.includes((props.data.graph && props.data.graph.type) || "")
|
||||
);
|
||||
|
||||
if ((props.needQuery || !dashboardStore.currentDashboard.id) && !isList) {
|
||||
if (
|
||||
(props.needQuery || !dashboardStore.currentDashboard.id) &&
|
||||
!isList.value
|
||||
) {
|
||||
queryMetrics();
|
||||
}
|
||||
|
||||
@@ -162,11 +165,8 @@ export default defineComponent({
|
||||
if (props.data.i !== dashboardStore.selectedGrid.i) {
|
||||
return;
|
||||
}
|
||||
const isList = ListChartTypes.includes(
|
||||
(props.data.graph && props.data.graph.type) || ""
|
||||
);
|
||||
const chart = dashboardStore.selectedGrid.graph || {};
|
||||
if (ListChartTypes.includes(chart.type) || isList) {
|
||||
if (ListChartTypes.includes(chart.type) || isList.value) {
|
||||
return;
|
||||
}
|
||||
queryMetrics();
|
||||
@@ -175,10 +175,7 @@ export default defineComponent({
|
||||
watch(
|
||||
() => [selectorStore.currentService, selectorStore.currentDestService],
|
||||
() => {
|
||||
const isList = ListChartTypes.includes(
|
||||
(props.data.graph && props.data.graph.type) || ""
|
||||
);
|
||||
if (isList) {
|
||||
if (isList.value) {
|
||||
return;
|
||||
}
|
||||
if (
|
||||
@@ -195,12 +192,18 @@ export default defineComponent({
|
||||
if (dashboardStore.entity === EntityType[0].value) {
|
||||
return;
|
||||
}
|
||||
if (isList.value) {
|
||||
return;
|
||||
}
|
||||
queryMetrics();
|
||||
}
|
||||
);
|
||||
watch(
|
||||
() => appStore.durationTime,
|
||||
() => {
|
||||
if (isList.value) {
|
||||
return;
|
||||
}
|
||||
if (dashboardStore.entity === EntityType[1].value) {
|
||||
queryMetrics();
|
||||
}
|
||||
|
Reference in New Issue
Block a user