Matteo Scandolo | fcdbed3 | 2016-02-08 16:55:44 -0800 | [diff] [blame] | 1 | (function () { |
| 2 | 'use strict'; |
| 3 | |
| 4 | angular.module('xos.serviceTopology') |
| 5 | .directive('diagnostic', function(){ |
| 6 | return { |
| 7 | restrict: 'E', |
| 8 | templateUrl: 'templates/diagnostic.tpl.html', |
| 9 | controllerAs: 'vm', |
| 10 | controller: function(Subscribers, ServiceRelation){ |
Matteo Scandolo | 7547f04 | 2016-02-09 09:13:30 -0800 | [diff] [blame^] | 11 | Subscribers.queryWithDevices().$promise |
Matteo Scandolo | fcdbed3 | 2016-02-08 16:55:44 -0800 | [diff] [blame] | 12 | .then((subscribers) => { |
Matteo Scandolo | 7547f04 | 2016-02-09 09:13:30 -0800 | [diff] [blame^] | 13 | console.log(subscribers); |
Matteo Scandolo | fcdbed3 | 2016-02-08 16:55:44 -0800 | [diff] [blame] | 14 | this.subscribers = subscribers; |
Matteo Scandolo | 7547f04 | 2016-02-09 09:13:30 -0800 | [diff] [blame^] | 15 | return ServiceRelation.get(subscribers[0]); |
Matteo Scandolo | fcdbed3 | 2016-02-08 16:55:44 -0800 | [diff] [blame] | 16 | }) |
| 17 | .then((serviceChain) => { |
| 18 | this.serviceChain = serviceChain; |
| 19 | }); |
| 20 | } |
| 21 | } |
| 22 | }); |
| 23 | })(); |