This is an automated email from the ASF dual-hosted git repository.
pingsutw pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/submarine.git
The following commit(s) were added to refs/heads/master by this push:
new 0f1eefd SUBMARINE-1068. Cannot Search in /workbench/manager/user
0f1eefd is described below
commit 0f1eefd70e73abf4ddbdf1ffc77d5238a98b4585
Author: atosystem <[email protected]>
AuthorDate: Mon Nov 1 09:53:36 2021 +0800
SUBMARINE-1068. Cannot Search in /workbench/manager/user
### What is this PR for?
- FIx search error in `/workbench/manager/user`
- Change `accountName` to `userName` to comply with backend API and
Database.
- Change UI `Account Name` to `User Name`
- Reorder `User Name` and `Departmant` in the search area.
### What type of PR is it?
[Bug Fix]
### Todos
### What is the Jira issue?
https://issues.apache.org/jira/browse/SUBMARINE-1068
### How should this be tested?
Go to `/workbench/manager/user` and search.
### Screenshots (if appropriate)
**UI**

**Search by User Name**

### Questions:
* Do the license files need updating? No
* Are there breaking changes for older versions? No
* Does this need new documentation? No
Author: atosystem <[email protected]>
Signed-off-by: Kevin <[email protected]>
Closes #790 from atosystem/SUBMARINE-1068 and squashes the following
commits:
3c763ce8 [atosystem] SUBMARINE-1068. Fix searching error of username and
switch the order of 'username' and 'Department' in searching area.
---
.../manager/user-drawer/user-drawer.component.html | 10 +++++-----
.../user-password-modal.component.html | 4 ++--
.../user-password-modal/user-password-modal.component.ts | 6 +++---
.../app/pages/workbench/manager/user/user.component.html | 16 ++++++++--------
.../app/pages/workbench/manager/user/user.component.ts | 10 +++++-----
.../workbench-web/src/app/services/user.service.ts | 2 +-
6 files changed, 24 insertions(+), 24 deletions(-)
diff --git
a/submarine-workbench/workbench-web/src/app/pages/workbench/manager/user-drawer/user-drawer.component.html
b/submarine-workbench/workbench-web/src/app/pages/workbench/manager/user-drawer/user-drawer.component.html
index e4686e7..ae6174e 100644
---
a/submarine-workbench/workbench-web/src/app/pages/workbench/manager/user-drawer/user-drawer.component.html
+++
b/submarine-workbench/workbench-web/src/app/pages/workbench/manager/user-drawer/user-drawer.component.html
@@ -26,26 +26,26 @@
[nzBodyStyle]="{ height: 'calc(100% - 55px)', overflow: 'auto',
'padding-bottom': '53px' }"
>
<form nz-form [formGroup]="form" nzLayout="horizontal">
- <!-- Account Name-->
+ <!-- User Name-->
<nz-form-item>
<nz-form-label [nzSpan]="labelSpan" nzRequired>
- Account Name
+ User Name
</nz-form-label>
<nz-form-control [nzSpan]="controlSpan" nzHasFeedback
[nzErrorTip]="usernameErrorTpl">
<input
type="text"
nz-input
formControlName="userName"
- placeholder="User's account name"
+ placeholder="User's name"
[readOnly]="sysUser?.id"
/>
<ng-template #usernameErrorTpl let-control>
<ng-container *ngIf="control.hasError('required')">
- Please input account's name!
+ Please input user's name!
</ng-container>
<ng-container *ngIf="control.hasError('duplicated')">
- Account name already exist!
+ User name already exist!
</ng-container>
<ng-container *ngIf="control.hasError('error')">
Error
diff --git
a/submarine-workbench/workbench-web/src/app/pages/workbench/manager/user-password-modal/user-password-modal.component.html
b/submarine-workbench/workbench-web/src/app/pages/workbench/manager/user-password-modal/user-password-modal.component.html
index da3f3de..a9cc5d6 100644
---
a/submarine-workbench/workbench-web/src/app/pages/workbench/manager/user-password-modal/user-password-modal.component.html
+++
b/submarine-workbench/workbench-web/src/app/pages/workbench/manager/user-password-modal/user-password-modal.component.html
@@ -28,10 +28,10 @@
<form nz-form nzLayout="horizontal" [formGroup]="form">
<nz-form-item>
<nz-form-label>
- Account Name
+ User Name
</nz-form-label>
<nz-form-control>
- <input type="text" nz-input readonly formControlName="accountName" />
+ <input type="text" nz-input readonly formControlName="userName" />
</nz-form-control>
</nz-form-item>
<nz-form-item>
diff --git
a/submarine-workbench/workbench-web/src/app/pages/workbench/manager/user-password-modal/user-password-modal.component.ts
b/submarine-workbench/workbench-web/src/app/pages/workbench/manager/user-password-modal/user-password-modal.component.ts
index 2478ff6..79ac643 100644
---
a/submarine-workbench/workbench-web/src/app/pages/workbench/manager/user-password-modal/user-password-modal.component.ts
+++
b/submarine-workbench/workbench-web/src/app/pages/workbench/manager/user-password-modal/user-password-modal.component.ts
@@ -26,7 +26,7 @@ import { FormBuilder, FormControl, FormGroup, Validators }
from '@angular/forms'
styleUrls: ['./user-password-modal.component.scss']
})
export class UserPasswordModalComponent implements OnChanges {
- @Input() accountName: string;
+ @Input() userName: string;
@Input() visible: boolean;
@Output() readonly close: EventEmitter<any> = new EventEmitter();
@Output() readonly ok: EventEmitter<string> = new EventEmitter();
@@ -34,7 +34,7 @@ export class UserPasswordModalComponent implements OnChanges {
constructor(private fb: FormBuilder) {
this.form = this.fb.group({
- accountName: [''],
+ userName: [''],
password: ['', Validators.required],
confirm: ['', this.confirmValidator]
});
@@ -42,7 +42,7 @@ export class UserPasswordModalComponent implements OnChanges {
ngOnChanges(changes: SimpleChanges) {
this.form.reset({
- accountName: this.accountName,
+ userName: this.userName,
password: '',
confirm: ''
});
diff --git
a/submarine-workbench/workbench-web/src/app/pages/workbench/manager/user/user.component.html
b/submarine-workbench/workbench-web/src/app/pages/workbench/manager/user/user.component.html
index 13cd98f..23081c7 100644
---
a/submarine-workbench/workbench-web/src/app/pages/workbench/manager/user/user.component.html
+++
b/submarine-workbench/workbench-web/src/app/pages/workbench/manager/user/user.component.html
@@ -21,6 +21,12 @@
<div class="user-table-operate">
<form nz-form [nzLayout]="'inline'" [formGroup]="form">
<nz-form-item>
+ <nz-form-label>User Name</nz-form-label>
+ <nz-form-control>
+ <input nz-input formControlName="userName" />
+ </nz-form-control>
+ </nz-form-item>
+ <nz-form-item>
<nz-form-label>Department</nz-form-label>
<nz-form-control>
<nz-tree-select
@@ -35,12 +41,6 @@
</nz-form-control>
</nz-form-item>
<nz-form-item>
- <nz-form-label>Account Name</nz-form-label>
- <nz-form-control>
- <input nz-input formControlName="accountName" />
- </nz-form-control>
- </nz-form-item>
- <nz-form-item>
<nz-form-label>Email</nz-form-label>
<nz-form-control>
<input nz-input formControlName="email" />
@@ -64,7 +64,7 @@
<nz-table #table [nzData]="userList" [nzScroll]="{ x: '1100px' }"
nzNoResult="No result" nzBordered>
<thead>
<tr>
- <th>Account Name</th>
+ <th>User Name</th>
<th>Real Name</th>
<th>Department</th>
<th>Role</th>
@@ -116,7 +116,7 @@
<submarine-user-password-modal
[visible]="resetPasswordModalVisible"
- [accountName]="currentSysUser?.userName"
+ [userName]="currentSysUser?.userName"
(close)="onHideResetPasswordModal()"
(ok)="onChangePassword($event)"
></submarine-user-password-modal>
diff --git
a/submarine-workbench/workbench-web/src/app/pages/workbench/manager/user/user.component.ts
b/submarine-workbench/workbench-web/src/app/pages/workbench/manager/user/user.component.ts
index a00f0da..3052f9c 100644
---
a/submarine-workbench/workbench-web/src/app/pages/workbench/manager/user/user.component.ts
+++
b/submarine-workbench/workbench-web/src/app/pages/workbench/manager/user/user.component.ts
@@ -44,7 +44,7 @@ export class UserComponent implements OnInit {
'createTime',
'action'
];
- accountName: string = '';
+ userName: string = '';
email: string = '';
deptCode: string = '';
pageNo: number = 1;
@@ -74,15 +74,15 @@ export class UserComponent implements OnInit {
this.form = this.fb.group({
deptCode: [this.deptCode],
- accountName: [this.accountName],
+ userName: [this.userName],
email: [this.email]
});
}
queryUserList() {
- const { deptCode, accountName, email } = this.form.getRawValue();
+ const { deptCode, userName, email } = this.form.getRawValue();
this.deptCode = deptCode;
- this.accountName = accountName;
+ this.userName = userName;
this.email = email;
this.fetchUserList();
@@ -94,7 +94,7 @@ export class UserComponent implements OnInit {
column: this.column,
order: this.order,
field: this.field.join(','),
- accountName: this.accountName,
+ userName: this.userName,
email: this.email,
deptCode: this.deptCode ? this.deptCode : '',
pageNo: '' + this.pageNo,
diff --git a/submarine-workbench/workbench-web/src/app/services/user.service.ts
b/submarine-workbench/workbench-web/src/app/services/user.service.ts
index feabd36..0e2992f 100644
--- a/submarine-workbench/workbench-web/src/app/services/user.service.ts
+++ b/submarine-workbench/workbench-web/src/app/services/user.service.ts
@@ -26,7 +26,7 @@ import { switchMap } from 'rxjs/operators';
import { BaseApiService } from './base-api.service';
interface UserListQueryParams {
- accountName: string;
+ userName: string;
email: string;
deptCode: string;
column: string;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]