You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by dg...@apache.org on 2020/06/01 14:51:11 UTC

[incubator-dlab] 01/01: [DLAB-1754]: Removed category name if there isn't any instance size in such category

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

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

commit 36480978c69693c23abc5cd6dda0ac17c90a9aa8
Author: Dmytro_Gnatyshyn <di...@ukr.net>
AuthorDate: Mon Jun 1 17:50:40 2020 +0300

    [DLAB-1754]: Removed category name if there isn't any instance size in such category
---
 .../webapp/src/app/core/util/sortUtils.ts          |  8 +++--
 .../src/app/shared/navbar/navbar.component.html    | 34 +++++++++++-----------
 2 files changed, 23 insertions(+), 19 deletions(-)

diff --git a/services/self-service/src/main/resources/webapp/src/app/core/util/sortUtils.ts b/services/self-service/src/main/resources/webapp/src/app/core/util/sortUtils.ts
index 0a613ad..2573d0d 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/util/sortUtils.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/util/sortUtils.ts
@@ -34,7 +34,11 @@ export class SortUtils {
 
     Object.keys(shapesJson)
       .sort((a, b) => sortOrder.indexOf(a) - sortOrder.indexOf(b))
-      .forEach(key => { sortedShapes[key] = shapesJson[key]; });
+      .forEach(key => {
+        if (shapesJson[key].length) {
+          sortedShapes[key] = shapesJson[key];
+        }
+      });
 
     return sortedShapes;
   }
@@ -48,5 +52,5 @@ export class SortUtils {
   public static flatDeep(arr, d = 1) {
     return d > 0 ? arr.reduce((acc, val) => acc.concat(Array.isArray(val) ? this.flatDeep(val, d - 1) : val), [])
       : arr.slice();
-  };
+  }
 }
diff --git a/services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.component.html b/services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.component.html
index f2d715f..d8b2322 100644
--- a/services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.component.html
@@ -101,23 +101,23 @@
             <ng-template #billing><i class="material-icons">account_balance_wallet</i></ng-template>
           </a>
         </div>
-        <div>
-          <a class="nav-item" [routerLink]="['/swagger']" [routerLinkActive]="['active']"
-            [routerLinkActiveOptions]="{exact:true}">
-            <span *ngIf="isExpanded; else endpoint">Cloud Endpoint API</span>
-            <ng-template #endpoint>
-              <span>
-                <svg width="30px" height="27px" viewBox="0 0 256 256" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMid">
-                  <g>
-                    <path d="M127.059657,255.996921 C58.8506544,255.526472 -0.457073619,198.918442 0.00265506057,126.998303 C0.444649399,57.7958628 57.9516598,-0.468967577 129.11002,0.00284555012 C198.267128,0.462386081 256.613109,57.8667711 255.995136,128.194199 C256.568091,197.883453 197.934268,256.489189 127.059657,255.996921 Z M127.059657,255.996921 C58.8506544,255.526472 -0.457073619,198.918442 0.00265506057,126.998303 C0.444649399,57.7958628 57.9516598,-0.468967577 129.11002,0.0028 [...]
-                    <path id="swager-bgr" d="M127.184644,238.997327 C68.0323765,238.589271 16.6036091,189.498744 17.0023028,127.131428 C17.3860285,67.1185953 67.2554,16.5917106 128.963117,17.0024872 C188.934544,17.4010221 239.531905,67.1825241 238.995778,128.169251 C239.492444,188.602381 188.64743,239.424426 127.184644,238.997327 Z M127.184644,238.997327 C68.0323765,238.589271 16.6036091,189.498744 17.0023028,127.131428 C17.3860285,67.1185953 67.2554,16.5917106 128.963117,17.0024872 C188 [...]
-                    <path d="M169.327319,127.956161 C169.042723,133.246373 164.421106,137.639224 159.866213,136.872586 C159.844426,136.872586 159.821277,136.872586 159.798128,136.872586 C154.753021,136.879395 150.658383,132.794288 150.652936,127.749182 C150.824511,122.690458 155.019915,118.703395 160.08,118.789182 C165.125106,118.813692 169.59966,123.077182 169.327319,127.956161 Z M88.2011915,179.220161 C90.1034894,179.27599 92.0071489,179.235139 94.2008511,179.235139 L94.2008511,193.021 [...]
-                  </g>
-                </svg>
-              </span>
-            </ng-template>
-          </a>
-        </div>
+<!--        <div>-->
+<!--          <a class="nav-item" [routerLink]="['/swagger']" [routerLinkActive]="['active']"-->
+<!--            [routerLinkActiveOptions]="{exact:true}">-->
+<!--            <span *ngIf="isExpanded; else endpoint">Cloud Endpoint API</span>-->
+<!--            <ng-template #endpoint>-->
+<!--              <span>-->
+<!--                <svg width="30px" height="27px" viewBox="0 0 256 256" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMid">-->
+<!--                  <g>-->
+<!--                    <path d="M127.059657,255.996921 C58.8506544,255.526472 -0.457073619,198.918442 0.00265506057,126.998303 C0.444649399,57.7958628 57.9516598,-0.468967577 129.11002,0.00284555012 C198.267128,0.462386081 256.613109,57.8667711 255.995136,128.194199 C256.568091,197.883453 197.934268,256.489189 127.059657,255.996921 Z M127.059657,255.996921 C58.8506544,255.526472 -0.457073619,198.918442 0.00265506057,126.998303 C0.444649399,57.7958628 57.9516598,-0.468967577 129.11002,0. [...]
+<!--                    <path id="swager-bgr" d="M127.184644,238.997327 C68.0323765,238.589271 16.6036091,189.498744 17.0023028,127.131428 C17.3860285,67.1185953 67.2554,16.5917106 128.963117,17.0024872 C188.934544,17.4010221 239.531905,67.1825241 238.995778,128.169251 C239.492444,188.602381 188.64743,239.424426 127.184644,238.997327 Z M127.184644,238.997327 C68.0323765,238.589271 16.6036091,189.498744 17.0023028,127.131428 C17.3860285,67.1185953 67.2554,16.5917106 128.963117,17.0024872  [...]
+<!--                    <path d="M169.327319,127.956161 C169.042723,133.246373 164.421106,137.639224 159.866213,136.872586 C159.844426,136.872586 159.821277,136.872586 159.798128,136.872586 C154.753021,136.879395 150.658383,132.794288 150.652936,127.749182 C150.824511,122.690458 155.019915,118.703395 160.08,118.789182 C165.125106,118.813692 169.59966,123.077182 169.327319,127.956161 Z M88.2011915,179.220161 C90.1034894,179.27599 92.0071489,179.235139 94.2008511,179.235139 L94.2008511,193 [...]
+<!--                  </g>-->
+<!--                </svg>-->
+<!--              </span>-->
+<!--            </ng-template>-->
+<!--          </a>-->
+<!--        </div>-->
       </nav>
     </mat-nav-list>
   </mat-sidenav>


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