Initial import of Angular5 components services and modules
Change-Id: I3953f1fbf7d5697a1c6d432808dd17d816ec285a
diff --git a/web/gui2/src/main/webapp/app/view/apps/apps.component.css b/web/gui2/src/main/webapp/app/view/apps/apps.component.css
new file mode 100644
index 0000000..a1963c0
--- /dev/null
+++ b/web/gui2/src/main/webapp/app/view/apps/apps.component.css
@@ -0,0 +1,154 @@
+/*
+ * 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.
+ */
+
+/*
+ ONOS GUI -- Applications View (layout) -- CSS file
+ */
+
+#ov-app h2 {
+ display: inline-block;
+}
+
+#ov-app div.ctrl-btns {
+ width: 290px;
+}
+
+/* -- Drag-n-Drop oar file upload -- */
+#ov-app form#inputFileForm,
+#ov-app input#uploadFile {
+ display: none;
+}
+
+.dropping {
+
+}
+
+/* -- Confirmation Dialog -- */
+#app-dialog {
+ top: 140px;
+ padding: 12px;
+}
+
+#app-dialog p {
+ font-size: 12pt;
+}
+
+#app-dialog p.strong {
+ font-weight: bold;
+ padding: 8px;
+ text-align: center;
+}
+
+/* -- Details Panel -- */
+#application-details-panel.floatpanel {
+ z-index: 0;
+}
+
+#application-details-panel.floatpanel a {
+ font-weight: bold;
+}
+
+#application-details-panel .container {
+ padding: 0 30px;
+ overflow-y: scroll;
+}
+
+#application-details-panel .close-btn {
+ position: absolute;
+ right: 26px;
+ top: 26px;
+ cursor: pointer;
+}
+
+#application-details-panel .app-icon {
+ display: inline-block;
+ padding: 0 6px 0 0;
+ vertical-align: middle;
+}
+
+#application-details-panel h2 {
+ display: inline-block;
+ margin: 12px 0 6px 0;
+ font-size: 11pt;
+ font-variant: small-caps;
+ text-transform: uppercase;
+}
+
+#application-details-panel .top .app-title {
+ width: 90%;
+ height: 62px;
+ font-size: 16pt;
+ font-weight: lighter;
+ overflow: hidden;
+ white-space: nowrap;
+ padding: 0 12px 0 2px;
+ margin-top: 19px;
+ margin-bottom: 5px;
+}
+
+#application-details-panel .top div.left {
+ float: left;
+ padding: 12px 12px 0 3px;
+}
+
+#application-details-panel .top div.right {
+ display: inline-block;
+ overflow: hidden;
+ width: 320px;
+}
+
+#application-details-panel td.label,
+#application-details-panel .app-url i {
+ font-weight: bold;
+ text-align: right;
+ font-size: 10pt;
+ padding-right: 6px;
+}
+
+#application-details-panel td.value-bold {
+ font-weight: bold;
+}
+
+#application-details-panel .app-url {
+ padding: 10px 6px 6px;
+ overflow: hidden;
+ clear: left;
+}
+
+#application-details-panel hr {
+ width: 100%;
+ margin: 12px auto;
+}
+
+#application-details-panel .middle {
+ padding: 7px 0 7px 6px;
+}
+
+#application-details-panel .bottom {
+ padding: 0px;
+}
+
+#application-details-panel .bottom table {
+ border-spacing: 0;
+ width: 100%;
+}
+
+#application-details-panel .bottom td {
+ margin-left: -6px;
+ padding: 6px 6px;
+ text-align: left;
+}
+
diff --git a/web/gui2/src/main/webapp/app/view/apps/apps.component.html b/web/gui2/src/main/webapp/app/view/apps/apps.component.html
new file mode 100644
index 0000000..90f9a16
--- /dev/null
+++ b/web/gui2/src/main/webapp/app/view/apps/apps.component.html
@@ -0,0 +1,3 @@
+<div id="ov-app">
+ <p>apps works!</p>
+</div>
\ No newline at end of file
diff --git a/web/gui2/src/main/webapp/app/view/apps/apps.component.ts b/web/gui2/src/main/webapp/app/view/apps/apps.component.ts
new file mode 100644
index 0000000..5eaa38f
--- /dev/null
+++ b/web/gui2/src/main/webapp/app/view/apps/apps.component.ts
@@ -0,0 +1,58 @@
+/*
+ * 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 { Component, OnInit } from '@angular/core';
+import { DialogService } from '../../fw/layer/dialog.service';
+import { FnService } from '../../fw/util/fn.service';
+import { IconService } from '../../fw/svg/icon.service';
+import { KeyService } from '../../fw/util/key.service';
+import { LionService } from '../../fw/util/lion.service';
+import { LogService } from '../../log.service';
+import { PanelService } from '../../fw/layer/panel.service';
+import { TableBuilderService } from '../../fw/widget/tablebuilder.service';
+import { UrlFnService } from '../../fw/remote/urlfn.service';
+import { WebSocketService } from '../../fw/remote/websocket.service';
+
+/**
+ * ONOS GUI -- Apps View Component
+ */
+@Component({
+ selector: 'onos-apps',
+ templateUrl: './apps.component.html',
+ styleUrls: ['./apps.component.css']
+})
+export class AppsComponent implements OnInit {
+
+ constructor(
+ private fs: FnService,
+ private ds: DialogService,
+ private is: IconService,
+ private ks: KeyService,
+ private ls: LionService,
+ private log: LogService,
+ private ps: PanelService,
+ private tbs: TableBuilderService,
+ private ufs: UrlFnService,
+ private wss: WebSocketService,
+ private window: Window
+ ) {
+ this.log.debug('AppsComponent constructed');
+ }
+
+ ngOnInit() {
+ this.log.debug('AppsComponent initialized');
+ }
+
+}
diff --git a/web/gui2/src/main/webapp/app/view/apps/apps.module.ts b/web/gui2/src/main/webapp/app/view/apps/apps.module.ts
new file mode 100644
index 0000000..3083b55
--- /dev/null
+++ b/web/gui2/src/main/webapp/app/view/apps/apps.module.ts
@@ -0,0 +1,40 @@
+/*
+ * 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 { AppsComponent } from './apps.component';
+import { TriggerFormDirective } from './triggerform.directive';
+
+/**
+ * ONOS GUI -- Apps View Module
+ *
+ * Note: This has been updated from onos-gui-1.0.0 where it was called 'app'
+ * whereas here it is now called 'apps'. This is to avoid any confusion with
+ * the 'app' folder which is the root of the complete framework
+ */
+@NgModule({
+ exports: [
+ AppsComponent
+ ],
+ imports: [
+ CommonModule
+ ],
+ declarations: [
+ AppsComponent,
+ TriggerFormDirective
+ ]
+})
+export class AppsModule { }
diff --git a/web/gui2/src/main/webapp/app/view/apps/apps.theme.css b/web/gui2/src/main/webapp/app/view/apps/apps.theme.css
new file mode 100644
index 0000000..3de7ad8
--- /dev/null
+++ b/web/gui2/src/main/webapp/app/view/apps/apps.theme.css
@@ -0,0 +1,52 @@
+/*
+ * 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.
+ */
+
+/*
+ ONOS GUI -- Applications View (theme) -- CSS file
+ */
+
+/* -- Drag-n-Drop OAR files -- */
+div.dropping {
+ border: solid 3px #0095d6;
+}
+
+
+/* -- confirmation dialog -- */
+.light #app-dialog p.strong {
+ color: white;
+ background-color: #ce5b58;
+}
+
+.light #app-dialog.floatpanel.dialog {
+ background-color: #ffffff;
+}
+
+/* ========== DARK Theme ========== */
+
+
+.dark .app-title {
+ color: #dddddd;
+}
+
+/* -- confirmation dialog -- */
+.dark #app-dialog p.strong {
+ color: red;
+ background-color: #ecd98e;
+}
+.dark #app-dialog.floatpanel.dialog {
+ background-color: #282528;
+ color:#ddddee;
+}
diff --git a/web/gui2/src/main/webapp/app/view/apps/triggerform.directive.ts b/web/gui2/src/main/webapp/app/view/apps/triggerform.directive.ts
new file mode 100644
index 0000000..2bf9cd7
--- /dev/null
+++ b/web/gui2/src/main/webapp/app/view/apps/triggerform.directive.ts
@@ -0,0 +1,28 @@
+/*
+ * 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';
+
+/**
+ * ONOS GUI -- Apps -- Trigger Form Directive
+ */
+@Directive({
+ selector: '[onosTriggerForm]'
+})
+export class TriggerFormDirective {
+
+ constructor() { }
+
+}