Commit eb4f4baafb174067b8e68f39a3636b5cc4151431
1 parent
d2f63c76
UI: Update Tenant Profile - add max emails and sms
Showing
4 changed files
with
39 additions
and
3 deletions
... | ... | @@ -161,6 +161,30 @@ |
161 | 161 | </mat-error> |
162 | 162 | </mat-form-field> |
163 | 163 | <mat-form-field class="mat-block"> |
164 | + <mat-label translate>tenant-profile.max-emails</mat-label> | |
165 | + <input matInput required min="0" step="1" | |
166 | + formControlName="maxEmails" | |
167 | + type="number"> | |
168 | + <mat-error *ngIf="defaultTenantProfileConfigurationFormGroup.get('maxEmails').hasError('required')"> | |
169 | + {{ 'tenant-profile.max-emails-required' | translate}} | |
170 | + </mat-error> | |
171 | + <mat-error *ngIf="defaultTenantProfileConfigurationFormGroup.get('maxEmails').hasError('min')"> | |
172 | + {{ 'tenant-profile.max-emails-range' | translate}} | |
173 | + </mat-error> | |
174 | + </mat-form-field> | |
175 | + <mat-form-field class="mat-block"> | |
176 | + <mat-label translate>tenant-profile.max-sms</mat-label> | |
177 | + <input matInput required min="0" step="1" | |
178 | + formControlName="maxSms" | |
179 | + type="number"> | |
180 | + <mat-error *ngIf="defaultTenantProfileConfigurationFormGroup.get('maxSms').hasError('required')"> | |
181 | + {{ 'tenant-profile.max-sms-required' | translate}} | |
182 | + </mat-error> | |
183 | + <mat-error *ngIf="defaultTenantProfileConfigurationFormGroup.get('maxSms').hasError('min')"> | |
184 | + {{ 'tenant-profile.max-sms-range' | translate}} | |
185 | + </mat-error> | |
186 | + </mat-form-field> | |
187 | + <mat-form-field class="mat-block"> | |
164 | 188 | <mat-label translate>tenant-profile.transport-tenant-msg-rate-limit</mat-label> |
165 | 189 | <input matInput formControlName="transportTenantMsgRateLimit"> |
166 | 190 | </mat-form-field> | ... | ... |
... | ... | @@ -70,7 +70,9 @@ export class DefaultTenantProfileConfigurationComponent implements ControlValueA |
70 | 70 | maxREExecutions: [null, [Validators.required, Validators.min(0)]], |
71 | 71 | maxJSExecutions: [null, [Validators.required, Validators.min(0)]], |
72 | 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)]], | |
75 | + maxSms: [null, [Validators.required, Validators.min(0)]] | |
74 | 76 | }); |
75 | 77 | this.defaultTenantProfileConfigurationFormGroup.valueChanges.subscribe(() => { |
76 | 78 | this.updateModel(); | ... | ... |
... | ... | @@ -44,6 +44,8 @@ export interface DefaultTenantProfileConfiguration { |
44 | 44 | maxJSExecutions: number; |
45 | 45 | maxDPStorageDays: number; |
46 | 46 | maxRuleNodeExecutionsPerMessage: number; |
47 | + maxEmails: number; | |
48 | + maxSms: number; | |
47 | 49 | } |
48 | 50 | |
49 | 51 | export type TenantProfileConfigurations = DefaultTenantProfileConfiguration; |
... | ... | @@ -69,7 +71,9 @@ export function createTenantProfileConfiguration(type: TenantProfileType): Tenan |
69 | 71 | maxREExecutions: 0, |
70 | 72 | maxJSExecutions: 0, |
71 | 73 | maxDPStorageDays: 0, |
72 | - maxRuleNodeExecutionsPerMessage: 0 | |
74 | + maxRuleNodeExecutionsPerMessage: 0, | |
75 | + maxEmails: 0, | |
76 | + maxSms: 0 | |
73 | 77 | }; |
74 | 78 | configuration = {...defaultConfiguration, type: TenantProfileType.DEFAULT}; |
75 | 79 | break; | ... | ... |
... | ... | @@ -2017,7 +2017,13 @@ |
2017 | 2017 | "max-d-p-storage-days-range": "Minimum number of data points storage days can't be negative", |
2018 | 2018 | "max-rule-node-executions-per-message": "Maximum number of rule node executions per message (0 - unlimited)", |
2019 | 2019 | "max-rule-node-executions-per-message-required": "Maximum number of rule node executions per message is required.", |
2020 | - "max-rule-node-executions-per-message-range": "Minimum number of rule node executions per message can't be negative" | |
2020 | + "max-rule-node-executions-per-message-range": "Minimum number of rule node executions per message can't be negative", | |
2021 | + "max-emails": "Maximum number of emails sent (0 - unlimited)", | |
2022 | + "max-emails-required": "Maximum number of emails sent is required.", | |
2023 | + "max-emails-range": "Maximum number of emails sent can't be negative", | |
2024 | + "max-sms": "Maximum number of SMS sent (0 - unlimited)", | |
2025 | + "max-sms-required": "Maximum number of SMS sent is required.", | |
2026 | + "max-sms-range": "Maximum number of SMS sent can't be negative" | |
2021 | 2027 | }, |
2022 | 2028 | "timeinterval": { |
2023 | 2029 | "seconds-interval": "{ seconds, plural, 1 {1 second} other {# seconds} }", | ... | ... |