Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(dedicated): add iplb delete option for us #14243

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

mhelhali-soufien
Copy link
Contributor

Question Answer
Branch? master / release/** / develop
Bug fix? yes/no
New feature? yes/no
Breaking change? yes/no
Tickets Fix #MANAGER-15666
License BSD 3-Clause
  • Try to keep pull requests small so they can be easily reviewed.
  • Commits are signed-off
  • Only FR translations have been updated
  • Branch is up-to-date with target branch
  • Lint has passed locally
  • Standalone app was ran and tested locally
  • Ticket reference is mentioned in linked commits (internal only)
  • Breaking change is mentioned in relevant commits

Description

Related

"iplb_terminate_service_success": "Votre demande de suppression de votre service a été prise en compte. Un e-mail contenant la procédure vous a été envoyé.",
"iplb_terminate_service_error": "Une erreur est survenue lors de la demande de suppression de votre service. {{error}}",
"iplb_terminate_service_confirm_input": "Entrez \"TERMINATE\" dans le champ ci-dessous pour confirmer",
"iplb_terminate_service_terminate_valide": "Valider",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"iplb_terminate_service_terminate_valide": "Valider",
"iplb_terminate_service_terminate_valid": "Valider",

},
redirectTo: (transition) =>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we removing this redirection for empty case ?

this.$http = $http;
this.Alerter = Alerter;
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$onInit() {
this.isDeleting = false;
}


$onInit() {
super.$onInit();
console.log(this.Alerter);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
console.log(this.Alerter);

Comment on lines 23 to 34
<oui-action-menu
data-compact
data-placement="end"
data-ng-if="$ctrl.isDeleteOptionsAvailable"
>
<oui-action-menu-item data-on-click="$ctrl.gotoService($row)">
<span data-translate="iplb_listing_action_detail"></span>
</oui-action-menu-item>
<oui-action-menu-item data-on-click="$ctrl.deleteIplb($row)">
<span data-translate="iplb_listing_action_delete"></span>
</oui-action-menu-item>
</oui-action-menu>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<oui-action-menu
data-compact
data-placement="end"
data-ng-if="$ctrl.isDeleteOptionsAvailable"
>
<oui-action-menu-item data-on-click="$ctrl.gotoService($row)">
<span data-translate="iplb_listing_action_detail"></span>
</oui-action-menu-item>
<oui-action-menu-item data-on-click="$ctrl.deleteIplb($row)">
<span data-translate="iplb_listing_action_delete"></span>
</oui-action-menu-item>
</oui-action-menu>
<oui-action-menu
data-compact
data-placement="end"
>
<oui-action-menu-item data-on-click="$ctrl.gotoService($row)">
<span data-translate="iplb_listing_action_detail"></span>
</oui-action-menu-item>
<oui-action-menu-item data-ng-if="$ctrl.isDeleteOptionsAvailable" data-on-click="$ctrl.deleteIplb($row)">
<span data-translate="iplb_listing_action_delete"></span>
</oui-action-menu-item>
</oui-action-menu>

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree with that request, you can keep action menu for the detail action.

data-heading="{{:: 'iplb_terminate_service' | translate}}"
data-primary-action="$ctrl.terminate()"
data-primary-disabled="!$ctrl.terminateConfirmation"
data-primary-label="{{:: 'iplb_terminate_service_terminate_valide' | translate }}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
data-primary-label="{{:: 'iplb_terminate_service_terminate_valide' | translate }}"
data-primary-label="{{:: 'iplb_terminate_service_terminate_valid' | translate }}"

Comment on lines 26 to 44
terminate() {
this.$http
.post(`/ipLoadbalancing/${this.service.serviceName}/terminate`)
.then(() => {
this.Alerter.success(
this.$translate.instant('iplb_terminate_service_success'),
);
})
.catch((err) => {
this.Alerter.error(
this.$translate.instant('iplb_terminate_service_error', {
t0: err.data ? err.data.message : err.message,
}),
this.alertId,
);
});
this.$uibModalInstance.close();
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
terminate() {
this.$http
.post(`/ipLoadbalancing/${this.service.serviceName}/terminate`)
.then(() => {
this.Alerter.success(
this.$translate.instant('iplb_terminate_service_success'),
);
})
.catch((err) => {
this.Alerter.error(
this.$translate.instant('iplb_terminate_service_error', {
t0: err.data ? err.data.message : err.message,
}),
this.alertId,
);
});
this.$uibModalInstance.close();
}
terminate() {
this.$http
.post(`/ipLoadbalancing/${this.service.serviceName}/terminate`)
.then(() => {
this.Alerter.success(
this.$translate.instant('iplb_terminate_service_success'),
);
this.$uibModalInstance.close();
})
.catch((err) => {
this.Alerter.error(
this.$translate.instant('iplb_terminate_service_error', {
t0: err.data ? err.data.message : err.message,
}),
this.alertId,
);
this.$uibModalInstance.dismiss();
});
}

$onInit() {
super.$onInit();
console.log(this.Alerter);
this.Alerter.error('test test test', 'InfoErrors');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
this.Alerter.error('test test test', 'InfoErrors');

this.$state = $state;
this.ouiDatagridService = ouiDatagridService;
this.CucControllerHelper = CucControllerHelper;
this.Alerter = Alerter;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
this.Alerter = Alerter;


export default class iplbListingCtrl extends ListLayoutHelper.ListLayoutCtrl {
/* @ngInject */
constructor($state, $q, Alerter, ouiDatagridService, CucControllerHelper) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
constructor($state, $q, Alerter, ouiDatagridService, CucControllerHelper) {
constructor($state, $q, ouiDatagridService, CucControllerHelper) {

Comment on lines 1 to 19
export const DEFAULT_NUMBER_OF_COLUMNS = 4;

export const STRING_COLUMN_OPTIONS = [
'contains',
'startsWith',
'endsWith',
'is',
'isNot',
];

export const NUMBER_COLUMN_OPTIONS = ['is'];
export const LB_DELETE_FEATURE = 'ip-load-balancer:delete';

export default {
DEFAULT_NUMBER_OF_COLUMNS,
NUMBER_COLUMN_OPTIONS,
STRING_COLUMN_OPTIONS,
LB_DELETE_FEATURE,
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To remove

Suggested change
export const DEFAULT_NUMBER_OF_COLUMNS = 4;
export const STRING_COLUMN_OPTIONS = [
'contains',
'startsWith',
'endsWith',
'is',
'isNot',
];
export const NUMBER_COLUMN_OPTIONS = ['is'];
export const LB_DELETE_FEATURE = 'ip-load-balancer:delete';
export default {
DEFAULT_NUMBER_OF_COLUMNS,
NUMBER_COLUMN_OPTIONS,
STRING_COLUMN_OPTIONS,
LB_DELETE_FEATURE,
};

Copy link

sonarqubecloud bot commented Dec 4, 2024

Copy link
Contributor

github-actions bot commented Jan 5, 2025

This Pull Request is stale due to inactivity since 30 days. If no activity happens for 15 more days from now, it will be closed.

@github-actions github-actions bot added the stale No activity since a long time label Jan 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants