Skip to content

Commit

Permalink
feat(dedicated): display edge status in dashboard
Browse files Browse the repository at this point in the history
ref: MANAGER-15423

Signed-off-by: Thibaud Crespin <[email protected]>
  • Loading branch information
Thibaud Crespin authored and ThibaudCrespin committed Dec 3, 2024
1 parent 829e68e commit 74c5307
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,8 @@ export default class {
this.datacenter.model.id,
).then((data) => {
this.datacenter.model.edgesCount = data.length;
this.datacenter.model.edgesLevel = data[0]?.size
? data[0].size.chatAt(0).toUpperCase() + data[0].size.slice(1)
: '';
this.datacenter.model.edgesLevel = data[0] ? data[0].size : '';
this.datacenter.model.edgesStatus = data[0] ? data[0].state : '';
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,26 @@
>
<oui-tile-definition
data-term="{{:: 'dedicatedCloud_nsx_edge_level' | translate }}"
data-description="{{:: $ctrl.datacenter.model.edgesLevel }}"
data-ng-if="!$ctrl.pollNsxTaskId"
>
<oui-tile-description>
<span
data-ng-bind=":: $ctrl.datacenter.model.edgesLevel"
></span>
<span
class="oui-badge"
data-ng-if="$ctrl.datacenter.model.edgesStatus"
data-ng-class="{
'oui-badge_error': ($ctrl.datacenter.model.edgesStatus === 'error'),
'oui-badge_warning': ($ctrl.datacenter.model.edgesStatus === 'disabling'||'migrating'||'provisionning'||'recycling'||'upgrading'),
'oui-badge_success': ($ctrl.datacenter.model.edgesStatus === 'available'||'delivered')
}"
>
<span
data-ng-bind=":: $ctrl.datacenter.model.edgesStatus"
></span>
</span>
</oui-tile-description>
<oui-action-menu
aria-label="{{:: 'dedicatedCloud_datacenter_resize' | translate}}"
data-compact
Expand Down

0 comments on commit 74c5307

Please sign in to comment.