[ONOS-8033] No Visible Indication for Active Applications in ONOS
Also tidied up onos.service.ts a bit for unused methods
Changed error message in Bazel build to point to new location under Bazel 1.0
Change-Id: Ie95f6fbb108386d3632cc8fa6656dc5b699023d9
diff --git a/web/gui2/BUILD b/web/gui2/BUILD
index dbb5311..6a61a92 100644
--- a/web/gui2/BUILD
+++ b/web/gui2/BUILD
@@ -103,7 +103,7 @@
"""
Run ng build to create outputs in production mode
- See bazel-genfiles/web/gui2/onos-gui2-ng-build-prod.log for details of the Angular CLI output
+ See bazel-out/k8-fastbuild/bin/web/gui2/onos-gui2-ng-build-prod.log for details of the Angular CLI output
To avoid the overhead of having several "npm install" invocations, we just do
it once in the //web/gui2-fw-lib which is really the core for the whole Angular 7
@@ -167,7 +167,7 @@
" if [ $$? -eq 0 ]; then echo 'Successfully ran build';" +
" else " +
" echo 'Error running \'ng build\' on \'//web/gui2:_onos-gui2-ng-build\'. \\\n" +
- " See bazel-genfiles/web/gui2/onos-gui2-ng-build-prod.log for more details' >&2;" +
+ " See bazel-out/k8-fastbuild/bin/web/gui2/onos-gui2-ng-build-prod.log for more details' >&2;" +
#" tail -n 100 ../../$(location onos-gui2-ng-test.log) >&2;" +
" exit 1;" +
" fi;" +
@@ -179,8 +179,8 @@
"""
Run 'ng test' to run Angular test and 'ng lint' for checkstyle
- See bazel-genfiles/web/gui2/onos-gui2-ng-lint.log or
- bazel-genfiles/web/gui2/onos-gui2-ng-test.log for details of the Angular CLI output
+ See bazel-out/k8-fastbuild/bin/web/gui2/onos-gui2-ng-lint.log or
+ bazel-out/k8-fastbuild/bin/web/gui2/onos-gui2-ng-test.log for details of the Angular CLI output
"""
genrule(
@@ -228,7 +228,8 @@
" if [ $$? -eq 0 ]; then echo 'Successfully ran lint';" +
" else " +
" echo 'Error running \'ng lint\' on \'//web/gui2:onos-gui2-ng-test\'. \\\n" +
- " See bazel-genfiles/web/gui2/onos-gui2-ng-lint.log for more details' >&2;" +
+ " See bazel-out/k8-fastbuild/bin/web/gui2/onos-gui2-ng-lint.log for details' >&2;" +
+ " cat ../../$(location onos-gui2-ng-lint.log) >&2 ||" +
" exit 1;" +
" fi;" +
" if [ -f /usr/bin/chromium-browser ]; then " + # Add to this for Mac and Chrome
@@ -248,7 +249,7 @@
" if [ $$? -eq 0 ]; then echo 'Successfully ran tests';" +
" else " +
" echo 'Error running \'ng test\' on \'//web/gui2:onos-gui2-ng-test\'. \\\n" +
- " See bazel-genfiles/web/gui2/onos-gui2-ng-test.log for more details' >&2;" +
+ " See bazel-out/k8-fastbuild/bin/web/gui2/onos-gui2-ng-test.log for more details' >&2;" +
#" tail -n 100 ../../$(location onos-gui2-ng-test.log) >&2;" +
" exit 1;" +
" fi;",
diff --git a/web/gui2/src/main/webapp/app/view/apps/apps/apps.component.html b/web/gui2/src/main/webapp/app/view/apps/apps/apps.component.html
index 77d5967..c7fc380 100644
--- a/web/gui2/src/main/webapp/app/view/apps/apps/apps.component.html
+++ b/web/gui2/src/main/webapp/app/view/apps/apps/apps.component.html
@@ -115,7 +115,7 @@
(click)="selectCallback($event, app)"
[ngClass]="{selected: app.id === selId, 'data-change': isChanged(app.id)}">
<td class="table-icon">
- <onos-icon iconId="{{app._iconid_state}}"></onos-icon>
+ <onos-icon [classes]="getStateAsClass(app.state)" [iconId]="app._iconid_state"></onos-icon>
</td>
<td class="table-icon">
<!-- The path below gets the app icon from the old GUI path -->
diff --git a/web/gui2/src/main/webapp/app/view/apps/apps/apps.component.ts b/web/gui2/src/main/webapp/app/view/apps/apps/apps.component.ts
index 59d91ed..ee543ad 100644
--- a/web/gui2/src/main/webapp/app/view/apps/apps/apps.component.ts
+++ b/web/gui2/src/main/webapp/app/view/apps/apps/apps.component.ts
@@ -341,4 +341,13 @@
active: undefined
};
}
+
+ getStateAsClass(value: string) {
+ if (value === 'ACTIVE') {
+ return 'active';
+ } else if (value === 'INSTALLED') {
+ return 'inactive';
+ }
+ return '';
+ }
}
diff --git a/web/gui2/src/main/webapp/app/view/cluster/cluster-details.directive.ts b/web/gui2/src/main/webapp/app/view/cluster/cluster-details.directive.ts
index 80fec4d..81f2f78 100644
--- a/web/gui2/src/main/webapp/app/view/cluster/cluster-details.directive.ts
+++ b/web/gui2/src/main/webapp/app/view/cluster/cluster-details.directive.ts
@@ -238,7 +238,9 @@
}
addCloseBtn(div) {
- this.is.loadEmbeddedIcon(div, 'close', 20);
+ // This whole cluster app needs to be changed over to the Angular 7 style
+ // It is the only one remaining that uses the d3 structure
+ // this.is.loadEmbeddedIcon(div, 'close', 20);
div.on('click', this.closePanel);
}
@@ -253,7 +255,9 @@
populateTop(details) {
const propLabels = this.getLionProps();
- this.is.loadEmbeddedIcon(iconDiv, 'node', 40);
+ // This whole cluster app needs to be changed over to the Angular 7 style
+ // It is the only one remaining that uses the d3 structure
+ // this.is.loadEmbeddedIcon(iconDiv, 'node', 40);
top.select('h2').text(details.id);
const tbody = topTable.append('tbody');