diff options
Diffstat (limited to 'framework/src/onos/apps/dhcp/app/src/main/resources')
6 files changed, 170 insertions, 0 deletions
diff --git a/framework/src/onos/apps/dhcp/app/src/main/resources/OSGI-INF/blueprint/shell-config.xml b/framework/src/onos/apps/dhcp/app/src/main/resources/OSGI-INF/blueprint/shell-config.xml new file mode 100644 index 00000000..ce716315 --- /dev/null +++ b/framework/src/onos/apps/dhcp/app/src/main/resources/OSGI-INF/blueprint/shell-config.xml @@ -0,0 +1,43 @@ +<!-- + ~ Copyright 2014 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. + --> +<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"> + + <command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.1.0"> + <command> + <action class="org.onosproject.dhcp.cli.DhcpListAllMappings"/> + </command> + <command> + <action class="org.onosproject.dhcp.cli.DhcpLeaseDetails"/> + </command> + <command> + <action class="org.onosproject.dhcp.cli.DhcpSetStaticMapping"/> + <completers> + <ref component-id="macIDCompleter"/> + <ref component-id="freeIPCompleter"/> + </completers> + </command> + <command> + <action class="org.onosproject.dhcp.cli.DhcpRemoveStaticMapping"/> + <completers> + <ref component-id="macIDCompleter"/> + </completers> + </command> + </command-bundle> + + <bean id="macIDCompleter" class="org.onosproject.dhcp.cli.MacIdCompleter"/> + <bean id="freeIPCompleter" class="org.onosproject.dhcp.cli.FreeIpCompleter"/> + +</blueprint>
\ No newline at end of file diff --git a/framework/src/onos/apps/dhcp/app/src/main/resources/app/view/dhcp/dhcp.css b/framework/src/onos/apps/dhcp/app/src/main/resources/app/view/dhcp/dhcp.css new file mode 100644 index 00000000..e0a29314 --- /dev/null +++ b/framework/src/onos/apps/dhcp/app/src/main/resources/app/view/dhcp/dhcp.css @@ -0,0 +1,27 @@ +/* + * Copyright 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 -- DHCP Server -- CSS file + */ + +#ov-dhcp h2 { + display: inline-block; +} + +#ov-dhcp div.ctrl-btns { + width: 45px; +} diff --git a/framework/src/onos/apps/dhcp/app/src/main/resources/app/view/dhcp/dhcp.html b/framework/src/onos/apps/dhcp/app/src/main/resources/app/view/dhcp/dhcp.html new file mode 100644 index 00000000..5782badf --- /dev/null +++ b/framework/src/onos/apps/dhcp/app/src/main/resources/app/view/dhcp/dhcp.html @@ -0,0 +1,47 @@ +<!-- DHCP Server partial HTML --> +<div id="ov-dhcp"> + <div class="tabular-header"> + <h2>DHCP Mappings ({{tableData.length}} total)</h2> + <div class="ctrl-btns"> + <div class="refresh" ng-class="{active: autoRefresh}" + icon icon-size="36" icon-id="refresh" + tooltip tt-msg="autoRefreshTip" + ng-click="toggleRefresh()"></div> + </div> + </div> + + <div class="summary-list" onos-table-resize> + <div ng-show="loading" class="loading-wheel" + icon icon-id="loading" icon-size="75"></div> + + <div class="table-header" onos-sortable-header> + <table> + <tr> + <td colId="host" sortable>Host ID</td> + <td colId="ip" sortable>IP Address</td> + <td colId="lease" sortable>Lease Expiry</td> + </tr> + </table> + </div> + + <div class="table-body"> + <table onos-flash-changes id-prop="host"> + <tr ng-if="!tableData.length" class="no-data"> + <td colspan="2"> + No mappings found + </td> + </tr> + + <tr ng-repeat="dhcp in tableData track by $index" + ng-click="selectCallback($event, dhcp)" + ng-repeat-complete row-id="{{dhcp.host}}"> + <td>{{dhcp.host}}</td> + <td>{{dhcp.ip}}</td> + <td>{{dhcp.lease}}</td> + </tr> + </table> + </div> + + </div> + +</div> diff --git a/framework/src/onos/apps/dhcp/app/src/main/resources/app/view/dhcp/dhcp.js b/framework/src/onos/apps/dhcp/app/src/main/resources/app/view/dhcp/dhcp.js new file mode 100644 index 00000000..061d0de6 --- /dev/null +++ b/framework/src/onos/apps/dhcp/app/src/main/resources/app/view/dhcp/dhcp.js @@ -0,0 +1,51 @@ +/* + * Copyright 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 -- DHCP Server View Module + */ + +(function () { + 'use strict'; + + // injected refs + var $log, $scope; + + angular.module('ovDhcp', []) + .controller('OvDhcpCtrl', + ['$log', '$scope', 'TableBuilderService', + + function (_$log_, _$scope_, tbs) { + $log = _$log_; + $scope = _$scope_; + + function selCb($event, row) { + $log.debug('Got a click on:', row); + } + + tbs.buildTable({ + scope: $scope, + tag: 'dhcp', + selCb: selCb + }); + + $scope.$on('$destroy', function () { + $log.debug('OvDhcpCtrl has been destroyed'); + }); + + $log.log('OvDhcpCtrl has been created'); + }]); +}());
\ No newline at end of file diff --git a/framework/src/onos/apps/dhcp/app/src/main/resources/gui/css.html b/framework/src/onos/apps/dhcp/app/src/main/resources/gui/css.html new file mode 100644 index 00000000..d02ad44a --- /dev/null +++ b/framework/src/onos/apps/dhcp/app/src/main/resources/gui/css.html @@ -0,0 +1 @@ +<link rel="stylesheet" href="app/view/dhcp/dhcp.css">
\ No newline at end of file diff --git a/framework/src/onos/apps/dhcp/app/src/main/resources/gui/js.html b/framework/src/onos/apps/dhcp/app/src/main/resources/gui/js.html new file mode 100644 index 00000000..d37b5768 --- /dev/null +++ b/framework/src/onos/apps/dhcp/app/src/main/resources/gui/js.html @@ -0,0 +1 @@ +<script src="app/view/dhcp/dhcp.js"></script>
\ No newline at end of file |