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 {
new UiView("host", "Hosts"),
new UiView("intent", "Intents"),
new UiView("app", "Applications"),
new UiView("cluster", "Cluster Nodes"),
new UiView("sample", "Sample"));
new UiView("cluster", "Cluster Nodes"));
UiMessageHandlerFactory messageHandlerFactory =
() -> ImmutableList.of(
new TopologyViewMessageHandler(),
......
# ONOS Sample View
Code and resources for implementing a sample view.
/*
* 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 -- Sample View -- CSS file
*/
.light #ov-sample {
color: navy;
}
.dark #ov-sample {
color: #1e5e6f;
}
.dark a {
color: #88c;
}
#ov-sample .msg {
color: darkorange;
}
.light #ov-sample .msg {
color: darkorange;
}
.dark #ov-sample .msg {
color: #904e00;
}
<!-- Sample partial HTML -->
<div id="ov-sample">
<h2> A Sample View </h2>
<img class="logo" src="data/img/onos-logo.png">
<p>
This is a <i>view</i> distinct from the Topology viewer,
to help facilitate development of the navigation model.
</p>
<p>
A message from the controller:
<span class="msg">{{ ctrl.message }}</span>
</p>
<p>
Try visiting the <a href="#/topo">Topology View</a>.
</p>
</div>
/*
* 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 -- Sample View Module
*/
(function () {
'use strict';
// injected refs
var $log, tbs, flash;
// configuration
var tbid = 'sample-toolbar';
// internal state
var togFnDiv, radFnP;
function btnFn() {
flash.flash('Hi there friends!');
}
function togFn(display) {
togFnDiv.style('display', display ? 'block' : 'none');
}
function checkFn() {
radFnP.text('Checkmark radio button active.')
.style('color', 'green');
}
function xMarkFn() {
radFnP.text('Xmark radio button active.')
.style('color', 'red');
}
function birdFn() {
radFnP.text('Bird radio button active.')
.style('color', '#369');
}
// define the controller
angular.module('ovSample', ['onosUtil'])
.controller('OvSampleCtrl',
['$scope', '$log', 'ToolbarService', 'FlashService',
function ($scope, _$log_, _tbs_, _flash_) {
var self = this,
toolbar,
rset;
$log = _$log_;
tbs = _tbs_;
flash = _flash_;
self.message = 'Hey there folks!';
togFnDiv = d3.select('#ov-sample')
.append('div')
.text('Look at me!')
.style({
display: 'none',
color: 'rgb(204, 89, 81)',
'font-size': '20pt'
});
radFnP = d3.select('#ov-sample')
.append('p')
.style('font-size', '16pt');
toolbar = tbs.createToolbar(tbid);
rset = [
{ gid: 'checkMark', cb: checkFn, tooltip: 'rbtn tooltip' },
{ gid: 'xMark', cb: xMarkFn },
{ gid: 'bird', cb: birdFn, tooltip: 'hello' }
];
toolbar.addButton('demo-button', 'crown', btnFn, 'yay a tooltip');
toolbar.addToggle('demo-toggle', 'chain', false, togFn, 'another tooltip');
toolbar.addSeparator();
toolbar.addRadioSet('demo-radio', rset);
toolbar.hide();
checkFn();
// Clean up on destroyed scope
$scope.$on('$destroy', function () {
tbs.destroyToolbar(tbid);
});
$log.log('OvSampleCtrl has been created');
}]);
}());
......@@ -115,7 +115,6 @@
<script src="app/view/intent/intent.js"></script>
<script src="app/view/cluster/cluster.js"></script>
<script src="app/view/app/app.js"></script>
<script src="app/view/sample/sample.js"></script>
<!-- This is where contributed javascript will get injected -->
<!-- {INJECTED-JAVASCRIPT-START} -->
......@@ -129,7 +128,6 @@
<link rel="stylesheet" href="app/view/intent/intent.css">
<link rel="stylesheet" href="app/view/app/app.css">
<link rel="stylesheet" href="app/view/cluster/cluster.css">
<link rel="stylesheet" href="app/view/sample/sample.css">
<!-- This is where contributed stylesheets will get injected -->
<!-- {INJECTED-STYLESHEETS-START} -->
......
<!-- {INJECTED-VIEW-NAV-START} -->
<a ng-click="navCtrl.hideNav()" href="#/sample">Sample</a>
<a ng-click="navCtrl.hideNav()" href="#/topo">Network Topology</a>
<a ng-click="navCtrl.hideNav()" href="#/device">Device List</a>
<!-- {INJECTED-VIEW-NAV-END} -->
......
......@@ -43,7 +43,6 @@
'intent',
'cluster',
'link',
'sample',
// {INJECTED-VIEW-IDS-END}
// dummy entry
......