Skip to content

Commit 8c9c455

Browse files
committed
[#12419] Grouping Filter field in ServerMap
1 parent d46ac60 commit 8c9c455

File tree

8 files changed

+177
-655
lines changed

8 files changed

+177
-655
lines changed

web-frontend/src/main/v3/packages/ui/src/atoms/serverMapMock.ts

Lines changed: 133 additions & 615 deletions
Large diffs are not rendered by default.

web-frontend/src/main/v3/packages/ui/src/constants/types/FilteredMap.ts

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -110,18 +110,16 @@ export namespace FilteredMapType {
110110
key: string;
111111
from: string;
112112
to: string;
113-
// fromAgent?: string[]; // Deprecated;
114-
// toAgent?: string[]; // Deprecated;
115-
fromAgents: Agent[];
116-
toAgents: Agent[];
117-
// fromAgentIdNameMap?: FromAgentIdNameMap;
118-
// toAgentIdNameMap?: ToAgentIdNameMap;
113+
fromAgents?: Agent[];
114+
toAgents?: Agent[];
119115
sourceInfo: SourceInfo;
120116
targetInfo: TargetInfo;
121-
filterApplicationName: string;
122-
filterApplicationServiceTypeCode: number;
123-
filterApplicationServiceTypeName: string;
124-
filterTargetRpcList?: FilterTargetRpcList[];
117+
filter: {
118+
applicationName: string;
119+
serviceTypeCode: number;
120+
serviceTypeName: string;
121+
outRpcList?: FilterTargetRpcList[];
122+
};
125123
totalCount: number;
126124
errorCount: number;
127125
slowCount: number;
@@ -227,7 +225,6 @@ export namespace FilteredMapType {
227225
agentTimeSeriesHistogram: AgentTimeSeriesHistogram;
228226
instanceCount: number;
229227
instanceErrorCount: number;
230-
// agentIds: string[];
231228
agents: Agent[];
232229
serverList: ServerList;
233230
}

web-frontend/src/main/v3/packages/ui/src/constants/types/GetServerMap.ts

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,16 @@ export namespace GetServerMap {
3939
key: string;
4040
from: string;
4141
to: string;
42-
// fromAgent?: string[]; // Deprecated
43-
// toAgent?: string[]; // Deprecated
44-
fromAgents: Agent[];
45-
toAgents: Agent[];
42+
fromAgents?: Agent[];
43+
toAgents?: Agent[];
4644
sourceInfo: SourceInfo;
4745
targetInfo: TargetInfo;
48-
filterApplicationName: string;
49-
filterApplicationServiceTypeCode: number;
50-
filterApplicationServiceTypeName: string;
51-
filterTargetRpcList?: FilterTargetRpcList[];
46+
filter: {
47+
applicationName: string;
48+
serviceTypeCode: number;
49+
serviceTypeName: string;
50+
outRpcList?: FilterTargetRpcList[];
51+
};
5252
totalCount: number;
5353
errorCount: number;
5454
slowCount: number;
@@ -126,7 +126,6 @@ export namespace GetServerMap {
126126
timeSeriesHistogram: TimeSeriesHistogram[];
127127
instanceCount: number;
128128
instanceErrorCount: number;
129-
// agentIds: string[]; // Deprecated
130129
agents: Agent[];
131130
isMerged?: boolean;
132131
mergedNodes?: any[];

web-frontend/src/main/v3/packages/ui/src/constants/types/TransactionInfo.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,11 @@ export namespace TransactionInfoType {
179179
fromAgentIdNameMap?: FromAgentIdNameMap;
180180
sourceInfo: SourceInfo;
181181
targetInfo: TargetInfo;
182-
filterApplicationName: string;
183-
filterApplicationServiceTypeCode: number;
184-
filterApplicationServiceTypeName: string;
182+
filter: {
183+
applicationName: string;
184+
serviceTypeCode: number;
185+
serviceTypeName: string;
186+
};
185187
totalCount: number;
186188
errorCount: number;
187189
slowCount: number;

web-frontend/src/main/v3/packages/ui/src/pages/FilteredMap.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ export const FilteredMapPage = ({
307307
addedHint =
308308
link.sourceInfo.isWas && link.targetInfo.isWas
309309
? {
310-
[link.targetInfo.applicationName]: link.filterTargetRpcList,
310+
[link.targetInfo.applicationName]: link.filter?.outRpcList,
311311
}
312312
: {};
313313
}
@@ -376,7 +376,7 @@ export const FilteredMapPage = ({
376376
const addedHint =
377377
link?.sourceInfo.isWas && link.targetInfo.isWas
378378
? {
379-
[link.targetInfo.applicationName]: link.filterTargetRpcList,
379+
[link.targetInfo.applicationName]: link.filter?.outRpcList,
380380
}
381381
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
382382
({} as any);

web-frontend/src/main/v3/packages/ui/src/pages/ServerMap.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ export const ServerMapPage = ({
290290
addedHint =
291291
link.sourceInfo.isWas && link.targetInfo.isWas
292292
? {
293-
[link.targetInfo.applicationName]: link.filterTargetRpcList,
293+
[link.targetInfo.applicationName]: link.filter?.outRpcList,
294294
}
295295
: {};
296296
}
@@ -355,7 +355,7 @@ export const ServerMapPage = ({
355355
const addedHint =
356356
link?.sourceInfo.isWas && link.targetInfo.isWas
357357
? {
358-
[link.targetInfo.applicationName]: link.filterTargetRpcList,
358+
[link.targetInfo.applicationName]: link.filter?.outRpcList,
359359
}
360360
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
361361
({} as any);

web-frontend/src/main/v3/packages/ui/src/utils/helper/filteredMap/merge.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ function mergeLinkAgentIds(
102102
const newAgents = neo[type];
103103
if (newAgents) {
104104
newAgents?.forEach((agent: FilteredMap.Agent) => {
105-
const oldAgentIndex = oldAgents.findIndex((oldAgent) => oldAgent.id === agent.id);
105+
const oldAgentIndex = oldAgents?.findIndex((oldAgent) => oldAgent.id === agent.id);
106106
if (oldAgentIndex === -1) {
107107
old[type]?.push(agent);
108108
}

web-frontend/src/main/v3/packages/ui/src/utils/helper/filteredMap/mergeMock.ts

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -346,10 +346,12 @@ export const prevLink: FilteredMap.LinkData = {
346346
serviceTypeCode: 1007,
347347
isWas: true,
348348
},
349-
filterApplicationName: 'app3',
350-
filterApplicationServiceTypeCode: 1050,
351-
filterApplicationServiceTypeName: 'VERTX',
352-
filterTargetRpcList: [],
349+
filter: {
350+
applicationName: 'app3',
351+
serviceTypeCode: 1050,
352+
serviceTypeName: 'VERTX',
353+
outRpcList: [],
354+
},
353355
totalCount: 1,
354356
errorCount: 0,
355357
slowCount: 0,
@@ -443,10 +445,12 @@ export const newLink: FilteredMap.LinkData = {
443445
serviceTypeCode: 1007,
444446
isWas: true,
445447
},
446-
filterApplicationName: 'app3',
447-
filterApplicationServiceTypeCode: 1050,
448-
filterApplicationServiceTypeName: 'VERTX',
449-
filterTargetRpcList: [],
448+
filter: {
449+
applicationName: 'app3',
450+
serviceTypeCode: 1050,
451+
serviceTypeName: 'VERTX',
452+
outRpcList: [],
453+
},
450454
totalCount: 2,
451455
errorCount: 0,
452456
slowCount: 0,
@@ -541,10 +545,12 @@ export const resultLink: FilteredMap.LinkData = {
541545
serviceTypeCode: 1007,
542546
isWas: true,
543547
},
544-
filterApplicationName: 'app3',
545-
filterApplicationServiceTypeCode: 1050,
546-
filterApplicationServiceTypeName: 'VERTX',
547-
filterTargetRpcList: [],
548+
filter: {
549+
applicationName: 'app3',
550+
serviceTypeCode: 1050,
551+
serviceTypeName: 'VERTX',
552+
outRpcList: [],
553+
},
548554
totalCount: 3,
549555
errorCount: 0,
550556
slowCount: 0,

0 commit comments

Comments
 (0)