Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed: Bug-1599291, Bug-1611991 #1079

Merged
merged 1 commit into from
Oct 19, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions src/modules/clusters/cluster-list/cluster-list.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,35 +64,35 @@ <h1>No Clusters Detected</h1>
</a>
</li>
<pf-modal-overlay
show-modal="clusterCntrl.showUnmanageModal"
on-close="clusterCntrl.closeModal(dismissCause)"
show-modal="cluster.showUnmanageModal"
on-close="clusterCntrl.closeModal(cluster)"
modal-id="clusterCntrl.unmanageModalId"
modal-title="clusterCntrl.unmanageModalTitle"
modal-body-template="clusterCntrl.unmanageTemplate"
action-buttons="clusterCntrl.unmanageActionButtons"
modal-body-scope="clusterCntrl.unmanageCluster">
</pf-modal-overlay>
<pf-modal-overlay
show-modal="clusterCntrl.showUnmanageProgress"
on-close="clusterCntrl.closeModal(dismissCause)"
show-modal="cluster.showUnmanageProgress"
on-close="clusterCntrl.closeModal(cluster)"
modal-id="clusterCntrl.unmanageProgressId"
modal-title="clusterCntrl.unmanageProgressTitle"
modal-body-template="clusterCntrl.unmanageProgressTemplate"
action-buttons="clusterCntrl.unmanageProgressActionButtons"
modal-body-scope="clusterCntrl.unmanageCluster">
</pf-modal-overlay>
<pf-modal-overlay
show-modal="clusterCntrl.showHost"
on-close="clusterCntrl.closeModal(dismissCause)"
show-modal="cluster.showHost"
on-close="clusterCntrl.closeModal(cluster)"
modal-id="clusterCntrl.hostModalId"
modal-title="clusterCntrl.hostModalTitle"
modal-body-template="clusterCntrl.hostModalTemplate"
action-buttons="clusterCntrl.hostModalActionButtons"
modal-body-scope="clusterCntrl.hostCluster">
</pf-modal-overlay>
<pf-modal-overlay
show-modal="clusterCntrl.showExpand"
on-close="clusterCntrl.closeModal(dismissCause)"
show-modal="cluster.showExpand"
on-close="clusterCntrl.closeModal(cluster)"
modal-id="clusterCntrl.expandModalId"
modal-title="clusterCntrl.expandModalTitle"
modal-body-template="clusterCntrl.expandModalTemplate"
Expand Down
26 changes: 11 additions & 15 deletions src/modules/clusters/cluster-list/cluster-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@
init();

/*BEGIN Unmanage confirm modal*/
vm.showUnmanageModal = false;
vm.openUnmanageModal = openUnmanageModal;
vm.unmanageModalId = "unmanageModal";
vm.unmanageModalTitle = "Unmanage Cluster";
Expand Down Expand Up @@ -130,14 +129,13 @@

function openUnmanageModal(cluster) {
vm.unmanageCluster = {};
vm.showUnmanageModal = true;
cluster.showUnmanageModal = true;
vm.unmanageCluster = cluster;
}

/*END Unmanage confirm modal*/

/*BEGIN Unmanage progress modal*/
vm.showUnmanageProgress = false;
vm.openUnmanageProgress = openUnmanageProgress;
vm.unmanageProgressId = "unmanageModal";
vm.unmanageProgressTitle = "Unmanage Cluster";
Expand All @@ -147,7 +145,7 @@
class: "btn-primary custom-class",
actionFn: function() {
if (vm.unmanageCluster.clusterId) {
vm.showUnmanageProgress = false;
vm.unmanageCluster.showUnmanageProgress = false;
$state.go("global-task-detail", { clusterId: vm.unmanageCluster.clusterId, taskId: vm.unmanageCluster.jobId });
}
}
Expand All @@ -156,13 +154,12 @@

function openUnmanageProgress(cluster) {
vm.unmanageCluster = cluster;
vm.showUnmanageProgress = true;
cluster.showUnmanageProgress = true;
}

/*END Unmanage progress modal*/

/*BEGIN Host modal*/
vm.showHost = false;
vm.openHostModal = openHostModal;
vm.hostModalId = "hostModal";
vm.hostModalTemplate = "/modules/clusters/host-list-modal/host-list-modal.html";
Expand All @@ -172,7 +169,7 @@
}];

function openHostModal(cluster) {
vm.showHost = true;
cluster.showHost = true;
vm.hostCluster = cluster;
vm.hostCluster.hostList = cluster.hosts;
vm.hostCluster.filteredHostList = cluster.hosts;
Expand Down Expand Up @@ -213,7 +210,6 @@
/*END Host modal*/

/*BEGIN expand modal*/
vm.showExpand = false;
vm.openExpandModal = openExpandModal;
vm.expandModalId = "expandModal";
vm.expandModalTitle = "Expand Cluster";
Expand All @@ -236,13 +232,13 @@
Notifications.message("danger", "", "Failed to initiate expand");
_disableClickExpand(vm.expandCluster, false);
});
vm.showExpand = false;
vm.expandCluster.showExpand = false;
}

}];

function openExpandModal(cluster) {
vm.showExpand = true;
cluster.showExpand = true;
vm.expandCluster = {};
vm.expandCluster.disableExpand = false;
vm.expandCluster = cluster;
Expand Down Expand Up @@ -296,11 +292,11 @@

/*END expand modal*/

function closeModal(dismissCause) {
vm.showHost = false;
vm.showUnmanageProgress = false;
vm.showUnmanageModal = false;
vm.showExpand = false;
function closeModal(cluster) {
cluster.showHost = false;
cluster.showUnmanageProgress = false;
cluster.showUnmanageModal = false;
cluster.showExpand = false;
}

/**
Expand Down