Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Update the name checking for the robot account #19645

Merged
merged 1 commit into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ <h3 *ngIf="isEditMode" class="modal-title">
<ng-template clrPageTitle>{{
'ROBOT_ACCOUNT.SELECT_PROJECT_PERMISSIONS' | translate
}}</ng-template>
<inline-alert class="modal-title"></inline-alert>
<inline-alert></inline-alert>
<form class="clr-form clr-form-horizontal pb-0 pt-0">
<section class="form-block">
<div class="clr-form-control mt-1">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
distinctUntilChanged,
filter,
finalize,
map,
switchMap,
} from 'rxjs/operators';
import {
Expand Down Expand Up @@ -119,7 +120,6 @@ export class NewRobotComponent implements OnInit, OnDestroy {
if (!this._nameSubscription) {
this._nameSubscription = this._nameSubject
.pipe(
debounceTime(500),
distinctUntilChanged(),
filter(name => {
if (
Expand All @@ -131,6 +131,11 @@ export class NewRobotComponent implements OnInit, OnDestroy {
}
return name?.length > 0;
}),
map(name => {
this.checkNameOnGoing = !!name;
return name;
}),
debounceTime(500),
switchMap(name => {
this.isNameExisting = false;
this.checkNameOnGoing = true;
Expand Down Expand Up @@ -490,6 +495,7 @@ export class NewRobotComponent implements OnInit, OnDestroy {
}

clrWizardPageOnLoad() {
this.inlineAlertComponent.close();
this.showPage3 = true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,13 +235,14 @@ <h3 *ngIf="isEditMode" class="modal-title">
</clr-wizard-page>

<clr-wizard-page
(clrWizardPageOnLoad)="clrWizardPageOnLoad()"
(clrWizardPageOnCommit)="save()"
[clrWizardPagePreventDefaultNext]="true"
[clrWizardPageNextDisabled]="disabled()">
<ng-template clrPageTitle>{{
'ROBOT_ACCOUNT.SELECT_PERMISSIONS' | translate
}}</ng-template>
<inline-alert class="modal-title"></inline-alert>
<inline-alert></inline-alert>
<form class="clr-form clr-form-horizontal mt-1">
<section class="form-block">
<robot-permissions-panel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
distinctUntilChanged,
filter,
finalize,
map,
switchMap,
} from 'rxjs/operators';
import { MessageHandlerService } from '../../../../shared/services/message-handler.service';
Expand Down Expand Up @@ -87,7 +88,6 @@ export class AddRobotComponent implements OnInit, OnDestroy {
if (!this._nameSubscription) {
this._nameSubscription = this._nameSubject
.pipe(
debounceTime(500),
distinctUntilChanged(),
filter(name => {
if (
Expand All @@ -99,6 +99,11 @@ export class AddRobotComponent implements OnInit, OnDestroy {
}
return name?.length > 0;
}),
map(name => {
this.checkNameOnGoing = !!name;
return name;
}),
debounceTime(500),
switchMap(name => {
this.isNameExisting = false;
this.checkNameOnGoing = true;
Expand Down Expand Up @@ -295,5 +300,9 @@ export class AddRobotComponent implements OnInit, OnDestroy {
return new Date() >= this.calculateExpiresAt();
}

clrWizardPageOnLoad() {
this.inlineAlertComponent.close();
}

protected readonly PermissionSelectPanelModes = PermissionSelectPanelModes;
}