Bri Prebilic Cole

GUI -- Added some test files to practice Angular and link with the IconService. WIP

Change-Id: Ifcacc107b99c6ff6c983c3d3821084947657dcd3
1 +/*
2 + * Copyright 2014,2015 Open Networking Laboratory
3 + *
4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 + * you may not use this file except in compliance with the License.
6 + * You may obtain a copy of the License at
7 + *
8 + * http://www.apache.org/licenses/LICENSE-2.0
9 + *
10 + * Unless required by applicable law or agreed to in writing, software
11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 + * See the License for the specific language governing permissions and
14 + * limitations under the License.
15 + */
16 +
17 +/*
18 + ONOS GUI -- Showing Icons Test Module
19 +
20 + @author Bri Prebilic Cole
21 + */
22 +
23 +(function () {
24 + 'use strict';
25 +
26 + angular.module('showIconsTest', ['onosSvg'])
27 +
28 + .controller('OvShowIconsTest', ['$log', 'GlyphService', 'IconService',
29 + function ($log, gs, icns) {
30 + var self = this;
31 + self.a = 1;
32 + self.b = 2;
33 +
34 + self.message = "Hi";
35 +
36 + $log.log('OvShowIconsTest has been created');
37 + }]);
38 +})();
1 +<!DOCTYPE html>
2 +<!--
3 + ~ Copyright 2015 Open Networking Laboratory
4 + ~
5 + ~ Licensed under the Apache License, Version 2.0 (the "License");
6 + ~ you may not use this file except in compliance with the License.
7 + ~ You may obtain a copy of the License at
8 + ~
9 + ~ http://www.apache.org/licenses/LICENSE-2.0
10 + ~
11 + ~ Unless required by applicable law or agreed to in writing, software
12 + ~ distributed under the License is distributed on an "AS IS" BASIS,
13 + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 + ~ See the License for the specific language governing permissions and
15 + ~ limitations under the License.
16 + -->
17 +
18 +<!--
19 + ONOS -- Displaying icons with Angular test page
20 +
21 + @author Bri Prebilic Cole
22 + -->
23 +
24 +<html>
25 +<head lang="en">
26 + <meta charset="UTF-8">
27 + <title>Show Icons Angular</title>
28 +
29 + <script src="show-icons-test.js"></script>
30 +
31 + <script src="../tp/angular.js"></script>
32 + <script src="../tp/angular-route.js"></script>
33 +
34 + <script src="../tp/d3.js"></script>
35 +
36 + <link rel="stylesheet" href="../app/common.css">
37 +
38 + <style>
39 + html,
40 + body {
41 + background-color: #ddf;
42 + font-family: Arial, Helvetica, sans-serif;
43 + font-size: 9pt;
44 + }
45 +
46 + h2 {
47 + color: darkred;
48 + }
49 + </style>
50 +
51 +</head>
52 +<!-- outline for using a controller in Angular -->
53 +<body class="light" ng-app="showIconsTest">
54 + <h2>Showing Icons with Icon Service Angular</h2>
55 + <div id="show-icons" ng-controller="OvShowIconsTest as ctrl">
56 + {{ctrl.message}}
57 + <!--{{a}} + {{b}} = {{a+b}}-->
58 + </div>
59 +
60 +
61 +
62 +</body>
63 +</html>
...\ No newline at end of file ...\ No newline at end of file