Bri Prebilic Cole

GUI -- Created onosWidget module and TableService with respective Karma Test file.

Change-Id: I0b164877bcd70503d126ccfe19e03a96d6b84b56
1 +/*
2 + * Copyright 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 -- Widget -- Table Service
19 + */
20 +(function () {
21 + 'use strict';
22 +
23 + var $log;
24 +
25 + angular.module('onosWidget')
26 + .factory('TableService', ['$log', function (_$log_) {
27 + $log = _$log_;
28 +
29 + return {
30 +
31 + };
32 + }]);
33 +
34 +}());
1 +/*
2 + * Copyright 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 -- Widgets Module
19 + */
20 +(function () {
21 + 'use strict';
22 +
23 + angular.module('onosWidget', []);
24 +
25 +}());
...@@ -54,6 +54,9 @@ ...@@ -54,6 +54,9 @@
54 <script src="fw/remote/websocket.js"></script> 54 <script src="fw/remote/websocket.js"></script>
55 <script src="fw/remote/wsevent.js"></script> 55 <script src="fw/remote/wsevent.js"></script>
56 56
57 + <script src="fw/widget/widget.js"></script>
58 + <script src="fw/widget/table.js"></script>
59 +
57 <!-- Framework and library stylesheets included here --> 60 <!-- Framework and library stylesheets included here -->
58 <!-- TODO: use a single catenated-minified file here --> 61 <!-- TODO: use a single catenated-minified file here -->
59 <link rel="stylesheet" href="onos.css"> 62 <link rel="stylesheet" href="onos.css">
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
24 // define core module dependencies here... 24 // define core module dependencies here...
25 var coreDependencies = [ 25 var coreDependencies = [
26 'ngRoute', 26 'ngRoute',
27 + 'onosWidget',
27 'onosUtil', 28 'onosUtil',
28 'onosSvg', 29 'onosSvg',
29 'onosRemote', 30 'onosRemote',
......
1 +/*
2 + * Copyright 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 -- Widget -- Table Service - Unit Tests
19 + */
20 +describe('factory: fw/widget/table.js', function() {
21 + var ts, $log;
22 +
23 + beforeEach(module('onosWidget'));
24 +
25 + beforeEach(inject(function (TableService, _$log_) {
26 + ts = TableService;
27 + $log = _$log_;
28 + }));
29 +
30 + it('should define TableService', function () {
31 + expect(ts).toBeDefined();
32 + });
33 +});
...\ No newline at end of file ...\ No newline at end of file
...@@ -29,6 +29,7 @@ module.exports = function(config) { ...@@ -29,6 +29,7 @@ module.exports = function(config) {
29 '../app/fw/util/util.js', 29 '../app/fw/util/util.js',
30 '../app/fw/svg/svg.js', 30 '../app/fw/svg/svg.js',
31 '../app/fw/remote/remote.js', 31 '../app/fw/remote/remote.js',
32 + '../app/fw/widget/widget.js',
32 // now load services etc. that augment the modules 33 // now load services etc. that augment the modules
33 '../app/**/*.js', 34 '../app/**/*.js',
34 35
......