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,6 +149,18 @@ | ||
149 | </mat-error> | 149 | </mat-error> |
150 | </mat-form-field> | 150 | </mat-form-field> |
151 | <mat-form-field class="mat-block"> | 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 | <mat-label translate>tenant-profile.max-rule-node-executions-per-message</mat-label> | 164 | <mat-label translate>tenant-profile.max-rule-node-executions-per-message</mat-label> |
153 | <input matInput required min="0" step="1" | 165 | <input matInput required min="0" step="1" |
154 | formControlName="maxRuleNodeExecutionsPerMessage" | 166 | formControlName="maxRuleNodeExecutionsPerMessage" |
@@ -72,7 +72,8 @@ export class DefaultTenantProfileConfigurationComponent implements ControlValueA | @@ -72,7 +72,8 @@ export class DefaultTenantProfileConfigurationComponent implements ControlValueA | ||
72 | maxDPStorageDays: [null, [Validators.required, Validators.min(0)]], | 72 | maxDPStorageDays: [null, [Validators.required, Validators.min(0)]], |
73 | maxRuleNodeExecutionsPerMessage: [null, [Validators.required, Validators.min(0)]], | 73 | maxRuleNodeExecutionsPerMessage: [null, [Validators.required, Validators.min(0)]], |
74 | maxEmails: [null, [Validators.required, Validators.min(0)]], | 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 | this.defaultTenantProfileConfigurationFormGroup.valueChanges.subscribe(() => { | 78 | this.defaultTenantProfileConfigurationFormGroup.valueChanges.subscribe(() => { |
78 | this.updateModel(); | 79 | this.updateModel(); |
@@ -1415,7 +1415,7 @@ | @@ -1415,7 +1415,7 @@ | ||
1415 | { | 1415 | { |
1416 | "name": "storageDataPointsCountHourly", | 1416 | "name": "storageDataPointsCountHourly", |
1417 | "type": "timeseries", | 1417 | "type": "timeseries", |
1418 | - "label": "Storage data points", | 1418 | + "label": "Data points storage days", |
1419 | "color": "#1039ee", | 1419 | "color": "#1039ee", |
1420 | "settings": { | 1420 | "settings": { |
1421 | "excludeFromStacking": false, | 1421 | "excludeFromStacking": false, |
@@ -2738,7 +2738,7 @@ | @@ -2738,7 +2738,7 @@ | ||
2738 | { | 2738 | { |
2739 | "name": "storageDataPointsCountHourly", | 2739 | "name": "storageDataPointsCountHourly", |
2740 | "type": "timeseries", | 2740 | "type": "timeseries", |
2741 | - "label": "Storage data points", | 2741 | + "label": "Data points storage days", |
2742 | "color": "#1039ee", | 2742 | "color": "#1039ee", |
2743 | "settings": { | 2743 | "settings": { |
2744 | "excludeFromStacking": false, | 2744 | "excludeFromStacking": false, |
@@ -2873,7 +2873,7 @@ | @@ -2873,7 +2873,7 @@ | ||
2873 | { | 2873 | { |
2874 | "name": "storageDataPointsCount", | 2874 | "name": "storageDataPointsCount", |
2875 | "type": "timeseries", | 2875 | "type": "timeseries", |
2876 | - "label": "Storage data points", | 2876 | + "label": "Data points storage days", |
2877 | "color": "#1039ee", | 2877 | "color": "#1039ee", |
2878 | "settings": { | 2878 | "settings": { |
2879 | "excludeFromStacking": false, | 2879 | "excludeFromStacking": false, |
@@ -46,6 +46,8 @@ export interface DefaultTenantProfileConfiguration { | @@ -46,6 +46,8 @@ export interface DefaultTenantProfileConfiguration { | ||
46 | maxRuleNodeExecutionsPerMessage: number; | 46 | maxRuleNodeExecutionsPerMessage: number; |
47 | maxEmails: number; | 47 | maxEmails: number; |
48 | maxSms: number; | 48 | maxSms: number; |
49 | + | ||
50 | + defaultStorageTtlDays: number; | ||
49 | } | 51 | } |
50 | 52 | ||
51 | export type TenantProfileConfigurations = DefaultTenantProfileConfiguration; | 53 | export type TenantProfileConfigurations = DefaultTenantProfileConfiguration; |
@@ -73,7 +75,8 @@ export function createTenantProfileConfiguration(type: TenantProfileType): Tenan | @@ -73,7 +75,8 @@ export function createTenantProfileConfiguration(type: TenantProfileType): Tenan | ||
73 | maxDPStorageDays: 0, | 75 | maxDPStorageDays: 0, |
74 | maxRuleNodeExecutionsPerMessage: 0, | 76 | maxRuleNodeExecutionsPerMessage: 0, |
75 | maxEmails: 0, | 77 | maxEmails: 0, |
76 | - maxSms: 0 | 78 | + maxSms: 0, |
79 | + defaultStorageTtlDays: 0 | ||
77 | }; | 80 | }; |
78 | configuration = {...defaultConfiguration, type: TenantProfileType.DEFAULT}; | 81 | configuration = {...defaultConfiguration, type: TenantProfileType.DEFAULT}; |
79 | break; | 82 | break; |
@@ -2011,19 +2011,22 @@ | @@ -2011,19 +2011,22 @@ | ||
2011 | "max-transport-messages-range": "Maximum number of transport messages can't be negative", | 2011 | "max-transport-messages-range": "Maximum number of transport messages can't be negative", |
2012 | "max-transport-data-points": "Maximum number of transport data points (0 - unlimited)", | 2012 | "max-transport-data-points": "Maximum number of transport data points (0 - unlimited)", |
2013 | "max-transport-data-points-required": "Maximum number of transport data points is required.", | 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 | "max-r-e-executions": "Maximum number of Rule Engine executions (0 - unlimited)", | 2015 | "max-r-e-executions": "Maximum number of Rule Engine executions (0 - unlimited)", |
2016 | "max-r-e-executions-required": "Maximum number of Rule Engine executions is required.", | 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 | "max-j-s-executions": "Maximum number of JavaScript executions (0 - unlimited)", | 2018 | "max-j-s-executions": "Maximum number of JavaScript executions (0 - unlimited)", |
2019 | "max-j-s-executions-required": "Maximum number of JavaScript executions is required.", | 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 | "max-d-p-storage-days": "Maximum number of data points storage days (0 - unlimited)", | 2021 | "max-d-p-storage-days": "Maximum number of data points storage days (0 - unlimited)", |
2022 | "max-d-p-storage-days-required": "Maximum number of data points storage days is required.", | 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 | "max-rule-node-executions-per-message": "Maximum number of rule node executions per message (0 - unlimited)", | 2027 | "max-rule-node-executions-per-message": "Maximum number of rule node executions per message (0 - unlimited)", |
2025 | "max-rule-node-executions-per-message-required": "Maximum number of rule node executions per message is required.", | 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 | "max-emails": "Maximum number of emails sent (0 - unlimited)", | 2030 | "max-emails": "Maximum number of emails sent (0 - unlimited)", |
2028 | "max-emails-required": "Maximum number of emails sent is required.", | 2031 | "max-emails-required": "Maximum number of emails sent is required.", |
2029 | "max-emails-range": "Maximum number of emails sent can't be negative", | 2032 | "max-emails-range": "Maximum number of emails sent can't be negative", |