GUI2 add in support for Preferences Service

Change-Id: Icdf2165d9f638aeff1b110a64777b93295935ed2
diff --git a/web/gui2/src/main/webapp/app/view/topology/layer/forcesvg/forcesvg.component.ts b/web/gui2/src/main/webapp/app/view/topology/layer/forcesvg/forcesvg.component.ts
index b0b4a0c..d2a0b18 100644
--- a/web/gui2/src/main/webapp/app/view/topology/layer/forcesvg/forcesvg.component.ts
+++ b/web/gui2/src/main/webapp/app/view/topology/layer/forcesvg/forcesvg.component.ts
@@ -51,7 +51,6 @@
     LinkSvgComponent
 } from './visuals';
 
-
 /**
  * ONOS GUI -- Topology Forces Graph Layer View.
  *
@@ -65,16 +64,16 @@
     changeDetection: ChangeDetectionStrategy.OnPush,
 })
 export class ForceSvgComponent implements OnInit, OnChanges {
-    @Input() onosInstMastership: string = '';
-    @Input() visibleLayer: LayerType = LayerType.LAYER_DEFAULT;
-    @Output() linkSelected = new EventEmitter<RegionLink>();
-    @Output() selectedNodeEvent = new EventEmitter<UiElement>();
-    @Input() selectedLink: RegionLink = null;
-    @Input() showHosts: boolean = false;
-    @Input() highlightPorts: boolean = true;
     @Input() deviceLabelToggle: LabelToggle = LabelToggle.NONE;
     @Input() hostLabelToggle: HostLabelToggle = HostLabelToggle.NONE;
+    @Input() showHosts: boolean = false;
+    @Input() highlightPorts: boolean = true;
+    @Input() onosInstMastership: string = '';
+    @Input() visibleLayer: LayerType = LayerType.LAYER_DEFAULT;
+    @Input() selectedLink: RegionLink = null;
     @Input() regionData: Region = <Region>{devices: [ [], [], [] ], hosts: [ [], [], [] ], links: []};
+    @Output() linkSelected = new EventEmitter<RegionLink>();
+    @Output() selectedNodeEvent = new EventEmitter<UiElement>();
     private graph: ForceDirectedGraph;
     private _options: { width, height } = { width: 800, height: 600 };
 
@@ -198,30 +197,6 @@
                 this.graph.nodes.length, 'nodes,', this.graph.links.length, 'links');
         }
 
-        if (changes['showHosts']) {
-            this.showHosts = changes['showHosts'].currentValue;
-        }
-
-        if (changes['highlightPorts']) {
-            this.highlightPorts = changes['highlightPorts'].currentValue;
-        }
-
-        // Pass on the changes to device
-        if (changes['deviceLabelToggle']) {
-            this.deviceLabelToggle = changes['deviceLabelToggle'].currentValue;
-            this.devices.forEach((d) => {
-                d.ngOnChanges({'labelToggle': changes['deviceLabelToggle']});
-            });
-        }
-
-        // Pass on the changes to host
-        if (changes['hostLabelToggle']) {
-            this.hostLabelToggle = changes['hostLabelToggle'].currentValue;
-            this.hosts.forEach((h) => {
-                h.ngOnChanges({'labelToggle': changes['hostLabelToggle']});
-            });
-        }
-
         this.ref.markForCheck();
     }