Skip to content

Commit

Permalink
feat(pci-object-storage): fix new issues
Browse files Browse the repository at this point in the history
ref: TAPC-1189
Signed-off-by: Selmen AKRMI <[email protected]>
  • Loading branch information
Selmen AKRMI committed Oct 18, 2024
1 parent 7fa735a commit 39148f0
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ export default class PciStoragesContainersAddController {

onContainerSolutionChange() {
this.container.region = null;
this.container.containerType = null;
}

onRegionsFocus() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
"pci_projects_project_storages_containers_add_error_post": "Une erreur est survenue lors de l'ajout du conteneur {{ container }} : {{ message }}.",
"pci_projects_project_storages_containers_add_type_price": "{{price}} HT/mois/Go",
"pci_projects_project_storages_containers_deployment_mode_title": "Sélectionnez un mode de déploiement",
"pci_projects_project_storages_containers_add_deployment_mode_region-3-az": "Région 3-AZ",
"pci_projects_project_storages_containers_add_deployment_mode_region": "Région 1-AZ",
"pci_projects_project_storages_containers_add_deployment_mode_region-3-az": "Régions 3-AZ",
"pci_projects_project_storages_containers_add_deployment_mode_region": "Régions 1-AZ",
"pci_projects_project_storages_containers_add_deployment_mode_region-3-az_description": "Déploiement hautement résilient et disponible sur 3 zones de disponibilité.",
"pci_projects_project_storages_containers_add_deployment_mode_region_description": "Déploiement résilient et économique sur 1 zone de disponibilité.",
"pci_projects_project_storages_containers_add_deployment_mode_region-3-az_label": "3-AZ",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ export default class PciStoragesContainersContainerController {
this.container.s3StorageType !== null &&
!this.archive;
this.loadMessages();
this.checkFileUploadState();
}

isLocalZone() {
Expand Down Expand Up @@ -121,18 +120,6 @@ export default class PciStoragesContainersContainerController {
.catch((err) => this.handleDownloadError(err));
}

checkFileUploadState() {
if (!this.container.s3StorageType) {
return false;
}
return this.PciProjectStorageContainersService.hasOngoingOpenIOMigration(
this.projectId,
this.container.region,
).then((ismigrating) => {
this.isFileUploadDisabled = ismigrating;
});
}

downloadStandardS3Object(serviceName, regionName, containerName, object) {
return this.PciProjectStorageContainersService.downloadStandardS3Object(
serviceName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,6 @@
<cui-message-container
data-messages="$ctrl.messages"
></cui-message-container>
<oui-message type="warning" data-ng-if="$ctrl.isFileUploadDisabled">
<span
data-translate="pci_projects_project_storages_containers_container_maintenance_message"
></span>
</oui-message>
</section>

<div data-ng-if="$ctrl.container">
Expand Down Expand Up @@ -295,10 +290,7 @@
</oui-action-menu>

<oui-datagrid-topbar>
<oui-button
data-on-click="$ctrl.addObject()"
data-disabled="$ctrl.isFileUploadDisabled"
>
<oui-button data-on-click="$ctrl.addObject()">
<span
class="oui-icon oui-icon-add pr-1"
aria-hidden="true"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
data-heading="{{ 'pci_projects_project_storages_containers_container_delete_'+ ($ctrl.archive ? 'archive' : 'object') + '_title' | translate }}"
data-primary-action="$ctrl.deleteStorage()"
data-primary-label="{{:: 'pci_projects_project_storages_containers_container_delete_submit_label' | translate }}"
data-primary-disabled="$ctrl.isLoading"
data-primary-disabled="$ctrl.isLoading || ($ctrl.container.objects && $ctrl.container.objects.length > 0)"
data-secondary-action="$ctrl.cancel()"
data-secondary-label="{{:: 'pci_projects_project_storages_containers_container_delete_cancel_label' | translate }}"
data-on-dismiss="$ctrl.goBack()"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -372,21 +372,6 @@ export default class PciStoragesContainersService {
);
}

/**
* Temporary feature to check if the merge of the S3 endpoints is ongoing.
* @param projectId {String}: project id (serviceName)
* @param {string} region container region
* @returns boolean
*/
hasOngoingOpenIOMigration(projectId, region) {
return this.$http
.get(
`/cloud/project/${projectId}/region/${region}/storage/openiomigrating`,
)
.then(({ data }) => data?.ismigrating)
.catch(() => false);
}

/**
* Create a S3 High Perf Standard Object
* Nota: later it will be used also to create S3 Standard Storage Object
Expand Down

0 comments on commit 39148f0

Please sign in to comment.