Skip to content

Commit

Permalink
revert(dedicated.pcc): add dashboard light when vcd and pcc is migrated
Browse files Browse the repository at this point in the history
This reverts commit 53f254b.
This reverts commit aea74c5.
This reverts commit c04a76a.
This reverts commit e5860d8.

Signed-off-by: David Arsène <[email protected]>
  • Loading branch information
darsene authored Nov 13, 2024
1 parent 6a3741f commit 8d6958f
Show file tree
Hide file tree
Showing 64 changed files with 93 additions and 590 deletions.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ export default {
trackingPrefix: '<',
dedicatedCloudDescription: '<',
managedVCDAvailability: '<',
dedicatedCloudVCDMigrationState: '<',
},
template,
};
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@
data-tracking-prefix="$ctrl.trackingPrefix"
data-go-to-vcd-order="$ctrl.goToVcdOrder"
data-product-id="$ctrl.productId"
data-vcd-migration-state="$ctrl.dedicatedCloudVCDMigrationState"
></ovh-manager-pcc-dashboard-vmware-cloud-director>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ export default {
bindings: {
currentService: '<',
editDetails: '<',
onUpgradeVersion: '<?',
onUpgradeVersion: '<',
associateIpBlockLink: '<',
onExecutionDateChange: '<?',
onExecutionDateChange: '<',
trackingPrefix: '<',
hasVcdMigration: '<?',
},
controller,
name: 'ovhManagerPccDashboardGeneralInformation',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,11 @@
</div>

<oui-tile-definition
data-ng-if="!$ctrl.hasVcdMigration"
data-term="{{:: 'ovhManagerPccDashboardGeneralInformation_commercial_range' | translate }}"
data-description="{{:: $ctrl.bindings.commercialRange }}"
></oui-tile-definition>

<oui-tile-definition
data-ng-if="!$ctrl.hasVcdMigration"
data-term="{{:: 'ovhManagerPccDashboardGeneralInformation_softwareSolution_term' | translate }}"
>
<oui-tile-description>
Expand Down Expand Up @@ -120,7 +118,6 @@
></oui-tile-definition>

<oui-tile-definition
data-ng-if="!$ctrl.hasVcdMigration"
data-term="{{:: 'ovhManagerPccDashboardGeneralInformation_numberOfDatacenters_term' | translate }}"
data-description="{{:: $ctrl.bindings.numberOfDatacenters }}"
></oui-tile-definition>
Expand Down Expand Up @@ -197,13 +194,6 @@
</oui-tile-definition>

<oui-tile-definition
data-ng-if="$ctrl.hasVcdMigration"
data-term="{{:: 'ovhManagerPccDashboardGeneralInformation_vcd_name' | translate }}"
data-description="{{:: $ctrl.bindings.vcdName || '-' }}"
></oui-tile-definition>

<oui-tile-definition
data-ng-if="!$ctrl.hasVcdMigration"
data-term="{{:: 'ovhManagerPccDashboardGeneralInformation_managementInterfaces_term' | translate }}"
>
<oui-tile-description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,5 @@
"ovhManagerPccDashboardGeneralInformation_managementInterfaces_term": "Verwaltungsinterfaces",
"ovhManagerPccDashboardGeneralInformation_managementInterfaces_definition_vscope": "vScope",
"ovhManagerPccDashboardGeneralInformation_managementInterfaces_definition_webInterface": "Webinterface",
"ovhManagerPccDashboardGeneralInformation_opensANewTab": "Öffnet einen neuen Tab",
"ovhManagerPccDashboardGeneralInformation_vcd_name": "Name des VCD"
"ovhManagerPccDashboardGeneralInformation_opensANewTab": "Öffnet einen neuen Tab"
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,5 @@
"ovhManagerPccDashboardGeneralInformation_managementInterfaces_term": "Management interfaces",
"ovhManagerPccDashboardGeneralInformation_managementInterfaces_definition_vscope": "vScope",
"ovhManagerPccDashboardGeneralInformation_managementInterfaces_definition_webInterface": "Web interface",
"ovhManagerPccDashboardGeneralInformation_opensANewTab": "Opens a new tab",
"ovhManagerPccDashboardGeneralInformation_vcd_name": "VCD name"
"ovhManagerPccDashboardGeneralInformation_opensANewTab": "Opens a new tab"
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,5 @@
"ovhManagerPccDashboardGeneralInformation_managementInterfaces_term": "Interfaces de gestión",
"ovhManagerPccDashboardGeneralInformation_managementInterfaces_definition_vscope": "vScope",
"ovhManagerPccDashboardGeneralInformation_managementInterfaces_definition_webInterface": "Interfaz web",
"ovhManagerPccDashboardGeneralInformation_opensANewTab": "Abrir una nueva pestaña",
"ovhManagerPccDashboardGeneralInformation_vcd_name": "Nombre del VCD"
"ovhManagerPccDashboardGeneralInformation_opensANewTab": "Abrir una nueva pestaña"
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
"ovhManagerPccDashboardGeneralInformation_commercial_range": "Gamme commerciale",

"ovhManagerPccDashboardGeneralInformation_numberOfDatacenters_term": "Nombre de datacenters",
"ovhManagerPccDashboardGeneralInformation_vcd_name": "Nom du VCD",

"ovhManagerPccDashboardGeneralInformation_numberOfIPBlocks_term": "Nombre de blocs IP",
"ovhManagerPccDashboardGeneralInformation_numberOfIPBlocks_definition_ripe": "RIPE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
"ovhManagerPccDashboardGeneralInformation_commercial_range": "Gamme commerciale",

"ovhManagerPccDashboardGeneralInformation_numberOfDatacenters_term": "Nombre de datacenters",
"ovhManagerPccDashboardGeneralInformation_vcd_name": "Nom du VCD",

"ovhManagerPccDashboardGeneralInformation_numberOfIPBlocks_term": "Nombre de blocs IP",
"ovhManagerPccDashboardGeneralInformation_numberOfIPBlocks_definition_ripe": "RIPE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,5 @@
"ovhManagerPccDashboardGeneralInformation_managementInterfaces_term": "Interfacce di gestione",
"ovhManagerPccDashboardGeneralInformation_managementInterfaces_definition_vscope": "vScope",
"ovhManagerPccDashboardGeneralInformation_managementInterfaces_definition_webInterface": "Interfaccia Web",
"ovhManagerPccDashboardGeneralInformation_opensANewTab": "Apri in una nuova scheda",
"ovhManagerPccDashboardGeneralInformation_vcd_name": "Nome del VCD"
"ovhManagerPccDashboardGeneralInformation_opensANewTab": "Apri in una nuova scheda"
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,5 @@
"ovhManagerPccDashboardGeneralInformation_managementInterfaces_term": "Interfejs do zarządzania",
"ovhManagerPccDashboardGeneralInformation_managementInterfaces_definition_vscope": "vScope",
"ovhManagerPccDashboardGeneralInformation_managementInterfaces_definition_webInterface": "Interfejs www",
"ovhManagerPccDashboardGeneralInformation_opensANewTab": "Otwórz nową zakładkę",
"ovhManagerPccDashboardGeneralInformation_vcd_name": "Nazwa VCD"
"ovhManagerPccDashboardGeneralInformation_opensANewTab": "Otwórz nową zakładkę"
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,5 @@
"ovhManagerPccDashboardGeneralInformation_managementInterfaces_term": "Interfaces de gestão",
"ovhManagerPccDashboardGeneralInformation_managementInterfaces_definition_vscope": "vScope",
"ovhManagerPccDashboardGeneralInformation_managementInterfaces_definition_webInterface": "Interface web",
"ovhManagerPccDashboardGeneralInformation_opensANewTab": "Abre um novo separador",
"ovhManagerPccDashboardGeneralInformation_vcd_name": "Nome do VCD"
"ovhManagerPccDashboardGeneralInformation_opensANewTab": "Abre um novo separador"
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ export default {
goToVcdOrder: '<',
productId: '<',
trackingPrefix: '<',
vcdMigrationState: '<',
},
name: 'ovhManagerPccDashboardVmwareCloudDirector',
controller,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default class {

$onInit() {
this.guideLinks = this.DedicatedCloud.getVCDGuideLinks();
this.defineMigrationTitle();
this.checkMigration();
}

trackGuideClick(guideName) {
Expand All @@ -18,11 +18,19 @@ export default class {
});
}

defineMigrationTitle() {
this.migrationTitle = this.$translate.instant(
this.vcdMigrationState.isDone
? 'dedicatedCloud_vmware_cloud_director_migration'
: 'dedicatedCloud_vmware_cloud_director_validate_migration',
);
checkMigration() {
this.loading = true;
return this.DedicatedCloud.getManagedVCDMigrationState(this.productId)
.then((state) => {
this.vcdMigrationState = state;
this.migrationTitle = this.$translate.instant(
this.vcdMigrationState.isDone
? 'dedicatedCloud_vmware_cloud_director_migration'
: 'dedicatedCloud_vmware_cloud_director_validate_migration',
);
})
.finally(() => {
this.loading = false;
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ export const DEDICATED_CLOUD_DATACENTER = {
},
};

export const TRACKING_PREFIX = 'Enterprise::PrivateCloud::';

export const COMMERCIAL_RANGE_NAME_EOL = [
'dedicated_cloud_2016',
'cdi_2018',
Expand All @@ -36,4 +38,5 @@ export default {
VDC_MIRGRATION_GUIDE_LINK,
TRACKING_NEW_PRODUCT_BANNER,
LANGUAGE_OVERRIDE,
TRACKING_PREFIX,
};
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
COMMERCIAL_RANGE_NAME_EOL,
VDC_MIRGRATION_GUIDE_LINK,
TRACKING_NEW_PRODUCT_BANNER,
TRACKING_PREFIX,
} from './dedicatedCloud-datacenter.constants';

export default class {
Expand All @@ -14,6 +15,7 @@ export default class {
this.ovhManagerPccDatacenterService = ovhManagerPccDatacenterService;
this.ovhSubsidiary = coreConfig.getUser().ovhSubsidiary;
this.TRACKING_NEW_PRODUCT_BANNER = TRACKING_NEW_PRODUCT_BANNER;
this.TRACKING_PREFIX = TRACKING_PREFIX;
}

$onInit() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@
</div>
</div>

<ovh-manager-pcc-managed-vcd-migration-banner
data-service-name="$ctrl.datacenter.model.serverName"
data-tracking-prefix="$ctrl.TRACKING_PREFIX"
/>

<oui-header-tabs>
<oui-header-tabs-item data-state="{{:: $ctrl.dashboardState }}"
><span data-translate="dedicatedCloud_tab_dashboard"></span
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ export default {
securityState: '<',
setMessage: '<',
usersState: '<',
dedicatedCloudVCDMigrationState: '<',
dedicatedCloudPCCMigrationState: '<',
hasVCDMigration: '<',
vcdTrackingPrefix: '<',
},
controller,
template,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ export const MANAGED_PCC_MIGRATION_STATUS = {
UNKNOWN: 'unknown',
};

export const TRACKING_PREFIX = 'Baremetal::Managed_baremetal::';

export const MANAGED_VCD_MIGRATION_STATUS = {
TO_MIGRATE: 'TO_MIGRATE',
MIGRATED: 'MIGRATED',
Expand Down Expand Up @@ -188,4 +190,5 @@ export default {
MANAGED_VCD_MIGRATION_STATUS,
MANAGED_VCD_MIGRATION_STATE,
MANAGED_PCC_MIGRATION_STATUS,
TRACKING_PREFIX,
};
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import { TRACKING_PREFIX } from './dedicatedCloud.constant';

export default class {
/* @ngInject */
constructor($scope, $translate) {
this.$scope = $scope;
this.$translate = $translate;
this.TRACKING_PREFIX = TRACKING_PREFIX;
}

$onInit() {
this.isTabsHidden = this.hasVCDMigration;
if (this.dedicatedCloud.isExpired) {
this.setMessage(this.$translate.instant('common_expired'), 'danger');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,10 @@

<ovh-manager-pcc-managed-vcd-migration-banner
data-service-name="$ctrl.dedicatedCloud.serviceName"
data-tracking-prefix="$ctrl.vcdTrackingPrefix"
data-vcd-migration-state="$ctrl.dedicatedCloudVCDMigrationState"
data-pcc-migration-state="$ctrl.dedicatedCloudPCCMigrationState"
data-has-vcd-migration="$ctrl.hasVCDMigration"
data-tracking-prefix="$ctrl.TRACKING_PREFIX"
/>
<oui-header-tabs data-ng-if="!$ctrl.isTabsHidden">

<oui-header-tabs>
<oui-header-tabs-item data-state="{{:: $ctrl.pccDashboardState }}"
><span data-translate="dedicatedCloud_tab_dashboard"></span
></oui-header-tabs-item>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@ import template from './template.html';

export default {
bindings: {
serviceName: '<',
trackingPrefix: '<',
pccMigrationState: '<',
vcdMigrationState: '<',
hasVcdMigration: '<',
},
controller,
template,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default class ManagedVcdMigrationBannerCtrl {
}

$onInit() {
this.trackMigrationState();
this.loadMigrationState();
}

trackPage(name) {
Expand All @@ -15,17 +15,26 @@ export default class ManagedVcdMigrationBannerCtrl {
});
}

trackMigrationState() {
if (this.pccMigrationState?.isEnabling) {
this.trackPage(
'vmware::vmware::banner-info::migrate_to_managed_vcd_pending',
);
}
loadMigrationState() {
this.migrationState = null;

if (this.vcdMigrationState?.isDone) {
this.trackPage(
'vmware::vmware::banner-info::migrate_to_managed_vcd_success',
);
}
this.DedicatedCloud.getPCCMigrationState(this.serviceName).then((state) => {
this.migrationState = state;
if (state.isEnabling) {
this.trackPage(
'vmware::vmware::banner-info::migrate_to_managed_vcd_pending',
);
}
});

this.DedicatedCloud.getManagedVCDMigrationState(this.serviceName).then(
(state) => {
if (state.isDone) {
this.trackPage(
'vmware::vmware::banner-info::migrate_to_managed_vcd_success',
);
}
},
);
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
<oui-message class="pt-2" data-type="info" data-ng-if="$ctrl.hasVcdMigration">
<span data-translate="dedicatedCloud_managed_vcd_migrated"></span>
<oui-message
class="pt-2"
data-type="warning"
data-ng-if="$ctrl.migrationState.isEnabling"
>
<span
data-translate="dedicatedCloud_managed_vcd_migration_pending_warning"
></span>
</oui-message>
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{
"dedicatedCloud_managed_vcd_migration_pending_warning": "Achtung: Laufende Migration! Die Änderungen an Ihrem Dienst werden nicht übernommen.",
"dedicatedCloud_managed_vcd_migrated": "Ihre Hosted Private Cloud Lösung wurde oder wird derzeit zu VMware Cloud Director migriert. Auf dieser Seite können Sie Ihre öffentlichen IP-Blöcke verwalten (Bestellung eines neuen Blocks, Neuzuweisung eines bestehenden Blocks zu einem anderen Dienst), die derzeit Ihrem Hosted Private Cloud Dienst zugeteilt und mit Ihrem VMware Cloud Director Dienst verbunden sind. Diese Situation ist vorübergehend und endet, sobald Ihre öffentlichen IP-Blöcke automatisch mit Ihrem VMware Cloud Director Dienst verknüpft wurden."
"dedicatedCloud_managed_vcd_migration_pending_warning": "Achtung: Laufende Migration! Die Änderungen an Ihrem Dienst werden nicht übernommen."
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{
"dedicatedCloud_managed_vcd_migration_pending_warning": "Warning: migration in progress, any changes made to your service will not be taken into account",
"dedicatedCloud_managed_vcd_migrated": "Your Hosted Private Cloud solution has either been migrated or is currently being migrated to VMware Cloud Director. You can use this page to manage the public IP blocks (order a new block, reassign an existing block to another service) currently linked to your Hosted Private Cloud service and connected to your VMware Cloud Director service. This is temporary and will change once your public IP blocks have been linked to your VMware Cloud Director service."
"dedicatedCloud_managed_vcd_migration_pending_warning": "Warning: migration in progress, any changes made to your service will not be taken into account"
}
Loading

0 comments on commit 8d6958f

Please sign in to comment.