From 07ee46efbb79111eeb039dcb45f6508b6983c274 Mon Sep 17 00:00:00 2001 From: Simon Hunt Date: Fri, 17 Apr 2015 09:59:20 -0700 Subject: [PATCH] GUI -- Removed Sample View, now that we have plenty others. Change-Id: I609a3e41ade1a863a7b08bce729920f8eabb9357 --- .../ui/impl/UiExtensionManager.java | 3 +- .../main/webapp/app/view/sample/README.txt | 4 - .../main/webapp/app/view/sample/sample.css | 44 ------- .../main/webapp/app/view/sample/sample.html | 18 --- .../src/main/webapp/app/view/sample/sample.js | 109 ------------------ web/gui/src/main/webapp/index.html | 2 - web/gui/src/main/webapp/nav.html | 1 - web/gui/src/main/webapp/onos.js | 1 - 8 files changed, 1 insertion(+), 181 deletions(-) delete mode 100644 web/gui/src/main/webapp/app/view/sample/README.txt delete mode 100644 web/gui/src/main/webapp/app/view/sample/sample.css delete mode 100644 web/gui/src/main/webapp/app/view/sample/sample.html delete mode 100644 web/gui/src/main/webapp/app/view/sample/sample.js diff --git a/web/gui/src/main/java/org/onosproject/ui/impl/UiExtensionManager.java b/web/gui/src/main/java/org/onosproject/ui/impl/UiExtensionManager.java index 408a85ad66..f5a7ec8c37 100644 --- a/web/gui/src/main/java/org/onosproject/ui/impl/UiExtensionManager.java +++ b/web/gui/src/main/java/org/onosproject/ui/impl/UiExtensionManager.java @@ -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(), diff --git a/web/gui/src/main/webapp/app/view/sample/README.txt b/web/gui/src/main/webapp/app/view/sample/README.txt deleted file mode 100644 index 0d137bc702..0000000000 --- a/web/gui/src/main/webapp/app/view/sample/README.txt +++ /dev/null @@ -1,4 +0,0 @@ -# ONOS Sample View - -Code and resources for implementing a sample view. - diff --git a/web/gui/src/main/webapp/app/view/sample/sample.css b/web/gui/src/main/webapp/app/view/sample/sample.css deleted file mode 100644 index 6787c23a1c..0000000000 --- a/web/gui/src/main/webapp/app/view/sample/sample.css +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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; -} - diff --git a/web/gui/src/main/webapp/app/view/sample/sample.html b/web/gui/src/main/webapp/app/view/sample/sample.html deleted file mode 100644 index c215830273..0000000000 --- a/web/gui/src/main/webapp/app/view/sample/sample.html +++ /dev/null @@ -1,18 +0,0 @@ - -
-

A Sample View

- - - -

- This is a view distinct from the Topology viewer, - to help facilitate development of the navigation model. -

-

- A message from the controller: - {{ ctrl.message }} -

-

- Try visiting the Topology View. -

-
diff --git a/web/gui/src/main/webapp/app/view/sample/sample.js b/web/gui/src/main/webapp/app/view/sample/sample.js deleted file mode 100644 index 9e6133b17e..0000000000 --- a/web/gui/src/main/webapp/app/view/sample/sample.js +++ /dev/null @@ -1,109 +0,0 @@ -/* - * 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'); - }]); -}()); diff --git a/web/gui/src/main/webapp/index.html b/web/gui/src/main/webapp/index.html index 36834f0b2b..d90bdc81af 100644 --- a/web/gui/src/main/webapp/index.html +++ b/web/gui/src/main/webapp/index.html @@ -115,7 +115,6 @@ - @@ -129,7 +128,6 @@ - diff --git a/web/gui/src/main/webapp/nav.html b/web/gui/src/main/webapp/nav.html index 0c545158c4..453efc39b3 100644 --- a/web/gui/src/main/webapp/nav.html +++ b/web/gui/src/main/webapp/nav.html @@ -1,5 +1,4 @@ -Sample Network Topology Device List diff --git a/web/gui/src/main/webapp/onos.js b/web/gui/src/main/webapp/onos.js index 07222f2bc8..5a4f9f51ca 100644 --- a/web/gui/src/main/webapp/onos.js +++ b/web/gui/src/main/webapp/onos.js @@ -43,7 +43,6 @@ 'intent', 'cluster', 'link', - 'sample', // {INJECTED-VIEW-IDS-END} // dummy entry