diff --git a/ui-ngx/src/app/modules/home/pages/rulechain/rulechains-table-config.resolver.ts b/ui-ngx/src/app/modules/home/pages/rulechain/rulechains-table-config.resolver.ts index afa1784e98..4954973d3c 100644 --- a/ui-ngx/src/app/modules/home/pages/rulechain/rulechains-table-config.resolver.ts +++ b/ui-ngx/src/app/modules/home/pages/rulechain/rulechains-table-config.resolver.ts @@ -69,18 +69,6 @@ export class RuleChainsTableConfigResolver implements Resolve('createdTime', 'common.created-time', this.datePipe, '150px'), - new EntityTableColumn('name', 'rulechain.name', '100%'), - new EntityTableColumn('root', 'rulechain.root', '60px', - entity => { - if (isDefined(this.config.componentsData.edgeId)) { - return checkBoxCell((this.config.componentsData.edge.rootRuleChainId.id == entity.id.id)); - } else { - return checkBoxCell(entity.root); - } - }) - ); this.config.deleteEntityTitle = ruleChain => this.translate.instant('rulechain.delete-rulechain-title', { ruleChainName: ruleChain.name }); this.config.deleteEntityContent = () => this.translate.instant('rulechain.delete-rulechain-text'); @@ -98,6 +86,34 @@ export class RuleChainsTableConfigResolver implements Resolve('createdTime', 'common.created-time', this.datePipe, '150px'), + new EntityTableColumn('name', 'rulechain.name', '100%'), + new EntityTableColumn('root', 'rulechain.default-root', '60px', + entity => { + return checkBoxCell(entity.root); + }) + ); + } else { + this.config.columns = []; + this.config.columns.push( + new DateEntityTableColumn('createdTime', 'common.created-time', this.datePipe, '150px'), + new EntityTableColumn('name', 'rulechain.name', '100%'), + new EntityTableColumn('root', 'rulechain.root', '60px', + entity => { + if (this.config.componentsData.edgeId) { + return checkBoxCell((this.config.componentsData.edge.rootRuleChainId.id == entity.id.id)); + } else { + return checkBoxCell(entity.root); + } + + }) + ); + } + if (this.config.componentsData.edgeId) { this.config.entitySelectionEnabled = ruleChain => this.config.componentsData.edge.rootRuleChainId.id != ruleChain.id.id; this.edgeService.getEdge(this.config.componentsData.edgeId).subscribe(edge => { diff --git a/ui-ngx/src/assets/locale/locale.constant-en_US.json b/ui-ngx/src/assets/locale/locale.constant-en_US.json index c64f730c1a..c1bd27d419 100644 --- a/ui-ngx/src/assets/locale/locale.constant-en_US.json +++ b/ui-ngx/src/assets/locale/locale.constant-en_US.json @@ -1853,7 +1853,8 @@ "unassign-rulechain-title": "Are you sure you want to unassign the rulechain '{{ruleChainName}}'?", "unassign-rulechains-title": "Are you sure you want to unassign { count, plural, 1 {1 rulechain} other {# rulechains} }?", "unassign-rulechains": "Unassign rulechains", - "default": "Default" + "default": "Default", + "default-root": "Default root" }, "rulenode": { "details": "Details",