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) => { |
| 13 | this.subscribers = subscribers; |
Matteo Scandolo | 77d8fa0 | 2016-02-16 17:43:00 -0800 | [diff] [blame^] | 14 | return ServiceRelation.get(); |
Matteo Scandolo | fcdbed3 | 2016-02-08 16:55:44 -0800 | [diff] [blame] | 15 | }) |
| 16 | .then((serviceChain) => { |
| 17 | this.serviceChain = serviceChain; |
| 18 | }); |
| 19 | } |
| 20 | } |
| 21 | }); |
| 22 | })(); |