GUI -- Beginnings of new file structure / Angular implementation. WIP.
Change-Id: Ic79347b41292432605cd30bf1d4920063f6602e8
diff --git a/web/gui/src/main/webapp/app/README.txt b/web/gui/src/main/webapp/app/README.txt
new file mode 100644
index 0000000..d5f94d8
--- /dev/null
+++ b/web/gui/src/main/webapp/app/README.txt
@@ -0,0 +1,7 @@
+# Main Application
+
+index.html is the main launch point for the application.
+
+fw/ contains framework related code
+
+view/ contains view related code
\ No newline at end of file
diff --git a/web/gui/src/main/webapp/app/fw/README.txt b/web/gui/src/main/webapp/app/fw/README.txt
new file mode 100644
index 0000000..712f055
--- /dev/null
+++ b/web/gui/src/main/webapp/app/fw/README.txt
@@ -0,0 +1,9 @@
+# Framework related code
+
+- Masthead
+- Float Panels
+- Alerts
+- Flash (transient messages)
+- Quick Help (key bindings, mouse gestures)
+- Death Mask (server connection lost)
+
diff --git a/web/gui/src/main/webapp/app/fw/mast/mast.css b/web/gui/src/main/webapp/app/fw/mast/mast.css
new file mode 100644
index 0000000..efd371e
--- /dev/null
+++ b/web/gui/src/main/webapp/app/fw/mast/mast.css
@@ -0,0 +1,55 @@
+/*
+ * Copyright 2014 Open Networking Laboratory
+ *
+ * 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 -- Masthead -- CSS file
+
+ @author Simon Hunt
+ */
+
+#mast {
+ height: 36px;
+ padding: 4px;
+ vertical-align: baseline;
+}
+
+.light #mast {
+ background-color: #bbb;
+ box-shadow: 0 2px 8px #777;
+}
+.dark #mast {
+ background-color: #444;
+ box-shadow: 0 2px 8px #777;
+}
+
+#mast img.logo {
+ height: 38px;
+ padding-left: 8px;
+ padding-right: 8px;
+}
+
+#mast .title {
+ font-size: 14pt;
+ font-style: italic;
+ vertical-align: 12px;
+}
+
+.light #mast .title {
+ color: #369;
+}
+.dark #mast .title {
+ color: #eee;
+}
diff --git a/web/gui/src/main/webapp/app/fw/mast/mast.html b/web/gui/src/main/webapp/app/fw/mast/mast.html
new file mode 100644
index 0000000..dc086e9
--- /dev/null
+++ b/web/gui/src/main/webapp/app/fw/mast/mast.html
@@ -0,0 +1,3 @@
+<!-- Masthead partial HTML -->
+<img class="logo" src="../data/img/onos-logo.png">
+<span class="title">Open Network Operating System</span>
\ No newline at end of file
diff --git a/web/gui/src/main/webapp/app/fw/mast/mast.js b/web/gui/src/main/webapp/app/fw/mast/mast.js
new file mode 100644
index 0000000..f8c4fc3
--- /dev/null
+++ b/web/gui/src/main/webapp/app/fw/mast/mast.js
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2014 Open Networking Laboratory
+ *
+ * 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 -- Masthead
+
+ @author Simon Hunt
+ */
+(function () {
+ 'use strict';
+
+ angular.module('onosMast', [])
+ .controller('MastCtrl', [function () {
+ // controller logic here
+ console.log('MastCtrl has been created');
+ }]);
+
+}());
diff --git a/web/gui/src/main/webapp/app/index.html b/web/gui/src/main/webapp/app/index.html
new file mode 100644
index 0000000..d820b96
--- /dev/null
+++ b/web/gui/src/main/webapp/app/index.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<!--
+~ Copyright 2014 Open Networking Laboratory
+~
+~ 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.
+-->
+<html>
+<head>
+ <meta charset="utf-8">
+ <link rel="shortcut icon" href="../data/img/onos-logo.png">
+ <title>ONOS Angular</title>
+
+ <!-- Third party library code included here -->
+ <!--TODO: use minified versions, once debugging is complete -->
+ <script src="../tp/angular.js"></script>
+ <script src="../tp/angular-route.js"></script>
+
+ <script src="../tp/d3.js"></script>
+ <script src="../tp/topojson.v1.min.js"></script>
+
+ <!-- NOTE: We are going to see if we can dispense with jQuery... -->
+ <!--<script src="../tp/jquery-2.1.1.min.js"></script>-->
+
+ <!-- ONOS UI Framework included here -->
+ <!-- TODO: use a single catenated-minified file here -->
+ <script src="onos.js"></script>
+ <script src="fw/mast/mast.js"></script>
+
+ <!-- Framework and library stylesheets included here -->
+ <!-- TODO: use a single catenated-minified file here -->
+ <link rel="stylesheet" href="onos.css">
+ <link rel="stylesheet" href="fw/mast/mast.css">
+
+ <!-- This is where contributed javascript get injected -->
+ <!-- INJECTED-JAVASCRIPT -->
+ <!-- TODO: inject javascript refs server-side -->
+
+ <!-- This is where contributed stylesheets get injected -->
+ <!-- INJECTED-CSS-STYLESHEETS -->
+ <!-- TODO: inject style-sheet refs server-side -->
+</head>
+<body class="light" ng-app="onosApp">
+ <div id="mast"
+ ng-controller="MastCtrl as mastCtrl"
+ ng-include="'fw/mast/mast.html'"></div>
+
+ <div id="view" ng-view></div>
+
+ <div id="floatpanels"></div>
+ <div id="alerts"></div>
+ <div id="flash"></div>
+ <div id="quickhelp"></div>
+ <div id="deathmask"></div>
+</body>
+</html>
diff --git a/web/gui/src/main/webapp/app/onos.css b/web/gui/src/main/webapp/app/onos.css
new file mode 100644
index 0000000..cc5b956
--- /dev/null
+++ b/web/gui/src/main/webapp/app/onos.css
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2014 Open Networking Laboratory
+ *
+ * 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 -- core -- CSS file
+
+ @author Simon Hunt
+ */
+
+html {
+ font-family: sans-serif;
+ -webkit-text-size-adjust: 100%;
+ -ms-text-size-adjust: 100%;
+ height: 100%;
+}
+
+/*
+ overflow hidden is to ensure that the body does not expand to account
+ for any flyout panes, that are positioned "off screen".
+ */
+body {
+ height: 100%;
+ margin: 0;
+ overflow: hidden;
+}
diff --git a/web/gui/src/main/webapp/app/onos.js b/web/gui/src/main/webapp/app/onos.js
new file mode 100644
index 0000000..ea29256
--- /dev/null
+++ b/web/gui/src/main/webapp/app/onos.js
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2014 Open Networking Laboratory
+ *
+ * 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 -- Base Framework
+
+ @author Simon Hunt
+ */
+(function () {
+ 'use strict';
+
+ angular.module('onosApp', ['onosMast'])
+ .controller('OnosCtrl', [function () {
+ // controller logic here
+ console.log('OnosCtrl has been created');
+ }]);
+
+}());
diff --git a/web/gui/src/main/webapp/app/view/topo/README.txt b/web/gui/src/main/webapp/app/view/topo/README.txt
new file mode 100644
index 0000000..61089bf
--- /dev/null
+++ b/web/gui/src/main/webapp/app/view/topo/README.txt
@@ -0,0 +1,3 @@
+# ONOS Topology View
+
+Code and resources for implementing the client-side for the Topology View.