blob: 1d4647136423cdc248d87cb0dbc9055dc98fb29b [file] [log] [blame]
Thomas Vachuska0fa583c2015-03-30 23:07:41 -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 -- App View Module
19 */
20
21(function () {
22 'use strict';
23
Bri Prebilic Coleb699a162015-04-13 12:01:39 -070024 var selRow;
25
Thomas Vachuska0fa583c2015-03-30 23:07:41 -070026 angular.module('ovApp', [])
27 .controller('OvAppCtrl',
Thomas Vachuska619c5382015-04-02 13:41:47 -070028 ['$log', '$scope', 'TableBuilderService',
Thomas Vachuska0fa583c2015-03-30 23:07:41 -070029
Thomas Vachuska619c5382015-04-02 13:41:47 -070030 function ($log, $scope, tbs) {
Bri Prebilic Coleb699a162015-04-13 12:01:39 -070031 function selCb($event, row) {
32 selRow = angular.element($event.currentTarget);
Thomas Vachuska619c5382015-04-02 13:41:47 -070033 // adjust which toolbar buttons are selected
34 $log.debug('Got a click on:', row);
35 }
Thomas Vachuska0fa583c2015-03-30 23:07:41 -070036
Thomas Vachuska619c5382015-04-02 13:41:47 -070037 tbs.buildTable({
38 self: this,
39 scope: $scope,
40 tag: 'app',
41 selCb: selCb
42 });
Thomas Vachuska0fa583c2015-03-30 23:07:41 -070043
Thomas Vachuska619c5382015-04-02 13:41:47 -070044 $log.log('OvAppCtrl has been created');
45 }]);
Thomas Vachuska0fa583c2015-03-30 23:07:41 -070046}());