UI: Update Tenant Profile - add max emails and sms
This commit is contained in:
parent
d2f63c762f
commit
eb4f4baafb
@ -160,6 +160,30 @@
|
|||||||
{{ 'tenant-profile.max-rule-node-executions-per-message-range' | translate}}
|
{{ 'tenant-profile.max-rule-node-executions-per-message-range' | translate}}
|
||||||
</mat-error>
|
</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
<mat-form-field class="mat-block">
|
||||||
|
<mat-label translate>tenant-profile.max-emails</mat-label>
|
||||||
|
<input matInput required min="0" step="1"
|
||||||
|
formControlName="maxEmails"
|
||||||
|
type="number">
|
||||||
|
<mat-error *ngIf="defaultTenantProfileConfigurationFormGroup.get('maxEmails').hasError('required')">
|
||||||
|
{{ 'tenant-profile.max-emails-required' | translate}}
|
||||||
|
</mat-error>
|
||||||
|
<mat-error *ngIf="defaultTenantProfileConfigurationFormGroup.get('maxEmails').hasError('min')">
|
||||||
|
{{ 'tenant-profile.max-emails-range' | translate}}
|
||||||
|
</mat-error>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field class="mat-block">
|
||||||
|
<mat-label translate>tenant-profile.max-sms</mat-label>
|
||||||
|
<input matInput required min="0" step="1"
|
||||||
|
formControlName="maxSms"
|
||||||
|
type="number">
|
||||||
|
<mat-error *ngIf="defaultTenantProfileConfigurationFormGroup.get('maxSms').hasError('required')">
|
||||||
|
{{ 'tenant-profile.max-sms-required' | translate}}
|
||||||
|
</mat-error>
|
||||||
|
<mat-error *ngIf="defaultTenantProfileConfigurationFormGroup.get('maxSms').hasError('min')">
|
||||||
|
{{ 'tenant-profile.max-sms-range' | translate}}
|
||||||
|
</mat-error>
|
||||||
|
</mat-form-field>
|
||||||
<mat-form-field class="mat-block">
|
<mat-form-field class="mat-block">
|
||||||
<mat-label translate>tenant-profile.transport-tenant-msg-rate-limit</mat-label>
|
<mat-label translate>tenant-profile.transport-tenant-msg-rate-limit</mat-label>
|
||||||
<input matInput formControlName="transportTenantMsgRateLimit">
|
<input matInput formControlName="transportTenantMsgRateLimit">
|
||||||
|
|||||||
@ -70,7 +70,9 @@ export class DefaultTenantProfileConfigurationComponent implements ControlValueA
|
|||||||
maxREExecutions: [null, [Validators.required, Validators.min(0)]],
|
maxREExecutions: [null, [Validators.required, Validators.min(0)]],
|
||||||
maxJSExecutions: [null, [Validators.required, Validators.min(0)]],
|
maxJSExecutions: [null, [Validators.required, Validators.min(0)]],
|
||||||
maxDPStorageDays: [null, [Validators.required, Validators.min(0)]],
|
maxDPStorageDays: [null, [Validators.required, Validators.min(0)]],
|
||||||
maxRuleNodeExecutionsPerMessage: [null, [Validators.required, Validators.min(0)]]
|
maxRuleNodeExecutionsPerMessage: [null, [Validators.required, Validators.min(0)]],
|
||||||
|
maxEmails: [null, [Validators.required, Validators.min(0)]],
|
||||||
|
maxSms: [null, [Validators.required, Validators.min(0)]]
|
||||||
});
|
});
|
||||||
this.defaultTenantProfileConfigurationFormGroup.valueChanges.subscribe(() => {
|
this.defaultTenantProfileConfigurationFormGroup.valueChanges.subscribe(() => {
|
||||||
this.updateModel();
|
this.updateModel();
|
||||||
|
|||||||
@ -44,6 +44,8 @@ export interface DefaultTenantProfileConfiguration {
|
|||||||
maxJSExecutions: number;
|
maxJSExecutions: number;
|
||||||
maxDPStorageDays: number;
|
maxDPStorageDays: number;
|
||||||
maxRuleNodeExecutionsPerMessage: number;
|
maxRuleNodeExecutionsPerMessage: number;
|
||||||
|
maxEmails: number;
|
||||||
|
maxSms: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type TenantProfileConfigurations = DefaultTenantProfileConfiguration;
|
export type TenantProfileConfigurations = DefaultTenantProfileConfiguration;
|
||||||
@ -69,7 +71,9 @@ export function createTenantProfileConfiguration(type: TenantProfileType): Tenan
|
|||||||
maxREExecutions: 0,
|
maxREExecutions: 0,
|
||||||
maxJSExecutions: 0,
|
maxJSExecutions: 0,
|
||||||
maxDPStorageDays: 0,
|
maxDPStorageDays: 0,
|
||||||
maxRuleNodeExecutionsPerMessage: 0
|
maxRuleNodeExecutionsPerMessage: 0,
|
||||||
|
maxEmails: 0,
|
||||||
|
maxSms: 0
|
||||||
};
|
};
|
||||||
configuration = {...defaultConfiguration, type: TenantProfileType.DEFAULT};
|
configuration = {...defaultConfiguration, type: TenantProfileType.DEFAULT};
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -2017,7 +2017,13 @@
|
|||||||
"max-d-p-storage-days-range": "Minimum number of data points storage days can't be negative",
|
"max-d-p-storage-days-range": "Minimum number of data points storage days can't be negative",
|
||||||
"max-rule-node-executions-per-message": "Maximum number of rule node executions per message (0 - unlimited)",
|
"max-rule-node-executions-per-message": "Maximum number of rule node executions per message (0 - unlimited)",
|
||||||
"max-rule-node-executions-per-message-required": "Maximum number of rule node executions per message is required.",
|
"max-rule-node-executions-per-message-required": "Maximum number of rule node executions per message is required.",
|
||||||
"max-rule-node-executions-per-message-range": "Minimum number of rule node executions per message can't be negative"
|
"max-rule-node-executions-per-message-range": "Minimum number of rule node executions per message can't be negative",
|
||||||
|
"max-emails": "Maximum number of emails sent (0 - unlimited)",
|
||||||
|
"max-emails-required": "Maximum number of emails sent is required.",
|
||||||
|
"max-emails-range": "Maximum number of emails sent can't be negative",
|
||||||
|
"max-sms": "Maximum number of SMS sent (0 - unlimited)",
|
||||||
|
"max-sms-required": "Maximum number of SMS sent is required.",
|
||||||
|
"max-sms-range": "Maximum number of SMS sent can't be negative"
|
||||||
},
|
},
|
||||||
"timeinterval": {
|
"timeinterval": {
|
||||||
"seconds-interval": "{ seconds, plural, 1 {1 second} other {# seconds} }",
|
"seconds-interval": "{ seconds, plural, 1 {1 second} other {# seconds} }",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user