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/05/21 10:36:48 UTC

[incubator-dlab] branch project_grid updated (c72bfa1 -> 698ab89)

This is an automated email from the ASF dual-hosted git repository.

ankovalyshyn pushed a change to branch project_grid
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git.


    from c72bfa1  fixed quota notification check
     new 419c202  added base create project form
     new 698ab89  fixed dialog style files

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../create-project/create-project.component.html   |  44 ++++++
 .../create-project.component.scss}                 |   0
 .../create-project/create-project.component.ts}    |  37 +++--
 .../project/create-project}/index.ts               |  12 +-
 .../webapp/src/app/administration/project/index.ts |   2 +
 .../administration/project/project.component.html  |  14 +-
 .../administration/project/project.component.ts    |   4 +
 .../detail-dialog/detail-dialog.component.html     |   6 +-
 .../resources-grid/resources-grid.component.ts     |   2 +-
 .../app/shared/modal-dialog/modal.component.scss   | 162 +--------------------
 10 files changed, 101 insertions(+), 182 deletions(-)
 create mode 100644 services/self-service/src/main/resources/webapp/src/app/administration/project/create-project/create-project.component.html
 copy services/self-service/src/main/resources/webapp/src/app/administration/project/{project.component.scss => create-project/create-project.component.scss} (100%)
 copy services/self-service/src/main/resources/webapp/src/app/{resources/billing/cost-details-dialog/cost-details-dialog.component.ts => administration/project/create-project/create-project.component.ts} (54%)
 copy services/self-service/src/main/resources/webapp/src/app/{webterminal => administration/project/create-project}/index.ts (81%)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org


[incubator-dlab] 02/02: fixed dialog style files

Posted by an...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ankovalyshyn pushed a commit to branch project_grid
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git

commit 698ab8986901b76d3280478fd6ade0690bdbf623
Author: Andriana Kovalyshyn <An...@epam.com>
AuthorDate: Tue May 21 13:36:33 2019 +0300

    fixed dialog style files
---
 .../detail-dialog/detail-dialog.component.html     |   6 +-
 .../resources-grid/resources-grid.component.ts     |   2 +-
 .../app/shared/modal-dialog/modal.component.scss   | 162 +--------------------
 3 files changed, 6 insertions(+), 164 deletions(-)

diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/detail-dialog/detail-dialog.component.html b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/detail-dialog/detail-dialog.component.html
index 347b1f9..c90af34 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/detail-dialog/detail-dialog.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/detail-dialog/detail-dialog.component.html
@@ -17,8 +17,10 @@
   ~ under the License.
   -->
 
-<div modalClass="detail-dialog modal-lg header-white">
-  <header></header>
+<div class="box detail-dialog"> 
+  <header class="dialog-header header-white">
+    <button type="button" class="close" (click)="dialogRef.close()">&times;</button>
+  </header>
   <div class="modal-content">
     <div *ngIf="data">
       <table class="detail-header">
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.component.ts b/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.component.ts
index 1ef10e6..e6b4676 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.component.ts
@@ -282,7 +282,7 @@ export class ResourcesGridComponent implements OnInit {
 
   printDetailEnvironmentModal(data): void {
     // this.detailDialog.open({ isFooter: false }, data);
-    this.dialog.open(DetailDialogComponent, { data: data })
+    this.dialog.open(DetailDialogComponent, { data: data, panelClass: 'modal-lg' })
                .afterClosed().subscribe(() => this.buildGrid());
   }
 
diff --git a/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/modal.component.scss b/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/modal.component.scss
index 8a6c09d..267fb39 100644
--- a/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/modal.component.scss
+++ b/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/modal.component.scss
@@ -169,174 +169,14 @@
   transition: all .35s linear .2s;
 }
 
-.dialog-content {
-  display: block;
-  position: relative;
-  background-color: #fff;
-  -webkit-background-clip: padding-box;
-  background-clip: padding-box;
-  border: 1px solid rgba(0,0,0,.2);
-  border-radius: 3px;
-  outline: 0;
-  -webkit-box-shadow: 0 3px 9px rgba(0,0,0,.5);
-  box-shadow: 0 3px 9px rgba(0,0,0,.5);
-  .danger_color {
-    padding-left: 5px;
-    font-size: 12px;
-    display: inline-block;
-    font-family: 'Open Sans', sans-serif;
-    font-weight: 300;
-    border-color: #d9534f !important;
-  }
-}
+
  
 .modal-footer .btn {
   margin-top: 0;
 }
 
-.dialog {
-  .header-white {
-    .dialog-header {
-      background: #fff;
-    }
-  }
-  .dialog-header {
-    padding-left: 30px;
-    background: #f6fafe;
-    height: 54px;
-    line-height: 54px;
-    .modal-title {
-      width: 90%;
-      margin: 0;
-      overflow: hidden;
-      white-space: nowrap;
-      text-overflow: ellipsis;
-      font-weight: 600;
-      color: #455c74;
-      font-size: 18px;
-      background: #f6fafe;
-      i {
-        vertical-align: middle;
-      }
-    }
-    .close {
-      position: absolute;
-      top: 0;
-      right: 0;
-      height: 50px;
-      width: 50px;
-      font-size: 24px;
-      border: 0;
-      background: none;
-      color: #577289;
-      outline: none;
-      cursor: pointer;
-      transition: all .45s ease-in-out;
-      &:hover {
-        color: #36afd5;
-      }
-    }
-  }
 
-  .dialog-body {
-    padding-top: 0;
-  }
-  .upload-key {
-    margin-bottom: 20px;
-    & > div > div {
-      margin-top: 5px;
-    }
 
-    .butt-file {
-      position: relative;
-      overflow: hidden;
-      margin-bottom: 10px;
-      display: inline-block;
-      color: #35afd5;
-      padding: 6px 29px 6px 23px;
-      width: 170px;
-      // font: 600 16px/1.45 'Open Sans';
-      font-style: normal;
-      font-weight: 600;
-      font-size: 16px;
-      line-height: 1.45;
-      font-family:'Open Sans', sans-serif;
-
-      text-align: center;
-      box-shadow: 0 3px 1px -2px rgba(0,0,0,.2), 0 2px 2px 0 rgba(0,0,0,.14), 0 1px 5px 0 rgba(0,0,0,.12);
-
-      .upload-icon {
-        background: url(../../../assets/img/upload-icon.png) no-repeat;
-        background-size: 100%;
-        display: inline-block;
-        width: 17px;
-        height: 17px;
-        margin-right: 8px;
-        position: relative;
-        top: 2px;
-      }
-      input[type=file] {
-        width: 100%;
-        height: 100%;
-        position: absolute;
-        top: 0;
-        right: 0;
-        min-width: 100%;
-        min-height: 100%;
-        font-size: 100px;
-        text-align: right;
-        opacity: 0;
-        outline: none;
-        background: #fff;
-        cursor: inherit;
-        display: block;
-      }
-      &:active {
-        box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
-      }
-    }
-    .butt-generate {
-      color: #35afd5;
-      width: 170px;
-    }
-  }
-  .btn-success {
-    margin-left: 40px;
-    margin-right: 2px;
-  }
-  .btn {
-    padding: 6px 15px;
-    min-width: 140px;
-    font-weight: 600;
-  }
-  a {
-    color: #35afd5;
-    text-decoration: none;
-    transition: all .45s ease-in-out;
-    &:hover {
-      color: #5faec7;
-    }
-  }
-  .info-label {
-    font-size: 16px;
-    margin-top: 20px;
-  }
-  .control-label {
-    font-weight: 600;
-    margin-top: 6px;
-  }
-  .form-group {
-    small {
-      font-size: 12px;
-      color: #9cadbe;
-      display: inline-block;
-      margin-top: 6px;
-    }
-  }
-}
-.content-box {
-  padding: 25px 30px 35px;
-}
 .detail-header {
   border-bottom: 0;
   width: 100%;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org


[incubator-dlab] 01/02: added base create project form

Posted by an...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ankovalyshyn pushed a commit to branch project_grid
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git

commit 419c202f078e185f29011742e838090659e1a800
Author: Andriana Kovalyshyn <An...@epam.com>
AuthorDate: Tue May 21 13:30:54 2019 +0300

    added base create project form
---
 .../create-project/create-project.component.html   | 44 ++++++++++++++++++++++
 .../create-project.component.scss}                 | 18 +--------
 .../create-project.component.ts}                   | 32 +++++++++++++---
 .../project/{ => create-project}/index.ts          | 17 ++++-----
 .../webapp/src/app/administration/project/index.ts |  2 +
 .../administration/project/project.component.html  | 14 ++++++-
 .../administration/project/project.component.ts    |  4 ++
 7 files changed, 98 insertions(+), 33 deletions(-)

diff --git a/services/self-service/src/main/resources/webapp/src/app/administration/project/create-project/create-project.component.html b/services/self-service/src/main/resources/webapp/src/app/administration/project/create-project/create-project.component.html
new file mode 100644
index 0000000..94e26f4
--- /dev/null
+++ b/services/self-service/src/main/resources/webapp/src/app/administration/project/create-project/create-project.component.html
@@ -0,0 +1,44 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<div>
+  <form [formGroup]="projectForm" novalidate>
+    <mat-horizontal-stepper #stepper class="stepper ani">
+      <mat-step>
+        <ng-template matStepLabel>Project</ng-template>
+        Step 1
+        <div class="control-group">
+          <label class="label">Project name</label>
+          <div class="control">
+            <input type="text" formControlName="project_name" placeholder="Enter project name">
+            <input type="text" formControlName="endpoint_name" placeholder="Enter endpoint name">
+          </div>
+        </div>
+      </mat-step>
+      <mat-step>
+        <ng-template matStepLabel>Users</ng-template>
+        Step 2
+  
+        <button mat-raised-button type="button" class="butt action" (click)="reset()">Clear</button>
+        <button mat-raised-button type="button" class="butt" [disabled]="!projectForm.valid" (click)="createProject(projectForm.value)">Create</button>
+      </mat-step>
+    </mat-horizontal-stepper>
+  </form>
+  <mat-divider></mat-divider>
+</div>
\ No newline at end of file
diff --git a/services/self-service/src/main/resources/webapp/src/app/administration/project/project.component.ts b/services/self-service/src/main/resources/webapp/src/app/administration/project/create-project/create-project.component.scss
similarity index 74%
copy from services/self-service/src/main/resources/webapp/src/app/administration/project/project.component.ts
copy to services/self-service/src/main/resources/webapp/src/app/administration/project/create-project/create-project.component.scss
index 75c222f..7220975 100644
--- a/services/self-service/src/main/resources/webapp/src/app/administration/project/project.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/administration/project/create-project/create-project.component.scss
@@ -15,20 +15,4 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- */
-
-import { Component, OnInit } from '@angular/core';
-
-@Component({
-  selector: 'dlab-project',
-  templateUrl: './project.component.html',
-  styleUrls: ['./project.component.scss']
-})
-export class ProjectComponent implements OnInit {
-
-  constructor() { }
-
-  ngOnInit() {
-  }
-
-}
+ */
\ No newline at end of file
diff --git a/services/self-service/src/main/resources/webapp/src/app/administration/project/project.component.ts b/services/self-service/src/main/resources/webapp/src/app/administration/project/create-project/create-project.component.ts
similarity index 53%
copy from services/self-service/src/main/resources/webapp/src/app/administration/project/project.component.ts
copy to services/self-service/src/main/resources/webapp/src/app/administration/project/create-project/create-project.component.ts
index 75c222f..7b91265 100644
--- a/services/self-service/src/main/resources/webapp/src/app/administration/project/project.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/administration/project/create-project/create-project.component.ts
@@ -17,18 +17,38 @@
  * under the License.
  */
 
-import { Component, OnInit } from '@angular/core';
+ import { Component, OnInit } from '@angular/core';
+ import { FormGroup, FormBuilder, Validators } from '@angular/forms';
 
 @Component({
-  selector: 'dlab-project',
-  templateUrl: './project.component.html',
-  styleUrls: ['./project.component.scss']
+  selector: 'create-project',
+  templateUrl: './create-project.component.html',
+  styleUrls: ['./create-project.component.scss']
 })
-export class ProjectComponent implements OnInit {
+export class CreateProjectComponent implements OnInit {
 
-  constructor() { }
+  public projectForm: FormGroup;
+  constructor(
+    private _fb: FormBuilder,
+  ) { }
 
   ngOnInit() {
+    this.initFormModel();
   }
 
+  public createProject(data) {
+    console.log(data);
+  }
+
+  public reset() {
+    this.initFormModel()
+  }
+
+  private initFormModel(): void {
+    this.projectForm = this._fb.group({
+      'project_name': ['', Validators.required],
+      'endpoint_name': ['', Validators.required],
+      'users_list': ['']
+    });
+  }
 }
diff --git a/services/self-service/src/main/resources/webapp/src/app/administration/project/index.ts b/services/self-service/src/main/resources/webapp/src/app/administration/project/create-project/index.ts
similarity index 72%
copy from services/self-service/src/main/resources/webapp/src/app/administration/project/index.ts
copy to services/self-service/src/main/resources/webapp/src/app/administration/project/create-project/index.ts
index 6b8e0f4..5a7e62b 100644
--- a/services/self-service/src/main/resources/webapp/src/app/administration/project/index.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/administration/project/create-project/index.ts
@@ -19,21 +19,20 @@
 
 import { NgModule } from '@angular/core';
 import { CommonModule } from '@angular/common';
-import { FormsModule } from '@angular/forms';
+import { FormsModule, ReactiveFormsModule } from '@angular/forms';
 
-import { MaterialModule } from '../../shared/material.module';
-import { FormControlsModule } from '../../shared/form-controls';
+import { MaterialModule } from '../../../shared/material.module';
 
-import { ProjectComponent } from './project.component';
+import { CreateProjectComponent } from './create-project.component';
 
 @NgModule({
   imports: [
     CommonModule,
     FormsModule,
-    MaterialModule,
-    FormControlsModule,
+    ReactiveFormsModule,
+    MaterialModule
   ],
-  declarations: [ProjectComponent],
-  exports: [ProjectComponent]
+  declarations: [CreateProjectComponent],
+  exports: [CreateProjectComponent]
 })
-export class ProjectModule { }
\ No newline at end of file
+export class CreateProjectModule { }
\ No newline at end of file
diff --git a/services/self-service/src/main/resources/webapp/src/app/administration/project/index.ts b/services/self-service/src/main/resources/webapp/src/app/administration/project/index.ts
index 6b8e0f4..b6d413f 100644
--- a/services/self-service/src/main/resources/webapp/src/app/administration/project/index.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/administration/project/index.ts
@@ -25,6 +25,7 @@ import { MaterialModule } from '../../shared/material.module';
 import { FormControlsModule } from '../../shared/form-controls';
 
 import { ProjectComponent } from './project.component';
+import { CreateProjectModule } from './create-project';
 
 @NgModule({
   imports: [
@@ -32,6 +33,7 @@ import { ProjectComponent } from './project.component';
     FormsModule,
     MaterialModule,
     FormControlsModule,
+    CreateProjectModule
   ],
   declarations: [ProjectComponent],
   exports: [ProjectComponent]
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 4d4b0d8..41eaf79 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
@@ -16,4 +16,16 @@
   ~ specific language governing permissions and limitations
   ~ under the License.
   -->
-  
+
+<div class="sub-nav base-retreat">
+  <div>
+    <button mat-raised-button class="butt butt-create"
+      (click)="createProject()">
+      <i class="material-icons">add</i>Create new
+    </button>
+  </div>
+  <div></div>
+</div>
+
+<create-project></create-project>
+
diff --git a/services/self-service/src/main/resources/webapp/src/app/administration/project/project.component.ts b/services/self-service/src/main/resources/webapp/src/app/administration/project/project.component.ts
index 75c222f..aacc32f 100644
--- a/services/self-service/src/main/resources/webapp/src/app/administration/project/project.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/administration/project/project.component.ts
@@ -31,4 +31,8 @@ export class ProjectComponent implements OnInit {
   ngOnInit() {
   }
 
+  createProject() {
+    console.log('çreate');
+    
+  }
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org