From f44f68aa9f6be43931a12ccd56514dd73ac96d75 Mon Sep 17 00:00:00 2001 From: Shu Muto Date: Tue, 21 Mar 2017 15:34:09 +0900 Subject: [PATCH] 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 --- .../dashboard/container/containers/containers.service.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/zun_ui/static/dashboard/container/containers/containers.service.js b/zun_ui/static/dashboard/container/containers/containers.service.js index 98ace0b..c81b8ad 100644 --- a/zun_ui/static/dashboard/container/containers/containers.service.js +++ b/zun_ui/static/dashboard/container/containers/containers.service.js @@ -19,6 +19,7 @@ .factory('horizon.dashboard.container.containers.service', containersService); containersService.$inject = [ + 'horizon.app.core.detailRoute', 'horizon.app.core.openstack-service-api.zun' ]; @@ -30,7 +31,7 @@ * This service provides functions that are used through * the containers features. */ - function containersService(zun) { + function containersService(detailRoute, zun) { return { getDetailsPath: getDetailsPath, getContainerPromise: getContainerPromise, @@ -45,7 +46,7 @@ * Returns the relative path to the details view. */ function getDetailsPath(item) { - return 'project/ngdetails/OS::Zun::Container/' + item.id; + return detailRoute + 'OS::Zun::Container/' + item.id; } /*