Commit e19b7f95 authored by lepdou's avatar lepdou

close/open namespace content

parent d3e0fdb7
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
<td ng-bind="appBaseInfo.ownerName"></td> <td ng-bind="appBaseInfo.ownerName"></td>
</tr> </tr>
<tr> <tr>
<th>Email:</th> <th>邮箱:</th>
<td> <td>
<small ng-bind="appBaseInfo.ownerEmail"></small> <small ng-bind="appBaseInfo.ownerEmail"></small>
</td> </td>
......
...@@ -88,7 +88,8 @@ function directive($window, toastr, AppUtil, EventManager, PermissionService, Na ...@@ -88,7 +88,8 @@ function directive($window, toastr, AppUtil, EventManager, PermissionService, Na
namespace.isPublic ? namespace.parentAppId != namespace.baseInfo.appId : false; namespace.isPublic ? namespace.parentAppId != namespace.baseInfo.appId : false;
namespace.displayControl = { namespace.displayControl = {
currentOperateBranch: 'master', currentOperateBranch: 'master',
showSearchInput: false showSearchInput: false,
show: true
}; };
namespace.viewItems = namespace.items; namespace.viewItems = namespace.items;
namespace.isPropertiesFormat = namespace.format == 'properties'; namespace.isPropertiesFormat = namespace.format == 'properties';
...@@ -99,6 +100,7 @@ function directive($window, toastr, AppUtil, EventManager, PermissionService, Na ...@@ -99,6 +100,7 @@ function directive($window, toastr, AppUtil, EventManager, PermissionService, Na
namespace.allInstancesPage = 0; namespace.allInstancesPage = 0;
namespace.commitChangeBtnDisabled = false; namespace.commitChangeBtnDisabled = false;
generateNamespaceId(namespace);
initNamespaceBranch(namespace); initNamespaceBranch(namespace);
initNamespaceViewName(namespace); initNamespaceViewName(namespace);
initNamespaceLock(namespace); initNamespaceLock(namespace);
...@@ -131,7 +133,11 @@ function directive($window, toastr, AppUtil, EventManager, PermissionService, Na ...@@ -131,7 +133,11 @@ function directive($window, toastr, AppUtil, EventManager, PermissionService, Na
namespace.branch.latestReleaseInstancesPage = 0; namespace.branch.latestReleaseInstancesPage = 0;
namespace.branch.instanceViewType = namespace_instance_view_type.LATEST_RELEASE; namespace.branch.instanceViewType = namespace_instance_view_type.LATEST_RELEASE;
namespace.branch.hasLoadInstances = false; namespace.branch.hasLoadInstances = false;
namespace.branch.displayControl = {
show: true
};
generateNamespaceId(namespace.branch);
initBranchItems(namespace.branch); initBranchItems(namespace.branch);
initRules(namespace.branch); initRules(namespace.branch);
loadInstanceInfo(namespace.branch); loadInstanceInfo(namespace.branch);
...@@ -201,6 +207,10 @@ function directive($window, toastr, AppUtil, EventManager, PermissionService, Na ...@@ -201,6 +207,10 @@ function directive($window, toastr, AppUtil, EventManager, PermissionService, Na
} }
} }
function generateNamespaceId(namespace) {
namespace.id = Math.random().toString(36).substr(2);
}
function initPermission(namespace) { function initPermission(namespace) {
PermissionService.has_modify_namespace_permission( PermissionService.has_modify_namespace_permission(
...@@ -338,7 +348,10 @@ function directive($window, toastr, AppUtil, EventManager, PermissionService, Na ...@@ -338,7 +348,10 @@ function directive($window, toastr, AppUtil, EventManager, PermissionService, Na
function switchBranch(branchName) { function switchBranch(branchName) {
if (branchName != 'master') { if (branchName != 'master') {
scope.namespace.branch.displayControl.show = true;
initRules(scope.namespace.branch); initRules(scope.namespace.branch);
} else {
scope.namespace.displayControl.show = true;
} }
scope.namespace.displayControl.currentOperateBranch = branchName; scope.namespace.displayControl.currentOperateBranch = branchName;
......
<section class="branch-panel-body" ng-if="namespace.hasBranch && namespace.displayControl.currentOperateBranch != 'master'"> <section class="branch-panel-body"
ng-if="namespace.hasBranch && namespace.displayControl.currentOperateBranch != 'master'">
<!--main header--> <!--main header-->
<header class="panel-heading"> <header class="panel-heading">
<div class="row"> <div class="row">
<div class="col-md-6 col-sm-6 header-namespace"> <div class="col-md-6 col-sm-6 header-namespace">
<b class="namespace-name" ng-bind="namespace.viewName" data-tooltip="tooltip" <span class="cursor-pointer"
data-placement="bottom" data-toggle="collapse" data-target="#BODY{{namespace.branch.id}}" aria-expanded="false"
title="{{namespace.comment}}"></b> ng-click="namespace.branch.displayControl.show = !namespace.branch.displayControl.show">
<span class="glyphicon glyphicon-triangle-bottom small"
ng-show="namespace.branch.displayControl.show"></span>
<span class="glyphicon glyphicon-triangle-top small"
ng-show="!namespace.branch.displayControl.show"></span>
<b class="namespace-name" ng-bind="namespace.viewName"
data-tooltip="tooltip" data-placement="bottom" title="点击展开/收缩Namespace"></b>
</span>
<span class="label label-info no-radius namespace-label" ng-bind="namespace.format"></span> <span class="label label-info no-radius namespace-label" ng-bind="namespace.format"></span>
<span class="label label-warning no-radius namespace-label" <span class="label label-warning no-radius namespace-label"
ng-show="namespace.branch.itemModifiedCnt > 0">有修改 ng-show="namespace.branch.itemModifiedCnt > 0">有修改
...@@ -44,99 +52,100 @@ ...@@ -44,99 +52,100 @@
</header> </header>
<!--second header--> <div id="BODY{{namespace.branch.id}}" class="collapse in">
<header class="panel-heading second-panel-heading"> <!--second header-->
<div class="row"> <header class="panel-heading second-panel-heading">
<div class="col-md-12 pull-left"> <div class="row">
<ul class="nav nav-tabs"> <div class="col-md-12 pull-left">
<li role="presentation" ng-click="switchView(namespace.branch, 'table')" <ul class="nav nav-tabs">
ng-show="namespace.isPropertiesFormat"> <li role="presentation" ng-click="switchView(namespace.branch, 'table')"
<a ng-class="{node_active:namespace.branch.viewType == 'table'}"> ng-show="namespace.isPropertiesFormat">
<img src="img/table.png"> <a ng-class="{node_active:namespace.branch.viewType == 'table'}">
配置 <img src="img/table.png">
</a> 配置
</li> </a>
<li role="presentation" ng-click="switchView(namespace.branch, 'rule')"> </li>
<a ng-class="{node_active:namespace.branch.viewType == 'rule'}"> <li role="presentation" ng-click="switchView(namespace.branch, 'rule')">
<img src="img/rule.png"> <a ng-class="{node_active:namespace.branch.viewType == 'rule'}">
灰度规则 <img src="img/rule.png">
灰度规则
<span class="badge badge-grey" <span class="badge badge-grey"
ng-bind="namespace.branch.grayIps.length + namespace.branch.grayApps.length"></span> ng-bind="namespace.branch.grayIps.length + namespace.branch.grayApps.length"></span>
</a> </a>
</li> </li>
<li role="presentation" ng-click="switchView(namespace.branch, 'instance')"> <li role="presentation" ng-click="switchView(namespace.branch, 'instance')">
<a ng-class="{node_active:namespace.branch.viewType == 'instance'}"> <a ng-class="{node_active:namespace.branch.viewType == 'instance'}">
<img src="img/machine.png"> <img src="img/machine.png">
灰度实例列表 灰度实例列表
<span class="badge badge-grey" <span class="badge badge-grey"
ng-bind="namespace.branch.latestReleaseInstances.total"></span> ng-bind="namespace.branch.latestReleaseInstances.total"></span>
</a> </a>
</li> </li>
<li role="presentation" ng-click="switchView(namespace.branch, 'history')"> <li role="presentation" ng-click="switchView(namespace.branch, 'history')">
<a ng-class="{node_active:namespace.branch.viewType == 'history'}"> <a ng-class="{node_active:namespace.branch.viewType == 'history'}">
<img src="img/change.png"> <img src="img/change.png">
更改历史 更改历史
</a> </a>
</li> </li>
</ul> </ul>
</div>
</div> </div>
</div> </header>
</header> <!--namespace body-->
<section>
<!--items-->
<div class="namespace-view-table" ng-show="namespace.branch.viewType == 'table'">
<section> <div class="panel panel-default" ng-if="namespace.hasBranch">
<!--items--> <div class="panel-heading">
<div class="namespace-view-table" ng-show="namespace.branch.viewType == 'table'"> 灰度的配置
<button type="button" class="btn btn-primary btn-sm pull-right" style="margin-top: -4px;"
<div class="panel panel-default" ng-if="namespace.hasBranch"> ng-show="namespace.hasModifyPermission"
<div class="panel-heading"> ng-click="createItem(namespace.branch)">
灰度的配置 <img src="img/plus.png">
<button type="button" class="btn btn-primary btn-sm pull-right" style="margin-top: -4px;" 新增灰度配置
ng-show="namespace.hasModifyPermission" </button>
ng-click="createItem(namespace.branch)"> </div>
<img src="img/plus.png"> <table class="table table-bordered table-striped table-hover">
新增灰度配置 <thead>
</button> <tr>
</div> <th>发布状态</th>
<table class="table table-bordered table-striped table-hover"> <th class="hover" title="排序"
<thead> ng-click="col='item.key';desc=!desc;">
<tr> Key&nbsp;
<th>发布状态</th> <span class="glyphicon glyphicon-sort"></span>
<th class="hover" title="排序"
ng-click="col='item.key';desc=!desc;"> </th>
Key&nbsp; <th>
<span class="glyphicon glyphicon-sort"></span> 主版本的值
</th>
</th> <th>
<th> 灰度的值
主版本的值 </th>
</th> <th>
<th> 备注
灰度的值 </th>
</th> <th class="hover" title="排序"
<th> ng-click="col='item.dataChangeLastModifiedBy';desc=!desc;">
备注 最后修改人
</th> <span class="glyphicon glyphicon-sort"></span>
<th class="hover" title="排序"
ng-click="col='item.dataChangeLastModifiedBy';desc=!desc;">
最后修改人
<span class="glyphicon glyphicon-sort"></span>
</th>
<th class="hover" title="排序"
ng-click="col='item.dataChangeLastModifiedTime';desc=!desc;">
最后修改时间
<span class="glyphicon glyphicon-sort"></span>
</th>
<th>
操作
</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="config in namespace.branch.branchItems |orderBy:col:desc" </th>
ng-if="config.item.key"> <th class="hover" title="排序"
<td width="7%" class="text-center"> ng-click="col='item.dataChangeLastModifiedTime';desc=!desc;">
最后修改时间
<span class="glyphicon glyphicon-sort"></span>
</th>
<th>
操作
</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="config in namespace.branch.branchItems |orderBy:col:desc"
ng-if="config.item.key">
<td width="7%" class="text-center">
<span class="label label-warning no-radius cursor-pointer" <span class="label label-warning no-radius cursor-pointer"
data-tooltip="tooltip" data-placement="bottom" title="点击查看已发布的值" data-tooltip="tooltip" data-placement="bottom" title="点击查看已发布的值"
ng-if="config.isModified || config.isDeleted" ng-if="config.isModified || config.isDeleted"
...@@ -144,10 +153,10 @@ ...@@ -144,10 +153,10 @@
<span class="label label-default-light no-radius" <span class="label label-default-light no-radius"
data-tooltip="tooltip" data-placement="bottom" title="已生效的配置" data-tooltip="tooltip" data-placement="bottom" title="已生效的配置"
ng-if="!config.isModified">已发布</span> ng-if="!config.isModified">已发布</span>
</td> </td>
<td width="15%" class="cursor-pointer" title="点击查看" ng-click="showText(config.item.key)"> <td width="15%" class="cursor-pointer" title="点击查看" ng-click="showText(config.item.key)">
<span ng-bind="config.item.key | limitTo: 250"></span> <span ng-bind="config.item.key | limitTo: 250"></span>
<span ng-bind="config.item.key.length > 250 ? '...' :''"></span> <span ng-bind="config.item.key.length > 250 ? '...' :''"></span>
<span class="label label-danger" ng-if="config.isDeleted" <span class="label label-danger" ng-if="config.isDeleted"
data-tooltip="tooltip" data-placement="bottom" title="删除的配置"></span> data-tooltip="tooltip" data-placement="bottom" title="删除的配置"></span>
<span class="label label-info" ng-if="!config.isDeleted && config.masterReleaseValue" <span class="label label-info" ng-if="!config.isDeleted && config.masterReleaseValue"
...@@ -155,86 +164,86 @@ ...@@ -155,86 +164,86 @@
<span class="label label-success" <span class="label label-success"
ng-if="!config.isDeleted && !config.masterReleaseValue" ng-if="!config.isDeleted && !config.masterReleaseValue"
data-tooltip="tooltip" data-placement="bottom" title="灰度版本特有的配置"></span> data-tooltip="tooltip" data-placement="bottom" title="灰度版本特有的配置"></span>
</td> </td>
<td width="20%" class="cursor-pointer" title="点击查看" <td width="20%" class="cursor-pointer" title="点击查看"
ng-click="showText(config.masterReleaseValue)"> ng-click="showText(config.masterReleaseValue)">
<span ng-bind="config.masterReleaseValue | limitTo: 250"></span> <span ng-bind="config.masterReleaseValue | limitTo: 250"></span>
<span ng-bind="config.item.value.length > 250 ? '...': ''"></span> <span ng-bind="config.item.value.length > 250 ? '...': ''"></span>
</td> </td>
<td width="20%" class="cursor-pointer" title="点击查看" ng-click="showText(config.item.value)"> <td width="20%" class="cursor-pointer" title="点击查看" ng-click="showText(config.item.value)">
<span ng-bind="config.item.value | limitTo: 250"></span> <span ng-bind="config.item.value | limitTo: 250"></span>
<span ng-bind="config.item.value.length > 250 ? '...': ''"></span> <span ng-bind="config.item.value.length > 250 ? '...': ''"></span>
</td> </td>
<td width="10%" title="{{config.item.comment}}"> <td width="10%" title="{{config.item.comment}}">
<span ng-bind="config.item.comment | limitTo: 250"></span> <span ng-bind="config.item.comment | limitTo: 250"></span>
<span ng-bind="config.item.comment.length > 250 ?'...' : ''"></span> <span ng-bind="config.item.comment.length > 250 ?'...' : ''"></span>
</td> </td>
<td width="10%" ng-bind="config.item.dataChangeLastModifiedBy"> <td width="10%" ng-bind="config.item.dataChangeLastModifiedBy">
</td> </td>
<td width="10%" <td width="10%"
ng-bind="config.item.dataChangeLastModifiedTime | date: 'yyyy-MM-dd HH:mm:ss'"> ng-bind="config.item.dataChangeLastModifiedTime | date: 'yyyy-MM-dd HH:mm:ss'">
</td> </td>
<td width="9%" class="text-center">
<img src="img/edit.png"
data-tooltip="tooltip" data-placement="bottom" title="修改"
ng-if="!config.isDeleted"
ng-click="editItem(namespace.branch, config.item)"
ng-show="namespace.hasModifyPermission">
<img style="margin-left: 5px;" src="img/cancel.png"
data-tooltip="tooltip" data-placement="bottom" title="删除"
ng-if="!config.isDeleted"
ng-click="preDeleteItem(namespace.branch, config.item.id)"
ng-show="namespace.hasModifyPermission">
</td>
</tr> <td width="9%" class="text-center">
</tbody> <img src="img/edit.png"
</table> data-tooltip="tooltip" data-placement="bottom" title="修改"
</div> ng-if="!config.isDeleted"
ng-click="editItem(namespace.branch, config.item)"
ng-show="namespace.hasModifyPermission">
<img style="margin-left: 5px;" src="img/cancel.png"
data-tooltip="tooltip" data-placement="bottom" title="删除"
ng-if="!config.isDeleted"
ng-click="preDeleteItem(namespace.branch, config.item.id)"
ng-show="namespace.hasModifyPermission">
</td>
<div class="panel panel-default" </tr>
ng-if="namespace.branch.masterItems && namespace.branch.masterItems.length > 0"> </tbody>
<div class="panel-heading"> </table>
主版本的配置
</div> </div>
<table class="table table-bordered table-striped table-hover">
<thead>
<tr>
<th>发布状态</th>
<th class="hover" title="排序"
ng-click="col='item.key';desc=!desc;">
Key&nbsp;
<span class="glyphicon glyphicon-sort"></span>
</th>
<th>
Value
</th>
<th>
备注
</th>
<th class="hover" title="排序"
ng-click="col='item.dataChangeLastModifiedBy';desc=!desc;">
最后修改人
<span class="glyphicon glyphicon-sort"></span>
</th>
<th class="hover" title="排序"
ng-click="col='item.dataChangeLastModifiedTime';desc=!desc;">
最后修改时间
<span class="glyphicon glyphicon-sort"></span>
</th>
<th>
操作
</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="config in namespace.branch.masterItems |orderBy:col:desc" <div class="panel panel-default"
ng-if="config.item.key"> ng-if="namespace.branch.masterItems && namespace.branch.masterItems.length > 0">
<td width="8%" class="text-center"> <div class="panel-heading">
主版本的配置
</div>
<table class="table table-bordered table-striped table-hover">
<thead>
<tr>
<th>发布状态</th>
<th class="hover" title="排序"
ng-click="col='item.key';desc=!desc;">
Key&nbsp;
<span class="glyphicon glyphicon-sort"></span>
</th>
<th>
Value
</th>
<th>
备注
</th>
<th class="hover" title="排序"
ng-click="col='item.dataChangeLastModifiedBy';desc=!desc;">
最后修改人
<span class="glyphicon glyphicon-sort"></span>
</th>
<th class="hover" title="排序"
ng-click="col='item.dataChangeLastModifiedTime';desc=!desc;">
最后修改时间
<span class="glyphicon glyphicon-sort"></span>
</th>
<th>
操作
</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="config in namespace.branch.masterItems |orderBy:col:desc"
ng-if="config.item.key">
<td width="8%" class="text-center">
<span class="label label-warning no-radius cursor-pointer" <span class="label label-warning no-radius cursor-pointer"
data-tooltip="tooltip" data-placement="bottom" title="点击查看已发布的值" data-tooltip="tooltip" data-placement="bottom" title="点击查看已发布的值"
ng-if="config.isModified || config.isDeleted" ng-if="config.isModified || config.isDeleted"
...@@ -242,10 +251,10 @@ ...@@ -242,10 +251,10 @@
<span class="label label-default-light no-radius" <span class="label label-default-light no-radius"
data-tooltip="tooltip" data-placement="bottom" title="已生效的配置" data-tooltip="tooltip" data-placement="bottom" title="已生效的配置"
ng-if="!config.isModified">已发布</span> ng-if="!config.isModified">已发布</span>
</td> </td>
<td width="15%" class="cursor-pointer" title="点击查看" ng-click="showText(config.item.key)"> <td width="15%" class="cursor-pointer" title="点击查看" ng-click="showText(config.item.key)">
<span ng-bind="config.item.key | limitTo: 250"></span> <span ng-bind="config.item.key | limitTo: 250"></span>
<span ng-bind="config.item.key.length > 250 ? '...' :''"></span> <span ng-bind="config.item.key.length > 250 ? '...' :''"></span>
<span class="label label-success" ng-if="config.isModified && !config.oldValue" <span class="label label-success" ng-if="config.isModified && !config.oldValue"
data-tooltip="tooltip" data-placement="bottom" title="新增的配置"></span> data-tooltip="tooltip" data-placement="bottom" title="新增的配置"></span>
<span class="label label-info" <span class="label label-info"
...@@ -253,274 +262,276 @@ ...@@ -253,274 +262,276 @@
data-tooltip="tooltip" data-placement="bottom" title="修改的配置"></span> data-tooltip="tooltip" data-placement="bottom" title="修改的配置"></span>
<span class="label label-danger" ng-if="config.isDeleted" <span class="label label-danger" ng-if="config.isDeleted"
data-tooltip="tooltip" data-placement="bottom" title="删除的配置"></span> data-tooltip="tooltip" data-placement="bottom" title="删除的配置"></span>
</td> </td>
<td width="35%" class="cursor-pointer" title="点击查看" ng-click="showText(config.item.value)"> <td width="35%" class="cursor-pointer" title="点击查看" ng-click="showText(config.item.value)">
<span ng-bind="config.item.value | limitTo: 250"></span> <span ng-bind="config.item.value | limitTo: 250"></span>
<span ng-bind="config.item.value.length > 250 ? '...': ''"></span> <span ng-bind="config.item.value.length > 250 ? '...': ''"></span>
</td> </td>
<td width="12%" title="{{config.item.comment}}"> <td width="12%" title="{{config.item.comment}}">
<span ng-bind="config.item.comment | limitTo: 250"></span> <span ng-bind="config.item.comment | limitTo: 250"></span>
<span ng-bind="config.item.comment.length > 250 ?'...' : ''"></span> <span ng-bind="config.item.comment.length > 250 ?'...' : ''"></span>
</td> </td>
<td width="10%" ng-bind="config.item.dataChangeLastModifiedBy"> <td width="10%" ng-bind="config.item.dataChangeLastModifiedBy">
</td> </td>
<td width="15%" <td width="15%"
ng-bind="config.item.dataChangeLastModifiedTime | date: 'yyyy-MM-dd HH:mm:ss'"> ng-bind="config.item.dataChangeLastModifiedTime | date: 'yyyy-MM-dd HH:mm:ss'">
</td> </td>
<td width="5%" class="text-center"> <td width="5%" class="text-center">
<img src="img/gray.png" <img src="img/gray.png"
data-tooltip="tooltip" data-placement="bottom" title="对此配置灰度" data-tooltip="tooltip" data-placement="bottom" title="对此配置灰度"
ng-if="!config.isDeleted" ng-if="!config.isDeleted"
ng-click="editItem(namespace.branch, config.item)" ng-click="editItem(namespace.branch, config.item)"
ng-show="namespace.hasModifyPermission"> ng-show="namespace.hasModifyPermission">
</td> </td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div>
</div> </div>
</div> <!--gray rules-->
<!--gray rules--> <div class="rules-manage-view row" ng-show="namespace.branch.viewType == 'rule'">
<div class="rules-manage-view row" ng-show="namespace.branch.viewType == 'rule'">
<div class="alert alert-warning no-radius" <div class="alert alert-warning no-radius"
ng-show="!namespace.hasModifyPermission && !namespace.hasReleasePermission"> ng-show="!namespace.hasModifyPermission && !namespace.hasReleasePermission">
<strong>Tips:</strong> <strong>Tips:</strong>
您没有权限编辑灰度规则, 具有namespace修改权或者发布权的人员才可以编辑灰度规则. 如需要编辑灰度规则,请找项目管理员申请权限. 您没有权限编辑灰度规则, 具有namespace修改权或者发布权的人员才可以编辑灰度规则. 如需要编辑灰度规则,请找项目管理员申请权限.
</div> </div>
<table class="table table-bordered table-hover">
<thead>
<tr>
<th>灰度的AppId</th>
<th>灰度的IP列表</th>
<th>操作</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="ruleItem in namespace.branch.rules.ruleItems">
<td width="20%" ng-bind="ruleItem.clientAppId"></td>
<td width="70%" ng-show="!ruleItem.ApplyToAllInstances"
ng-bind="ruleItem.clientIpList.join(', ')"></td>
<td width="70%" ng-show="ruleItem.ApplyToAllInstances">ALL</td>
<td class="text-center" width="10%">
<img src="img/edit.png" class="i-20 hover"
data-tooltip="tooltip" data-placement="bottom" title="修改"
ng-show="namespace.hasModifyPermission || namespace.hasReleasePermission"
ng-click="editRuleItem(namespace.branch, ruleItem)">
<img src="img/cancel.png" class="i-20 hover" style="margin-left: 5px;"
data-tooltip="tooltip" data-placement="bottom" title="删除"
ng-show="namespace.hasModifyPermission || namespace.hasReleasePermission"
ng-click="deleteRuleItem(namespace.branch, ruleItem)">
</td>
</tr>
<table class="table table-bordered table-hover"> </tbody>
<thead> </table>
<tr> <button class="btn btn-primary"
<th>灰度的AppId</th> ng-if="namespace.hasModifyPermission || namespace.hasReleasePermission"
<th>灰度的IP列表</th> ng-show="(namespace.isPublic && !namespace.isLinkedNamespace) ||
<th>操作</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="ruleItem in namespace.branch.rules.ruleItems">
<td width="20%" ng-bind="ruleItem.clientAppId"></td>
<td width="70%" ng-show="!ruleItem.ApplyToAllInstances"
ng-bind="ruleItem.clientIpList.join(', ')"></td>
<td width="70%" ng-show="ruleItem.ApplyToAllInstances">ALL</td>
<td class="text-center" width="10%">
<img src="img/edit.png" class="i-20 hover"
data-tooltip="tooltip" data-placement="bottom" title="修改"
ng-show="namespace.hasModifyPermission || namespace.hasReleasePermission"
ng-click="editRuleItem(namespace.branch, ruleItem)">
<img src="img/cancel.png" class="i-20 hover" style="margin-left: 5px;"
data-tooltip="tooltip" data-placement="bottom" title="删除"
ng-show="namespace.hasModifyPermission || namespace.hasReleasePermission"
ng-click="deleteRuleItem(namespace.branch, ruleItem)">
</td>
</tr>
</tbody>
</table>
<button class="btn btn-primary"
ng-if="namespace.hasModifyPermission || namespace.hasReleasePermission"
ng-show="(namespace.isPublic && !namespace.isLinkedNamespace) ||
((!namespace.isPublic || namespace.isLinkedNamespace) ((!namespace.isPublic || namespace.isLinkedNamespace)
&& (!namespace.branch.rules && (!namespace.branch.rules
|| !namespace.branch.rules.ruleItems || !namespace.branch.rules.ruleItems
|| !namespace.branch.rules.ruleItems.length))" || !namespace.branch.rules.ruleItems.length))"
ng-click="addRuleItem(namespace.branch)">新增规则 ng-click="addRuleItem(namespace.branch)">新增规则
</button>
</div>
<!--instances -->
<div class="panel panel-default" ng-show="namespace.branch.viewType == 'instance'">
<div class="panel-heading text-right">
<button class="btn btn-default btn-sm"
data-tooltip="tooltip" data-placement="bottom" title="刷新列表"
ng-click="refreshInstancesInfo(namespace.branch)">
<img src="../../img/refresh.png"/>
</button> </button>
</div>
<div class="panel-body">
<div class="panel-default" ng-if="namespace.branch.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={{namespace.baseInfo.clusterName}}&namespaceName={{namespace.baseInfo.namespaceName}}&releaseId={{namespace.branch.latestRelease.id}}">
{{namespace.branch.latestRelease.name}}
</a>
</div>
<table class="table table-bordered table-striped">
<thead>
<tr>
<td>App ID</td>
<td>Cluster Name</td>
<td>Data Center</td>
<td>IP</td>
<td>配置获取时间</td>
</tr>
</thead>
<tbody>
<tr ng-repeat="instance in namespace.branch.latestReleaseInstances.content">
<td width="20%" ng-bind="instance.appId"></td>
<td width="20%" ng-bind="instance.clusterName"></td>
<td width="20%" ng-bind="instance.dataCenter"></td>
<td width="20%" ng-bind="instance.ip"></td>
<td width="20%">{{instance.configs && instance.configs.length ?
(instance.configs[0].releaseDeliveryTime | date: 'yyyy-MM-dd HH:mm:ss') : ''}}
</td>
</tr>
</tbody>
</table>
<div class="row text-center"
ng-show="namespace.branch.latestReleaseInstances.content.length < namespace.branch.latestReleaseInstances.total">
<button class="btn btn-default" ng-click="loadInstanceInfo(namespace.branch)">加载更多</button>
</div>
</div>
<div class="text-center" ng-if="namespace.branch.latestReleaseInstances.total == 0">
无实例信息
</div>
</div> </div>
</div> <!--instances -->
<!--history view--> <div class="panel panel-default" ng-show="namespace.branch.viewType == 'instance'">
<div class="J_historyview history-view" ng-show="namespace.branch.viewType == 'history'"> <div class="panel-heading text-right">
<div class="media" <button class="btn btn-default btn-sm"
ng-show="namespace.branch.commits && namespace.branch.commits.length" data-tooltip="tooltip" data-placement="bottom" title="刷新列表"
ng-repeat="commits in namespace.branch.commits"> ng-click="refreshInstancesInfo(namespace.branch)">
<div class="media-body"> <img src="../../img/refresh.png"/>
<div class="row"> </button>
<div class="col-md-6 col-sm-6 "><h3 class="media-heading" </div>
ng-bind="commits.dataChangeCreatedBy"></h3> <div class="panel-body">
<div class="panel-default" ng-if="namespace.branch.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={{namespace.baseInfo.clusterName}}&namespaceName={{namespace.baseInfo.namespaceName}}&releaseId={{namespace.branch.latestRelease.id}}">
{{namespace.branch.latestRelease.name}}
</a>
</div> </div>
<div class="col-md-6 col-sm-6 text-right"> <table class="table table-bordered table-striped">
<h5 class="media-heading" <thead>
ng-bind="commits.dataChangeCreatedTime | date: 'yyyy-MM-dd HH:mm:ss'"></h5> <tr>
<td>App ID</td>
<td>Cluster Name</td>
<td>Data Center</td>
<td>IP</td>
<td>配置获取时间</td>
</tr>
</thead>
<tbody>
<tr ng-repeat="instance in namespace.branch.latestReleaseInstances.content">
<td width="20%" ng-bind="instance.appId"></td>
<td width="20%" ng-bind="instance.clusterName"></td>
<td width="20%" ng-bind="instance.dataCenter"></td>
<td width="20%" ng-bind="instance.ip"></td>
<td width="20%">{{instance.configs && instance.configs.length ?
(instance.configs[0].releaseDeliveryTime | date: 'yyyy-MM-dd HH:mm:ss') : ''}}
</td>
</tr>
</tbody>
</table>
<div class="row text-center"
ng-show="namespace.branch.latestReleaseInstances.content.length < namespace.branch.latestReleaseInstances.total">
<button class="btn btn-default" ng-click="loadInstanceInfo(namespace.branch)">加载更多</button>
</div> </div>
</div> </div>
<div class="text-center" ng-if="namespace.branch.latestReleaseInstances.total == 0">
无实例信息
</div>
</div>
<!--properties format--> </div>
<table class="table table-bordered table-striped text-center table-hover" <!--history view-->
style="margin-top: 5px;" <div class="J_historyview history-view" ng-show="namespace.branch.viewType == 'history'">
ng-if="namespace.isPropertiesFormat"> <div class="media"
<thead> ng-show="namespace.branch.commits && namespace.branch.commits.length"
<tr> ng-repeat="commits in namespace.branch.commits">
<th> <div class="media-body">
Type <div class="row">
</th> <div class="col-md-6 col-sm-6 "><h3 class="media-heading"
<th> ng-bind="commits.dataChangeCreatedBy"></h3>
Key </div>
</th> <div class="col-md-6 col-sm-6 text-right">
<th> <h5 class="media-heading"
Old Value ng-bind="commits.dataChangeCreatedTime | date: 'yyyy-MM-dd HH:mm:ss'"></h5>
</th> </div>
<th> </div>
New Value
</th>
<th>
Comment
</th>
</tr>
</thead>
<tbody>
<!--兼容老数据,不显示item类型为空行和注释的item-->
<tr ng-repeat="item in commits.changeSets.createItems" ng-show="item.key">
<td width="2%">
新增
</td>
<td width="20%" title="{{item.key}}">
<span ng-bind="item.key | limitTo: 250"></span>
<span ng-bind="item.key.length > 250 ? '...' :''"></span>
</td>
<td width="30%">
</td>
<td width="30%" class="cursor-pointer" title="{{item.value}}"
ng-click="showText(item.value)">
<span ng-bind="item.value | limitTo: 250"></span>
<span ng-bind="item.value.length > 250 ? '...': ''"></span>
</td>
<td width="18%" title="{{item.comment}}">
<span ng-bind="item.comment | limitTo: 250"></span>
<span ng-bind="item.comment.length > 250 ?'...' : ''"></span>
</td>
</tr>
<tr ng-repeat="item in commits.changeSets.updateItems">
<td width="2%">
更新
</td>
<td width="20%" title="{{item.newItem.key}}">
<span ng-bind="item.newItem.key | limitTo: 250"></span>
<span ng-bind="item.newItem.key.length > 250 ? '...' :''"></span>
</td>
<td width="30%" class="cursor-pointer" title="{{item.oldItem.value}}"
ng-click="showText(item.oldItem.value)">
<span ng-bind="item.oldItem.value | limitTo: 250"></span>
<span ng-bind="item.oldItem.value.length > 250 ? '...': ''"></span>
</td>
<td width="30%" class="cursor-pointer" title="{{item.newItem.value}}"
ng-click="showText(item.newItem.value)">
<span ng-bind="item.newItem.value | limitTo: 250"></span>
<span ng-bind="item.newItem.value.length > 250 ? '...': ''"></span>
</td>
<td width="18%" title="{{item.newItem.comment}}">
<span ng-bind="item.newItem.comment | limitTo: 250"></span>
<span ng-bind="item.newItem.comment.length > 250 ?'...' : ''"></span>
</td>
</tr>
<tr ng-repeat="item in commits.changeSets.deleteItems"
ng-show="item.key || item.comment">
<td width="2%">
删除
</td>
<td width="20%" title="{{item.key}}">
<span ng-bind="item.key | limitTo: 250"></span>
<span ng-bind="item.key.length > 250 ? '...' :''"></span>
</td>
<td width="30%" title="{{item.value}}">
<span ng-bind="item.value | limitTo: 250"></span>
<span ng-bind="item.value.length > 250 ? '...': ''"></span>
</td>
<td width="30%">
</td>
<td width="18%" title="{{item.comment}}">
<span ng-bind="item.comment | limitTo: 250"></span>
<span ng-bind="item.comment.length > 250 ?'...' : ''"></span>
</td>
</tr>
</tbody>
</table>
<!--not properties format--> <!--properties format-->
<div ng-if="!namespace.isPropertiesFormat"> <table class="table table-bordered table-striped text-center table-hover"
<div ng-repeat="item in commits.changeSets.createItems"> style="margin-top: 5px;"
ng-if="namespace.isPropertiesFormat">
<thead>
<tr>
<th>
Type
</th>
<th>
Key
</th>
<th>
Old Value
</th>
<th>
New Value
</th>
<th>
Comment
</th>
</tr>
</thead>
<tbody>
<!--兼容老数据,不显示item类型为空行和注释的item-->
<tr ng-repeat="item in commits.changeSets.createItems" ng-show="item.key">
<td width="2%">
新增
</td>
<td width="20%" title="{{item.key}}">
<span ng-bind="item.key | limitTo: 250"></span>
<span ng-bind="item.key.length > 250 ? '...' :''"></span>
</td>
<td width="30%">
</td>
<td width="30%" class="cursor-pointer" title="{{item.value}}"
ng-click="showText(item.value)">
<span ng-bind="item.value | limitTo: 250"></span>
<span ng-bind="item.value.length > 250 ? '...': ''"></span>
</td>
<td width="18%" title="{{item.comment}}">
<span ng-bind="item.comment | limitTo: 250"></span>
<span ng-bind="item.comment.length > 250 ?'...' : ''"></span>
</td>
</tr>
<tr ng-repeat="item in commits.changeSets.updateItems">
<td width="2%">
更新
</td>
<td width="20%" title="{{item.newItem.key}}">
<span ng-bind="item.newItem.key | limitTo: 250"></span>
<span ng-bind="item.newItem.key.length > 250 ? '...' :''"></span>
</td>
<td width="30%" class="cursor-pointer" title="{{item.oldItem.value}}"
ng-click="showText(item.oldItem.value)">
<span ng-bind="item.oldItem.value | limitTo: 250"></span>
<span ng-bind="item.oldItem.value.length > 250 ? '...': ''"></span>
</td>
<td width="30%" class="cursor-pointer" title="{{item.newItem.value}}"
ng-click="showText(item.newItem.value)">
<span ng-bind="item.newItem.value | limitTo: 250"></span>
<span ng-bind="item.newItem.value.length > 250 ? '...': ''"></span>
</td>
<td width="18%" title="{{item.newItem.comment}}">
<span ng-bind="item.newItem.comment | limitTo: 250"></span>
<span ng-bind="item.newItem.comment.length > 250 ?'...' : ''"></span>
</td>
</tr>
<tr ng-repeat="item in commits.changeSets.deleteItems"
ng-show="item.key || item.comment">
<td width="2%">
删除
</td>
<td width="20%" title="{{item.key}}">
<span ng-bind="item.key | limitTo: 250"></span>
<span ng-bind="item.key.length > 250 ? '...' :''"></span>
</td>
<td width="30%" title="{{item.value}}">
<span ng-bind="item.value | limitTo: 250"></span>
<span ng-bind="item.value.length > 250 ? '...': ''"></span>
</td>
<td width="30%">
</td>
<td width="18%" title="{{item.comment}}">
<span ng-bind="item.comment | limitTo: 250"></span>
<span ng-bind="item.comment.length > 250 ?'...' : ''"></span>
</td>
</tr>
</tbody>
</table>
<!--not properties format-->
<div ng-if="!namespace.isPropertiesFormat">
<div ng-repeat="item in commits.changeSets.createItems">
<textarea class="form-control no-radius" rows="20" <textarea class="form-control no-radius" rows="20"
ng-disabled="true" ng-bind="item.value"> ng-disabled="true" ng-bind="item.value">
</textarea> </textarea>
</div> </div>
<div ng-repeat="item in commits.changeSets.updateItems"> <div ng-repeat="item in commits.changeSets.updateItems">
<textarea class="form-control no-radius" rows="20" <textarea class="form-control no-radius" rows="20"
ng-disabled="true" ng-bind="item.newItem.value"> ng-disabled="true" ng-bind="item.newItem.value">
</textarea> </textarea>
</div>
</div> </div>
</div>
</div>
<hr>
</div>
<div class="text-center">
<button type="button" class="btn btn-default" ng-show="!namespace.branch.hasLoadAllCommit"
ng-click="loadCommitHistory(namespace.branch)">加载更多
<span class="glyphicon glyphicon-menu-down"></span></button>
</div>
<div class="empty-container text-center"
ng-show="!namespace.branch.commits || !namespace.branch.commits.length">
无更改历史
</div> </div>
<hr>
</div>
<div class="text-center">
<button type="button" class="btn btn-default" ng-show="!namespace.branch.hasLoadAllCommit"
ng-click="loadCommitHistory(namespace.branch)">加载更多
<span class="glyphicon glyphicon-menu-down"></span></button>
</div>
<div class="empty-container text-center" ng-show="!namespace.branch.commits || !namespace.branch.commits.length">
无更改历史
</div> </div>
</div> </section>
</section> </div>
</section> </section>
...@@ -7,8 +7,17 @@ ...@@ -7,8 +7,17 @@
<header class="panel-heading"> <header class="panel-heading">
<div class="row"> <div class="row">
<div class="col-md-6 col-sm-6 header-namespace"> <div class="col-md-6 col-sm-6 header-namespace">
<b class="namespace-name" ng-bind="namespace.viewName" <span class="cursor-pointer"
data-tooltip="tooltip" data-placement="bottom" title="{{namespace.comment}}"></b> data-toggle="collapse" data-target="#BODY{{namespace.id}}" aria-expanded="false"
ng-click="namespace.displayControl.show = !namespace.displayControl.show">
<span class="glyphicon glyphicon-triangle-bottom small"
ng-show="namespace.displayControl.show"></span>
<span class="glyphicon glyphicon-triangle-top small"
ng-show="!namespace.displayControl.show"></span>
<b class="namespace-name" ng-bind="namespace.viewName"
data-tooltip="tooltip" data-placement="bottom" title="点击展开/收缩Namespace"></b>
</span>
<span class="label label-info no-radius namespace-label" ng-bind="namespace.format"></span> <span class="label label-info no-radius namespace-label" ng-bind="namespace.format"></span>
<span class="label label-warning no-radius namespace-label modify-tip" <span class="label label-warning no-radius namespace-label modify-tip"
ng-show="namespace.itemModifiedCnt > 0"> ng-show="namespace.itemModifiedCnt > 0">
...@@ -81,162 +90,164 @@ ...@@ -81,162 +90,164 @@
</div> </div>
</header> </header>
<!--second header--> <div id="BODY{{namespace.id}}" class="collapse in">
<header class="panel-heading second-panel-heading"> <!--second header-->
<div class="row"> <header class="panel-heading second-panel-heading">
<div class="col-md-6 col-sm-6 pull-left"> <div class="row">
<!--master branch nav tabs--> <div class="col-md-6 col-sm-6 pull-left">
<ul class="nav nav-tabs"> <!--master branch nav tabs-->
<li role="presentation" ng-click="switchView(namespace, 'table')" <ul class="nav nav-tabs">
ng-show="namespace.isPropertiesFormat"> <li role="presentation" ng-click="switchView(namespace, 'table')"
<a ng-class="{node_active:namespace.viewType == 'table'}"> ng-show="namespace.isPropertiesFormat">
<img src="img/table.png"> <a ng-class="{node_active:namespace.viewType == 'table'}">
表格 <img src="img/table.png">
</a> 表格
</li> </a>
<li role="presentation" </li>
ng-click="switchView(namespace, 'text')"> <li role="presentation"
<a ng-class="{node_active:namespace.viewType == 'text'}"> ng-click="switchView(namespace, 'text')">
<img src="img/text.png"> <a ng-class="{node_active:namespace.viewType == 'text'}">
文本 <img src="img/text.png">
</a> 文本
</li> </a>
<li role="presentation" ng-click="switchView(namespace, 'history')"> </li>
<a ng-class="{node_active:namespace.viewType == 'history'}"> <li role="presentation" ng-click="switchView(namespace, 'history')">
<img src="img/change.png"> <a ng-class="{node_active:namespace.viewType == 'history'}">
更改历史 <img src="img/change.png">
</a> 更改历史
</li> </a>
<li role="presentation" ng-click="switchView(namespace, 'instance')"> </li>
<a ng-class="{node_active:namespace.viewType == 'instance'}"> <li role="presentation" ng-click="switchView(namespace, 'instance')">
<img src="img/machine.png"> <a ng-class="{node_active:namespace.viewType == 'instance'}">
实例列表 <img src="img/machine.png">
<span class="badge badge-grey" ng-bind="namespace.instancesCount"></span> 实例列表
</a> <span class="badge badge-grey" ng-bind="namespace.instancesCount"></span>
</li> </a>
</ul> </li>
</div> </ul>
<div class="col-md-6 col-sm-6 text-right"> </div>
<a class="clipboard" <div class="col-md-6 col-sm-6 text-right">
data-clipboard-text="{{namespace.text}}" <a class="clipboard"
data-tooltip="tooltip" data-placement="bottom" title="复制文本" data-clipboard-text="{{namespace.text}}"
ng-show="!namespace.isTextEditing && namespace.viewType == 'text' && namespace.hasModifyPermission"> data-tooltip="tooltip" data-placement="bottom" title="复制文本"
<img src="img/copy.png" class="ns_btn"> ng-show="!namespace.isTextEditing && namespace.viewType == 'text' && namespace.hasModifyPermission">
</a> <img src="img/copy.png" class="ns_btn">
&nbsp; </a>
<a data-tooltip="tooltip" data-placement="bottom" title="取消修改" &nbsp;
ng-show="namespace.isTextEditing && namespace.viewType == 'text'" <a data-tooltip="tooltip" data-placement="bottom" title="取消修改"
ng-click="toggleTextEditStatus(namespace)"> ng-show="namespace.isTextEditing && namespace.viewType == 'text'"
<img src="img/cancel.png" class="ns_btn"> ng-click="toggleTextEditStatus(namespace)">
</a> <img src="img/cancel.png" class="ns_btn">
<a data-tooltip="tooltip" data-placement="bottom" title="修改配置" </a>
ng-show="!namespace.isTextEditing && namespace.viewType == 'text' && namespace.hasModifyPermission" <a data-tooltip="tooltip" data-placement="bottom" title="修改配置"
ng-click="toggleTextEditStatus(namespace)"> ng-show="!namespace.isTextEditing && namespace.viewType == 'text' && namespace.hasModifyPermission"
<img src="img/edit.png" class="ns_btn"> ng-click="toggleTextEditStatus(namespace)">
</a> <img src="img/edit.png" class="ns_btn">
</a>
&nbsp;
<a data-tooltip="tooltip" data-placement="bottom" title="提交修改" &nbsp;
data-toggle="modal" data-target="#commitModal" <a data-tooltip="tooltip" data-placement="bottom" title="提交修改"
ng-show="namespace.isTextEditing && namespace.viewType == 'text'" data-toggle="modal" data-target="#commitModal"
ng-click="modifyByText(namespace)"> ng-show="namespace.isTextEditing && namespace.viewType == 'text'"
<img src="img/submit.png" class="ns_btn"> ng-click="modifyByText(namespace)">
</a> <img src="img/submit.png" class="ns_btn">
</a>
<button type="button" class="btn btn-default btn-sm"
data-tooltip="tooltip" data-placement="bottom" title="按Key过滤配置" <button type="button" class="btn btn-default btn-sm"
ng-show="namespace.viewType == 'table' && namespace.displayControl.currentOperateBranch == 'master' data-tooltip="tooltip" data-placement="bottom" title="按Key过滤配置"
ng-show="namespace.viewType == 'table' && namespace.displayControl.currentOperateBranch == 'master'
&& !namespace.isLinkedNamespace" && !namespace.isLinkedNamespace"
ng-click="toggleItemSearchInput(namespace)"> ng-click="toggleItemSearchInput(namespace)">
<span class="glyphicon glyphicon-filter"></span> <span class="glyphicon glyphicon-filter"></span>
过滤配置 过滤配置
</button> </button>
<button type="button" class="btn btn-default btn-sm J_tableview_btn" <button type="button" class="btn btn-default btn-sm J_tableview_btn"
data-tooltip="tooltip" data-placement="bottom" title="同步各环境间配置" data-tooltip="tooltip" data-placement="bottom" title="同步各环境间配置"
ng-click="goToSyncPage(namespace)" ng-click="goToSyncPage(namespace)"
ng-show="namespace.viewType == 'table' && namespace.displayControl.currentOperateBranch == 'master' ng-show="namespace.viewType == 'table' && namespace.displayControl.currentOperateBranch == 'master'
&& namespace.hasModifyPermission && namespace.isPropertiesFormat"> && namespace.hasModifyPermission && namespace.isPropertiesFormat">
<img src="img/sync.png"> <img src="img/sync.png">
同步配置 同步配置
</button> </button>
<button type="button" class="btn btn-primary btn-sm" <button type="button" class="btn btn-primary btn-sm"
ng-show="!namespace.isLinkedNamespace ng-show="!namespace.isLinkedNamespace
&& namespace.viewType == 'table' && namespace.viewType == 'table'
&& namespace.displayControl.currentOperateBranch == 'master' && namespace.displayControl.currentOperateBranch == 'master'
&& namespace.hasModifyPermission" && namespace.hasModifyPermission"
ng-click="createItem(namespace)"> ng-click="createItem(namespace)">
<img src="img/plus.png"> <img src="img/plus.png">
新增配置 新增配置
</button> </button>
</div>
</div> </div>
</div> </header>
</header>
<section> <!--namespace body-->
<!--table view--> <section>
<div class="namespace-view-table" ng-show="namespace.viewType == 'table'"> <!--table view-->
<div class="namespace-view-table" ng-show="namespace.viewType == 'table'">
<div class="J_namespace-release-tip well well-sm no-radius text-center" <div class="J_namespace-release-tip well well-sm no-radius text-center"
ng-show="namespace.isLatestReleaseLoaded && !namespace.isLinkedNamespace && !namespace.latestRelease"> ng-show="namespace.isLatestReleaseLoaded && !namespace.isLinkedNamespace && !namespace.latestRelease">
<span style="color: red"> Tips: 此namespace从来没有发布过,Apollo客户端将获取不到配置并记录404日志信息,请及时发布。</span> <span style="color: red"> Tips: 此namespace从来没有发布过,Apollo客户端将获取不到配置并记录404日志信息,请及时发布。</span>
</div>
<!--not link namespace-->
<div ng-if="!namespace.isLinkedNamespace">
<div class="search-input" ng-show="namespace.displayControl.showSearchInput">
<input type="text" class="form-control" placeholder="输入key过滤"
ng-model="namespace.searchKey"
ng-change="searchItems(namespace)">
</div> </div>
<!--not link namespace-->
<div ng-if="!namespace.isLinkedNamespace">
<div class="search-input" ng-show="namespace.displayControl.showSearchInput">
<input type="text" class="form-control" placeholder="输入key过滤"
ng-model="namespace.searchKey"
ng-change="searchItems(namespace)">
</div>
<table class="table table-bordered table-striped table-hover">
<thead>
<tr>
<th>发布状态</th>
<th class="hover" title="排序"
ng-click="col='item.key';desc=!desc;">
Key&nbsp;
<span class="glyphicon glyphicon-sort"></span>
</th>
<th>
Value
</th>
<th>
备注
</th>
<th class="hover" title="排序"
ng-click="col='item.dataChangeLastModifiedBy';desc=!desc;">
最后修改人
<span class="glyphicon glyphicon-sort"></span>
</th>
<th class="hover" title="排序"
ng-click="col='item.dataChangeLastModifiedTime';desc=!desc;">
最后修改时间
<span class="glyphicon glyphicon-sort"></span>
</th>
<table class="table table-bordered table-striped table-hover"> <th>
<thead> 操作
<tr> </th>
<th>发布状态</th> </tr>
<th class="hover" title="排序" </thead>
ng-click="col='item.key';desc=!desc;"> <tbody>
Key&nbsp; <tr ng-repeat="config in namespace.viewItems |orderBy:col:desc"
<span class="glyphicon glyphicon-sort"></span> ng-if="config.item.key">
<td width="8%" class="text-center">
</th>
<th>
Value
</th>
<th>
备注
</th>
<th class="hover" title="排序"
ng-click="col='item.dataChangeLastModifiedBy';desc=!desc;">
最后修改人
<span class="glyphicon glyphicon-sort"></span>
</th>
<th class="hover" title="排序"
ng-click="col='item.dataChangeLastModifiedTime';desc=!desc;">
最后修改时间
<span class="glyphicon glyphicon-sort"></span>
</th>
<th>
操作
</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="config in namespace.viewItems |orderBy:col:desc"
ng-if="config.item.key">
<td width="8%" class="text-center">
<span class="label label-warning no-radius cursor-pointer" ng-if="config.isModified" <span class="label label-warning no-radius cursor-pointer" ng-if="config.isModified"
data-tooltip="tooltip" data-placement="bottom" title="点击查看已发布的值" data-tooltip="tooltip" data-placement="bottom" title="点击查看已发布的值"
ng-click="showText(config.oldValue?config.oldValue:'新增的配置,无发布的值')">未发布</span> ng-click="showText(config.oldValue?config.oldValue:'新增的配置,无发布的值')">未发布</span>
<span class="label label-default-light no-radius" <span class="label label-default-light no-radius"
data-tooltip="tooltip" data-placement="bottom" title="已生效的配置" data-tooltip="tooltip" data-placement="bottom" title="已生效的配置"
ng-if="!config.isModified">已发布</span> ng-if="!config.isModified">已发布</span>
</td> </td>
<td width="15%" class="cursor-pointer" title="点击查看" ng-click="showText(config.item.key)"> <td width="15%" class="cursor-pointer" title="点击查看" ng-click="showText(config.item.key)">
<span ng-bind="config.item.key | limitTo: 250"></span> <span ng-bind="config.item.key | limitTo: 250"></span>
<span ng-bind="config.item.key.length > 250 ? '...' :''"></span> <span ng-bind="config.item.key.length > 250 ? '...' :''"></span>
<span class="label label-default cursor-pointer" ng-if="config.hasBranchValue" <span class="label label-default cursor-pointer" ng-if="config.hasBranchValue"
data-tooltip="tooltip" data-placement="bottom" title="该配置有灰度配置,点击查看灰度的值" data-tooltip="tooltip" data-placement="bottom" title="该配置有灰度配置,点击查看灰度的值"
ng-click="namespace.displayControl.currentOperateBranch=namespace.branchName;namespace.branch.viewType='table'"></span> ng-click="namespace.displayControl.currentOperateBranch=namespace.branchName;namespace.branch.viewType='table'"></span>
...@@ -247,105 +258,105 @@ ...@@ -247,105 +258,105 @@
data-tooltip="tooltip" data-placement="bottom" title="修改的配置"></span> data-tooltip="tooltip" data-placement="bottom" title="修改的配置"></span>
<span class="label label-danger" ng-if="config.isDeleted" <span class="label label-danger" ng-if="config.isDeleted"
data-tooltip="tooltip" data-placement="bottom" title="删除的配置"></span> data-tooltip="tooltip" data-placement="bottom" title="删除的配置"></span>
</td> </td>
<td width="30%" class="cursor-pointer" title="点击查看" ng-click="showText(config.item.value)"> <td width="30%" class="cursor-pointer" title="点击查看" ng-click="showText(config.item.value)">
<span ng-bind="config.item.value | limitTo: 250"></span> <span ng-bind="config.item.value | limitTo: 250"></span>
<span ng-bind="config.item.value.length > 250 ? '...': ''"></span> <span ng-bind="config.item.value.length > 250 ? '...': ''"></span>
</td> </td>
<td width="13%" title="{{config.item.comment}}"> <td width="13%" title="{{config.item.comment}}">
<span ng-bind="config.item.comment | limitTo: 250"></span> <span ng-bind="config.item.comment | limitTo: 250"></span>
<span ng-bind="config.item.comment.length > 250 ?'...' : ''"></span> <span ng-bind="config.item.comment.length > 250 ?'...' : ''"></span>
</td> </td>
<td width="10%" ng-bind="config.item.dataChangeLastModifiedBy"> <td width="10%" ng-bind="config.item.dataChangeLastModifiedBy">
</td> </td>
<td width="16%" <td width="16%"
ng-bind="config.item.dataChangeLastModifiedTime | date: 'yyyy-MM-dd HH:mm:ss'"> ng-bind="config.item.dataChangeLastModifiedTime | date: 'yyyy-MM-dd HH:mm:ss'">
</td> </td>
<td width="8%" class="text-center" ng-if="!config.isDeleted">
<img src="img/edit.png" data-tooltip="tooltip" data-placement="bottom" title="修改"
ng-click="editItem(namespace, config.item)"
ng-show="namespace.hasModifyPermission">
<img style="margin-left: 5px;" src="img/cancel.png"
data-tooltip="tooltip" data-placement="bottom" title="删除"
ng-click="preDeleteItem(namespace, config.item.id)"
ng-show="namespace.hasModifyPermission">
</td>
<td width="6%" class="text-center" ng-if="config.isDeleted">
</td>
</tr>
</tbody>
</table>
</div>
<!--link namespace--> <td width="8%" class="text-center" ng-if="!config.isDeleted">
<div class="panel panel-default" ng-if="namespace.isLinkedNamespace"> <img src="img/edit.png" data-tooltip="tooltip" data-placement="bottom" title="修改"
<div class="panel-heading"> ng-click="editItem(namespace, config.item)"
<div class="row"> ng-show="namespace.hasModifyPermission">
<div class="padding-top-5 col-md-4 col-sm-4"> <img style="margin-left: 5px;" src="img/cancel.png"
覆盖的配置 data-tooltip="tooltip" data-placement="bottom" title="删除"
</div> ng-click="preDeleteItem(namespace, config.item.id)"
<div class="col-md-8 col-sm-8"> ng-show="namespace.hasModifyPermission">
<input type="text" class="form-control pull-right" placeholder="filter by key ..." </td>
ng-class="{'search-onblur': namespace.searchStatus == 'OFF' || !namespace.searchStatus, <td width="6%" class="text-center" ng-if="config.isDeleted">
</td>
</tr>
</tbody>
</table>
</div>
<!--link namespace-->
<div class="panel panel-default" ng-if="namespace.isLinkedNamespace">
<div class="panel-heading">
<div class="row">
<div class="padding-top-5 col-md-4 col-sm-4">
覆盖的配置
</div>
<div class="col-md-8 col-sm-8">
<input type="text" class="form-control pull-right" placeholder="filter by key ..."
ng-class="{'search-onblur': namespace.searchStatus == 'OFF' || !namespace.searchStatus,
'search-focus': namespace.searchStatus == 'ON'}" 'search-focus': namespace.searchStatus == 'ON'}"
ng-model="namespace.searchKey" ng-model="namespace.searchKey"
ng-change="searchItems(namespace)" ng-change="searchItems(namespace)"
ng-focus="namespace.searchStatus='ON'" ng-focus="namespace.searchStatus='ON'"
ng-blur="namespace.searchStatus='OFF'"> ng-blur="namespace.searchStatus='OFF'">
</div>
</div> </div>
</div> </div>
</div>
<table class="table table-bordered table-striped table-hover" <table class="table table-bordered table-striped table-hover"
ng-if="namespace.viewItems && namespace.viewItems.length"> ng-if="namespace.viewItems && namespace.viewItems.length">
<thead> <thead>
<tr> <tr>
<th>发布状态</th> <th>发布状态</th>
<th class="hover" title="排序" <th class="hover" title="排序"
ng-click="col='item.key';desc=!desc;"> ng-click="col='item.key';desc=!desc;">
Key&nbsp; Key&nbsp;
<span class="glyphicon glyphicon-sort"></span> <span class="glyphicon glyphicon-sort"></span>
</th> </th>
<th> <th>
Value Value
</th> </th>
<th> <th>
备注 备注
</th> </th>
<th class="hover" title="排序" <th class="hover" title="排序"
ng-click="col='item.dataChangeLastModifiedBy';desc=!desc;"> ng-click="col='item.dataChangeLastModifiedBy';desc=!desc;">
最后修改人 最后修改人
<span class="glyphicon glyphicon-sort"></span> <span class="glyphicon glyphicon-sort"></span>
</th> </th>
<th class="hover" title="排序" <th class="hover" title="排序"
ng-click="col='item.dataChangeLastModifiedTime';desc=!desc;"> ng-click="col='item.dataChangeLastModifiedTime';desc=!desc;">
最后修改时间 最后修改时间
<span class="glyphicon glyphicon-sort"></span> <span class="glyphicon glyphicon-sort"></span>
</th> </th>
<th> <th>
操作 操作
</th> </th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr ng-repeat="config in namespace.viewItems |orderBy:col:desc" <tr ng-repeat="config in namespace.viewItems |orderBy:col:desc"
ng-if="config.item.key"> ng-if="config.item.key">
<td width="8%" class="text-center"> <td width="8%" class="text-center">
<span class="label label-warning no-radius cursor-pointer" ng-if="config.isModified" <span class="label label-warning no-radius cursor-pointer" ng-if="config.isModified"
data-tooltip="tooltip" data-placement="bottom" title="点击查看已发布的值" data-tooltip="tooltip" data-placement="bottom" title="点击查看已发布的值"
ng-click="showText(config.oldValue?config.oldValue:'新增的配置,无发布的值')">未发布</span> ng-click="showText(config.oldValue?config.oldValue:'新增的配置,无发布的值')">未发布</span>
<span class="label label-default-light no-radius" <span class="label label-default-light no-radius"
data-tooltip="tooltip" data-placement="bottom" title="已生效的配置" data-tooltip="tooltip" data-placement="bottom" title="已生效的配置"
ng-if="!config.isModified">已发布</span> ng-if="!config.isModified">已发布</span>
</td> </td>
<td width="15%" class="cursor-pointer" title="点击查看" ng-click="showText(config.item.key)"> <td width="15%" class="cursor-pointer" title="点击查看" ng-click="showText(config.item.key)">
<span ng-bind="config.item.key | limitTo: 250"></span> <span ng-bind="config.item.key | limitTo: 250"></span>
<span ng-bind="config.item.key.length > 250 ? '...' :''"></span> <span ng-bind="config.item.key.length > 250 ? '...' :''"></span>
<span class="label label-default cursor-pointer" ng-if="config.hasBranchValue" <span class="label label-default cursor-pointer" ng-if="config.hasBranchValue"
data-tooltip="tooltip" data-placement="bottom" title="该配置有灰度配置,点击查看灰度的值" data-tooltip="tooltip" data-placement="bottom" title="该配置有灰度配置,点击查看灰度的值"
ng-click="namespace.displayControl.currentOperateBranch=namespace.branchName;namespace.branch.viewType='table'"></span> ng-click="namespace.displayControl.currentOperateBranch=namespace.branchName;namespace.branch.viewType='table'"></span>
...@@ -356,94 +367,172 @@ ...@@ -356,94 +367,172 @@
data-tooltip="tooltip" data-placement="bottom" title="修改的配置"></span> data-tooltip="tooltip" data-placement="bottom" title="修改的配置"></span>
<span class="label label-danger" ng-if="config.isDeleted" <span class="label label-danger" ng-if="config.isDeleted"
data-tooltip="tooltip" data-placement="bottom" title="删除的配置"></span> data-tooltip="tooltip" data-placement="bottom" title="删除的配置"></span>
</td> </td>
<td width="30%" class="cursor-pointer" title="点击查看" ng-click="showText(config.item.value)"> <td width="30%" class="cursor-pointer" title="点击查看" ng-click="showText(config.item.value)">
<span ng-bind="config.item.value | limitTo: 250"></span> <span ng-bind="config.item.value | limitTo: 250"></span>
<span ng-bind="config.item.value.length > 250 ? '...': ''"></span> <span ng-bind="config.item.value.length > 250 ? '...': ''"></span>
</td> </td>
<td width="13%" title="{{config.item.comment}}"> <td width="13%" title="{{config.item.comment}}">
<span ng-bind="config.item.comment | limitTo: 250"></span> <span ng-bind="config.item.comment | limitTo: 250"></span>
<span ng-bind="config.item.comment.length > 250 ?'...' : ''"></span> <span ng-bind="config.item.comment.length > 250 ?'...' : ''"></span>
</td> </td>
<td width="10%" ng-bind="config.item.dataChangeLastModifiedBy"> <td width="10%" ng-bind="config.item.dataChangeLastModifiedBy">
</td> </td>
<td width="16%" <td width="16%"
ng-bind="config.item.dataChangeLastModifiedTime | date: 'yyyy-MM-dd HH:mm:ss'"> ng-bind="config.item.dataChangeLastModifiedTime | date: 'yyyy-MM-dd HH:mm:ss'">
</td> </td>
<td width="8%" class="text-center" ng-if="!config.isDeleted"> <td width="8%" class="text-center" ng-if="!config.isDeleted">
<img src="img/edit.png" data-tooltip="tooltip" data-placement="bottom" title="修改" <img src="img/edit.png" data-tooltip="tooltip" data-placement="bottom" title="修改"
ng-click="editItem(namespace, config.item)" ng-click="editItem(namespace, config.item)"
ng-show="namespace.hasModifyPermission"> ng-show="namespace.hasModifyPermission">
<img style="margin-left: 5px;" src="img/cancel.png" <img style="margin-left: 5px;" src="img/cancel.png"
data-tooltip="tooltip" data-placement="bottom" title="删除" data-tooltip="tooltip" data-placement="bottom" title="删除"
ng-click="preDeleteItem(namespace, config.item.id)" ng-click="preDeleteItem(namespace, config.item.id)"
ng-show="namespace.hasModifyPermission"> ng-show="namespace.hasModifyPermission">
</td> </td>
<td width="6%" class="text-center" ng-if="config.isDeleted"> <td width="6%" class="text-center" ng-if="config.isDeleted">
</td> </td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<div class="text-center no-config-panel" <div class="text-center no-config-panel"
ng-if="!namespace.viewItems || !namespace.viewItems.length"> ng-if="!namespace.viewItems || !namespace.viewItems.length">
<h5>无覆盖的配置</h5> <h5>无覆盖的配置</h5>
</div>
</div> </div>
</div>
<!--link namespace's public namespace--> <!--link namespace's public namespace-->
<div ng-if="namespace.isLinkedNamespace"> <div ng-if="namespace.isLinkedNamespace">
<div class="panel panel-default" ng-if="namespace.publicNamespace"> <div class="panel panel-default" ng-if="namespace.publicNamespace">
<div class="panel-heading"> <div class="panel-heading">
<div class="row"> <div class="row">
<div class="padding-top-5 col-md-4 col-sm-4"> <div class="padding-top-5 col-md-4 col-sm-4">
公共的配置 公共的配置
<a href="/config.html?#/appid={{namespace.publicNamespace.baseInfo.appId}}&env={{env}}&cluster={{namespace.publicNamespace.baseInfo.clusterName}}" <a href="/config.html?#/appid={{namespace.publicNamespace.baseInfo.appId}}&env={{env}}&cluster={{namespace.publicNamespace.baseInfo.clusterName}}"
target="_blank"> target="_blank">
<small> <small>
(AppId:{{namespace.publicNamespace.baseInfo.appId}}, (AppId:{{namespace.publicNamespace.baseInfo.appId}},
Cluster:{{namespace.publicNamespace.baseInfo.clusterName}}) Cluster:{{namespace.publicNamespace.baseInfo.clusterName}})
</small> </small>
</a> </a>
</div> </div>
<div class="col-md-4 col-sm-4 text-center"> <div class="col-md-4 col-sm-4 text-center">
<div class="btn-group btn-group-sm" role="group" <div class="btn-group btn-group-sm" role="group"
ng-show="namespace.publicNamespace.isModified"> ng-show="namespace.publicNamespace.isModified">
<button type="button" class="btn btn-default" <button type="button" class="btn btn-default"
ng-class="{'active':namespace.publicNamespaceViewType == 'RELEASE' ng-class="{'active':namespace.publicNamespaceViewType == 'RELEASE'
|| !namespace.publicNamespaceViewType}" || !namespace.publicNamespaceViewType}"
ng-click="namespace.publicNamespaceViewType = 'RELEASE'"> ng-click="namespace.publicNamespaceViewType = 'RELEASE'">
已发布的配置 已发布的配置
</button> </button>
<button type="button" class="btn btn-default" <button type="button" class="btn btn-default"
ng-class="{'active':namespace.publicNamespaceViewType == 'NOT_RELEASE'}" ng-class="{'active':namespace.publicNamespaceViewType == 'NOT_RELEASE'}"
ng-click="namespace.publicNamespaceViewType = 'NOT_RELEASE'"> ng-click="namespace.publicNamespaceViewType = 'NOT_RELEASE'">
未发布的配置 未发布的配置
</button> </button>
</div>
</div> </div>
</div>
<div class="col-md-4 col-sm-4"> <div class="col-md-4 col-sm-4">
<input type="text" class="form-control pull-right" placeholder="filter by key ..." <input type="text" class="form-control pull-right" placeholder="filter by key ..."
ng-class="{'search-onblur': namespace.publicNamespace.searchStatus == 'OFF' ng-class="{'search-onblur': namespace.publicNamespace.searchStatus == 'OFF'
|| !namespace.publicNamespace.searchStatus, || !namespace.publicNamespace.searchStatus,
'search-focus': namespace.publicNamespace.searchStatus == 'ON'}" 'search-focus': namespace.publicNamespace.searchStatus == 'ON'}"
ng-model="namespace.publicNamespace.searchKey" ng-model="namespace.publicNamespace.searchKey"
ng-change="searchItems(namespace.publicNamespace)" ng-change="searchItems(namespace.publicNamespace)"
ng-blur="namespace.publicNamespace.searchStatus='OFF'" ng-blur="namespace.publicNamespace.searchStatus='OFF'"
ng-focus="namespace.publicNamespace.searchStatus='ON'"/> ng-focus="namespace.publicNamespace.searchStatus='ON'"/>
</div>
</div> </div>
</div> </div>
</div>
<!--published items--> <!--published items-->
<div ng-show="!namespace.publicNamespaceViewType || namespace.publicNamespaceViewType == 'RELEASE'"> <div ng-show="!namespace.publicNamespaceViewType || namespace.publicNamespaceViewType == 'RELEASE'">
<table class="table table-bordered table-striped table-hover"
ng-show="namespace.publicNamespace.hasPublishedItem">
<thead>
<tr>
<th class="hover" title="排序"
ng-click="col='item.key';desc=!desc;">
Key&nbsp;
<span class="glyphicon glyphicon-sort"></span>
</th>
<th>
Value
</th>
<th>
备注
</th>
<th class="hover" title="排序"
ng-click="col='item.dataChangeLastModifiedBy';desc=!desc;">
最后修改人
<span class="glyphicon glyphicon-sort"></span>
</th>
<th class="hover" title="排序"
ng-click="col='item.dataChangeLastModifiedTime';desc=!desc;">
最后修改时间
<span class="glyphicon glyphicon-sort"></span>
</th>
<th>
操作
</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="config in namespace.publicNamespace.viewItems |orderBy:col:desc"
ng-if="config.item.key && !config.isModified && !config.isDeleted">
<td width="15%" class="cursor-pointer" title="点击查看"
ng-click="showText(config.item.key)">
<span ng-bind="config.item.key | limitTo: 250"></span>
<span ng-bind="config.item.key.length > 250 ? '...' :''"></span>
</td>
<td width="35%" class="cursor-pointer" title="点击查看"
ng-click="showText(config.item.value)">
<span ng-bind="config.item.value | limitTo: 250"></span>
<span ng-bind="config.item.value.length > 250 ? '...': ''"></span>
</td>
<td width="15%" title="{{config.item.comment}}">
<span ng-bind="config.item.comment | limitTo: 250"></span>
<span ng-bind="config.item.comment.length > 250 ?'...' : ''"></span>
</td>
<td width="10%" ng-bind="config.item.dataChangeLastModifiedBy">
</td>
<td width="15%"
ng-bind="config.item.dataChangeLastModifiedTime | date: 'yyyy-MM-dd HH:mm:ss'">
</td>
<td width="10%" class="text-center" ng-if="!config.isDeleted">
<img src="img/gray.png" data-tooltip="tooltip" data-placement="bottom"
title="覆盖此配置"
ng-click="editItem(namespace, config.item)"
ng-show="namespace.hasModifyPermission && !config.covered">
</td>
<td width="6%" class="text-center" ng-if="config.isDeleted">
</td>
</tr>
</tbody>
</table>
<div class="text-center no-config-panel"
ng-if="namespace.publicNamespace.viewItems
&& namespace.publicNamespace.viewItems.length
&& !namespace.publicNamespace.hasPublishedItem">
<h5>无发布的配置</h5>
</div>
</div>
<!--not published items-->
<table class="table table-bordered table-striped table-hover" <table class="table table-bordered table-striped table-hover"
ng-show="namespace.publicNamespace.hasPublishedItem"> ng-show="namespace.publicNamespaceViewType == 'NOT_RELEASE'">
<thead> <thead>
<tr> <tr>
<th class="hover" title="排序" <th class="hover" title="排序"
...@@ -453,16 +542,13 @@ ...@@ -453,16 +542,13 @@
</th> </th>
<th> <th>
Value 已发布的值
</th> </th>
<th> <th>
备注 未发布的值
</th> </th>
<th class="hover" title="排序" <th>
ng-click="col='item.dataChangeLastModifiedBy';desc=!desc;"> 备注
最后修改人
<span class="glyphicon glyphicon-sort"></span>
</th> </th>
<th class="hover" title="排序" <th class="hover" title="排序"
ng-click="col='item.dataChangeLastModifiedTime';desc=!desc;"> ng-click="col='item.dataChangeLastModifiedTime';desc=!desc;">
...@@ -477,444 +563,370 @@ ...@@ -477,444 +563,370 @@
</thead> </thead>
<tbody> <tbody>
<tr ng-repeat="config in namespace.publicNamespace.viewItems |orderBy:col:desc" <tr ng-repeat="config in namespace.publicNamespace.viewItems |orderBy:col:desc"
ng-if="config.item.key && !config.isModified && !config.isDeleted"> ng-if="config.item.key && (config.isModified || config.isDeleted)">
<td width="15%" class="cursor-pointer" title="点击查看" <td width="20%" class="cursor-pointer" title="点击查看"
ng-click="showText(config.item.key)"> ng-click="showText(config.item.key)">
<span ng-bind="config.item.key | limitTo: 250"></span> <span ng-bind="config.item.key | limitTo: 250"></span>
<span ng-bind="config.item.key.length > 250 ? '...' :''"></span> <span ng-bind="config.item.key.length > 250 ? '...' :''"></span>
<span class="label label-success" ng-if="config.isModified && !config.oldValue"
data-tooltip="tooltip" data-placement="bottom" title="新增的配置"></span>
<span class="label label-info"
ng-if="config.isModified && config.oldValue && !config.isDeleted"
data-tooltip="tooltip" data-placement="bottom" title="修改的配置"></span>
<span class="label label-danger" ng-if="config.isDeleted"
data-tooltip="tooltip" data-placement="bottom" title="删除的配置"></span>
</td>
<td width="25%" class="cursor-pointer" title="点击查看"
ng-click="showText(config.oldValue)">
<span ng-bind="config.oldValue | limitTo: 250"></span>
<span ng-bind="config.oldValue.length > 250 ? '...': ''"></span>
</td> </td>
<td width="35%" class="cursor-pointer" title="点击查看" <td width="25%" class="cursor-pointer" title="点击查看"
ng-click="showText(config.item.value)"> ng-click="showText(config.item.value)">
<span ng-bind="config.item.value | limitTo: 250"></span> <span ng-bind="config.item.value | limitTo: 250"></span>
<span ng-bind="config.item.value.length > 250 ? '...': ''"></span> <span ng-bind="config.item.value.length > 250 ? '...': ''"></span>
</td> </td>
<td width="15%" title="{{config.item.comment}}"> <td width="10%" title="{{config.item.comment}}">
<span ng-bind="config.item.comment | limitTo: 250"></span> <span ng-bind="config.item.comment | limitTo: 250"></span>
<span ng-bind="config.item.comment.length > 250 ?'...' : ''"></span> <span ng-bind="config.item.comment.length > 250 ?'...' : ''"></span>
</td> </td>
<td width="10%" ng-bind="config.item.dataChangeLastModifiedBy">
</td>
<td width="15%" <td width="15%"
ng-bind="config.item.dataChangeLastModifiedTime | date: 'yyyy-MM-dd HH:mm:ss'"> ng-bind="config.item.dataChangeLastModifiedTime | date: 'yyyy-MM-dd HH:mm:ss'">
</td> </td>
<td width="10%" class="text-center" ng-if="!config.isDeleted"> <td width="5%" class="text-center" ng-if="!config.isDeleted">
<img src="img/gray.png" data-tooltip="tooltip" data-placement="bottom" <img src="img/gray.png" data-tooltip="tooltip" data-placement="bottom" title="覆盖此配置"
title="覆盖此配置"
ng-click="editItem(namespace, config.item)" ng-click="editItem(namespace, config.item)"
ng-show="namespace.hasModifyPermission && !config.covered"> ng-show="namespace.hasModifyPermission && !config.covered">
</td> </td>
<td width="6%" class="text-center" ng-if="config.isDeleted">
</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<div class="text-center no-config-panel" <div class="text-center no-config-panel"
ng-if="namespace.publicNamespace.viewItems ng-if="!namespace.publicNamespace.viewItems || !namespace.publicNamespace.viewItems.length">
&& namespace.publicNamespace.viewItems.length <h5>无公共的配置</h5>
&& !namespace.publicNamespace.hasPublishedItem">
<h5>无发布的配置</h5>
</div> </div>
</div> </div>
<div class="panel panel-default" ng-if="!namespace.publicNamespace">
<!--not published items--> <div class="panel-heading">
<table class="table table-bordered table-striped table-hover" 公共的配置
ng-show="namespace.publicNamespaceViewType == 'NOT_RELEASE'"> </div>
<thead> <div class="panel-body text-center">
<tr> 当前公共namespace的所有者
<th class="hover" title="排序" <a href="/config.html?#/appid={{namespace.parentAppId}}" target="_blank">{{namespace.parentAppId}}</a>
ng-click="col='item.key';desc=!desc;"> 没有关联此namespace,请联系{{namespace.parentAppId}}的所有者在{{namespace.parentAppId}}项目里关联此namespace
Key&nbsp; </div>
<span class="glyphicon glyphicon-sort"></span>
</th>
<th>
已发布的值
</th>
<th>
未发布的值
</th>
<th>
备注
</th>
<th class="hover" title="排序"
ng-click="col='item.dataChangeLastModifiedTime';desc=!desc;">
最后修改时间
<span class="glyphicon glyphicon-sort"></span>
</th>
<th>
操作
</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="config in namespace.publicNamespace.viewItems |orderBy:col:desc"
ng-if="config.item.key && (config.isModified || config.isDeleted)">
<td width="20%" class="cursor-pointer" title="点击查看"
ng-click="showText(config.item.key)">
<span ng-bind="config.item.key | limitTo: 250"></span>
<span ng-bind="config.item.key.length > 250 ? '...' :''"></span>
<span class="label label-success" ng-if="config.isModified && !config.oldValue"
data-tooltip="tooltip" data-placement="bottom" title="新增的配置"></span>
<span class="label label-info"
ng-if="config.isModified && config.oldValue && !config.isDeleted"
data-tooltip="tooltip" data-placement="bottom" title="修改的配置"></span>
<span class="label label-danger" ng-if="config.isDeleted"
data-tooltip="tooltip" data-placement="bottom" title="删除的配置"></span>
</td>
<td width="25%" class="cursor-pointer" title="点击查看"
ng-click="showText(config.oldValue)">
<span ng-bind="config.oldValue | limitTo: 250"></span>
<span ng-bind="config.oldValue.length > 250 ? '...': ''"></span>
</td>
<td width="25%" class="cursor-pointer" title="点击查看"
ng-click="showText(config.item.value)">
<span ng-bind="config.item.value | limitTo: 250"></span>
<span ng-bind="config.item.value.length > 250 ? '...': ''"></span>
</td>
<td width="10%" title="{{config.item.comment}}">
<span ng-bind="config.item.comment | limitTo: 250"></span>
<span ng-bind="config.item.comment.length > 250 ?'...' : ''"></span>
</td>
<td width="15%"
ng-bind="config.item.dataChangeLastModifiedTime | date: 'yyyy-MM-dd HH:mm:ss'">
</td>
<td width="5%" class="text-center" ng-if="!config.isDeleted">
<img src="img/gray.png" data-tooltip="tooltip" data-placement="bottom" title="覆盖此配置"
ng-click="editItem(namespace, config.item)"
ng-show="namespace.hasModifyPermission && !config.covered">
</td>
</tr>
</tbody>
</table>
<div class="text-center no-config-panel"
ng-if="!namespace.publicNamespace.viewItems || !namespace.publicNamespace.viewItems.length">
<h5>无公共的配置</h5>
</div>
</div>
<div class="panel panel-default" ng-if="!namespace.publicNamespace">
<div class="panel-heading">
公共的配置
</div>
<div class="panel-body text-center">
当前公共namespace的所有者
<a href="/config.html?#/appid={{namespace.parentAppId}}" target="_blank">{{namespace.parentAppId}}</a>
没有关联此namespace,请联系{{namespace.parentAppId}}的所有者在{{namespace.parentAppId}}项目里关联此namespace
</div> </div>
</div> </div>
</div>
</div> </div>
<!--text view--> <!--text view-->
<!--只读模式下的文本内容,不替换换行符--> <!--只读模式下的文本内容,不替换换行符-->
<textarea class="form-control no-radius" <textarea class="form-control no-radius"
rows="{{namespace.itemCnt < 10 ? 10: namespace.itemCnt>20 ? 20:namespace.itemCnt}}" rows="{{namespace.itemCnt < 10 ? 10: namespace.itemCnt>20 ? 20:namespace.itemCnt}}"
ng-show="namespace.viewType == 'text' && !namespace.isTextEditing" ng-show="namespace.viewType == 'text' && !namespace.isTextEditing"
ng-disabled="!namespace.isTextEditing" ng-disabled="!namespace.isTextEditing"
ng-bind="namespace.text"> ng-bind="namespace.text">
</textarea> </textarea>
<!--编辑状态下的文本内容,会过滤掉换行符--> <!--编辑状态下的文本内容,会过滤掉换行符-->
<textarea class="form-control no-radius" <textarea class="form-control no-radius"
rows="{{namespace.itemCnt < 10 ? 10: namespace.itemCnt>20 ? 20:namespace.itemCnt}}" rows="{{namespace.itemCnt < 10 ? 10: namespace.itemCnt>20 ? 20:namespace.itemCnt}}"
ng-show="namespace.viewType == 'text' && namespace.isTextEditing" ng-show="namespace.viewType == 'text' && namespace.isTextEditing"
ng-disabled="!namespace.isTextEditing" ng-model="namespace.editText"> ng-disabled="!namespace.isTextEditing" ng-model="namespace.editText">
</textarea> </textarea>
<!--history view--> <!--history view-->
<div class="J_historyview history-view" ng-show="namespace.viewType == 'history'"> <div class="J_historyview history-view" ng-show="namespace.viewType == 'history'">
<div class="media" <div class="media"
ng-show="namespace.commits && namespace.commits.length" ng-show="namespace.commits && namespace.commits.length"
ng-repeat="commits in namespace.commits"> ng-repeat="commits in namespace.commits">
<div class="media-body"> <div class="media-body">
<div class="row"> <div class="row">
<div class="col-md-6 col-sm-6"><h3 class="media-heading" <div class="col-md-6 col-sm-6"><h3 class="media-heading"
ng-bind="commits.dataChangeCreatedBy"></h3> ng-bind="commits.dataChangeCreatedBy"></h3>
</div> </div>
<div class="col-md-6 col-sm-6 text-right"><h5 class="media-heading" <div class="col-md-6 col-sm-6 text-right"><h5 class="media-heading"
ng-bind="commits.dataChangeCreatedTime | date: 'yyyy-MM-dd HH:mm:ss'"></h5> ng-bind="commits.dataChangeCreatedTime | date: 'yyyy-MM-dd HH:mm:ss'"></h5>
</div>
</div> </div>
</div>
<!--properties format--> <!--properties format-->
<table class="table table-bordered table-striped text-center table-hover" <table class="table table-bordered table-striped text-center table-hover"
style="margin-top: 5px;" style="margin-top: 5px;"
ng-if="namespace.isPropertiesFormat"> ng-if="namespace.isPropertiesFormat">
<thead> <thead>
<tr> <tr>
<th> <th>
Type Type
</th> </th>
<th> <th>
Key Key
</th> </th>
<th> <th>
Old Value Old Value
</th> </th>
<th> <th>
New Value New Value
</th> </th>
<th> <th>
Comment Comment
</th> </th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<!--兼容老数据,不显示item类型为空行和注释的item--> <!--兼容老数据,不显示item类型为空行和注释的item-->
<tr ng-repeat="item in commits.changeSets.createItems" ng-show="item.key"> <tr ng-repeat="item in commits.changeSets.createItems" ng-show="item.key">
<td width="2%"> <td width="2%">
新增 新增
</td> </td>
<td width="20%" title="{{item.key}}"> <td width="20%" title="{{item.key}}">
<span ng-bind="item.key | limitTo: 250"></span> <span ng-bind="item.key | limitTo: 250"></span>
<span ng-bind="item.key.length > 250 ? '...' :''"></span> <span ng-bind="item.key.length > 250 ? '...' :''"></span>
</td> </td>
<td width="30%"> <td width="30%">
</td> </td>
<td width="30%" class="cursor-pointer" title="{{item.value}}" <td width="30%" class="cursor-pointer" title="{{item.value}}"
ng-click="showText(item.value)"> ng-click="showText(item.value)">
<span ng-bind="item.value | limitTo: 250"></span> <span ng-bind="item.value | limitTo: 250"></span>
<span ng-bind="item.value.length > 250 ? '...': ''"></span> <span ng-bind="item.value.length > 250 ? '...': ''"></span>
</td> </td>
<td width="18%" title="{{item.comment}}"> <td width="18%" title="{{item.comment}}">
<span ng-bind="item.comment | limitTo: 250"></span> <span ng-bind="item.comment | limitTo: 250"></span>
<span ng-bind="item.comment.length > 250 ?'...' : ''"></span> <span ng-bind="item.comment.length > 250 ?'...' : ''"></span>
</td> </td>
</tr> </tr>
<tr ng-repeat="item in commits.changeSets.updateItems"> <tr ng-repeat="item in commits.changeSets.updateItems">
<td width="2%"> <td width="2%">
更新 更新
</td> </td>
<td width="20%" title="{{item.newItem.key}}"> <td width="20%" title="{{item.newItem.key}}">
<span ng-bind="item.newItem.key | limitTo: 250"></span> <span ng-bind="item.newItem.key | limitTo: 250"></span>
<span ng-bind="item.newItem.key.length > 250 ? '...' :''"></span> <span ng-bind="item.newItem.key.length > 250 ? '...' :''"></span>
</td> </td>
<td width="30%" class="cursor-pointer" title="{{item.oldItem.value}}" <td width="30%" class="cursor-pointer" title="{{item.oldItem.value}}"
ng-click="showText(item.oldItem.value)"> ng-click="showText(item.oldItem.value)">
<span ng-bind="item.oldItem.value | limitTo: 250"></span> <span ng-bind="item.oldItem.value | limitTo: 250"></span>
<span ng-bind="item.oldItem.value.length > 250 ? '...': ''"></span> <span ng-bind="item.oldItem.value.length > 250 ? '...': ''"></span>
</td> </td>
<td width="30%" class="cursor-pointer" title="{{item.newItem.value}}" <td width="30%" class="cursor-pointer" title="{{item.newItem.value}}"
ng-click="showText(item.newItem.value)"> ng-click="showText(item.newItem.value)">
<span ng-bind="item.newItem.value | limitTo: 250"></span> <span ng-bind="item.newItem.value | limitTo: 250"></span>
<span ng-bind="item.newItem.value.length > 250 ? '...': ''"></span> <span ng-bind="item.newItem.value.length > 250 ? '...': ''"></span>
</td> </td>
<td width="18%" title="{{item.newItem.comment}}"> <td width="18%" title="{{item.newItem.comment}}">
<span ng-bind="item.newItem.comment | limitTo: 250"></span> <span ng-bind="item.newItem.comment | limitTo: 250"></span>
<span ng-bind="item.newItem.comment.length > 250 ?'...' : ''"></span> <span ng-bind="item.newItem.comment.length > 250 ?'...' : ''"></span>
</td> </td>
</tr> </tr>
<tr ng-repeat="item in commits.changeSets.deleteItems" <tr ng-repeat="item in commits.changeSets.deleteItems"
ng-show="item.key || item.comment"> ng-show="item.key || item.comment">
<td width="2%"> <td width="2%">
删除 删除
</td> </td>
<td width="20%" title="{{item.key}}"> <td width="20%" title="{{item.key}}">
<span ng-bind="item.key | limitTo: 250"></span> <span ng-bind="item.key | limitTo: 250"></span>
<span ng-bind="item.key.length > 250 ? '...' :''"></span> <span ng-bind="item.key.length > 250 ? '...' :''"></span>
</td> </td>
<td width="30%" title="{{item.value}}"> <td width="30%" title="{{item.value}}">
<span ng-bind="item.value | limitTo: 250"></span> <span ng-bind="item.value | limitTo: 250"></span>
<span ng-bind="item.value.length > 250 ? '...': ''"></span> <span ng-bind="item.value.length > 250 ? '...': ''"></span>
</td> </td>
<td width="30%"> <td width="30%">
</td> </td>
<td width="18%" title="{{item.comment}}"> <td width="18%" title="{{item.comment}}">
<span ng-bind="item.comment | limitTo: 250"></span> <span ng-bind="item.comment | limitTo: 250"></span>
<span ng-bind="item.comment.length > 250 ?'...' : ''"></span> <span ng-bind="item.comment.length > 250 ?'...' : ''"></span>
</td> </td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<!--not properties format--> <!--not properties format-->
<div ng-if="!namespace.isPropertiesFormat"> <div ng-if="!namespace.isPropertiesFormat">
<div ng-repeat="item in commits.changeSets.createItems"> <div ng-repeat="item in commits.changeSets.createItems">
<textarea class="form-control no-radius" rows="20" <textarea class="form-control no-radius" rows="20"
ng-disabled="true" ng-bind="item.value"> ng-disabled="true" ng-bind="item.value">
</textarea> </textarea>
</div> </div>
<div ng-repeat="item in commits.changeSets.updateItems"> <div ng-repeat="item in commits.changeSets.updateItems">
<textarea class="form-control no-radius" rows="20" <textarea class="form-control no-radius" rows="20"
ng-disabled="true" ng-bind="item.newItem.value"> ng-disabled="true" ng-bind="item.newItem.value">
</textarea> </textarea>
</div>
</div> </div>
</div>
</div>
<hr>
</div>
<div class="text-center">
<button type="button" class="btn btn-default" ng-show="!namespace.hasLoadAllCommit"
ng-click="loadCommitHistory(namespace)">加载更多
<span class="glyphicon glyphicon-menu-down"></span></button>
</div>
<div class="empty-container text-center" ng-show="!namespace.commits || !namespace.commits.length">
无更改历史
</div> </div>
<hr>
</div>
<div class="text-center">
<button type="button" class="btn btn-default" ng-show="!namespace.hasLoadAllCommit"
ng-click="loadCommitHistory(namespace)">加载更多
<span class="glyphicon glyphicon-menu-down"></span></button>
</div>
<div class="empty-container text-center" ng-show="!namespace.commits || !namespace.commits.length">
无更改历史
</div> </div>
</div> <!--instance view-->
<!--instance view--> <div class="panel panel-default instance-view" ng-show="namespace.viewType == 'instance'">
<div class="panel panel-default instance-view" ng-show="namespace.viewType == 'instance'"> <div class="panel-heading">
<div class="panel-heading"> <div class="row">
<div class="row">
<div class="col-md-5 col-sm-5"> <div class="col-md-5 col-sm-5">
<small>实例说明:只展示最近一天访问过Apollo的实例</small> <small>实例说明:只展示最近一天访问过Apollo的实例</small>
</div> </div>
<div class="col-md-7 col-sm-7 text-right"> <div class="col-md-7 col-sm-7 text-right">
<div class="btn-group btn-group-sm" role="group"> <div class="btn-group btn-group-sm" role="group">
<button type="button" class="btn btn-default" <button type="button" class="btn btn-default"
ng-class="{'btn-primary':namespace.instanceViewType == 'latest_release'}" ng-class="{'btn-primary':namespace.instanceViewType == 'latest_release'}"
ng-click="switchInstanceViewType(namespace, 'latest_release')"> 使用最新配置的实例 ng-click="switchInstanceViewType(namespace, 'latest_release')"> 使用最新配置的实例
<span class="badge" ng-bind="namespace.latestReleaseInstances.total"></span> <span class="badge" ng-bind="namespace.latestReleaseInstances.total"></span>
</button> </button>
<button type="button" class="btn btn-default" <button type="button" class="btn btn-default"
ng-class="{'btn-primary':namespace.instanceViewType == 'not_latest_release'}" ng-class="{'btn-primary':namespace.instanceViewType == 'not_latest_release'}"
ng-click="switchInstanceViewType(namespace, 'not_latest_release')">使用非最新配置的实例 ng-click="switchInstanceViewType(namespace, 'not_latest_release')">使用非最新配置的实例
<span class="badge" <span class="badge"
ng-bind="namespace.instancesCount - namespace.latestReleaseInstances.total"></span> ng-bind="namespace.instancesCount - namespace.latestReleaseInstances.total"></span>
</button> </button>
<button type="button" class="btn btn-default" <button type="button" class="btn btn-default"
ng-class="{'btn-primary':namespace.instanceViewType == 'all'}" ng-class="{'btn-primary':namespace.instanceViewType == 'all'}"
ng-click="switchInstanceViewType(namespace, 'all')">所有实例 ng-click="switchInstanceViewType(namespace, 'all')">所有实例
<span class="badge" ng-bind="namespace.instancesCount"></span> <span class="badge" ng-bind="namespace.instancesCount"></span>
</button>
</div>
<button class="btn btn-default btn-sm"
data-tooltip="tooltip" data-placement="bottom" title="刷新列表"
ng-click="refreshInstancesInfo(namespace)">
<img src="../../img/refresh.png"/>
</button> </button>
</div> </div>
<button class="btn btn-default btn-sm"
data-tooltip="tooltip" data-placement="bottom" title="刷新列表"
ng-click="refreshInstancesInfo(namespace)">
<img src="../../img/refresh.png"/>
</button>
</div>
</div>
</div> </div>
</div>
<!--latest release instances--> <!--latest release instances-->
<div class="panel-body" ng-show="namespace.instanceViewType == 'latest_release'"> <div class="panel-body" ng-show="namespace.instanceViewType == 'latest_release'">
<div class="panel-default" ng-if="namespace.latestReleaseInstances.total > 0"> <div class="panel-default" ng-if="namespace.latestReleaseInstances.total > 0">
<div class="panel-heading"> <div class="panel-heading">
<a target="_blank" data-tooltip="tooltip" data-placement="bottom" title="查看配置" <a target="_blank" data-tooltip="tooltip" data-placement="bottom" title="查看配置"
href="/config/history.html?#/appid={{appId}}&env={{env}}&clusterName={{cluster}}&namespaceName={{namespace.baseInfo.namespaceName}}&releaseId={{namespace.latestRelease.id}}"> href="/config/history.html?#/appid={{appId}}&env={{env}}&clusterName={{cluster}}&namespaceName={{namespace.baseInfo.namespaceName}}&releaseId={{namespace.latestRelease.id}}">
{{namespace.latestRelease.name}} {{namespace.latestRelease.name}}
</a> </a>
</div> </div>
<table class="table table-bordered table-striped"> <table class="table table-bordered table-striped">
<thead> <thead>
<tr> <tr>
<td>App ID</td> <td>App ID</td>
<td>Cluster Name</td> <td>Cluster Name</td>
<td>Data Center</td> <td>Data Center</td>
<td>IP</td> <td>IP</td>
<td>配置获取时间</td> <td>配置获取时间</td>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr ng-repeat="instance in namespace.latestReleaseInstances.content"> <tr ng-repeat="instance in namespace.latestReleaseInstances.content">
<td width="20%" ng-bind="instance.appId"></td> <td width="20%" ng-bind="instance.appId"></td>
<td width="20%" ng-bind="instance.clusterName"></td> <td width="20%" ng-bind="instance.clusterName"></td>
<td width="20%" ng-bind="instance.dataCenter"></td> <td width="20%" ng-bind="instance.dataCenter"></td>
<td width="20%" ng-bind="instance.ip"></td> <td width="20%" ng-bind="instance.ip"></td>
<td width="20%">{{instance.configs && instance.configs.length ? <td width="20%">{{instance.configs && instance.configs.length ?
(instance.configs[0].releaseDeliveryTime | date: 'yyyy-MM-dd HH:mm:ss') : ''}} (instance.configs[0].releaseDeliveryTime | date: 'yyyy-MM-dd HH:mm:ss') : ''}}
</td> </td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<div class="row text-center" <div class="row text-center"
ng-show="namespace.latestReleaseInstances.content.length < namespace.latestReleaseInstances.total"> ng-show="namespace.latestReleaseInstances.content.length < namespace.latestReleaseInstances.total">
<button class="btn btn-default" ng-click="loadInstanceInfo(namespace)">加载更多</button> <button class="btn btn-default" ng-click="loadInstanceInfo(namespace)">加载更多</button>
</div>
</div> </div>
</div>
<div class="text-center" ng-if="namespace.latestReleaseInstances.total == 0"> <div class="text-center" ng-if="namespace.latestReleaseInstances.total == 0">
无实例信息 无实例信息
</div>
</div> </div>
</div>
<!--not latest release instances--> <!--not latest release instances-->
<div class="panel-body" ng-show="namespace.instanceViewType == 'not_latest_release'"> <div class="panel-body" ng-show="namespace.instanceViewType == 'not_latest_release'">
<div class="panel-default" <div class="panel-default"
ng-if="namespace.instancesCount - namespace.latestReleaseInstances.total > 0" ng-if="namespace.instancesCount - namespace.latestReleaseInstances.total > 0"
ng-repeat="release in namespace.notLatestReleases"> ng-repeat="release in namespace.notLatestReleases">
<div class="panel-heading"> <div class="panel-heading">
<a target="_blank" data-tooltip="tooltip" data-placement="bottom" title="查看配置" <a target="_blank" data-tooltip="tooltip" data-placement="bottom" title="查看配置"
href="/config/history.html?#/appid={{appId}}&env={{env}}&clusterName={{cluster}}&namespaceName={{namespace.baseInfo.namespaceName}}&releaseId={{release.id}}"> href="/config/history.html?#/appid={{appId}}&env={{env}}&clusterName={{cluster}}&namespaceName={{namespace.baseInfo.namespaceName}}&releaseId={{release.id}}">
{{release.name}} {{release.name}}
</a> </a>
</div>
<table class="table table-bordered table-striped">
<thead>
<tr>
<td>App ID</td>
<td>Cluster Name</td>
<td>Data Center</td>
<td>IP</td>
<td>配置获取时间</td>
</tr>
</thead>
<tbody>
<tr ng-repeat="instance in namespace.notLatestReleaseInstances[release.id]">
<td width="20%" ng-bind="instance.appId"></td>
<td width="20%" ng-bind="instance.clusterName"></td>
<td width="20%" ng-bind="instance.dataCenter"></td>
<td width="20%" ng-bind="instance.ip"></td>
<td width="20%">{{instance.configs && instance.configs.length ?
(instance.configs[0].releaseDeliveryTime | date: 'yyyy-MM-dd HH:mm:ss') : ''}}
</td>
</tr>
</tbody>
</table>
</div>
<div class="text-center"
ng-if="namespace.instancesCount - namespace.latestReleaseInstances.total == 0">
无实例信息
</div> </div>
<table class="table table-bordered table-striped">
<thead>
<tr>
<td>App ID</td>
<td>Cluster Name</td>
<td>Data Center</td>
<td>IP</td>
<td>配置获取时间</td>
</tr>
</thead>
<tbody>
<tr ng-repeat="instance in namespace.notLatestReleaseInstances[release.id]">
<td width="20%" ng-bind="instance.appId"></td>
<td width="20%" ng-bind="instance.clusterName"></td>
<td width="20%" ng-bind="instance.dataCenter"></td>
<td width="20%" ng-bind="instance.ip"></td>
<td width="20%">{{instance.configs && instance.configs.length ?
(instance.configs[0].releaseDeliveryTime | date: 'yyyy-MM-dd HH:mm:ss') : ''}}
</td>
</tr>
</tbody>
</table>
</div>
<div class="text-center"
ng-if="namespace.instancesCount - namespace.latestReleaseInstances.total == 0">
无实例信息
</div> </div>
</div>
<!--all instances--> <!--all instances-->
<div class="panel-body" ng-show="namespace.instanceViewType == 'all'"> <div class="panel-body" ng-show="namespace.instanceViewType == 'all'">
<div class="panel-default" ng-if="namespace.instancesCount > 0"> <div class="panel-default" ng-if="namespace.instancesCount > 0">
<table class="table table-bordered table-striped" ng-if="namespace.allInstances"> <table class="table table-bordered table-striped" ng-if="namespace.allInstances">
<thead> <thead>
<tr> <tr>
<td>App ID</td> <td>App ID</td>
<td>Cluster Name</td> <td>Cluster Name</td>
<td>Data Center</td> <td>Data Center</td>
<td>IP</td> <td>IP</td>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr ng-repeat="instance in namespace.allInstances"> <tr ng-repeat="instance in namespace.allInstances">
<td width="25%" ng-bind="instance.appId"></td> <td width="25%" ng-bind="instance.appId"></td>
<td width="25%" ng-bind="instance.clusterName"></td> <td width="25%" ng-bind="instance.clusterName"></td>
<td width="25%" ng-bind="instance.dataCenter"></td> <td width="25%" ng-bind="instance.dataCenter"></td>
<td width="25%" ng-bind="instance.ip"></td> <td width="25%" ng-bind="instance.ip"></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<div class="row text-center" ng-show="namespace.allInstances.length < namespace.instancesCount"> <div class="row text-center" ng-show="namespace.allInstances.length < namespace.instancesCount">
<button class="btn btn-default" ng-click="loadInstanceInfo(namespace)">加载更多</button> <button class="btn btn-default" ng-click="loadInstanceInfo(namespace)">加载更多</button>
</div>
</div>
<div class="text-center" ng-if="namespace.instancesCount == 0">
无实例信息
</div> </div>
</div>
<div class="text-center" ng-if="namespace.instancesCount == 0">
无实例信息
</div> </div>
</div> </div>
</div> </section>
</section> </div>
</section> </section>
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