You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by an...@apache.org on 2019/06/18 09:10:32 UTC
[incubator-dlab] branch feature/projects updated: [DLAB-805]: fixed
issue with tabs on git credential list
This is an automated email from the ASF dual-hosted git repository.
ankovalyshyn pushed a commit to branch feature/projects
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git
The following commit(s) were added to refs/heads/feature/projects by this push:
new 8edd4ac [DLAB-805]: fixed issue with tabs on git credential list
8edd4ac is described below
commit 8edd4ac1117565feee12d0693c80d01d58395bab
Author: Andriana Kovalyshyn <kv...@kvellia-MacBook-Pro.local>
AuthorDate: Tue Jun 18 12:09:57 2019 +0300
[DLAB-805]: fixed issue with tabs on git credential list
---
.../administration/project/project.component.html | 8 ++---
.../manage-ungit/manage-ungit.component.html | 34 ++++++++++++++--------
.../manage-ungit/manage-ungit.component.scss | 20 ++++++++++++-
.../manage-ungit/manage-ungit.component.ts | 14 ++++-----
4 files changed, 52 insertions(+), 24 deletions(-)
diff --git a/services/self-service/src/main/resources/webapp/src/app/administration/project/project.component.html b/services/self-service/src/main/resources/webapp/src/app/administration/project/project.component.html
index 3bb39ec..a40f264 100644
--- a/services/self-service/src/main/resources/webapp/src/app/administration/project/project.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/administration/project/project.component.html
@@ -32,13 +32,13 @@
</div>
</div>
- <mat-card class="base-retreat project-form" *ngIf="!projectList.length">
+ <mat-divider></mat-divider>
+
+ <mat-card class="project-form" *ngIf="!projectList.length">
<project-form></project-form>
</mat-card>
- <mat-divider></mat-divider>
-
<div [hidden]="!projectList.length">
<project-list (editItem)="editProject($event)" (deleteItem)="deleteProject($event)"></project-list>
</div>
-</div>
\ No newline at end of file
+</div>
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/manage-ungit/manage-ungit.component.html b/services/self-service/src/main/resources/webapp/src/app/resources/manage-ungit/manage-ungit.component.html
index c8766ff..6697e68 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/manage-ungit/manage-ungit.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/manage-ungit/manage-ungit.component.html
@@ -23,9 +23,9 @@
<button type="button" class="close" (click)="dialogRef.close()">×</button>
</header>
<div class="dialog-content tabs">
- <mat-tab-group mat-stretch-tabs #tabGroup class="content-box">
+ <mat-tab-group mat-stretch-tabs #tabGroupGit class="content-box">
<mat-tab label="LIST">
- <button mat-raised-button class="butt add-creds" (click)="tabGroup.selectedIndex = 1">
+ <button mat-raised-button class="butt add-creds" (click)="tabGroupGit.selectedIndex = 1">
<i class="material-icons">people_outline</i>Add account
</button>
<mat-divider></mat-divider>
@@ -63,7 +63,8 @@
<div class="text-center m-top-30 m-bott-10" *ngIf="editableForm && gitCredentials?.length">
<button mat-raised-button type="button" class="butt action" (click)="cancelAllModifyings()">Cancel</button>
- <button mat-raised-button type="button" class="butt butt-success action" (click)="editAccounts_btnClick()">Apply changes</button>
+ <button mat-raised-button type="button" class="butt butt-success action"
+ (click)="editAccounts_btnClick()">Apply changes</button>
</div>
</mat-tab>
<mat-tab label="MANAGE ACCOUNT">
@@ -73,13 +74,16 @@
<div class="control-group">
<label class="label">Host name</label>
<div class="control">
- <input type="text" formControlName="hostname" placeholder="Enter host name ( without http:// or https:// )">
+ <input type="text" formControlName="hostname"
+ placeholder="Enter host name ( without http:// or https:// )">
</div>
- <span class="danger_color" *ngIf="!updateAccountCredentialsForm.controls['hostname'].valid
+ <span class="danger_color"
+ *ngIf="!updateAccountCredentialsForm.controls['hostname'].valid
&& updateAccountCredentialsForm.controls['hostname'].touched && !updateAccountCredentialsForm.controls['hostname'].hasError('duplicate')">
Hostname field is required. Please provide a qualified domain name (e.g. gitlab.com or github.com)
</span>
- <span class="danger_color" *ngIf="updateAccountCredentialsForm.controls['hostname'].hasError('duplicate') && updateAccountCredentialsForm.controls['hostname'].dirty">
+ <span class="danger_color"
+ *ngIf="updateAccountCredentialsForm.controls['hostname'].hasError('duplicate') && updateAccountCredentialsForm.controls['hostname'].dirty">
The Host name is already in use
</span>
</div>
@@ -88,7 +92,8 @@
<div class="control">
<input type="text" formControlName="username" placeholder="Enter user name">
</div>
- <span class="danger_color" *ngIf="!updateAccountCredentialsForm.controls['username'].valid && updateAccountCredentialsForm.controls['username'].touched">
+ <span class="danger_color"
+ *ngIf="!updateAccountCredentialsForm.controls['username'].valid && updateAccountCredentialsForm.controls['username'].touched">
Username field is required. Please provide a valid username
</span>
</div>
@@ -97,7 +102,8 @@
<div class="control">
<input type="email" formControlName="email" placeholder="Enter email">
</div>
- <span class="danger_color" *ngIf="!updateAccountCredentialsForm.controls['email'].valid && updateAccountCredentialsForm.controls['email'].touched">
+ <span class="danger_color"
+ *ngIf="!updateAccountCredentialsForm.controls['email'].valid && updateAccountCredentialsForm.controls['email'].touched">
Email field is required. Please provide a valid email
</span>
</div>
@@ -108,7 +114,8 @@
<div class="control">
<input type="text" formControlName="login" placeholder="Enter login">
</div>
- <span class="danger_color" *ngIf="!updateAccountCredentialsForm.controls['login'].valid && updateAccountCredentialsForm.controls['login'].touched">
+ <span class="danger_color"
+ *ngIf="!updateAccountCredentialsForm.controls['login'].valid && updateAccountCredentialsForm.controls['login'].touched">
Login field is required. Please provide a valid login
</span>
</div>
@@ -117,7 +124,8 @@
<div class="control">
<input type="password" formControlName="password" placeholder="Enter Password">
</div>
- <span class="danger_color" *ngIf="!updateAccountCredentialsForm.controls['password'].valid && updateAccountCredentialsForm.controls['password'].touched">
+ <span class="danger_color"
+ *ngIf="!updateAccountCredentialsForm.controls['password'].valid && updateAccountCredentialsForm.controls['password'].touched">
Field is required. Password must be at least 6 characters
</span>
</div>
@@ -126,7 +134,8 @@
<div class="control">
<input type="password" formControlName="confirmPassword" placeholder="Enter Password">
</div>
- <span class="danger_color" *ngIf="!updateAccountCredentialsForm.controls['confirmPassword'].valid && updateAccountCredentialsForm.controls['confirmPassword'].touched">
+ <span class="danger_color"
+ *ngIf="!updateAccountCredentialsForm.controls['confirmPassword'].valid && updateAccountCredentialsForm.controls['confirmPassword'].touched">
Field is required. Please confirm a password
</span>
</div>
@@ -134,7 +143,8 @@
</div>
<div class="text-center submit m-bott-10">
<button mat-raised-button type="button" class="butt action" (click)="resetForm()">Clear</button>
- <button mat-raised-button type="button" [disabled]="!updateAccountCredentialsForm.valid" (click)="assignChanges(updateAccountCredentialsForm.value)"
+ <button mat-raised-button type="button" [disabled]="!updateAccountCredentialsForm.valid"
+ (click)="assignChanges(updateAccountCredentialsForm.value)"
class="butt butt-success action">Assign</button>
</div>
</form>
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/manage-ungit/manage-ungit.component.scss b/services/self-service/src/main/resources/webapp/src/app/resources/manage-ungit/manage-ungit.component.scss
index 228c048..60e40b1 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/manage-ungit/manage-ungit.component.scss
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/manage-ungit/manage-ungit.component.scss
@@ -22,22 +22,27 @@
height: 500px;
padding: 25px 35px;
}
+
.add-creds {
- margin: 15px 5px;
+ margin: 15px 5px 0;
}
+
.scrollingList {
overflow-x: hidden;
padding: 5px;
height: 185px;
+
&.info {
display: flex;
justify-content: center;
height: 300px;
+
p {
align-self: center;
}
}
}
+
.mail-field,
.user-field,
.login-field {
@@ -46,6 +51,7 @@
text-overflow: ellipsis;
padding: 5px;
}
+
.hostname-field {
width: 25%;
overflow: hidden;
@@ -53,18 +59,22 @@
padding: 5px;
width: 30%;
}
+
.actions {
width: 20%;
position: relative;
overflow: visible;
width: 50px;
+
span {
position: absolute;
top: -10px;
left: 0;
zoom: 0.8;
+
&.git-actions {
cursor: pointer;
+
&.remove {
left: 35px;
}
@@ -74,23 +84,28 @@
.git-form {
display: flex;
+
.control-group {
width: 100%;
font-family: 'Open Sans', sans-serif;
padding: 10px 0 25px;
position: relative;
+
input[type='text'],
input[type='password'],
input[type='email'] {
font-size: 14px;
}
+
.label {
width: 30%;
font-size: 14px;
}
+
.control {
width: 70%;
}
+
.danger_color {
position: absolute;
top: 45px;
@@ -98,14 +113,17 @@
font-size: 12px;
}
}
+
.col {
padding: 30px 10px;
width: 50%;
}
+
.danger_color {
padding-top: 0;
}
}
+
.submit {
margin-top: 60px;
}
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/manage-ungit/manage-ungit.component.ts b/services/self-service/src/main/resources/webapp/src/app/resources/manage-ungit/manage-ungit.component.ts
index 7bd6538..e339acb 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/manage-ungit/manage-ungit.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/manage-ungit/manage-ungit.component.ts
@@ -44,7 +44,7 @@ export class ManageUngitComponent implements OnInit {
public editableForm: boolean = false;
public updateAccountCredentialsForm: FormGroup;
- @ViewChild('tabGroup') tabGroup;
+ @ViewChild('tabGroupGit') tabGroupGit;
constructor(
public toastr: ToastrService,
@@ -66,11 +66,11 @@ export class ManageUngitComponent implements OnInit {
}
public open(): void {
- this.model = new MangeUngitModel(() => {},
+ this.model = new MangeUngitModel(() => { },
error => this.toastr.error(error.message || 'Manage git credentials failed!', 'Oops!'),
() => {
- if (!this.gitCredentials.length)
- this.tabGroup.selectedIndex = 1;
+ // if (!this.gitCredentials.length)
+ // this.tabGroupGit.selectedIndex = 1;
},
this.manageUngitService);
}
@@ -87,7 +87,7 @@ export class ManageUngitComponent implements OnInit {
}
public editSpecificAccount(item: AccountCredentials) {
- this.tabGroup.selectedIndex = 1;
+ this.tabGroupGit.selectedIndex = 1;
this.currentEditableItem = item;
this.updateAccountCredentialsForm = this._fb.group({
@@ -122,13 +122,13 @@ export class ManageUngitComponent implements OnInit {
this.gitCredentials = modifiedCredentials;
this.editableForm = true;
- this.tabGroup.selectedIndex = 0;
+ this.tabGroupGit.selectedIndex = 0;
this.resetForm();
}
public editAccounts_btnClick() {
this.model.confirmAction(this.gitCredentials);
- this.tabGroup.selectedIndex = 0;
+ this.tabGroupGit.selectedIndex = 0;
this.editableForm = false;
this.toastr.success('Git credentials updated successfully!', 'Success!');
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org