blob: b475280f9f4543328a93de251f5fc30d82b07873 [file] [log] [blame]
Bri Prebilic Cole7c92a3d2015-01-09 16:50:03 -08001/*
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 -- Sample View Module
19
20 @author Simon Hunt
21 @author Bri Prebilic Cole
22 */
23
24(function () {
25 'use strict';
26
27 var urlSuffix = '/onos/v1/devices';
28
Bri Prebilic Cole7c92a3d2015-01-09 16:50:03 -080029 angular.module('ovDevice', [])
Bri Prebilic Coleeb28b0b2015-01-15 14:20:58 -080030 .controller('OvDeviceCtrl', ['$log', '$location',
Bri Prebilic Cole7c92a3d2015-01-09 16:50:03 -080031 function ($log, $http, $loc) {
32 var self = this;
33 self.deviceData = [];
Bri Prebilic Coleeb28b0b2015-01-15 14:20:58 -080034 //var url = buildUrl($loc) + urlSuffix;
35 //$log.log(url);
Bri Prebilic Cole7c92a3d2015-01-09 16:50:03 -080036
Bri Prebilic Coleeb28b0b2015-01-15 14:20:58 -080037 //$http.get(url).then(
38 // //success
39 // function (response) {
40 // self.deviceData = response.data.devices;
41 // },
42 // //failure
43 // function (response) {
44 // $log.warn('Failed to get device data ', response.status);
45 // }
46 //);
Bri Prebilic Cole7c92a3d2015-01-09 16:50:03 -080047
48 $log.log('OvDeviceCtrl has been created');
49 }]);
50}());