Skip to content

Commit

Permalink
development: Doing auto refresh only in info tab
Browse files Browse the repository at this point in the history
  • Loading branch information
juanmont authored and Ruben S. Montero committed Nov 16, 2018
1 parent d539187 commit 1bcd383
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/sunstone/public/app/sunstone.js
Original file line number Diff line number Diff line change
Expand Up @@ -1185,7 +1185,11 @@ define(function(require) {
};

var _rightInfoVisible = function(context) {
return $(".sunstone-info", context).is(":visible");
return $(".sunstone-info", context).is(":visible")
};

var _infoTabVisible = function(context, tab) {
return $(tab, $(".sunstone-info", context)).is(":visible")
};

var _rightListVisible = function(context) {
Expand Down Expand Up @@ -1285,6 +1289,7 @@ define(function(require) {


"rightInfoVisible": _rightInfoVisible,
"infoTabVisible": _infoTabVisible,
"rightListVisible": _rightListVisible,
"rightInfoResourceId": _rightInfoResourceId,

Expand Down
2 changes: 1 addition & 1 deletion src/sunstone/public/app/tabs/vms-tab/panels/info.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ define(function(require) {

setInterval(function() {
var tab = $('#' + TAB_ID);
if (Sunstone.rightInfoVisible(tab)){
if (Sunstone.infoTabVisible(tab, "#vm_info_tab")){
$("#vms-tabrefresh_buttons button").click();
}
}, Config.autorefreshInfo("vms-tab"));
Expand Down

0 comments on commit 1bcd383

Please sign in to comment.