Commit 8385d18c3a53e01ac7fad492ba1c473bb19a7ec8
1 parent
4e8b0aa6
UI: Add default storage TTL Days to tenant profile configuration
Showing
5 changed files
with
29 additions
and
10 deletions
... | ... | @@ -149,6 +149,18 @@ |
149 | 149 | </mat-error> |
150 | 150 | </mat-form-field> |
151 | 151 | <mat-form-field class="mat-block"> |
152 | + <mat-label translate>tenant-profile.default-storage-ttl-days</mat-label> | |
153 | + <input matInput required min="0" step="1" | |
154 | + formControlName="defaultStorageTtlDays" | |
155 | + type="number"> | |
156 | + <mat-error *ngIf="defaultTenantProfileConfigurationFormGroup.get('defaultStorageTtlDays').hasError('required')"> | |
157 | + {{ 'tenant-profile.default-storage-ttl-days-required' | translate}} | |
158 | + </mat-error> | |
159 | + <mat-error *ngIf="defaultTenantProfileConfigurationFormGroup.get('defaultStorageTtlDays').hasError('min')"> | |
160 | + {{ 'tenant-profile.default-storage-ttl-days-range' | translate}} | |
161 | + </mat-error> | |
162 | + </mat-form-field> | |
163 | + <mat-form-field class="mat-block"> | |
152 | 164 | <mat-label translate>tenant-profile.max-rule-node-executions-per-message</mat-label> |
153 | 165 | <input matInput required min="0" step="1" |
154 | 166 | formControlName="maxRuleNodeExecutionsPerMessage" | ... | ... |
... | ... | @@ -72,7 +72,8 @@ export class DefaultTenantProfileConfigurationComponent implements ControlValueA |
72 | 72 | maxDPStorageDays: [null, [Validators.required, Validators.min(0)]], |
73 | 73 | maxRuleNodeExecutionsPerMessage: [null, [Validators.required, Validators.min(0)]], |
74 | 74 | maxEmails: [null, [Validators.required, Validators.min(0)]], |
75 | - maxSms: [null, [Validators.required, Validators.min(0)]] | |
75 | + maxSms: [null, [Validators.required, Validators.min(0)]], | |
76 | + defaultStorageTtlDays: [null, [Validators.required, Validators.min(0)]] | |
76 | 77 | }); |
77 | 78 | this.defaultTenantProfileConfigurationFormGroup.valueChanges.subscribe(() => { |
78 | 79 | this.updateModel(); | ... | ... |
... | ... | @@ -1415,7 +1415,7 @@ |
1415 | 1415 | { |
1416 | 1416 | "name": "storageDataPointsCountHourly", |
1417 | 1417 | "type": "timeseries", |
1418 | - "label": "Storage data points", | |
1418 | + "label": "Data points storage days", | |
1419 | 1419 | "color": "#1039ee", |
1420 | 1420 | "settings": { |
1421 | 1421 | "excludeFromStacking": false, |
... | ... | @@ -2738,7 +2738,7 @@ |
2738 | 2738 | { |
2739 | 2739 | "name": "storageDataPointsCountHourly", |
2740 | 2740 | "type": "timeseries", |
2741 | - "label": "Storage data points", | |
2741 | + "label": "Data points storage days", | |
2742 | 2742 | "color": "#1039ee", |
2743 | 2743 | "settings": { |
2744 | 2744 | "excludeFromStacking": false, |
... | ... | @@ -2873,7 +2873,7 @@ |
2873 | 2873 | { |
2874 | 2874 | "name": "storageDataPointsCount", |
2875 | 2875 | "type": "timeseries", |
2876 | - "label": "Storage data points", | |
2876 | + "label": "Data points storage days", | |
2877 | 2877 | "color": "#1039ee", |
2878 | 2878 | "settings": { |
2879 | 2879 | "excludeFromStacking": false, | ... | ... |
... | ... | @@ -46,6 +46,8 @@ export interface DefaultTenantProfileConfiguration { |
46 | 46 | maxRuleNodeExecutionsPerMessage: number; |
47 | 47 | maxEmails: number; |
48 | 48 | maxSms: number; |
49 | + | |
50 | + defaultStorageTtlDays: number; | |
49 | 51 | } |
50 | 52 | |
51 | 53 | export type TenantProfileConfigurations = DefaultTenantProfileConfiguration; |
... | ... | @@ -73,7 +75,8 @@ export function createTenantProfileConfiguration(type: TenantProfileType): Tenan |
73 | 75 | maxDPStorageDays: 0, |
74 | 76 | maxRuleNodeExecutionsPerMessage: 0, |
75 | 77 | maxEmails: 0, |
76 | - maxSms: 0 | |
78 | + maxSms: 0, | |
79 | + defaultStorageTtlDays: 0 | |
77 | 80 | }; |
78 | 81 | configuration = {...defaultConfiguration, type: TenantProfileType.DEFAULT}; |
79 | 82 | break; | ... | ... |
... | ... | @@ -2011,19 +2011,22 @@ |
2011 | 2011 | "max-transport-messages-range": "Maximum number of transport messages can't be negative", |
2012 | 2012 | "max-transport-data-points": "Maximum number of transport data points (0 - unlimited)", |
2013 | 2013 | "max-transport-data-points-required": "Maximum number of transport data points is required.", |
2014 | - "max-transport-data-points-range": "Minimum number of transport data points can't be negative", | |
2014 | + "max-transport-data-points-range": "Maximum number of transport data points can't be negative", | |
2015 | 2015 | "max-r-e-executions": "Maximum number of Rule Engine executions (0 - unlimited)", |
2016 | 2016 | "max-r-e-executions-required": "Maximum number of Rule Engine executions is required.", |
2017 | - "max-r-e-executions-range": "Minimum number of Rule Engine executions can't be negative", | |
2017 | + "max-r-e-executions-range": "Maximum number of Rule Engine executions can't be negative", | |
2018 | 2018 | "max-j-s-executions": "Maximum number of JavaScript executions (0 - unlimited)", |
2019 | 2019 | "max-j-s-executions-required": "Maximum number of JavaScript executions is required.", |
2020 | - "max-j-s-executions-range": "Minimum number of JavaScript executions can't be negative", | |
2020 | + "max-j-s-executions-range": "Maximum number of JavaScript executions can't be negative", | |
2021 | 2021 | "max-d-p-storage-days": "Maximum number of data points storage days (0 - unlimited)", |
2022 | 2022 | "max-d-p-storage-days-required": "Maximum number of data points storage days is required.", |
2023 | - "max-d-p-storage-days-range": "Minimum number of data points storage days can't be negative", | |
2023 | + "max-d-p-storage-days-range": "Maximum number of data points storage days can't be negative", | |
2024 | + "default-storage-ttl-days": "Default storage TTL days (0 - unlimited)", | |
2025 | + "default-storage-ttl-days-required": "Default storage TTL days is required.", | |
2026 | + "default-storage-ttl-days-range": "Default storage TTL days can't be negative", | |
2024 | 2027 | "max-rule-node-executions-per-message": "Maximum number of rule node executions per message (0 - unlimited)", |
2025 | 2028 | "max-rule-node-executions-per-message-required": "Maximum number of rule node executions per message is required.", |
2026 | - "max-rule-node-executions-per-message-range": "Minimum number of rule node executions per message can't be negative", | |
2029 | + "max-rule-node-executions-per-message-range": "Maximum number of rule node executions per message can't be negative", | |
2027 | 2030 | "max-emails": "Maximum number of emails sent (0 - unlimited)", |
2028 | 2031 | "max-emails-required": "Maximum number of emails sent is required.", |
2029 | 2032 | "max-emails-range": "Maximum number of emails sent can't be negative", | ... | ... |