aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/ng2/components
diff options
context:
space:
mode:
authorIdan Amit <ia096e@intl.att.com>2018-03-21 12:04:57 +0200
committerMichael Lando <ml636r@att.com>2018-03-27 15:04:23 +0000
commit7363f3d875e08d5195cb5e8b7e4f9ac86ec99ef5 (patch)
treec49f7d31d5b694330b47247f30d9e7a5d6f602ea /catalog-ui/src/app/ng2/components
parentfb81a037f9f81be9bdb4b13032a9415654d6d2cc (diff)
Create Error page for offline plugin
Created an error page to be displayed when a plugin is offline Change-Id: I7bff7d29896e5eae88eca79784854bcd1086ca50 Issue-ID: SDC-1082 Signed-off-by: Idan Amit <ia096e@intl.att.com>
Diffstat (limited to 'catalog-ui/src/app/ng2/components')
-rw-r--r--catalog-ui/src/app/ng2/components/ui/plugin/plugin-frame.component.html3
-rw-r--r--catalog-ui/src/app/ng2/components/ui/plugin/plugin-frame.component.ts6
-rw-r--r--catalog-ui/src/app/ng2/components/ui/plugin/plugin-frame.module.ts2
3 files changed, 10 insertions, 1 deletions
diff --git a/catalog-ui/src/app/ng2/components/ui/plugin/plugin-frame.component.html b/catalog-ui/src/app/ng2/components/ui/plugin/plugin-frame.component.html
index fb90a1eb90..a72ed837a4 100644
--- a/catalog-ui/src/app/ng2/components/ui/plugin/plugin-frame.component.html
+++ b/catalog-ui/src/app/ng2/components/ui/plugin/plugin-frame.component.html
@@ -1,5 +1,6 @@
<div class="plugin-frame">
<div class="w-sdc-main-container">
- <iframe class="plugin-iframe" [src]="pluginUrl | safeUrlSanitizer"></iframe>
+ <iframe *ngIf="plugin.isOnline" class="plugin-iframe" [src]="pluginUrl | safeUrlSanitizer"></iframe>
+ <plugin-not-connected [pluginName]="plugin.pluginId" *ngIf="!plugin.isOnline"></plugin-not-connected>
</div>
</div>
diff --git a/catalog-ui/src/app/ng2/components/ui/plugin/plugin-frame.component.ts b/catalog-ui/src/app/ng2/components/ui/plugin/plugin-frame.component.ts
index fc0af53a44..2ba784727f 100644
--- a/catalog-ui/src/app/ng2/components/ui/plugin/plugin-frame.component.ts
+++ b/catalog-ui/src/app/ng2/components/ui/plugin/plugin-frame.component.ts
@@ -25,6 +25,12 @@ export class PluginFrameComponent implements OnInit {
}
ngOnInit(): void {
+ if (this.plugin.isOnline) {
+ this.initPlugin();
+ }
+ }
+
+ private initPlugin() {
this.pluginUrl = this.plugin.pluginSourceUrl;
this.isClosed = false;
diff --git a/catalog-ui/src/app/ng2/components/ui/plugin/plugin-frame.module.ts b/catalog-ui/src/app/ng2/components/ui/plugin/plugin-frame.module.ts
index 9eebd5c47f..fce9c76eb1 100644
--- a/catalog-ui/src/app/ng2/components/ui/plugin/plugin-frame.module.ts
+++ b/catalog-ui/src/app/ng2/components/ui/plugin/plugin-frame.module.ts
@@ -4,6 +4,7 @@ import {PluginFrameComponent} from "./plugin-frame.component";
import {LayoutModule} from "../../layout/layout.module";
import {GlobalPipesModule} from "../../../pipes/global-pipes.module";
import {UiElementsModule} from "../ui-elements.module";
+import {PluginNotConnectedModule} from "../../../pages/plugin-not-connected/plugin-not-connected-module";
@NgModule({
@@ -13,6 +14,7 @@ import {UiElementsModule} from "../ui-elements.module";
imports: [
CommonModule,
LayoutModule,
+ PluginNotConnectedModule,
GlobalPipesModule,
UiElementsModule
],