GUI2 implementation of device/flow/port/group/meter/host/link/tunnel view

Review comments incorporated.

Change-Id: I45dd6570961cc3e0f4ffddb7acbf02cd7d860de5
diff --git a/web/gui2/src/main/webapp/app/view/host/host/host.component.ts b/web/gui2/src/main/webapp/app/view/host/host/host.component.ts
new file mode 100644
index 0000000..c13e2f5
--- /dev/null
+++ b/web/gui2/src/main/webapp/app/view/host/host/host.component.ts
@@ -0,0 +1,79 @@
+/*
+* Copyright 2018-present Open Networking Foundation
+*
+* Licensed 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.
+*/
+import { Component, OnInit, OnDestroy } from '@angular/core';
+import { FnService } from '../../../fw/util/fn.service';
+import { LoadingService } from '../../../fw/layer/loading.service';
+import { LogService } from '../../../log.service';
+import { TableBaseImpl, TableResponse, SortDir } from '../../../fw/widget/table.base';
+import { WebSocketService } from '../../../fw/remote/websocket.service';
+
+interface HostTableResponse extends TableResponse {
+    hosts: Host[];
+}
+
+interface Host {
+    name: boolean;
+    id: string;
+    hw: string;
+    vlanId: string;
+    configured: string;
+    address: string;
+    location: string;
+    _iconid_type: string;
+}
+
+/**
+ * ONOS GUI -- Host View Component
+ */
+@Component({
+    selector: 'onos-host',
+    templateUrl: './host.component.html',
+    styleUrls: ['./host.component.css',
+        '../../../fw/widget/table.css', '../../../fw/widget/table.theme.css']
+})
+export class HostComponent extends TableBaseImpl implements OnInit, OnDestroy {
+
+    constructor(
+        protected fs: FnService,
+        protected ls: LoadingService,
+        protected log: LogService,
+        protected wss: WebSocketService,
+    ) {
+        super(fs, ls, log, wss, 'host');
+        this.responseCallback = this.hostResponseCb;
+        this.sortParams = {
+            firstCol: 'name',
+            firstDir: SortDir.desc,
+            secondCol: 'id',
+            secondDir: SortDir.asc,
+        };
+    }
+
+    ngOnInit() {
+        this.init();
+        this.log.debug('HostComponent initialized');
+    }
+
+    ngOnDestroy() {
+        this.destroy();
+        this.log.debug('HostComponent destroyed');
+    }
+
+    hostResponseCb(data: HostTableResponse) {
+        this.log.debug('Host response received for ', data.hosts.length, 'host');
+    }
+
+}