Clear selections for table view

Item selections on table view for batch actions does not be cleared
after execution of actions.
This patch ensures to clear item selections by emitting 'hzTable:clearSelection'
event.

Change-Id: Icdbed25ed0c9125c49e3c23675a2069a88ddf0a4
Closes-Bug: #1777545
This commit is contained in:
Shu Muto 2018-06-19 10:44:56 +09:00
parent 321d756db5
commit 3d7cf8175e
5 changed files with 25 additions and 0 deletions

View File

@ -22,12 +22,14 @@
deleteClusterService.$inject = [
'$q',
'$location',
'$rootScope',
'horizon.app.core.openstack-service-api.policy',
'horizon.app.core.openstack-service-api.senlin',
'horizon.framework.util.actions.action-result.service',
'horizon.framework.util.i18n.gettext',
'horizon.framework.util.q.extensions',
'horizon.framework.widgets.modal.deleteModalService',
'horizon.framework.widgets.table.events',
'horizon.framework.widgets.toast.service',
'horizon.app.core.clusters.resourceType'
];
@ -45,12 +47,14 @@
function deleteClusterService(
$q,
$location,
$rootScope,
policyService,
senlin,
actionResultService,
gettext,
$qExtensions,
deleteModal,
tableEvents,
toast,
clustersResourceType
) {
@ -111,6 +115,7 @@
currentPath !== indexPath) {
$location.path(indexPath);
} else {
$rootScope.$broadcast(tableEvents.CLEAR_SELECTIONS);
return actionResult.result;
}
}

View File

@ -22,12 +22,14 @@
deleteService.$inject = [
'$q',
'$location',
'$rootScope',
'horizon.app.core.openstack-service-api.policy',
'horizon.app.core.openstack-service-api.senlin',
'horizon.framework.util.actions.action-result.service',
'horizon.framework.util.i18n.gettext',
'horizon.framework.util.q.extensions',
'horizon.framework.widgets.modal.deleteModalService',
'horizon.framework.widgets.table.events',
'horizon.framework.widgets.toast.service',
'horizon.app.core.nodes.resourceType'
];
@ -45,12 +47,14 @@
function deleteService(
$q,
$location,
$rootScope,
policyService,
senlin,
actionResultService,
gettext,
$qExtensions,
deleteModal,
tableEvents,
toast,
nodesResourceType
) {
@ -109,6 +113,7 @@
currentPath !== indexPath) {
$location.path(indexPath);
} else {
$rootScope.$broadcast(tableEvents.CLEAR_SELECTIONS);
return result.result;
}
}

View File

@ -22,12 +22,14 @@
deletePolicyService.$inject = [
'$q',
'$location',
'$rootScope',
'horizon.app.core.openstack-service-api.policy',
'horizon.app.core.openstack-service-api.senlin',
'horizon.framework.util.actions.action-result.service',
'horizon.framework.util.i18n.gettext',
'horizon.framework.util.q.extensions',
'horizon.framework.widgets.modal.deleteModalService',
'horizon.framework.widgets.table.events',
'horizon.framework.widgets.toast.service',
'horizon.app.core.policies.resourceType'
];
@ -45,12 +47,14 @@
function deletePolicyService(
$q,
$location,
$rootScope,
policyService,
senlin,
actionResultService,
gettext,
$qExtensions,
deleteModal,
tableEvents,
toast,
policiesResourceType
) {
@ -111,6 +115,7 @@
currentPath !== indexPath) {
$location.path(indexPath);
} else {
$rootScope.$broadcast(tableEvents.CLEAR_SELECTIONS);
return actionResult.result;
}
}

View File

@ -22,12 +22,14 @@
deleteService.$inject = [
'$q',
'$location',
'$rootScope',
'horizon.app.core.openstack-service-api.policy',
'horizon.app.core.openstack-service-api.senlin',
'horizon.framework.util.actions.action-result.service',
'horizon.framework.util.i18n.gettext',
'horizon.framework.util.q.extensions',
'horizon.framework.widgets.modal.deleteModalService',
'horizon.framework.widgets.table.events',
'horizon.framework.widgets.toast.service',
'horizon.app.core.profiles.resourceType'
];
@ -45,12 +47,14 @@
function deleteService(
$q,
$location,
$rootScope,
policyService,
senlin,
actionResultService,
gettext,
$qExtensions,
deleteModal,
tableEvents,
toast,
profilesResourceType
) {
@ -109,6 +113,7 @@
currentPath !== indexPath) {
$location.path(indexPath);
} else {
$rootScope.$broadcast(tableEvents.CLEAR_SELECTIONS);
return result.result;
}
}

View File

@ -22,12 +22,14 @@
deleteReceiverService.$inject = [
'$q',
'$location',
'$rootScope',
'horizon.app.core.openstack-service-api.policy',
'horizon.app.core.openstack-service-api.senlin',
'horizon.framework.util.actions.action-result.service',
'horizon.framework.util.i18n.gettext',
'horizon.framework.util.q.extensions',
'horizon.framework.widgets.modal.deleteModalService',
'horizon.framework.widgets.table.events',
'horizon.framework.widgets.toast.service',
'horizon.app.core.receivers.resourceType'
];
@ -45,12 +47,14 @@
function deleteReceiverService(
$q,
$location,
$rootScope,
policyService,
senlin,
actionResultService,
gettext,
$qExtensions,
deleteModal,
tableEvents,
toast,
receiversResourceType
) {
@ -111,6 +115,7 @@
currentPath !== indexPath) {
$location.path(indexPath);
} else {
$rootScope.$broadcast(tableEvents.CLEAR_SELECTIONS);
return result.result;
}
}