Use detailRoute constant for path of details view

This patch replaces hard coded "project/ngdetails/" for path of
details view to constant using "horizon.app.core.detailRoute".

Change-Id: Ia238f0a4b6df45f08673e4d41b24c6005d22ef00
Closes-Bug: #1641250
This commit is contained in:
Shu Muto 2017-03-21 15:34:09 +09:00
parent c2042f873a
commit f44f68aa9f

View File

@ -19,6 +19,7 @@
.factory('horizon.dashboard.container.containers.service', containersService); .factory('horizon.dashboard.container.containers.service', containersService);
containersService.$inject = [ containersService.$inject = [
'horizon.app.core.detailRoute',
'horizon.app.core.openstack-service-api.zun' 'horizon.app.core.openstack-service-api.zun'
]; ];
@ -30,7 +31,7 @@
* This service provides functions that are used through * This service provides functions that are used through
* the containers features. * the containers features.
*/ */
function containersService(zun) { function containersService(detailRoute, zun) {
return { return {
getDetailsPath: getDetailsPath, getDetailsPath: getDetailsPath,
getContainerPromise: getContainerPromise, getContainerPromise: getContainerPromise,
@ -45,7 +46,7 @@
* Returns the relative path to the details view. * Returns the relative path to the details view.
*/ */
function getDetailsPath(item) { function getDetailsPath(item) {
return 'project/ngdetails/OS::Zun::Container/' + item.id; return detailRoute + 'OS::Zun::Container/' + item.id;
} }
/* /*