Commit ee00c5fa by zhangle

history page use release id as anchor

parent 583b098e
......@@ -37,7 +37,7 @@
<span class="label label-primary no-radius"
ng-if="release.active">当前生效</span>
</div>
<div class="row" id="{{release.baseInfo.name}}">
<div class="row" id="{{release.baseInfo.id}}">
<div class="col-md-2 user">
<img src="../img/user.png" class="i-20">
<span class="info" ng-bind="release.baseInfo.dataChangeCreatedBy"></span>
......@@ -50,7 +50,7 @@
<div class="col-md-3 time">
<img src="../img/title.png" class="i-20">
<span class="info"
ng-bind="release.baseInfo.name" ng-class="{'highlight':pageContext.scrollTo == release.baseInfo.name}"></span>
ng-bind="release.baseInfo.name" ng-class="{'highlight':pageContext.scrollTo == release.baseInfo.id}"></span>
</div>
<div class="col-md-4 comment" ng-show="release.baseInfo.comment">
......
......@@ -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;
})
......
......@@ -375,7 +375,7 @@
<div class="panel-default" ng-if="namespace.latestReleaseInstances.total > 0">
<div class="panel-heading">
<a target="_blank" data-tooltip="tooltip" data-placement="bottom" title="查看配置"
href="/config/history.html?#/appid={{appId}}&env={{env}}&clusterName={{cluster}}&namespaceName={{namespace.baseInfo.namespaceName}}&scrollTo={{namespace.latestRelease.name}}">
href="/config/history.html?#/appid={{appId}}&env={{env}}&clusterName={{cluster}}&namespaceName={{namespace.baseInfo.namespaceName}}&scrollTo={{namespace.latestRelease.id}}">
{{namespace.latestRelease.name}}
</a>
</div>
......@@ -410,11 +410,12 @@
<!--not latest release instances-->
<div class="panel-body" ng-show="namespace.instanceViewType == 'not_latest_release'">
<div class="panel-default" ng-if="namespace.instancesCount - namespace.latestReleaseInstances.total > 0" ng-repeat="releaseName in namespace.notLatestReleaseNames">
<div class="panel-default" ng-if="namespace.instancesCount - namespace.latestReleaseInstances.total > 0"
ng-repeat="release in namespace.notLatestReleases">
<div class="panel-heading">
<a target="_blank" data-tooltip="tooltip" data-placement="bottom" title="查看配置"
href="/config/history.html?#/appid={{appId}}&env={{env}}&clusterName={{cluster}}&namespaceName={{namespace.baseInfo.namespaceName}}&scrollTo={{releaseName}}">
{{releaseName}}
href="/config/history.html?#/appid={{appId}}&env={{env}}&clusterName={{cluster}}&namespaceName={{namespace.baseInfo.namespaceName}}&scrollTo={{release.id}}">
{{release.name}}
</a>
</div>
......@@ -428,7 +429,7 @@
</tr>
</thead>
<tbody>
<tr ng-repeat="instance in namespace.notLatestReleaseInstances[releaseName]">
<tr ng-repeat="instance in namespace.notLatestReleaseInstances[release.name]">
<td width="25%" ng-bind="instance.appId"></td>
<td width="25%" ng-bind="instance.clusterName"></td>
<td width="25%" ng-bind="instance.dataCenter"></td>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment