GUI -- Added some test files to practice Angular and link with the IconService. WIP
Change-Id: Ifcacc107b99c6ff6c983c3d3821084947657dcd3
diff --git a/web/gui/src/main/webapp/_bripc/show-icons-test.js b/web/gui/src/main/webapp/_bripc/show-icons-test.js
new file mode 100644
index 0000000..7fe44e4
--- /dev/null
+++ b/web/gui/src/main/webapp/_bripc/show-icons-test.js
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2014,2015 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 -- Showing Icons Test Module
+
+ @author Bri Prebilic Cole
+ */
+
+(function () {
+ 'use strict';
+
+ angular.module('showIconsTest', ['onosSvg'])
+
+ .controller('OvShowIconsTest', ['$log', 'GlyphService', 'IconService',
+ function ($log, gs, icns) {
+ var self = this;
+ self.a = 1;
+ self.b = 2;
+
+ self.message = "Hi";
+
+ $log.log('OvShowIconsTest has been created');
+ }]);
+})();
diff --git a/web/gui/src/main/webapp/_bripc/show-icons.html b/web/gui/src/main/webapp/_bripc/show-icons.html
new file mode 100644
index 0000000..0394793
--- /dev/null
+++ b/web/gui/src/main/webapp/_bripc/show-icons.html
@@ -0,0 +1,63 @@
+<!DOCTYPE html>
+<!--
+ ~ Copyright 2015 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 -- Displaying icons with Angular test page
+
+ @author Bri Prebilic Cole
+ -->
+
+<html>
+<head lang="en">
+ <meta charset="UTF-8">
+ <title>Show Icons Angular</title>
+
+ <script src="show-icons-test.js"></script>
+
+ <script src="../tp/angular.js"></script>
+ <script src="../tp/angular-route.js"></script>
+
+ <script src="../tp/d3.js"></script>
+
+ <link rel="stylesheet" href="../app/common.css">
+
+ <style>
+ html,
+ body {
+ background-color: #ddf;
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 9pt;
+ }
+
+ h2 {
+ color: darkred;
+ }
+ </style>
+
+</head>
+<!-- outline for using a controller in Angular -->
+<body class="light" ng-app="showIconsTest">
+ <h2>Showing Icons with Icon Service Angular</h2>
+ <div id="show-icons" ng-controller="OvShowIconsTest as ctrl">
+ {{ctrl.message}}
+ <!--{{a}} + {{b}} = {{a+b}}-->
+ </div>
+
+
+
+</body>
+</html>
\ No newline at end of file