Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
wrr-cat
apollo
提交
58d59c1f
apollo
项目概览
wrr-cat
/
apollo
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
apollo
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
58d59c1f
编写于
5月 19, 2016
作者:
L
lepdou
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
.
上级
9fe11a24
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
108 addition
and
29 deletion
+108
-29
apollo-portal/src/main/resources/static/config.html
apollo-portal/src/main/resources/static/config.html
+93
-29
apollo-portal/src/main/resources/static/scripts/controller/app/ConfigNamespaceController.js
...tatic/scripts/controller/app/ConfigNamespaceController.js
+1
-0
apollo-portal/src/main/resources/static/scripts/controller/app/ItemCreateController.js
...ces/static/scripts/controller/app/ItemCreateController.js
+14
-0
未找到文件。
apollo-portal/src/main/resources/static/config.html
浏览文件 @
58d59c1f
...
...
@@ -108,7 +108,8 @@
<div
class=
"checkbox"
ng-repeat=
"env in missEnvs"
>
<label>
<input
type=
"checkbox"
name=
"selectedEnvs[]"
value=
"{{env}}"
ng-checked=
"selectedEnvs.indexOf(env) > -1"
ng-click=
"toggleSelection(env)"
><span
ng-bind=
"env"
><span/>
ng-checked=
"selectedEnvs.indexOf(env) > -1"
ng-click=
"toggleSelection(env)"
><span
ng-bind=
"env"
></span>
</label>
</div>
</div>
...
...
@@ -116,7 +117,8 @@
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
关闭
</button>
<button
type=
"button"
class=
"btn btn-primary"
data-dismiss=
"modal"
ng-click=
"createEnvs()"
>
添加
<button
type=
"button"
class=
"btn btn-primary"
data-dismiss=
"modal"
ng-click=
"createEnvs()"
>
添加
</button>
</div>
</div>
...
...
@@ -132,7 +134,8 @@
<div
class=
"row"
>
<div
class=
"col-md-4"
>
<b
ng-bind=
"namespace.namespace.namespaceName"
></b>
<span
class=
"label label-primary"
ng-show=
"namespace.itemModifiedCnt > 0"
>
有修改
<span
class=
"label label-primary"
ng-show=
"namespace.itemModifiedCnt > 0"
>
有修改
<span
class=
"badge"
ng-bind=
"namespace.itemModifiedCnt"
></span></span>
</div>
<div
class=
"col-md-4"
>
...
...
@@ -196,6 +199,12 @@
ng-show=
"namespace.isTextEditing"
ng-click=
"saveDraft(namespace)"
>
<span
class=
"glyphicon glyphicon-ok"
aria-hidden=
"true"
></span>
</a>
<a
data-tooltip=
"tooltip"
data-placement=
"bottom"
title=
"添加配置"
ng-show=
"namespace.viewType == 'table'"
data-toggle=
"modal"
data-target=
"#createItem"
>
<span
class=
"glyphicon glyphicon-plus"
aria-hidden=
"true"
></span>
</a>
</div>
</div>
</header>
...
...
@@ -203,7 +212,8 @@
<!--text view-->
<textarea
class=
"form-control"
rows=
"{{namespace.itemCnt}}"
style=
"border-radius: 0px"
ng-show=
"namespace.viewType == 'text'"
ng-disabled=
"!namespace.isTextEditing"
ng-model=
"namespace.text"
ng-bind=
"namespace.text"
>
ng-disabled=
"!namespace.isTextEditing"
ng-model=
"namespace.text"
ng-bind=
"namespace.text"
>
</textarea>
<!--table view-->
...
...
@@ -231,25 +241,27 @@
</thead>
<tbody>
<tr
title=
"点击查看"
data-toggle=
"modal"
data-target=
"#oldValueModal"
<tr
title=
"点击查看"
data-toggle=
"modal"
data-target=
"#oldValueModal"
ng-repeat=
"config in namespace.items"
ng-class=
"{warning:config.modified}"
ng-if=
"config.item.key"
ng-click=
"watchItem(config.item.key, config.item.value, config.oldValue)"
>
<td
width=
"25%"
>
<td
width=
"25%"
>
<span
ng-bind=
"config.item.key | limitTo: 20"
></span>
<span
ng-bind=
"config.item.key.length > 20 ? '...' :''"
></span>
</td>
<td
width=
"30%"
>
<td
width=
"30%"
>
<span
ng-bind=
"config.item.value | limitTo: 20"
></span>
<span
ng-bind=
"config.item.value.length > 20 ? '...': ''"
></span>
</td>
<td
width=
"20%"
>
<td
width=
"20%"
>
<span
ng-bind=
"config.item.comment | limitTo: 20"
></span>
<span
ng-bind=
"config.item.comment.length > 20 ?'...' : ''"
></span>
</td>
<td
width=
"10%"
ng-bind=
"config.item.lastModifiedBy"
>
</td>
<td
width=
"15%"
ng-bind=
"config.item.lastModifiedTime | date: 'yyyy-MM-dd HH:mm:ss'"
>
<td
width=
"15%"
ng-bind=
"config.item.lastModifiedTime | date: 'yyyy-MM-dd HH:mm:ss'"
>
</td>
</tr>
...
...
@@ -337,12 +349,14 @@
<h4
class=
"modal-title"
>
Commit changes
</h4>
</div>
<div
class=
"modal-body"
>
<textarea
rows=
"4"
class=
"form-control"
style=
"width:570px;"
placeholder=
"Add an optional extended description..."
<textarea
rows=
"4"
class=
"form-control"
style=
"width:570px;"
placeholder=
"Add an optional extended description..."
ng-model=
"commitComment"
></textarea>
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
关闭
</button>
<button
type=
"button"
class=
"btn btn-primary"
data-dismiss=
"modal"
ng-click=
"commitChange()"
>
<button
type=
"button"
class=
"btn btn-primary"
data-dismiss=
"modal"
ng-click=
"commitChange()"
>
提交
</button>
</div>
...
...
@@ -351,7 +365,7 @@
</div>
<!--create release modal-->
<
div
class=
"modal fade"
id=
"releaseModal"
tabindex=
"-1"
role=
"dialog
"
>
<
form
class=
"modal fade form-horizontal"
id=
"releaseModal"
tabindex=
"-1"
role=
"dialog"
ng-submit=
"release()
"
>
<div
class=
"modal-dialog"
role=
"document"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header panel-primary"
>
...
...
@@ -360,22 +374,71 @@
<h4
class=
"modal-title"
>
发布
</h4>
</div>
<div
class=
"modal-body"
>
<div
class=
"form-group"
>
<label
class=
"col-sm-2 control-label"
>
Release Name:
</label>
<div
class=
"col-sm-10"
>
<input
type=
"text"
class=
"form-control"
ng-model=
"key"
ng-required=
"true"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-2 control-label"
>
Key
</label>
<div
class=
"col-sm-10"
>
<input
type=
"text"
class=
"form-control"
ng-model=
"key"
ng-required=
"true"
>
</div>
</div>
<input
type=
"text"
class=
"form-control"
placeholder=
"input release title"
ng-model=
"releaseTitle"
required=
"required
"
>
ng-model=
"releaseTitle"
ng-required=
"true
"
>
<textarea
rows=
"4"
class=
"form-control"
style=
"margin-top: 15px;"
ng-model=
"releaseComment"
placeholder=
"Add an optional extended description..."
></textarea>
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
关闭
</button>
<button
type=
"submit"
class=
"btn btn-primary"
data-dismiss=
"modal"
ng-click=
"release()"
>
提交
<button
type=
"submit"
class=
"btn btn-primary"
>
提交
</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<form
class=
"modal fade form-horizontal"
id=
"createItem"
role=
"dialog"
ng-controller=
"ItemCreateController"
ng-submit=
"create()"
>
<div
class=
"modal-dialog"
role=
"document"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header panel-primary"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-label=
"Close"
><span
aria-hidden=
"true"
>
×
</span></button>
<h4
class=
"modal-title"
>
添加配置项
</h4>
</div>
<div
class=
"modal-body"
>
<div
class=
"form-group"
>
<label
class=
"col-sm-2 control-label"
>
Key
</label>
<div
class=
"col-sm-10"
>
<input
type=
"text"
class=
"form-control"
ng-model=
"key"
ng-required=
"true"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-2 control-label"
>
Value
</label>
<div
class=
"col-sm-10"
>
<input
type=
"text"
class=
"form-control"
ng-model=
"value"
ng-required=
"true"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-2 control-label"
>
Comment
</label>
<div
class=
"col-sm-10"
>
<textarea
class=
"form-control"
ng-model=
"comment"
rows=
"4"
></textarea>
</div>
</div>
</div>
<div
class=
"modal-footer"
>
<button
type=
"submit"
class=
"btn btn-primary"
>
提交
</button>
</div>
</div>
</div>
</form>
</div>
</div>
...
...
@@ -419,6 +482,7 @@
<!--controller-->
<script
type=
"application/javascript"
src=
"scripts/controller/app/ConfigNamespaceController.js"
></script>
<script
type=
"application/javascript"
src=
"scripts/controller/app/ConfigBaseInfoController.js"
></script>
<script
type=
"application/javascript"
src=
"scripts/controller/app/ItemCreateController.js"
></script>
<script
type=
"application/javascript"
src=
"scripts/PageCommon.js"
></script>
...
...
apollo-portal/src/main/resources/static/scripts/controller/app/ConfigNamespaceController.js
浏览文件 @
58d59c1f
...
...
@@ -141,6 +141,7 @@ application_module.controller("ConfigNamespaceController",
releaseNamespace
.
namespace
.
namespaceName
,
$scope
.
releaseTitle
,
$scope
.
releaseComment
).
then
(
function
(
result
)
{
$
(
'
#releaseModal
'
).
modal
(
'
hide
'
);
toastr
.
success
(
"
发布成功
"
);
//refresh all namespace items
$rootScope
.
refreshNamespaces
();
...
...
apollo-portal/src/main/resources/static/scripts/controller/app/ItemCreateController.js
0 → 100644
浏览文件 @
58d59c1f
application_module
.
controller
(
"
ItemCreateController
"
,
[
'
$rootScope
'
,
'
$scope
'
,
'
$location
'
,
'
toastr
'
,
'
AppService
'
,
'
AppUtil
'
,
function
(
$rootScope
,
$scope
,
$location
,
toastr
,
AppService
,
AppUtil
)
{
$scope
.
create
=
function
()
{
console
.
log
(
"
xx
"
);
};
$scope
.
key
=
'
xx
'
;
}]);
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录