Skip to content

Commit

Permalink
feat(domains): add domain status (#12720)
Browse files Browse the repository at this point in the history
Signed-off-by: Julien Vaumoron <[email protected]>
  • Loading branch information
jvaumoroovh authored Sep 5, 2024
1 parent a005c89 commit 10e46e3
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@ import maxBy from 'lodash/maxBy';
import reduce from 'lodash/reduce';
import some from 'lodash/some';

import { DOMAIN_TRACKING } from '../../hosting/hosting.constants';
import { DOMAINS_BADGES_STATUS } from '../list/list-domain-layout.constants';
import {
DNSSEC_STATUS,
PRODUCT_TYPE,
PROTECTION_TYPES,
DOMAIN_SERVICE_STATES,
DOMAIN_STATE_TYPE,
PRODUCT_TYPE,
PROTECTION_TYPES,
} from './general-information.constants';
import { DOMAIN_TRACKING } from '../../hosting/hosting.constants';

export default class DomainTabGeneralInformationsCtrl {
/* @ngInject */
Expand Down Expand Up @@ -86,6 +87,7 @@ export default class DomainTabGeneralInformationsCtrl {
}

$onInit() {
this.DOMAINS_BADGES_STATUS = DOMAINS_BADGES_STATUS;
this.domain = this.$scope.ctrlDomain.domain;
this.domainInfos = this.$scope.ctrlDomain.domainInfos;
this.allDom = this.$scope.ctrlDomain.allDom;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,19 @@
class="h-100"
data-loading="$ctrl.loading.dnsStatus || $ctrl.loading.hosting || $ctrl.loading.associatedHosting"
>
<oui-tile-definition
data-term="{{ ::'domains_status' | translate }}"
>
<oui-tile-description>
<span
class="{{:: 'oui-badge ' + $ctrl.DOMAINS_BADGES_STATUS[$ctrl.domainInfos.state] }}"
>
{{ ::'domains_status_' + $ctrl.domainInfos.state |
translate }}
</span>
</oui-tile-description>
</oui-tile-definition>

<oui-tile-definition
data-ng-if="$ctrl.isAllDom && $ctrl.allDom"
data-term="{{ ::'domain_dashboard_type_alldom_' + $ctrl.constructor.parseType($ctrl.allDom.type) | translate }}"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import isEmpty from 'lodash/isEmpty';
import template from './GENERAL_INFORMATIONS.html';
import template from './domain-general-informations.html';

import './general-information.styles.scss';

Expand Down

0 comments on commit 10e46e3

Please sign in to comment.