Commit 30424a91 by vss宋顺

Merge branch 'master' into 'release'

portal bugfix and add many tips See merge request !24
parents 47a4fabd 2fd37c26
......@@ -13,6 +13,10 @@ Apollo(配置中心)
Apollo(阿波罗)是携程框架部门研发的配置管理平台,能够集中化管理应用不同环境、不同集群的配置,配置修改后能够实时推送到应用端,并且具备规范的权限、流程治理等特性。
服务端基于Spring Boot和Spring Cloud开发,打包后可以直接运行,不需要额外安装Tomcat等应用容器。
客户端不依赖任何框架,能够运行于所有Java运行时环境。
更多介绍参见[Apollo配置中心介绍](https://github.com/ctripcorp/apollo/wiki/Apollo%E9%85%8D%E7%BD%AE%E4%B8%AD%E5%BF%83%E4%BB%8B%E7%BB%8D)
#Features
......
......@@ -62,6 +62,7 @@
应用负责人</label>
<div class="col-sm-6">
<apollouserselector apollo-id="userSelectWidgetId"></apollouserselector>
<br>
<small>(负责人具有项目管理的最高权限,比如分配配置的修改权,发布权等)</small>
</div>
</div>
......
......@@ -34,6 +34,19 @@
</header>
<div class="panel-body">
<div class="alert alert-info" role="alert">
<strong>Tips:</strong>
<ul>
<li>通过添加集群,可以使同一份程序在不同的集群(如不同的数据中心)使用不同的配置</li>
<li>
Apollo默认会读取机器上/opt/settings/server.properties(linux)或C:\opt\settings\server.properties(windows)文件中的idc属性作为集群名字,
如SHAJQ(金桥数据中心)、SHAOY(欧阳数据中心)
</li>
<li>在这里创建的集群名字需要和机器上server.properties中的idc属性一致</li>
</ul>
</div>
<form class="form-horizontal" name="clusterForm" valdr-type="Cluster" ng-show="step == 1"
ng-submit="create()">
<div class="form-group">
......
......@@ -73,11 +73,24 @@
</a>
<apolloentrance apollo-title="'添加集群'" apollo-img-src="'plus-orange'"
apollo-href="'cluster.html?#/appid=' + pageContext.appId"></apolloentrance>
apollo-href="'cluster.html?#/appid=' + pageContext.appId"
ng-show="hasCreateClusterPermission"></apolloentrance>
<span class="list-group-item cursor-pointer hover" ng-click="showMasterPermissionTips()"
ng-show="!hasCreateClusterPermission">
<div class="row icon-text icon-plus-orange">
<p class="btn-title">添加集群</p>
</div>
</span>
<apolloentrance apollo-title="'添加Namespace'" apollo-img-src="'plus-orange'"
apollo-href="'namespace.html?#/appid=' + pageContext.appId"
ng-show="hasCreateNamespacePermission"></apolloentrance>
<span class="list-group-item cursor-pointer hover" ng-click="showMasterPermissionTips()"
ng-show="!hasCreateNamespacePermission">
<div class="row icon-text icon-plus-orange">
<p class="btn-title">添加Namespace</p>
</div>
</span>
<apolloentrance apollo-title="'项目权限'" apollo-img-src="'user-manage'"
apollo-href="'/app/role.html?#/appid=' + pageContext.appId"
......@@ -124,7 +137,8 @@
pre-release-ns="prepareReleaseNamespace"
create-item="createItem" edit-item="editItem"
pre-delete-item="preDeleteItem" commit-change="commitChange"
pre-rollback="preRollback" show-text="showText"></apollonspanel>
pre-rollback="preRollback" show-text="showText"
show-no-modify-permission-dialog="showNoModifyPermissionDialog"></apollonspanel>
</div>
<!-- delete modal-->
......@@ -132,7 +146,16 @@
apollo-detail="'确定要删除配置吗?'" apollo-confirm="deleteItem"></apolloconfirmdialog>
<apolloconfirmdialog apollo-dialog-id="'releaseNoPermissionDialog'" apollo-title="'发布'"
apollo-detail="'您没有发布权限哦~ 请找 ' + masterUsers + ' 分配权限'"
apollo-detail="'您没有发布权限哦~ 请找项目管理员 ' + masterUsers + ' 分配发布权限'"
apollo-show-cancel-btn="false"></apolloconfirmdialog>
<apolloconfirmdialog apollo-dialog-id="'modifyNoPermissionDialog'" apollo-title="'申请配置权限'"
apollo-detail="'请找项目管理员 ' + masterUsers + ' 分配编辑或发布权限'"
apollo-show-cancel-btn="false"></apolloconfirmdialog>
<apolloconfirmdialog apollo-dialog-id="'masterNoPermissionDialog'" apollo-title="'申请配置权限'"
apollo-detail="'您不是项目管理员, 只有项目管理员才有添加集群、namespace的权限。
如需管理员权限,请找项目管理员 ' + masterUsers + ' 分配管理员权限'"
apollo-show-cancel-btn="false"></apolloconfirmdialog>
<apolloconfirmdialog apollo-dialog-id="'namespaceLockedDialog'" apollo-title="'编辑受限'"
......
......@@ -43,6 +43,13 @@
</header>
<div class="panel-body">
<div class="row" ng-show="syncItemStep == 1">
<div class="alert-info alert">
<strong>Tips:</strong>
<ul>
<li>通过同步配置功能,可以使多个环境、集群间的配置保持一致</li>
<li>需要注意的是,同步完之后需要发布后才会对应用生效</li>
</ul>
</div>
<div class="form-horizontal">
<div class="form-group">
<label class="col-sm-2 control-label">同步的Namespace</label>
......
......@@ -34,6 +34,25 @@
<div class="panel-body">
<div class="alert alert-info" role="alert" ng-show="type == 'link'">
<strong>Tips:</strong>
<ul>
<li>公共namespace所属的应用通过关联公共namespace来配置公共部分的配置</li>
<li>其它应用可以通过关联公共namespace来覆盖公共部分的配置</li>
<li>如果其它应用不需要覆盖公共部分的配置,那么无需关联公共namespace</li>
</ul>
</div>
<div class="alert alert-info" ng-show="type == 'create'">
<strong>Tips:</strong>
<ul>
<li>
通过创建一个公共的namespace可以实现公共组件的配置,或多个应用共享同一份配置的需求
</li>
<li>创建完公共的namespace且关联到当前应用后,就可以配置公共部分的配置了</li>
<li>如果其它应用需要覆盖公共部分的配置,可以在其它应用那里关联公共的namespace,然后在关联的namespace里面配置需要覆盖的配置即可</li>
<li>如果其它应用不需要覆盖公共部分的配置,那么就不需要在其它应用那里关联公共的namespace</li>
</ul>
</div>
<div class="row text-right" style="padding-right: 20px;">
<div class="btn-group btn-group-sm" role="group" aria-label="...">
<button type="button" class="btn btn-default" ng-class="{active:type=='link'}"
......@@ -45,6 +64,7 @@
</div>
</div>
<form class="form-horizontal" name="namespaceForm" valdr-type="AppNamespace"
style="margin-top: 30px;" ng-show="step == 1" ng-submit="createNamespace()">
<div class="form-group">
......@@ -122,7 +142,8 @@
<div class="form-group">
<div class="col-sm-offset-3 col-sm-10">
<button type="submit" class="btn btn-primary"
ng-disabled="(type == 'create' && namespaceForm.$invalid) || submitBtnDisabled">提交
ng-disabled="(type == 'create' && namespaceForm.$invalid) || submitBtnDisabled">
提交
</button>
</div>
</div>
......
......@@ -207,5 +207,9 @@ application_module.controller("ConfigBaseInfoController",
});
$scope.showMasterPermissionTips = function () {
$("#masterNoPermissionDialog").modal('show');
}
}]);
......@@ -17,7 +17,8 @@ directive_module.directive('apollonspanel',
editItem: '=',
preDeleteItem: '=',
commitChange: '=',
showText: '='
showText: '=',
showNoModifyPermissionDialog: '='
},
link: function (scope, element, attrs) {
......
<a class="list-group-item" href="{{href}}">
<a class="list-group-item hover" href="{{href}}">
<div class="row icon-text icon-{{imgSrc}}">
<p class="btn-title">{{title}}</p>
</div>
......
......@@ -57,6 +57,12 @@
<img src="img/sync.png">
同步配置
</a>
<a type="button" class="btn btn-danger btn-sm J_tableview_btn"
data-tooltip="tooltip" data-placement="bottom" title="您没有任何配置权限,请申请"
ng-click="showNoModifyPermissionDialog()"
ng-show="!namespace.hasModifyPermission && !namespace.hasReleasePermission">
申请配置权限
</a>
</div>
</div>
</header>
......
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