@meshmakers/octo-services 3.4.900 → 3.4.930
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -56,16 +56,37 @@ class OctoErrorLink extends ApolloLink {
|
|
|
56
56
|
}
|
|
57
57
|
showError(combinedGraphQLErrors) {
|
|
58
58
|
const messageService = this.injector.get(MessageService);
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
// Dedupe identical errors before rendering. A list query with one broken field produces one
|
|
60
|
+
// error PER ROW (observed on AB#4771: 13 rollup rows each yielded the same "Error trying to
|
|
61
|
+
// resolve field 'columns'" / INVALID_OPERATION), which used to flood the toast with the same
|
|
62
|
+
// message N times. Identical (message, code, OctoDetails) tuples collapse into one entry with
|
|
63
|
+
// an "(× N)" suffix; every raw error is still logged to the console individually.
|
|
64
|
+
const deduped = new Map();
|
|
61
65
|
for (const error of combinedGraphQLErrors.errors) {
|
|
62
66
|
console.error(error);
|
|
67
|
+
const key = JSON.stringify([
|
|
68
|
+
error.message,
|
|
69
|
+
error.extensions?.['code'] ?? null,
|
|
70
|
+
error.extensions?.['OctoDetails'] ?? null,
|
|
71
|
+
]);
|
|
72
|
+
const entry = deduped.get(key);
|
|
73
|
+
if (entry) {
|
|
74
|
+
entry.count++;
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
deduped.set(key, { error, count: 1 });
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
let title = 'GraphQL error';
|
|
81
|
+
let details = '';
|
|
82
|
+
for (const { error, count } of deduped.values()) {
|
|
83
|
+
const message = count > 1 ? `${error.message} (× ${count})` : `${error.message}`;
|
|
63
84
|
if (title == 'GraphQL error') {
|
|
64
|
-
title =
|
|
85
|
+
title = message;
|
|
65
86
|
}
|
|
66
87
|
else {
|
|
67
88
|
details += `======================`;
|
|
68
|
-
details +=
|
|
89
|
+
details += message;
|
|
69
90
|
}
|
|
70
91
|
if (error.extensions) {
|
|
71
92
|
// check for custom error properties, OctoDetails should be an array of MessageDetails
|
|
@@ -6268,6 +6289,8 @@ const GetEntitiesByCkTypeDocumentDto = gql `
|
|
|
6268
6289
|
rtId
|
|
6269
6290
|
ckTypeId
|
|
6270
6291
|
rtWellKnownName
|
|
6292
|
+
rtDisplayName
|
|
6293
|
+
rtDisplayDescription
|
|
6271
6294
|
rtCreationDateTime
|
|
6272
6295
|
rtChangedDateTime
|
|
6273
6296
|
attributes(resolveEnumValuesToNames: true) {
|
|
@@ -6312,7 +6335,9 @@ class RuntimeEntitySelectDataSource {
|
|
|
6312
6335
|
ckTypeId: this.ckTypeId,
|
|
6313
6336
|
first: take ?? 10,
|
|
6314
6337
|
fieldFilters: [
|
|
6315
|
-
|
|
6338
|
+
// Search by the engine-computed display name (AB#4813); rtId matching required exact
|
|
6339
|
+
// hex ids and never matched what users type into an entity search.
|
|
6340
|
+
{ attributePath: 'rtDisplayName', operator: FieldFilterOperatorsDto.LikeDto, comparisonValue: filter }
|
|
6316
6341
|
]
|
|
6317
6342
|
}
|
|
6318
6343
|
}));
|
|
@@ -6322,7 +6347,9 @@ class RuntimeEntitySelectDataSource {
|
|
|
6322
6347
|
rtId: item.rtId,
|
|
6323
6348
|
ckTypeId: item.ckTypeId,
|
|
6324
6349
|
rtWellKnownName: item.rtWellKnownName ?? undefined,
|
|
6325
|
-
|
|
6350
|
+
rtDisplayName: item.rtDisplayName,
|
|
6351
|
+
rtDisplayDescription: item.rtDisplayDescription ?? undefined,
|
|
6352
|
+
displayName: item.rtDisplayName
|
|
6326
6353
|
}));
|
|
6327
6354
|
return {
|
|
6328
6355
|
totalCount: result.data?.runtime?.runtimeEntities?.totalCount ?? 0,
|
|
@@ -6348,16 +6375,18 @@ class RuntimeEntityDialogDataSource {
|
|
|
6348
6375
|
}
|
|
6349
6376
|
getColumns() {
|
|
6350
6377
|
return [
|
|
6378
|
+
{ field: 'rtDisplayName', displayName: 'Name' },
|
|
6379
|
+
{ field: 'rtDisplayDescription', displayName: 'Description' },
|
|
6351
6380
|
{ field: 'rtId', displayName: 'RT-ID' },
|
|
6352
|
-
{ field: 'rtWellKnownName', displayName: 'Name' },
|
|
6353
6381
|
{ field: 'ckTypeId', displayName: 'CK Type' }
|
|
6354
6382
|
];
|
|
6355
6383
|
}
|
|
6356
6384
|
fetchData(options) {
|
|
6357
6385
|
const fieldFilters = [];
|
|
6358
6386
|
if (options.textSearch && options.textSearch.trim()) {
|
|
6387
|
+
// Search by the engine-computed display name (AB#4813)
|
|
6359
6388
|
fieldFilters.push({
|
|
6360
|
-
attributePath: '
|
|
6389
|
+
attributePath: 'rtDisplayName',
|
|
6361
6390
|
operator: FieldFilterOperatorsDto.LikeDto,
|
|
6362
6391
|
comparisonValue: options.textSearch.trim()
|
|
6363
6392
|
});
|
|
@@ -6376,7 +6405,9 @@ class RuntimeEntityDialogDataSource {
|
|
|
6376
6405
|
rtId: item.rtId,
|
|
6377
6406
|
ckTypeId: item.ckTypeId,
|
|
6378
6407
|
rtWellKnownName: item.rtWellKnownName ?? undefined,
|
|
6379
|
-
|
|
6408
|
+
rtDisplayName: item.rtDisplayName,
|
|
6409
|
+
rtDisplayDescription: item.rtDisplayDescription ?? undefined,
|
|
6410
|
+
displayName: item.rtDisplayName
|
|
6380
6411
|
}));
|
|
6381
6412
|
return {
|
|
6382
6413
|
data: items,
|