@@ -35,9 +35,12 @@ module HawkularMetrics {
35
35
when ( '/metrics/response-time' , {
36
36
templateUrl : 'plugins/metrics/html/response-time.html' ,
37
37
resolve : {
38
- hkResourceList : function ( $filter , $location , $rootScope , $q , HawkularInventory ) {
39
- var resPromise = HawkularInventory . Resource . query ( {
40
- environmentId : globalEnvironmentId
38
+ hkResourceList : function ( $route , $filter , $location , $rootScope , $q , HawkularInventory ) {
39
+ var idParts = $route . current . params . resourceId . split ( '~' ) ;
40
+ var feedId = idParts [ 0 ] ;
41
+ var resPromise = HawkularInventory . ResourceUnderFeed . query ( {
42
+ environmentId : globalEnvironmentId ,
43
+ feedId : feedId
41
44
} ) . $promise ;
42
45
resPromise . then ( function ( hkResourceList ) {
43
46
$location . path ( '/metrics/response-time/' + hkResourceList [ 0 ] . id ) ;
@@ -57,8 +60,10 @@ module HawkularMetrics {
57
60
reloadOnSearch : false ,
58
61
resolve : {
59
62
resource : function ( $route , $location , HawkularInventory , NotificationsService :INotificationsService ) {
60
- var p = HawkularInventory . Resource . get ( { environmentId : globalEnvironmentId ,
61
- resourceId : $route . current . params . resourceId } ) . $promise ;
63
+ var idParts = $route . current . params . resourceId . split ( '~' ) ;
64
+ var feedId = idParts [ 0 ] ;
65
+ var p = HawkularInventory . ResourceUnderFeed . get ( { environmentId : globalEnvironmentId ,
66
+ feedId : feedId , resourceId : $route . current . params . resourceId } ) . $promise ;
62
67
p . then ( ( response :any ) => {
63
68
return response . properties . url ;
64
69
} ,
@@ -75,8 +80,10 @@ module HawkularMetrics {
75
80
reloadOnSearch : false ,
76
81
resolve : {
77
82
resource : function ( $route , $location , HawkularInventory , NotificationsService :INotificationsService ) {
78
- var p = HawkularInventory . Resource . get ( { environmentId : globalEnvironmentId ,
79
- resourceId : $route . current . params . resourceId } ) . $promise ;
83
+ var idParts = $route . current . params . resourceId . split ( '~' ) ;
84
+ var feedId = idParts [ 0 ] ;
85
+ var p = HawkularInventory . ResourceUnderFeed . get ( { environmentId : globalEnvironmentId ,
86
+ feedId : feedId , resourceId : $route . current . params . resourceId } ) . $promise ;
80
87
p . then ( ( response :any ) => {
81
88
return response . properties . url ;
82
89
} ,
@@ -93,8 +100,10 @@ module HawkularMetrics {
93
100
reloadOnSearch : false ,
94
101
resolve : {
95
102
resource : function ( $route , $location , HawkularInventory , NotificationsService :INotificationsService ) {
96
- var p = HawkularInventory . Resource . get ( { environmentId : globalEnvironmentId ,
97
- resourceId : $route . current . params . resourceId } ) . $promise ;
103
+ var idParts = $route . current . params . resourceId . split ( '~' ) ;
104
+ var feedId = idParts [ 0 ] ;
105
+ var p = HawkularInventory . ResourceUnderFeed . get ( { environmentId : globalEnvironmentId ,
106
+ feedId : feedId , resourceId : $route . current . params . resourceId } ) . $promise ;
98
107
p . then ( ( response :any ) => {
99
108
return response . properties . url ;
100
109
} ,
@@ -123,10 +132,10 @@ module HawkularMetrics {
123
132
redirectMissingAppServer ( ) ;
124
133
return ;
125
134
}
126
- var p = HawkularInventory . FeedResource . get ( {
135
+ var p = HawkularInventory . ResourceUnderFeed . get ( {
127
136
environmentId : globalEnvironmentId ,
128
137
feedId : idParts [ 0 ] ,
129
- resourceId : $route . current . params . resourceId + '~/ '
138
+ resourceId : $route . current . params . resourceId + '~~ '
130
139
} ) . $promise ;
131
140
p . then ( ( response ) => {
132
141
return response ;
0 commit comments