Skip to content

Commit

Permalink
feat(dedicated.vrack): enable delete vrack service only for ca and eu
Browse files Browse the repository at this point in the history
ref: MANAGER-14507

Signed-off-by: Sachin Ramesh <sachin.ramesh@ovhcloud.com>
  • Loading branch information
sachinrameshn committed Oct 28, 2024
1 parent 81caaab commit 6e19e47
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export default {
bindings: {
features: '<',
goToMoveDialog: '<',
deletefeature: '<',
},
controller,
template,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ export const FEATURE_NAMES = {
managedBareMetalDatacenter: 'managed-bare-metal',
};

export const DELETE_VRACK_SERVICE_FEATURE = 'vrack:delete';

export const POLLING_INTERVAL = 500;
export const ELIGIBLE_POLLING_INTERVAL = 1000;

Expand Down
2 changes: 1 addition & 1 deletion packages/manager/modules/vrack/src/dashboard/vrack.html
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ <h3 data-translate="vrack_introduction_title"></h3>
</div>
</div>
</section>
<section>
<section data-ng-if="$ctrl.deletefeature">
<h3 data-translate="vrack_terminate_title"></h3>
<p data-translate="vrack_terminate_description"></p>
<button
Expand Down
10 changes: 9 additions & 1 deletion packages/manager/modules/vrack/src/dashboard/vrack.routing.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FEATURE_NAMES } from './vrack.constant';
import { FEATURE_NAMES, DELETE_VRACK_SERVICE_FEATURE } from './vrack.constant';

export default /* @ngInject */ ($stateProvider) => {
$stateProvider.state('vrack.dashboard', {
Expand All @@ -11,6 +11,14 @@ export default /* @ngInject */ ($stateProvider) => {
ovhFeatureFlipping.checkFeatureAvailability(
Object.values(FEATURE_NAMES),
),
deletefeatures: /* @ngInject */ (ovhFeatureFlipping) =>
ovhFeatureFlipping
.checkFeatureAvailability(DELETE_VRACK_SERVICE_FEATURE)
.then((featureAvailability) =>
featureAvailability.isFeatureAvailable(
DELETE_VRACK_SERVICE_FEATURE,
),
),
vrackId: /* @ngInject */ ($transition$) => $transition$.params().vrackId,
breadcrumb: /* @ngInject */ (vrackId) => vrackId,
},
Expand Down

0 comments on commit 6e19e47

Please sign in to comment.