Initial import of Angular5 components services and modules

Change-Id: I3953f1fbf7d5697a1c6d432808dd17d816ec285a
diff --git a/web/gui2/src/main/webapp/app/fw/widget/button.service.ts b/web/gui2/src/main/webapp/app/fw/widget/button.service.ts
new file mode 100644
index 0000000..da6cbab
--- /dev/null
+++ b/web/gui2/src/main/webapp/app/fw/widget/button.service.ts
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2015-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 { Injectable } from '@angular/core';
+import { FnService } from '../util/fn.service';
+import { IconService } from '../svg/icon.service';
+import { LogService } from '../../log.service';
+import { TooltipService } from './tooltip.service';
+
+/**
+ * ONOS GUI -- Widget -- Button Service
+ */
+@Injectable()
+export class ButtonService {
+
+    constructor(
+        private is: IconService,
+        private fs: FnService,
+        private log: LogService,
+        private tts: TooltipService
+    ) {
+        this.log.debug('ButtonService constructed');
+    }
+
+}
diff --git a/web/gui2/src/main/webapp/app/fw/widget/chartbuilder.service.ts b/web/gui2/src/main/webapp/app/fw/widget/chartbuilder.service.ts
new file mode 100644
index 0000000..1ed93df
--- /dev/null
+++ b/web/gui2/src/main/webapp/app/fw/widget/chartbuilder.service.ts
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2016-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 { Injectable } from '@angular/core';
+import { FnService } from '../util/fn.service';
+import { LoadingService } from '../layer/loading.service';
+import { LogService } from '../../log.service';
+import { WebSocketService } from '../remote/websocket.service';
+
+/**
+ * ONOS GUI -- Widget -- Chart Service
+ */
+@Injectable()
+export class ChartBuilderService {
+
+    constructor(
+        private fs: FnService,
+        private ls: LoadingService,
+        private log: LogService,
+        private wss: WebSocketService
+    ) {
+        this.log.debug('ChartBuilderService constructed');
+    }
+
+}
diff --git a/web/gui2/src/main/webapp/app/fw/widget/flashchanges.directive.ts b/web/gui2/src/main/webapp/app/fw/widget/flashchanges.directive.ts
new file mode 100644
index 0000000..1a5594f
--- /dev/null
+++ b/web/gui2/src/main/webapp/app/fw/widget/flashchanges.directive.ts
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2015-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 { Directive } from '@angular/core';
+import { FnService } from '../util/fn.service';
+import { LogService } from '../../log.service';
+
+/**
+ * ONOS GUI -- Widget -- Table Flash Changes Directive
+ */
+@Directive({
+  selector: '[onosFlashChanges]'
+})
+export class FlashChangesDirective {
+
+    constructor(
+        private fs: FnService,
+        private log: LogService
+    ) {
+        this.log.debug('FlashChangesDirective constructed');
+    }
+
+}
diff --git a/web/gui2/src/main/webapp/app/fw/widget/list.service.ts b/web/gui2/src/main/webapp/app/fw/widget/list.service.ts
new file mode 100644
index 0000000..3d31ab6
--- /dev/null
+++ b/web/gui2/src/main/webapp/app/fw/widget/list.service.ts
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2015-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 { Injectable } from '@angular/core';
+import { LogService } from '../../log.service';
+
+/**
+ * ONOS GUI -- Widget -- List Service
+ */
+@Injectable()
+export class ListService {
+
+    constructor(
+        private log: LogService
+    ) {
+        this.log.debug('ListService constructed');
+    }
+
+}
diff --git a/web/gui2/src/main/webapp/app/fw/widget/sortableheader.directive.ts b/web/gui2/src/main/webapp/app/fw/widget/sortableheader.directive.ts
new file mode 100644
index 0000000..71c1df3
--- /dev/null
+++ b/web/gui2/src/main/webapp/app/fw/widget/sortableheader.directive.ts
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2015-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 { Directive } from '@angular/core';
+import { IconService } from '../svg/icon.service';
+import { LogService } from '../../log.service';
+
+/**
+ * ONOS GUI -- Widget -- Table Sortable Header Directive
+ */
+@Directive({
+  selector: '[onosSortableHeader]'
+})
+export class SortableHeaderDirective {
+
+    constructor(
+        private icon: IconService,
+        private log: LogService
+    ) {
+        this.log.debug('SortableHeaderDirective constructed');
+    }
+
+}
diff --git a/web/gui2/src/main/webapp/app/fw/widget/tablebuilder.service.ts b/web/gui2/src/main/webapp/app/fw/widget/tablebuilder.service.ts
new file mode 100644
index 0000000..6c804d1
--- /dev/null
+++ b/web/gui2/src/main/webapp/app/fw/widget/tablebuilder.service.ts
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2015-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 { Injectable } from '@angular/core';
+import { FnService } from '../util/fn.service';
+import { LoadingService } from '../layer/loading.service';
+import { LogService } from '../../log.service';
+import { WebSocketService } from '../remote/websocket.service';
+
+/**
+ * ONOS GUI -- Widget -- Table Builder Service
+ */
+@Injectable()
+export class TableBuilderService {
+
+  constructor(
+    private fs: FnService,
+    private ls: LoadingService,
+    private log: LogService,
+    private wss: WebSocketService
+  ) {
+    this.log.debug('TableBuilderService constructed');
+  }
+
+}
diff --git a/web/gui2/src/main/webapp/app/fw/widget/tabledetail.service.ts b/web/gui2/src/main/webapp/app/fw/widget/tabledetail.service.ts
new file mode 100644
index 0000000..76a5764
--- /dev/null
+++ b/web/gui2/src/main/webapp/app/fw/widget/tabledetail.service.ts
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2017-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 { Injectable } from '@angular/core';
+import { FnService } from '../util/fn.service';
+import { LogService } from '../../log.service';
+
+/**
+ * ONOS GUI -- Widget -- Table Detail Panel Service
+ */
+@Injectable()
+export class TableDetailService {
+
+  constructor(
+    private fs: FnService,
+    private log: LogService,
+  ) {
+    this.log.debug('TableDetailService constructed');
+  }
+
+}
diff --git a/web/gui2/src/main/webapp/app/fw/widget/tableresize.directive.ts b/web/gui2/src/main/webapp/app/fw/widget/tableresize.directive.ts
new file mode 100644
index 0000000..bd25919
--- /dev/null
+++ b/web/gui2/src/main/webapp/app/fw/widget/tableresize.directive.ts
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2015-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 { Directive } from '@angular/core';
+import { FnService } from '../util/fn.service';
+import { LogService } from '../../log.service';
+import { MastService } from '../mast/mast.service';
+
+/**
+ * ONOS GUI -- Widget -- Table Resize Directive
+ */
+@Directive({
+  selector: '[onosTableResize]'
+})
+export class TableResizeDirective {
+
+    constructor(
+        private fs: FnService,
+        private log: LogService,
+        private ms: MastService
+    ) {
+        this.log.debug('TableResizeDirective constructed');
+    }
+
+}
diff --git a/web/gui2/src/main/webapp/app/fw/widget/toolbar.service.ts b/web/gui2/src/main/webapp/app/fw/widget/toolbar.service.ts
new file mode 100644
index 0000000..3681c80
--- /dev/null
+++ b/web/gui2/src/main/webapp/app/fw/widget/toolbar.service.ts
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2015-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 { Injectable } from '@angular/core';
+
+import { ButtonService } from './button.service';
+import { FnService } from '../util/fn.service';
+import { IconService } from '../svg/icon.service';
+import { LogService } from '../../log.service';
+import { PanelService } from '../layer/panel.service';
+
+/**
+ * ONOS GUI -- Widget -- Toolbar Service
+ * TODO: Augment service to allow toolbars to exist on right edge of screen
+ * TODO: also - make toolbar more object aware (rows etc.)
+ */
+@Injectable()
+export class ToolbarService {
+
+  constructor(
+    private fs: FnService,
+    private bns: ButtonService,
+    private is: IconService,
+    private log: LogService,
+    private ps: PanelService,
+  ) {
+    this.log.debug('ToolbarService constructed');
+  }
+
+}
diff --git a/web/gui2/src/main/webapp/app/fw/widget/tooltip.directive.ts b/web/gui2/src/main/webapp/app/fw/widget/tooltip.directive.ts
new file mode 100644
index 0000000..92f8ae3
--- /dev/null
+++ b/web/gui2/src/main/webapp/app/fw/widget/tooltip.directive.ts
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2015-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 { Directive } from '@angular/core';
+import { FnService } from '../util/fn.service';
+import { LogService } from '../../log.service';
+
+/**
+ * ONOS GUI -- Widget -- Tooltip Directive
+ */
+@Directive({
+  selector: '[onosTooltip]'
+})
+export class TooltipDirective {
+
+    constructor(
+        private fs: FnService,
+        private log: LogService
+    ) {
+        this.log.debug('TooltipDirective constructed');
+    }
+
+}
diff --git a/web/gui2/src/main/webapp/app/fw/widget/tooltip.service.ts b/web/gui2/src/main/webapp/app/fw/widget/tooltip.service.ts
new file mode 100644
index 0000000..6b08779
--- /dev/null
+++ b/web/gui2/src/main/webapp/app/fw/widget/tooltip.service.ts
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2015-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 { Injectable } from '@angular/core';
+import { FnService } from '../util/fn.service';
+import { LogService } from '../../log.service';
+
+/**
+ * ONOS GUI -- Widget -- Tooltip Service
+ */
+@Injectable()
+export class TooltipService {
+
+  constructor(
+      private fs: FnService,
+      private log: LogService,
+  ) {
+    this.log.debug('TooltipService constructed');
+  }
+
+}
diff --git a/web/gui2/src/main/webapp/app/fw/widget/widget.module.ts b/web/gui2/src/main/webapp/app/fw/widget/widget.module.ts
new file mode 100644
index 0000000..2e7a0ea
--- /dev/null
+++ b/web/gui2/src/main/webapp/app/fw/widget/widget.module.ts
@@ -0,0 +1,60 @@
+/*
+ * Copyright 2015-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 { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+import { LayerModule } from '../layer/layer.module';
+import { RemoteModule } from '../remote/remote.module';
+import { SvgModule } from '../svg/svg.module';
+import { UtilModule } from '../util/util.module';
+
+import { ButtonService } from './button.service';
+import { ChartBuilderService } from './chartbuilder.service';
+import { ListService } from './list.service';
+import { TableBuilderService } from './tablebuilder.service';
+import { TableDetailService } from './tabledetail.service';
+import { ToolbarService } from './toolbar.service';
+import { TooltipService } from './tooltip.service';
+import { TooltipDirective } from './tooltip.directive';
+import { SortableHeaderDirective } from './sortableheader.directive';
+import { TableResizeDirective } from './tableresize.directive';
+import { FlashChangesDirective } from './flashchanges.directive';
+
+/**
+ * ONOS GUI -- Widgets Module
+ */
+@NgModule({
+  imports: [
+    CommonModule
+    // Services have global scope and their modules don't have to be imported again
+    // It's enough to import them in the OnosModule
+  ],
+  declarations: [
+    TooltipDirective,
+    SortableHeaderDirective,
+    TableResizeDirective,
+    FlashChangesDirective
+  ],
+  providers: [
+    ButtonService,
+    ChartBuilderService,
+    ListService,
+    TableBuilderService,
+    TableDetailService,
+    TooltipService,
+    ToolbarService
+  ]
+})
+export class WidgetModule { }