|
199 | 199 | :width="'60vw'" |
200 | 200 | @cancel="closeRelatedModal"> |
201 | 201 | <p>{{ $t('message.related.settings.changed').replace('%x', relatedSourceConfigName) }}</p> |
| 202 | + <a-alert |
| 203 | + type="info" |
| 204 | + showIcon |
| 205 | + style="margin-bottom: 12px" |
| 206 | + :message="$t('message.related.settings.may.not.be.exhaustive')" /> |
202 | 207 | <a-table |
203 | 208 | size="small" |
204 | 209 | :showHeader="false" |
@@ -396,22 +401,37 @@ export default { |
396 | 401 | }, |
397 | 402 | fetchRelatedConfigurations (configrecord) { |
398 | 403 | const prefix = this.getRelatedConfigPrefix(configrecord) |
399 | | - if (!prefix) { |
400 | | - return |
401 | | - } |
402 | | - this.relatedLoading = true |
403 | | - const params = { |
| 404 | + const scopeParams = { |
404 | 405 | [this.scopeKey]: this.$route.params?.id, |
405 | | - keyword: prefix, |
406 | 406 | pagesize: -1, |
407 | 407 | listAll: true |
408 | 408 | } |
409 | | - if (this.scopeKey === 'domainid' && !params[this.scopeKey]) { |
410 | | - params[this.scopeKey] = this.resource?.id |
| 409 | + if (this.scopeKey === 'domainid' && !scopeParams[this.scopeKey]) { |
| 410 | + scopeParams[this.scopeKey] = this.resource?.id |
| 411 | + } |
| 412 | + const requests = [] |
| 413 | + if (prefix) { |
| 414 | + requests.push( |
| 415 | + getAPI('listConfigurations', { ...scopeParams, keyword: prefix }).then(json => { |
| 416 | + const list = json?.listconfigurationsresponse?.configuration || [] |
| 417 | + return list.filter(c => c.name.startsWith(prefix + '.')) |
| 418 | + }) |
| 419 | + ) |
411 | 420 | } |
412 | | - getAPI('listConfigurations', params).then(json => { |
413 | | - const list = json?.listconfigurationsresponse?.configuration || [] |
414 | | - this.relatedConfigs = list.filter(c => c.name !== configrecord.name && c.name.startsWith(prefix + '.')) |
| 421 | + requests.push( |
| 422 | + getAPI('listConfigurations', { ...scopeParams, parent: configrecord.name }).then(json => { |
| 423 | + return json?.listconfigurationsresponse?.configuration || [] |
| 424 | + }) |
| 425 | + ) |
| 426 | + this.relatedLoading = true |
| 427 | + Promise.all(requests).then(results => { |
| 428 | + const merged = new Map() |
| 429 | + results.flat().forEach(c => { |
| 430 | + if (c.name !== configrecord.name) { |
| 431 | + merged.set(c.name, c) |
| 432 | + } |
| 433 | + }) |
| 434 | + this.relatedConfigs = Array.from(merged.values()) |
415 | 435 | if (this.relatedConfigs.length > 0) { |
416 | 436 | this.relatedSourceConfigName = configrecord.name |
417 | 437 | this.relatedModalVisible = true |
|
0 commit comments