Skip to content

Commit

Permalink
sync: master to develop
Browse files Browse the repository at this point in the history
sync: master to develop
  • Loading branch information
ovh-ux-cds authored Oct 18, 2024
2 parents 01677dc + e62d5d0 commit 4720767
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,9 @@ export default class RegionsListController {
}
})
.finally(() => {
this.loadEnd();
if (this.loadEnd) {
this.loadEnd();
}
});
} else {
this.regionsByDeploymentMode = this.regions;
Expand Down Expand Up @@ -221,7 +223,9 @@ export default class RegionsListController {
);
this.macroRegion = this.region?.macroRegion.text;
}
this.loadEnd();
if (this.loadEnd) {
this.loadEnd();
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,17 @@ export default /* @ngInject */ ($stateProvider) => {
$translate.instant(
'pci_projects_project_storages_containers_archive_title',
),

regions: /* @ngInject */ (PciProjectRegions, projectId) =>
PciProjectRegions.getAvailableRegions(projectId).then((regions) => {
return regions.reduce((acc, region) => {
acc[region.name] = region;
return acc;
}, {});
}),

catalog: /* @ngInject */ (PciStoragesObjectStorageService) =>
PciStoragesObjectStorageService.getCatalog(),
},
});
};
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ export default class PciStoragesContainersAddController {
deploymentMode: null,
});
this.container.region = null;
this.container.offer = OBJECT_CONTAINER_OFFER_STORAGE_STANDARD;
this.container.offer = this.archive
? null
: OBJECT_CONTAINER_OFFER_STORAGE_STANDARD;

this.userModel = {
linkedMode: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ <h2 class="oui-header__description mb-5">
<!--Regions list-->
<oui-step-form
data-position="{{!$ctrl.archive && $ctrl.isRightOffer() ? 2 : 1}}"
ata-ng-if="!$ctrl.archive && (!$ctrl.isRightOffer() || $ctrl.container.deploymentMode)"
data-ng-if="!$ctrl.archive && (!$ctrl.isRightOffer() || $ctrl.container.deploymentMode)"
data-name="storage_container_add_region"
data-header="{{:: 'pci_projects_project_storages_containers_add_region_title' | translate }}"
data-navigation="$ctrl.container.region"
Expand Down Expand Up @@ -364,7 +364,7 @@ <h2 class="oui-header__description mb-5">
<!--Create/Linked user-->
<oui-step-form
data-position="3"
data-ng-if="$ctrl.isRightOffer()"
data-ng-if="!$ctrl.archive && $ctrl.isRightOffer()"
data-header="{{:: 'pci_projects_project_storages_containers_add_create_or_linked_user_title' | translate }}"
data-navigation="$ctrl.isReadyForValidation()"
data-name="storage_container_add_user"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export default class PciStoragesContainersController {
this.containers = this.containers.reduce((acc, container) => {
acc.push({
...container,
deploymentMode: this.regions[container.region].type,
deploymentMode: this.regions?.[container.region].type || null,
});
return acc;
}, []);
Expand Down

0 comments on commit 4720767

Please sign in to comment.