Skip to content

Commit

Permalink
feat(ssl): add ssl check
Browse files Browse the repository at this point in the history
  • Loading branch information
PxyUp committed Jan 23, 2021
1 parent 2f66e12 commit 253b040
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,41 @@
</mat-form-field>
<ng-container [ngSwitch]="form.get('type').value">
<ng-container formGroupName="config">
<ng-container *ngSwitchCase="SslExpirationType" formGroupName="sslExpirationConfig">
<mat-form-field>
<input
matInput
placeholder="{{ 'MODULES.MODALS.ADD_CHECKER.SELECT_HOST' | translate}}"
formControlName="host"
>
<mat-error
*ngIf="sslExpirationConfig.get('host').hasError('required')"
>{{ 'ERRORS.REQUIRED' | translate }}</mat-error>
<mat-error
*ngIf="sslExpirationConfig.get('host').hasError('pattern')"
>{{ 'ERRORS.notValidHost' | translate }}</mat-error>
</mat-form-field>
<mat-form-field>
<input
matInput
type="number"
placeholder="{{ 'MODULES.MODALS.ADD_CHECKER.SELECT_PORT' | translate}}"
formControlName="port"
>
<mat-error
*ngIf="sslExpirationConfig.get('port').hasError('required')"
>{{ 'ERRORS.REQUIRED' | translate }}</mat-error>
<mat-error
*ngIf="sslExpirationConfig.get('port').hasError('min')"
>{{ 'ERRORS.minInterval' | translate }}</mat-error>
<mat-error
*ngIf="sslExpirationConfig.get('port').hasError('notInteger')"
>{{ 'ERRORS.integer' | translate }}</mat-error>
<mat-error
*ngIf="sslExpirationConfig.get('port').hasError('max')"
>{{ 'ERRORS.maxPort' | translate }}</mat-error>
</mat-form-field>
</ng-container>
<ng-container *ngSwitchCase="TcpType" formGroupName="tcpConfig">
<mat-form-field>
<input
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ mat-card {
margin-top: 10px;
display: flex;
}
textarea {
min-height: 100px;
}
.example-item {
&:hover {
background-color: mat-color($primary, 50);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,13 @@ export class AddRuleFormComponent implements OnDestroy {
},
{
description: 'MODULES.MODALS.ADD_RULE.EXAMPLE_SCHEDULER_SSL_EXPIRATION',
value: `Index(-1).Code == Error
|| (
Index(-1).Code == Ok &&
durationLess(
timeDiff(NowTime(), unixNanoToTime(float64ToInt64(getValue(Index(-1)).GetNumberValue()))),
mulDuration(4,Week)
)
)`,
value: `Index(-1).Code == Error || (
Index(-1).Code == Ok &&
durationLess(
timeDiff(unixNanoToTime(float64ToInt64(getValue(Index(-1)).GetNumberValue())), NowTime()),
mulDuration(4,Week)
)
)`,
},
],
[`${OwnerType.INCIDENT_OWNER_TYPE_AGENT}`]: [
Expand Down

0 comments on commit 253b040

Please sign in to comment.