mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-07-18 14:05:25 +00:00
fix: update settings
This commit is contained in:
parent
2b492d6fe4
commit
3c79e45f4a
@ -105,7 +105,7 @@ export const ConfigData3: any = [
|
|||||||
{
|
{
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
w: 2,
|
w: 4,
|
||||||
h: 6,
|
h: 6,
|
||||||
i: "1",
|
i: "1",
|
||||||
type: "Topology",
|
type: "Topology",
|
||||||
@ -122,7 +122,7 @@ export const ConfigData3: any = [
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
x: 2,
|
x: 4,
|
||||||
y: 0,
|
y: 0,
|
||||||
w: 8,
|
w: 8,
|
||||||
h: 12,
|
h: 12,
|
||||||
|
@ -27,7 +27,7 @@ limitations under the License. -->
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "vue-i18n";
|
||||||
import WidgetOptions from "./WidgetOptions.vue";
|
import WidgetOptions from "./WidgetOptions.vue";
|
||||||
import TopologyOptions from "./graph-styles/Topology.vue";
|
import TopologyOptions from "./graph-styles/TopologyItem.vue";
|
||||||
import { useDashboardStore } from "@/store/modules/dashboard";
|
import { useDashboardStore } from "@/store/modules/dashboard";
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
@ -21,7 +21,7 @@ limitations under the License. -->
|
|||||||
size="small"
|
size="small"
|
||||||
placeholder="Select a color"
|
placeholder="Select a color"
|
||||||
class="input"
|
class="input"
|
||||||
@change="changeConfig({ backgroundColor })"
|
@change="changeConfig({ backgroundColor: $event[0].value })"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="item">
|
<div class="item">
|
||||||
@ -45,7 +45,7 @@ limitations under the License. -->
|
|||||||
size="small"
|
size="small"
|
||||||
placeholder="Select a color"
|
placeholder="Select a color"
|
||||||
class="input"
|
class="input"
|
||||||
@change="changeConfig({ fontColor })"
|
@change="changeConfig({ fontColor: $event[0].value })"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="item">
|
<div class="item">
|
||||||
@ -78,23 +78,23 @@ const { selectedGrid } = dashboardStore;
|
|||||||
const iconTheme = ref(selectedGrid.graph.iconTheme || true);
|
const iconTheme = ref(selectedGrid.graph.iconTheme || true);
|
||||||
const backgroundColor = ref(selectedGrid.graph.backgroundColor || "green");
|
const backgroundColor = ref(selectedGrid.graph.backgroundColor || "green");
|
||||||
const fontColor = ref(selectedGrid.graph.fontColor || "white");
|
const fontColor = ref(selectedGrid.graph.fontColor || "white");
|
||||||
const content = ref<string>("");
|
const content = ref<string>(selectedGrid.graph.content);
|
||||||
const fontSize = ref<number>(selectedGrid.graph.fontSize);
|
const fontSize = ref<number>(selectedGrid.graph.fontSize);
|
||||||
const colors = [
|
const colors = [
|
||||||
{
|
{
|
||||||
label: "Green",
|
label: "Green",
|
||||||
key: "#67C23A",
|
|
||||||
value: "green",
|
value: "green",
|
||||||
},
|
},
|
||||||
{ label: "Blue", key: "#409EFF", value: "blue" },
|
{ label: "Blue", value: "blue" },
|
||||||
{ label: "Red", key: "#F56C6C", value: "red" },
|
{ label: "Red", value: "red" },
|
||||||
{ label: "Grey", key: "#909399", value: "grey" },
|
{ label: "Grey", value: "grey" },
|
||||||
{ label: "White", key: "#fff", value: "white" },
|
{ label: "White", value: "white" },
|
||||||
{ label: "Black", key: "#000", value: "black" },
|
{ label: "Black", value: "black" },
|
||||||
{ label: "Orange", key: "#E6A23C", value: "orange" },
|
{ label: "Orange", value: "orange" },
|
||||||
];
|
];
|
||||||
|
|
||||||
function changeConfig(param: { [key: string]: unknown }) {
|
function changeConfig(param: { [key: string]: unknown }) {
|
||||||
|
const { selectedGrid } = dashboardStore;
|
||||||
const graph = {
|
const graph = {
|
||||||
...selectedGrid.graph,
|
...selectedGrid.graph,
|
||||||
...param,
|
...param,
|
@ -15,10 +15,17 @@ limitations under the License. -->
|
|||||||
<template>
|
<template>
|
||||||
<div class="topology">
|
<div class="topology">
|
||||||
<div class="header flex-h">
|
<div class="header flex-h">
|
||||||
<div>title</div>
|
<div>{{ data.widget?.title || "" }}</div>
|
||||||
<div>
|
<div>
|
||||||
<el-tooltip :content="'tips'">
|
<el-tooltip :content="data.widget?.tips">
|
||||||
<Icon iconName="info_outline" size="sm" class="operation" />
|
<span>
|
||||||
|
<Icon
|
||||||
|
iconName="info_outline"
|
||||||
|
size="sm"
|
||||||
|
class="operation"
|
||||||
|
v-show="data.widget?.tips"
|
||||||
|
/>
|
||||||
|
</span>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-popover placement="bottom" trigger="click" :width="100">
|
<el-popover placement="bottom" trigger="click" :width="100">
|
||||||
<template #reference>
|
<template #reference>
|
||||||
@ -38,7 +45,7 @@ limitations under the License. -->
|
|||||||
<div
|
<div
|
||||||
class="body"
|
class="body"
|
||||||
@click="ViewTopology"
|
@click="ViewTopology"
|
||||||
:style="`background: ${Colors[data.graph.backgroundColor]}`"
|
:style="{ backgroundColor: Colors[data.graph.backgroundColor] }"
|
||||||
>
|
>
|
||||||
<Icon
|
<Icon
|
||||||
:iconName="data.graph.iconTheme ? 'topology-light' : 'topology-dark'"
|
:iconName="data.graph.iconTheme ? 'topology-light' : 'topology-dark'"
|
||||||
@ -70,6 +77,7 @@ const props = defineProps({
|
|||||||
});
|
});
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const dashboardStore = useDashboardStore();
|
const dashboardStore = useDashboardStore();
|
||||||
|
console.log(Colors[props.data.graph.backgroundColor]);
|
||||||
function editConfig() {
|
function editConfig() {
|
||||||
dashboardStore.setConfigPanel(true);
|
dashboardStore.setConfigPanel(true);
|
||||||
dashboardStore.selectWidget(props.data);
|
dashboardStore.selectWidget(props.data);
|
||||||
|
@ -18,12 +18,14 @@ limitations under the License. -->
|
|||||||
<div>{{ data.widget?.title || "" }}</div>
|
<div>{{ data.widget?.title || "" }}</div>
|
||||||
<div>
|
<div>
|
||||||
<el-tooltip :content="data.widget?.tips">
|
<el-tooltip :content="data.widget?.tips">
|
||||||
<Icon
|
<span>
|
||||||
iconName="info_outline"
|
<Icon
|
||||||
size="sm"
|
iconName="info_outline"
|
||||||
class="operation"
|
size="sm"
|
||||||
v-show="data.widget?.tips"
|
class="operation"
|
||||||
/>
|
v-show="data.widget?.tips"
|
||||||
|
/>
|
||||||
|
</span>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-popover placement="bottom" trigger="click" :width="100">
|
<el-popover placement="bottom" trigger="click" :width="100">
|
||||||
<template #reference>
|
<template #reference>
|
||||||
|
Loading…
Reference in New Issue
Block a user