Simon Hunt

GUI -- Removed Sample View, now that we have plenty others.

Change-Id: I609a3e41ade1a863a7b08bce729920f8eabb9357
...@@ -65,8 +65,7 @@ public class UiExtensionManager implements UiExtensionService, SpriteService { ...@@ -65,8 +65,7 @@ public class UiExtensionManager implements UiExtensionService, SpriteService {
65 new UiView("host", "Hosts"), 65 new UiView("host", "Hosts"),
66 new UiView("intent", "Intents"), 66 new UiView("intent", "Intents"),
67 new UiView("app", "Applications"), 67 new UiView("app", "Applications"),
68 - new UiView("cluster", "Cluster Nodes"), 68 + new UiView("cluster", "Cluster Nodes"));
69 - new UiView("sample", "Sample"));
70 UiMessageHandlerFactory messageHandlerFactory = 69 UiMessageHandlerFactory messageHandlerFactory =
71 () -> ImmutableList.of( 70 () -> ImmutableList.of(
72 new TopologyViewMessageHandler(), 71 new TopologyViewMessageHandler(),
......
1 -# ONOS Sample View
2 -
3 -Code and resources for implementing a sample view.
4 -
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 -- Sample View -- CSS file
19 - */
20 -
21 -.light #ov-sample {
22 - color: navy;
23 -}
24 -
25 -.dark #ov-sample {
26 - color: #1e5e6f;
27 -}
28 -
29 -.dark a {
30 - color: #88c;
31 -}
32 -
33 -#ov-sample .msg {
34 - color: darkorange;
35 -}
36 -
37 -.light #ov-sample .msg {
38 - color: darkorange;
39 -}
40 -
41 -.dark #ov-sample .msg {
42 - color: #904e00;
43 -}
44 -
1 -<!-- Sample partial HTML -->
2 -<div id="ov-sample">
3 - <h2> A Sample View </h2>
4 -
5 - <img class="logo" src="data/img/onos-logo.png">
6 -
7 - <p>
8 - This is a <i>view</i> distinct from the Topology viewer,
9 - to help facilitate development of the navigation model.
10 - </p>
11 - <p>
12 - A message from the controller:
13 - <span class="msg">{{ ctrl.message }}</span>
14 - </p>
15 - <p>
16 - Try visiting the <a href="#/topo">Topology View</a>.
17 - </p>
18 -</div>
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 -- Sample View Module
19 - */
20 -
21 -(function () {
22 - 'use strict';
23 -
24 - // injected refs
25 - var $log, tbs, flash;
26 -
27 - // configuration
28 - var tbid = 'sample-toolbar';
29 -
30 - // internal state
31 - var togFnDiv, radFnP;
32 -
33 - function btnFn() {
34 - flash.flash('Hi there friends!');
35 - }
36 -
37 - function togFn(display) {
38 - togFnDiv.style('display', display ? 'block' : 'none');
39 - }
40 -
41 - function checkFn() {
42 - radFnP.text('Checkmark radio button active.')
43 - .style('color', 'green');
44 - }
45 -
46 - function xMarkFn() {
47 - radFnP.text('Xmark radio button active.')
48 - .style('color', 'red');
49 - }
50 -
51 - function birdFn() {
52 - radFnP.text('Bird radio button active.')
53 - .style('color', '#369');
54 - }
55 -
56 -
57 - // define the controller
58 -
59 - angular.module('ovSample', ['onosUtil'])
60 - .controller('OvSampleCtrl',
61 - ['$scope', '$log', 'ToolbarService', 'FlashService',
62 -
63 - function ($scope, _$log_, _tbs_, _flash_) {
64 - var self = this,
65 - toolbar,
66 - rset;
67 -
68 - $log = _$log_;
69 - tbs = _tbs_;
70 - flash = _flash_;
71 -
72 - self.message = 'Hey there folks!';
73 -
74 - togFnDiv = d3.select('#ov-sample')
75 - .append('div')
76 - .text('Look at me!')
77 - .style({
78 - display: 'none',
79 - color: 'rgb(204, 89, 81)',
80 - 'font-size': '20pt'
81 - });
82 -
83 - radFnP = d3.select('#ov-sample')
84 - .append('p')
85 - .style('font-size', '16pt');
86 -
87 - toolbar = tbs.createToolbar(tbid);
88 - rset = [
89 - { gid: 'checkMark', cb: checkFn, tooltip: 'rbtn tooltip' },
90 - { gid: 'xMark', cb: xMarkFn },
91 - { gid: 'bird', cb: birdFn, tooltip: 'hello' }
92 - ];
93 -
94 - toolbar.addButton('demo-button', 'crown', btnFn, 'yay a tooltip');
95 - toolbar.addToggle('demo-toggle', 'chain', false, togFn, 'another tooltip');
96 - toolbar.addSeparator();
97 - toolbar.addRadioSet('demo-radio', rset);
98 - toolbar.hide();
99 -
100 - checkFn();
101 -
102 - // Clean up on destroyed scope
103 - $scope.$on('$destroy', function () {
104 - tbs.destroyToolbar(tbid);
105 - });
106 -
107 - $log.log('OvSampleCtrl has been created');
108 - }]);
109 -}());
...@@ -115,7 +115,6 @@ ...@@ -115,7 +115,6 @@
115 <script src="app/view/intent/intent.js"></script> 115 <script src="app/view/intent/intent.js"></script>
116 <script src="app/view/cluster/cluster.js"></script> 116 <script src="app/view/cluster/cluster.js"></script>
117 <script src="app/view/app/app.js"></script> 117 <script src="app/view/app/app.js"></script>
118 - <script src="app/view/sample/sample.js"></script>
119 118
120 <!-- This is where contributed javascript will get injected --> 119 <!-- This is where contributed javascript will get injected -->
121 <!-- {INJECTED-JAVASCRIPT-START} --> 120 <!-- {INJECTED-JAVASCRIPT-START} -->
...@@ -129,7 +128,6 @@ ...@@ -129,7 +128,6 @@
129 <link rel="stylesheet" href="app/view/intent/intent.css"> 128 <link rel="stylesheet" href="app/view/intent/intent.css">
130 <link rel="stylesheet" href="app/view/app/app.css"> 129 <link rel="stylesheet" href="app/view/app/app.css">
131 <link rel="stylesheet" href="app/view/cluster/cluster.css"> 130 <link rel="stylesheet" href="app/view/cluster/cluster.css">
132 - <link rel="stylesheet" href="app/view/sample/sample.css">
133 131
134 <!-- This is where contributed stylesheets will get injected --> 132 <!-- This is where contributed stylesheets will get injected -->
135 <!-- {INJECTED-STYLESHEETS-START} --> 133 <!-- {INJECTED-STYLESHEETS-START} -->
......
1 <!-- {INJECTED-VIEW-NAV-START} --> 1 <!-- {INJECTED-VIEW-NAV-START} -->
2 -<a ng-click="navCtrl.hideNav()" href="#/sample">Sample</a>
3 <a ng-click="navCtrl.hideNav()" href="#/topo">Network Topology</a> 2 <a ng-click="navCtrl.hideNav()" href="#/topo">Network Topology</a>
4 <a ng-click="navCtrl.hideNav()" href="#/device">Device List</a> 3 <a ng-click="navCtrl.hideNav()" href="#/device">Device List</a>
5 <!-- {INJECTED-VIEW-NAV-END} --> 4 <!-- {INJECTED-VIEW-NAV-END} -->
......
...@@ -43,7 +43,6 @@ ...@@ -43,7 +43,6 @@
43 'intent', 43 'intent',
44 'cluster', 44 'cluster',
45 'link', 45 'link',
46 - 'sample',
47 // {INJECTED-VIEW-IDS-END} 46 // {INJECTED-VIEW-IDS-END}
48 47
49 // dummy entry 48 // dummy entry
......