From ee00c5fa8bda9b468dcfd072be3c98b208c8bcd5 Mon Sep 17 00:00:00 2001 From: zhangle Date: Wed, 31 Aug 2016 17:09:25 +0800 Subject: [PATCH] history page use release id as anchor --- .../src/main/resources/static/config/history.html | 4 ++-- .../scripts/directive/namespace-panel-directive.js | 6 +++--- .../static/views/component/namespace-panel.html | 11 ++++++----- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/apollo-portal/src/main/resources/static/config/history.html b/apollo-portal/src/main/resources/static/config/history.html index b91a5256c..e91fe6ae8 100644 --- a/apollo-portal/src/main/resources/static/config/history.html +++ b/apollo-portal/src/main/resources/static/config/history.html @@ -37,7 +37,7 @@ 当前生效 -
+
@@ -50,7 +50,7 @@
+ ng-bind="release.baseInfo.name" ng-class="{'highlight':pageContext.scrollTo == release.baseInfo.id}">
diff --git a/apollo-portal/src/main/resources/static/scripts/directive/namespace-panel-directive.js b/apollo-portal/src/main/resources/static/scripts/directive/namespace-panel-directive.js index 0630671c9..e847ba01a 100644 --- a/apollo-portal/src/main/resources/static/scripts/directive/namespace-panel-directive.js +++ b/apollo-portal/src/main/resources/static/scripts/directive/namespace-panel-directive.js @@ -246,7 +246,7 @@ directive_module.directive('apollonspanel', } var groupedInstances = {}, - notLatestReleaseNames = []; + notLatestReleases = []; result.forEach(function (instance) { var configs = instance.configs; @@ -255,14 +255,14 @@ directive_module.directive('apollonspanel', var release = instanceConfig.release; if (!groupedInstances[release.name]) { groupedInstances[release.name] = []; - notLatestReleaseNames.push(release.name); + notLatestReleases.push(release); } groupedInstances[release.name].push(instance); }) } }); - namespace.notLatestReleaseNames = notLatestReleaseNames; + namespace.notLatestReleases = notLatestReleases; namespace.notLatestReleaseInstances = groupedInstances; }) diff --git a/apollo-portal/src/main/resources/static/views/component/namespace-panel.html b/apollo-portal/src/main/resources/static/views/component/namespace-panel.html index 0d923bc4d..64f26de94 100644 --- a/apollo-portal/src/main/resources/static/views/component/namespace-panel.html +++ b/apollo-portal/src/main/resources/static/views/component/namespace-panel.html @@ -375,7 +375,7 @@