blob: e82c7da966b2cb61c490a65ee2f8ff07929920e0 [file] [log] [blame]
Thomas Vachuskae586b792015-03-26 13:59:38 -07001/*
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 -- Host View Module
19 */
20
21(function () {
22 'use strict';
23
24 angular.module('ovHost', [])
25 .controller('OvHostCtrl',
Bri Prebilic Cole3d4d01c2015-04-30 13:48:36 -070026 ['$log', '$scope', 'TableService', 'TableBuilderService',
Thomas Vachuskae586b792015-03-26 13:59:38 -070027
Bri Prebilic Cole3d4d01c2015-04-30 13:48:36 -070028 function ($log, $scope, ts, tbs) {
Bri Prebilic Cole864cdd62015-04-02 15:46:47 -070029 tbs.buildTable({
Bri Prebilic Cole864cdd62015-04-02 15:46:47 -070030 scope: $scope,
31 tag: 'host'
Thomas Vachuskae586b792015-03-26 13:59:38 -070032 });
Bri Prebilic Cole3d4d01c2015-04-30 13:48:36 -070033
34 $scope.refresh = function () {
35 $log.debug('Refreshing hosts page');
36 ts.resetSortIcons();
37 $scope.sortCallback();
38 };
Bri Prebilic Colee568ead2015-05-01 09:51:28 -070039
Bri Prebilic Cole19a32dd2015-03-26 18:00:03 -070040 $log.log('OvHostCtrl has been created');
Thomas Vachuskae586b792015-03-26 13:59:38 -070041 }]);
42}());