Skip to content

Commit

Permalink
Merge pull request #2557 from skateman/fix-topology-refresh
Browse files Browse the repository at this point in the history
Fixed broken refresh functionality on all topology screens
(cherry picked from commit f372776)

https://bugzilla.redhat.com/show_bug.cgi?id=1509301
  • Loading branch information
mzazrivec authored and simaishi committed Nov 6, 2017
1 parent 6aaf2fc commit 520f3b8
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 3 deletions.
Expand Up @@ -15,7 +15,7 @@ function CloudTopologyCtrl($scope, $http, $interval, $location, topologyService,
topologyService.mixinContextMenu(vm, vm);

ManageIQ.angular.rxSubject.subscribe(function(event) {
if (event.controller === 'cloudTopologyController' && event.name === 'refresh') {
if (event.name === 'refreshTopology') {
vm.refresh();
}
});
Expand Down
Expand Up @@ -13,6 +13,12 @@ function ContainerTopologyCtrl($scope, $http, $interval, topologyService, $windo

topologyService.mixinContextMenu(vm, vm);

ManageIQ.angular.rxSubject.subscribe(function(event) {
if (event.name === 'refreshTopology') {
vm.refresh();
}
});

vm.refresh = function() {
var id;
var type;
Expand Down
Expand Up @@ -13,6 +13,12 @@ function InfraTopologyCtrl($scope, $http, $interval, $location, topologyService,

topologyService.mixinContextMenu(vm, vm);

ManageIQ.angular.rxSubject.subscribe(function(event) {
if (event.name === 'refreshTopology') {
vm.refresh();
}
});

vm.refresh = function() {
var id;
if ($location.absUrl().match("show/$") || $location.absUrl().match("show$")) {
Expand Down
Expand Up @@ -12,6 +12,12 @@ function MiddlewareTopologyCtrl($scope, $http, $interval, $location, topologySer

topologyService.mixinContextMenu(vm, vm);

ManageIQ.angular.rxSubject.subscribe(function(event) {
if (event.name === 'refreshTopology') {
vm.refresh();
}
});

vm.refresh = function() {
var id;
if ($location.absUrl().match('show/$') || $location.absUrl().match('show$')) {
Expand Down
Expand Up @@ -13,6 +13,12 @@ function NetworkTopologyCtrl($scope, $http, $interval, $location, topologyServic

topologyService.mixinContextMenu(this, $scope);

ManageIQ.angular.rxSubject.subscribe(function(event) {
if (event.name === 'refreshTopology') {
$scope.refresh();
}
});

$scope.refresh = function() {
var id;
if ($location.absUrl().match("show/$") || $location.absUrl().match("show$")) {
Expand Down
Expand Up @@ -13,6 +13,12 @@ function physicalInfraTopologyCtrl($scope, $http, $interval, $location, topology

topologyService.mixinContextMenu(vm, vm);

ManageIQ.angular.rxSubject.subscribe(function(event) {
if (event.name === 'refreshTopology') {
vm.refresh();
}
});

vm.refresh = function() {
var id;
if ($location.absUrl().match("show/$") || $location.absUrl().match("show$")) {
Expand Down
3 changes: 1 addition & 2 deletions app/views/shared/_topology_header_toolbar.html.haml
Expand Up @@ -5,8 +5,7 @@

.form-group
%button.btn.btn-default{'data-function' => 'sendDataWithRx',
'data-function-data' => {:controller => 'cloudTopologyController',
:name => 'refresh'}.to_json}
'data-function-data' => {:name => 'refreshTopology'}.to_json}
%i.fa.fa-refresh.fa-lg
= _("Refresh")
%form.search-pf.topology-search{:role => 'form',
Expand Down

0 comments on commit 520f3b8

Please sign in to comment.