-
Notifications
You must be signed in to change notification settings - Fork 134
/
basic-plan-price-spec.ts
117 lines (102 loc) · 3.92 KB
/
basic-plan-price-spec.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
import { Kinds, Links, ServerFarmSku } from './../../../shared/models/constants';
import { PortalResources } from './../../../shared/models/portal-resources';
import { AppKind } from './../../../shared/Utilities/app-kind';
import { PriceSpec, PriceSpecInput } from './price-spec';
export abstract class BasicPlanPriceSpec extends PriceSpec {
sku = ServerFarmSku.basic;
featureItems = [{
iconUrl: 'image/ssl.svg',
title: this._ts.instant(PortalResources.pricing_customDomainsSsl),
description: this._ts.instant(PortalResources.pricing_customDomainsSslDesc),
},
{
iconUrl: 'image/scale-up.svg',
title: this._ts.instant(PortalResources.pricing_manualScale),
description: this._ts.instant(PortalResources.pricing_scaleDesc).format(3),
}];
hardwareItems = [{
iconUrl: 'image/app-service-plan.svg',
title: this._ts.instant(PortalResources.pricing_includedHardware_azureComputeUnits),
description: this._ts.instant(PortalResources.pricing_computeDedicatedAcu),
learnMoreUrl: Links.azureComputeUnitLearnMore,
},
{
iconUrl: 'image/website-power.svg',
title: this._ts.instant(PortalResources.memory),
description: this._ts.instant(PortalResources.pricing_dedicatedMemory),
},
{
iconUrl: 'image/storage.svg',
title: this._ts.instant(PortalResources.storage),
description: this._ts.instant(PortalResources.pricing_sharedDisk).format('10 GB'),
}];
cssClass = 'spec basic-spec';
runInitialization(input: PriceSpecInput) {
// data should only be populated for new plans
if (input.specPickerInput.data) {
if (input.specPickerInput.data.hostingEnvironmentName
|| input.specPickerInput.data.isXenon
|| input.specPickerInput.data.isElastic) {
this.state = 'hidden';
}
} else if (input.plan) {
if (input.plan.properties.hostingEnvironmentProfile
|| input.plan.properties.isXenon
|| AppKind.hasAnyKind(input.plan, [Kinds.elastic])) {
this.state = 'hidden';
}
}
return this.checkIfDreamspark(input.subscriptionId);
}
}
export class BasicSmallPlanPriceSpec extends BasicPlanPriceSpec {
skuCode = 'B1';
legacySkuName = 'small_basic';
topLevelFeatures = [
this._ts.instant(PortalResources.pricing_ACU).format('100'),
this._ts.instant(PortalResources.pricing_memory).format('1.75'),
this._ts.instant(PortalResources.pricing_aSeriesComputeEquivalent),
];
meterFriendlyName = 'Basic Small App Service Hours';
specResourceSet = {
id: this.skuCode,
firstParty: [{
quantity: 744,
resourceId: null
}]
};
}
export class BasicMediumPlanPriceSpec extends BasicPlanPriceSpec {
skuCode = 'B2';
legacySkuName = 'medium_basic';
topLevelFeatures = [
this._ts.instant(PortalResources.pricing_ACU).format('200'),
this._ts.instant(PortalResources.pricing_memory).format('3.5'),
this._ts.instant(PortalResources.pricing_aSeriesComputeEquivalent),
];
meterFriendlyName = 'Basic Medium App Service Hours';
specResourceSet = {
id: this.skuCode,
firstParty: [{
quantity: 744,
resourceId: null
}]
};
}
export class BasicLargePlanPriceSpec extends BasicPlanPriceSpec {
skuCode = 'B3';
legacySkuName = 'large_basic';
topLevelFeatures = [
this._ts.instant(PortalResources.pricing_ACU).format('400'),
this._ts.instant(PortalResources.pricing_memory).format('7'),
this._ts.instant(PortalResources.pricing_aSeriesComputeEquivalent),
];
meterFriendlyName = 'Basic Large App Service Hours';
specResourceSet = {
id: this.skuCode,
firstParty: [{
quantity: 744,
resourceId: null
}]
};
}