mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-07-18 11:44:09 +00:00
fix data and style
This commit is contained in:
parent
ceec794fce
commit
d2d49a55dd
@ -75,7 +75,7 @@ export const topologyStore = defineStore({
|
|||||||
setTopology(data: { nodes: Node[]; calls: Call[] }) {
|
setTopology(data: { nodes: Node[]; calls: Call[] }) {
|
||||||
const obj = {} as any;
|
const obj = {} as any;
|
||||||
const services = useSelectorStore().services;
|
const services = useSelectorStore().services;
|
||||||
const nodes = data.nodes.reduce((prev: Node[], next: Node) => {
|
const nodes = (data.nodes || []).reduce((prev: Node[], next: Node) => {
|
||||||
if (!obj[next.id]) {
|
if (!obj[next.id]) {
|
||||||
obj[next.id] = true;
|
obj[next.id] = true;
|
||||||
const s = services.filter((d: Service) => d.id === next.id)[0] || {};
|
const s = services.filter((d: Service) => d.id === next.id)[0] || {};
|
||||||
@ -84,7 +84,7 @@ export const topologyStore = defineStore({
|
|||||||
}
|
}
|
||||||
return prev;
|
return prev;
|
||||||
}, []);
|
}, []);
|
||||||
const calls = data.calls.reduce((prev: Call[], next: Call) => {
|
const calls = (data.calls || []).reduce((prev: Call[], next: Call) => {
|
||||||
if (!obj[next.id]) {
|
if (!obj[next.id]) {
|
||||||
obj[next.id] = true;
|
obj[next.id] = true;
|
||||||
next.value = next.value || 1;
|
next.value = next.value || 1;
|
||||||
@ -117,7 +117,7 @@ export const topologyStore = defineStore({
|
|||||||
async getDepthServiceTopology(serviceIds: string[], depth: number) {
|
async getDepthServiceTopology(serviceIds: string[], depth: number) {
|
||||||
const res = await this.getServicesTopology(serviceIds);
|
const res = await this.getServicesTopology(serviceIds);
|
||||||
if (depth > 1) {
|
if (depth > 1) {
|
||||||
const ids = res.nodes
|
const ids = (res.nodes || [])
|
||||||
.map((item: Node) => item.id)
|
.map((item: Node) => item.id)
|
||||||
.filter((d: string) => !serviceIds.includes(d));
|
.filter((d: string) => !serviceIds.includes(d));
|
||||||
if (!ids.length) {
|
if (!ids.length) {
|
||||||
|
@ -105,6 +105,7 @@ function editConfig() {
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tools {
|
.tools {
|
||||||
|
Loading…
Reference in New Issue
Block a user