GUI -- Added skeleton factories for SVG module.
Change-Id: Iba32faef86d95327fd70bc8fc57a716d543551db
Showing
10 changed files
with
316 additions
and
0 deletions
web/gui/src/main/webapp/app/fw/svg/glyph.js
0 → 100644
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 -- SVG -- Glyph Service | ||
19 | + | ||
20 | + @author Simon Hunt | ||
21 | + */ | ||
22 | +(function () { | ||
23 | + 'use strict'; | ||
24 | + | ||
25 | + var $log; | ||
26 | + | ||
27 | + angular.module('onosSvg') | ||
28 | + .factory('GlyphService', ['$log', function (_$log_) { | ||
29 | + $log = _$log_; | ||
30 | + | ||
31 | + return { | ||
32 | + tbd: function () {} | ||
33 | + }; | ||
34 | + }]); | ||
35 | + | ||
36 | +}()); |
web/gui/src/main/webapp/app/fw/svg/icon.js
0 → 100644
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 -- SVG -- Icon Service | ||
19 | + | ||
20 | + @author Simon Hunt | ||
21 | + */ | ||
22 | +(function () { | ||
23 | + 'use strict'; | ||
24 | + | ||
25 | + var $log; | ||
26 | + | ||
27 | + angular.module('onosSvg') | ||
28 | + .factory('IconService', ['$log', function (_$log_) { | ||
29 | + $log = _$log_; | ||
30 | + | ||
31 | + return { | ||
32 | + tbd: function () {} | ||
33 | + }; | ||
34 | + }]); | ||
35 | + | ||
36 | +}()); |
web/gui/src/main/webapp/app/fw/svg/map.js
0 → 100644
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 -- SVG -- Map Service | ||
19 | + | ||
20 | + @author Simon Hunt | ||
21 | + */ | ||
22 | +(function () { | ||
23 | + 'use strict'; | ||
24 | + | ||
25 | + var $log; | ||
26 | + | ||
27 | + angular.module('onosSvg') | ||
28 | + .factory('MapService', ['$log', function (_$log_) { | ||
29 | + $log = _$log_; | ||
30 | + | ||
31 | + return { | ||
32 | + tbd: function () {} | ||
33 | + }; | ||
34 | + }]); | ||
35 | + | ||
36 | +}()); |
web/gui/src/main/webapp/app/fw/svg/svg.js
0 → 100644
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 -- Scalable Vector Graphics Module | ||
19 | + | ||
20 | + @author Simon Hunt | ||
21 | + */ | ||
22 | +(function () { | ||
23 | + 'use strict'; | ||
24 | + | ||
25 | + angular.module('onosSvg', []); | ||
26 | + | ||
27 | +}()); |
web/gui/src/main/webapp/app/fw/svg/zoom.js
0 → 100644
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 -- SVG -- Zoom Service | ||
19 | + | ||
20 | + @author Simon Hunt | ||
21 | + */ | ||
22 | +(function () { | ||
23 | + 'use strict'; | ||
24 | + | ||
25 | + var $log; | ||
26 | + | ||
27 | + angular.module('onosSvg') | ||
28 | + .factory('ZoomService', ['$log', function (_$log_) { | ||
29 | + $log = _$log_; | ||
30 | + | ||
31 | + return { | ||
32 | + tbd: function () {} | ||
33 | + }; | ||
34 | + }]); | ||
35 | + | ||
36 | +}()); |
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 -- SVG -- Glyph Service - Unit Tests | ||
19 | + | ||
20 | + @author Simon Hunt | ||
21 | + */ | ||
22 | +describe('factory: fw/svg/glyph.js', function() { | ||
23 | + var gs; | ||
24 | + | ||
25 | + beforeEach(module('onosSvg')); | ||
26 | + | ||
27 | + beforeEach(inject(function (GlyphService) { | ||
28 | + gs = GlyphService; | ||
29 | + })); | ||
30 | + | ||
31 | + it('should define GlyphService', function () { | ||
32 | + expect(gs).toBeDefined(); | ||
33 | + }); | ||
34 | + | ||
35 | + // TODO: unit tests for glyph functions | ||
36 | +}); |
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 -- SVG -- Icon Service - Unit Tests | ||
19 | + | ||
20 | + @author Simon Hunt | ||
21 | + */ | ||
22 | +describe('factory: fw/svg/icon.js', function() { | ||
23 | + var is; | ||
24 | + | ||
25 | + beforeEach(module('onosSvg')); | ||
26 | + | ||
27 | + beforeEach(inject(function (IconService) { | ||
28 | + is = IconService; | ||
29 | + })); | ||
30 | + | ||
31 | + it('should define IconService', function () { | ||
32 | + expect(is).toBeDefined(); | ||
33 | + }); | ||
34 | + | ||
35 | + // TODO: unit tests for icon functions | ||
36 | +}); |
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 -- SVG -- Map Service - Unit Tests | ||
19 | + | ||
20 | + @author Simon Hunt | ||
21 | + */ | ||
22 | +describe('factory: fw/svg/map.js', function() { | ||
23 | + var ms; | ||
24 | + | ||
25 | + beforeEach(module('onosSvg')); | ||
26 | + | ||
27 | + beforeEach(inject(function (MapService) { | ||
28 | + ms = MapService; | ||
29 | + })); | ||
30 | + | ||
31 | + it('should define MapService', function () { | ||
32 | + expect(ms).toBeDefined(); | ||
33 | + }); | ||
34 | + | ||
35 | + // TODO: unit tests for map functions | ||
36 | +}); |
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 -- SVG -- Zoom Service - Unit Tests | ||
19 | + | ||
20 | + @author Simon Hunt | ||
21 | + */ | ||
22 | +describe('factory: fw/svg/zoom.js', function() { | ||
23 | + var zs; | ||
24 | + | ||
25 | + beforeEach(module('onosSvg')); | ||
26 | + | ||
27 | + beforeEach(inject(function (ZoomService) { | ||
28 | + zs = ZoomService; | ||
29 | + })); | ||
30 | + | ||
31 | + it('should define ZoomService', function () { | ||
32 | + expect(zs).toBeDefined(); | ||
33 | + }); | ||
34 | + | ||
35 | + // TODO: unit tests for map functions | ||
36 | +}); |
... | @@ -27,6 +27,7 @@ module.exports = function(config) { | ... | @@ -27,6 +27,7 @@ module.exports = function(config) { |
27 | // make sure modules are defined first... | 27 | // make sure modules are defined first... |
28 | '../app/onos.js', | 28 | '../app/onos.js', |
29 | '../app/fw/util/util.js', | 29 | '../app/fw/util/util.js', |
30 | + '../app/fw/svg/svg.js', | ||
30 | // now load services etc. that augment the modules | 31 | // now load services etc. that augment the modules |
31 | '../app/**/*.js', | 32 | '../app/**/*.js', |
32 | 33 | ... | ... |
-
Please register or login to post a comment