Skip to content

Commit

Permalink
feat(dedicated.ip): make parking as constant (#13610)
Browse files Browse the repository at this point in the history
ref: MANAGER-15660

Signed-off-by: Sachin Ramesh <[email protected]>
  • Loading branch information
sachinrameshn authored Oct 31, 2024
1 parent 080269b commit 1e16542
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@
"ip_servicetype_ipLoadbalancing": "IP Load Balancing",
"ip_servicetype_cloudProject": "Projet Cloud",
"ip_servicetype_vRack": "VRACK",
"ip_servicetype__PARK": "Parking",
"ip_order_quota_full": "Le quota maximal d'IPs a été atteint pour ce serveur.",
"ip_order_noservices": "Vous n'avez aucun service disponible à la commande.",
"ip_order_step1_question": "Sélectionnez le service pour lequel vous désirez acheter des ",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import {

export const FETCH_PRICE_MAX_TRIES = 5;

export const IP_SERVICETYPE__PARK = 'IP Parking';

export const PRODUCT_TYPES = {
dedicatedServer: {
apiTypeName: 'SERVER',
Expand Down Expand Up @@ -124,6 +126,7 @@ export const IP_LOCATION_GROUPS_BASED_ON_DATACENTER = [
export default {
FETCH_PRICE_MAX_TRIES,
IP_LOCATION_GROUPS,
IP_SERVICETYPE__PARK,
PRODUCT_TYPES,
TRACKING_PREFIX,
VPS_MAX_QUANTITY,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {

import {
IP_LOCATION_GROUPS,
IP_SERVICETYPE__PARK,
PRODUCT_TYPES,
TRACKING_PREFIX,
VPS_MAX_QUANTITY,
Expand Down Expand Up @@ -118,16 +119,19 @@ export default class AgoraIpV4OrderController {
})
.then((results) => {
results.services.push({
displayName: this.$translate.instant('ip_servicetype__PARK'),
displayName: IP_SERVICETYPE__PARK,
serviceName: 'parking',
type: 'parking',
});
this.user = results.user;
this.services = results.services.map((service) => ({
...service,
translatedType: this.$translate.instant(
`ip_filter_services_title_${service.type}`,
),
translatedType:
service.type === 'parking'
? IP_SERVICETYPE__PARK
: this.$translate.instant(
`ip_filter_services_title_${service.type}`,
),
}));
this.ipFailoverPrice = this.getIpFailoverPrice();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
export const ADDITIONAL_IP = 'Additional IP';
export const DELETE_TRACKING_PREFIX = 'dedicated::ip::delete-additional-ip';
export const IP_SERVICETYPE__PARK = 'IP Parking';

export default {
ADDITIONAL_IP,
DELETE_TRACKING_PREFIX,
IP_SERVICETYPE__PARK,
};
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ADDITIONAL_IP } from '../ip-ip-block.constant';
import { ADDITIONAL_IP, IP_SERVICETYPE__PARK } from '../ip-ip-block.constant';

export default /* @ngInject */ (
$scope,
Expand All @@ -14,6 +14,7 @@ export default /* @ngInject */ (
$scope.ipCanBeMovedTo = false;
$scope.ipCanBeMovedToError = '';
$scope.ADDITIONAL_IP = ADDITIONAL_IP;
$scope.IP_SERVICETYPE__PARK = IP_SERVICETYPE__PARK;

$scope.loading = {
init: true,
Expand All @@ -38,7 +39,7 @@ export default /* @ngInject */ (
Ip.getIpMove($scope.data.ipBlock.ipBlock).then((result) => {
$scope.ipDestinations = result;
$scope.ipDestinations.push({
service: $translate.instant('ip_servicetype__PARK'),
service: IP_SERVICETYPE__PARK,
serviceType: '_PARK',
nexthop: [],
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
class="form-control"
data-ng-model="model.serviceName"
data-ng-change="model.nexthop = null"
data-ng-options="service as service.service group by (('ip_servicetype_' + service.serviceType) | ducTranslateAlt: service.serviceType) for service in ipDestinations"
data-ng-options="service as service.service group by (('ip_servicetype_' + service.serviceType) | ducTranslateAlt: (service.serviceType === '_PARK' ? IP_SERVICETYPE__PARK : service.serviceType)) for service in ipDestinations"
>
</select>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@
"ip_filter_services_title_MAIL": "Serveurs de Mails",
"ip_filter_services_title_CLOUD": "Public Cloud",
"ip_filter_services_title_IP_LOAD_BALANCING": "OVHcloud Load Balancer",
"ip_filter_services_title_parking": "Parking",
"ip_filter_services_CDN": "Uniquement les CDN",
"ip_filter_services_DEDICATED": "Uniquement les Serveurs Dédiés",
"ip_filter_services_HOSTED_SSL": "Uniquement les Hosted SSL",
Expand Down Expand Up @@ -519,7 +518,7 @@
"ip_servicetype_ipLoadbalancing": "IP Load Balancing",
"ip_servicetype_cloudProject": "Projet Cloud",
"ip_servicetype_vRack": "VRACK",
"ip_servicetype__PARK": "Parking",

"ip_order_quota_full": "Le quota maximal d'IPs a été atteint pour ce serveur.",
"ip_order_noservices": "Vous n'avez aucun service disponible à la commande.",
"ip_order_step1_question": "Sélectionnez le service pour lequel vous désirez acheter des ",
Expand Down

0 comments on commit 1e16542

Please sign in to comment.