Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
wrr-cat
apollo
提交
b75a4359
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,发现更多精彩内容 >>
提交
b75a4359
编写于
5月 25, 2016
作者:
L
lepdou
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
优化多处细节&bugfix&表格模式可以删除key
上级
a66c3b41
变更
14
显示空白变更内容
内联
并排
Showing
14 changed file
with
146 addition
and
55 deletion
+146
-55
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/repository/NamespaceRepository.java
.../framework/apollo/biz/repository/NamespaceRepository.java
+1
-1
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/service/NamespaceService.java
.../ctrip/framework/apollo/biz/service/NamespaceService.java
+1
-1
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/api/AdminServiceAPI.java
...om/ctrip/framework/apollo/portal/api/AdminServiceAPI.java
+4
-0
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/controller/PortalConfigController.java
...work/apollo/portal/controller/PortalConfigController.java
+8
-0
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/service/PortalConfigService.java
.../framework/apollo/portal/service/PortalConfigService.java
+3
-0
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/service/txtresolver/PropertyResolver.java
...k/apollo/portal/service/txtresolver/PropertyResolver.java
+0
-4
apollo-portal/src/main/resources/static/config.html
apollo-portal/src/main/resources/static/config.html
+47
-16
apollo-portal/src/main/resources/static/config/sync.html
apollo-portal/src/main/resources/static/config/sync.html
+7
-7
apollo-portal/src/main/resources/static/scripts/app.js
apollo-portal/src/main/resources/static/scripts/app.js
+1
-1
apollo-portal/src/main/resources/static/scripts/controller/app/ConfigNamespaceController.js
...tatic/scripts/controller/app/ConfigNamespaceController.js
+42
-21
apollo-portal/src/main/resources/static/scripts/directive.js
apollo-portal/src/main/resources/static/scripts/directive.js
+1
-1
apollo-portal/src/main/resources/static/scripts/services/ConfigService.js
...c/main/resources/static/scripts/services/ConfigService.js
+17
-0
apollo-portal/src/main/resources/static/styles/common-style.css
...-portal/src/main/resources/static/styles/common-style.css
+6
-3
apollo-portal/src/main/resources/static/vendor/angular/angular-bootstrap-confirm.min.js
...es/static/vendor/angular/angular-bootstrap-confirm.min.js
+8
-0
未找到文件。
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/repository/NamespaceRepository.java
浏览文件 @
b75a4359
...
...
@@ -8,7 +8,7 @@ import com.ctrip.framework.apollo.biz.entity.Namespace;
public
interface
NamespaceRepository
extends
PagingAndSortingRepository
<
Namespace
,
Long
>
{
List
<
Namespace
>
findByAppIdAndClusterName
(
String
appId
,
String
clusterName
);
List
<
Namespace
>
findByAppIdAndClusterName
OrderByIdAsc
(
String
appId
,
String
clusterName
);
Namespace
findByAppIdAndClusterNameAndNamespaceName
(
String
appId
,
String
clusterName
,
String
namespaceName
);
}
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/service/NamespaceService.java
浏览文件 @
b75a4359
...
...
@@ -49,7 +49,7 @@ public class NamespaceService {
}
public
List
<
Namespace
>
findNamespaces
(
String
appId
,
String
clusterName
)
{
List
<
Namespace
>
groups
=
namespaceRepository
.
findByAppIdAndClusterName
(
appId
,
clusterName
);
List
<
Namespace
>
groups
=
namespaceRepository
.
findByAppIdAndClusterName
OrderByIdAsc
(
appId
,
clusterName
);
if
(
groups
==
null
)
{
return
Collections
.
emptyList
();
}
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/api/AdminServiceAPI.java
浏览文件 @
b75a4359
...
...
@@ -121,6 +121,10 @@ public class AdminServiceAPI {
.
format
(
"apps/%s/clusters/%s/namespaces/%s/items"
,
appId
,
clusterName
,
namespace
),
item
,
ItemDTO
.
class
).
getBody
();
}
public
void
deleteItem
(
Env
env
,
long
itemId
){
restTemplate
.
delete
(
getAdminServiceHost
(
env
)
+
"items/"
+
itemId
);
}
}
@Service
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/controller/PortalConfigController.java
浏览文件 @
b75a4359
...
...
@@ -77,6 +77,14 @@ public class PortalConfigController {
return
configService
.
createOrUpdateItem
(
appId
,
Env
.
valueOf
(
env
),
clusterName
,
namespaceName
,
item
);
}
@RequestMapping
(
value
=
"/envs/{env}/items/{itemId}"
,
method
=
RequestMethod
.
DELETE
)
public
void
deleteItem
(
@PathVariable
String
env
,
@PathVariable
long
itemId
){
if
(
itemId
<=
0
){
throw
new
BadRequestException
(
"item id invalid"
);
}
configService
.
deleteItem
(
Env
.
valueOf
(
env
),
itemId
);
}
@RequestMapping
(
value
=
"/apps/{appId}/env/{env}/clusters/{clusterName}/namespaces/{namespaceName}/release"
,
method
=
RequestMethod
.
POST
,
consumes
=
{
"application/json"
})
public
ReleaseDTO
createRelease
(
@PathVariable
String
appId
,
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/service/PortalConfigService.java
浏览文件 @
b75a4359
...
...
@@ -81,7 +81,10 @@ public class PortalConfigService {
item
.
setNamespaceId
(
namespace
.
getId
());
return
itemAPI
.
createOrUpdateItem
(
appId
,
env
,
clusterName
,
namespaceName
,
item
);
}
public
void
deleteItem
(
Env
env
,
long
itemId
){
itemAPI
.
deleteItem
(
env
,
itemId
);
}
/**
* createRelease config items
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/service/txtresolver/PropertyResolver.java
浏览文件 @
b75a4359
...
...
@@ -28,10 +28,6 @@ public class PropertyResolver implements ConfigTextResolver {
@Override
public
ItemChangeSets
resolve
(
long
namespaceId
,
String
configText
,
List
<
ItemDTO
>
baseItems
)
{
if
(
StringUtils
.
isEmpty
(
configText
)){
throw
new
BadRequestException
(
"config text can not be empty"
);
}
Map
<
Integer
,
ItemDTO
>
oldLineNumMapItem
=
BeanUtils
.
mapByKey
(
"lineNum"
,
baseItems
);
Map
<
String
,
ItemDTO
>
oldKeyMapItem
=
BeanUtils
.
mapByKey
(
"key"
,
baseItems
);
...
...
apollo-portal/src/main/resources/static/config.html
浏览文件 @
b75a4359
...
...
@@ -198,7 +198,7 @@
<a
data-tooltip=
"tooltip"
data-placement=
"bottom"
title=
"提交修改"
data-toggle=
"modal"
data-target=
"#commitModal"
ng-show=
"namespace.isTextEditing && namespace.viewType == 'text'"
ng-click=
"s
aveDraft
(namespace)"
>
ng-click=
"s
etCommitNamespace
(namespace)"
>
<span
class=
"glyphicon glyphicon-ok"
aria-hidden=
"true"
></span>
</a>
...
...
@@ -249,17 +249,17 @@
<tr
ng-repeat=
"config in namespace.items"
ng-class=
"{warning:config.isModified}"
ng-if=
"config.item.key"
>
<td
width=
"20%"
>
<span
ng-bind=
"config.item.key | limitTo: 20"
></span>
<span
ng-bind=
"config.item.key.length > 20 ? '...' :''"
></span>
<td
width=
"20%"
title=
"{{config.item.key}}"
>
<span
ng-bind=
"config.item.key | limitTo: 2
5
0"
></span>
<span
ng-bind=
"config.item.key.length > 2
5
0 ? '...' :''"
></span>
</td>
<td
width=
"25%"
>
<span
ng-bind=
"config.item.value | limitTo: 20"
></span>
<span
ng-bind=
"config.item.value.length > 20 ? '...': ''"
></span>
<td
width=
"25%"
title=
"{{config.item.value}}"
>
<span
ng-bind=
"config.item.value | limitTo: 2
5
0"
></span>
<span
ng-bind=
"config.item.value.length > 2
5
0 ? '...': ''"
></span>
</td>
<td
width=
"20%"
>
<span
ng-bind=
"config.item.comment | limitTo: 20"
></span>
<span
ng-bind=
"config.item.comment.length > 20 ?'...' : ''"
></span>
<td
width=
"20%"
title=
"{{config.item.comment}}"
>
<span
ng-bind=
"config.item.comment | limitTo: 2
5
0"
></span>
<span
ng-bind=
"config.item.comment.length > 2
5
0 ?'...' : ''"
></span>
</td>
<td
width=
"10%"
ng-bind=
"config.item.lastModifiedBy"
>
</td>
...
...
@@ -279,6 +279,12 @@
data-toggle=
"modal"
data-target=
"#itemModal"
ng-click=
"editItem(namespace, config.item)"
>
</span>
<span
class=
"glyphicon glyphicon-remove"
aria-hidden=
"true"
data-toggle=
"modal"
data-target=
"#deleteModal"
data-tooltip=
"tooltip"
data-placement=
"bottom"
title=
"删除"
ng-click=
"preDeleteItem(config.item.id)"
>
</span>
</td>
</tr>
...
...
@@ -358,6 +364,29 @@
</div>
</div>
<!-- delete modal-->
<div
class=
"modal fade"
id=
"deleteModal"
tabindex=
"-1"
role=
"dialog"
>
<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>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
取消
</button>
<button
type=
"button"
class=
"btn btn-danger"
data-dismiss=
"modal"
ng-click=
"deleteItem()"
>
确定
</button>
</div>
</div>
</div>
</div>
<!--create release modal-->
<form
class=
"modal fade form-horizontal"
id=
"releaseModal"
tabindex=
"-1"
role=
"dialog"
ng-submit=
"release()"
>
...
...
@@ -422,24 +451,22 @@
<div
class=
"form-group"
>
<label
class=
"col-sm-2 control-label"
><apollorequiredfiled></apollorequiredfiled>
Value
</label>
<div
class=
"col-sm-10"
>
<textarea
type=
"text"
class=
"form-control"
rows=
"
4
"
ng-model=
"item.value"
ng-required=
"true"
ng-
disabled=
"tableViewOperType =
= 'retrieve'"
>
<textarea
type=
"text"
class=
"form-control"
rows=
"
6
"
ng-model=
"item.value"
ng-required=
"true"
ng-
show=
"tableViewOperType !
= 'retrieve'"
>
</textarea>
<span
ng-bind=
"item.value"
ng-show=
"tableViewOperType == 'retrieve'"
></span>
</div>
</div>
<div
class=
"form-group"
ng-show=
"tableViewOperType == 'retrieve'"
>
<label
class=
"col-sm-2 control-label"
>
Released Value
</label>
<div
class=
"col-sm-10"
>
<textarea
type=
"text"
class=
"form-control"
rows=
"4"
ng-model=
"item.oldValue"
ng-disabled=
"true"
ng-show=
"item.oldVale"
>
</textarea>
<span
ng-show=
"!item.oldVale"
>
这是新增的配置
</span>
</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=
"item.comment"
rows=
"
4
"
<textarea
class=
"form-control"
ng-model=
"item.comment"
rows=
"
2
"
ng-disabled=
"tableViewOperType == 'retrieve'"
>
</textarea>
...
...
@@ -490,11 +517,15 @@
<script
src=
"vendor/angular/angular-resource.min.js"
></script>
<script
src=
"vendor/angular/angular-toastr-1.4.1.tpls.min.js"
></script>
<script
src=
"vendor/angular/loading-bar.min.js"
></script>
<script
src=
"//ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular-sanitize.min.js"
></script>
<script
src=
"//cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/1.3.2/ui-bootstrap-tpls.min.js"
></script>
<script
src=
"vendor/angular/angular-bootstrap-confirm.min.js"
></script>
<!-- bootstrap.js -->
<script
src=
"vendor/bootstrap/js/bootstrap.min.js"
type=
"text/javascript"
></script>
<script
src=
"vendor/bootstrap/js/bootstrap-treeview.min.js"
type=
"text/javascript"
></script>
<!--biz script-->
<script
type=
"application/javascript"
src=
"scripts/app.js"
></script>
...
...
apollo-portal/src/main/resources/static/config/sync.html
浏览文件 @
b75a4359
...
...
@@ -60,7 +60,7 @@
<label
class=
"control-label"
>
需要同步的配置
</label>
</div>
<div
class=
"col-sm-10"
>
<table
class=
"table table-bordered table-striped table-hover"
>
<table
class=
"table table-bordered table-striped table-hover"
>
<thead>
<tr>
<td><input
type=
"checkbox"
ng-click=
"toggleItemsCheckedStatus()"
></td>
...
...
@@ -74,16 +74,16 @@
<td
width=
"10%"
><input
type=
"checkbox"
ng-checked=
"item.checked"
ng-click=
"switchSelect(item)"
></td>
<td
width=
"20%"
>
<span
ng-bind=
"item.key | limitTo:
3
0"
></span>
<span
ng-bind=
"item.key.length >
3
0 ? '...' : ''"
></span>
<span
ng-bind=
"item.key | limitTo:
25
0"
></span>
<span
ng-bind=
"item.key.length >
25
0 ? '...' : ''"
></span>
</td>
<td
width=
"50%"
>
<span
ng-bind=
"item.value | limitTo:
45
"
></span>
<span
ng-bind=
"item.value.length >
45
? '...' : ''"
></span>
<span
ng-bind=
"item.value | limitTo:
250
"
></span>
<span
ng-bind=
"item.value.length >
250
? '...' : ''"
></span>
</td>
<td
width=
"20%"
>
<span
ng-bind=
"item.comment | limitTo:
15
"
></span>
<span
ng-bind=
"item.comment.length >
15
? '...' :''"
></span>
<span
ng-bind=
"item.comment | limitTo:
250
"
></span>
<span
ng-bind=
"item.comment.length >
250
? '...' :''"
></span>
</td>
</tr>
</tbody>
...
...
apollo-portal/src/main/resources/static/scripts/app.js
浏览文件 @
b75a4359
...
...
@@ -11,7 +11,7 @@ var directive_module = angular.module('apollo.directive', ['app.service', 'app.u
// 首页
var
index_module
=
angular
.
module
(
'
index
'
,
[
'
toastr
'
,
'
app.service
'
,
'
app.util
'
,
'
angular-loading-bar
'
]);
//项目主页
var
application_module
=
angular
.
module
(
'
application
'
,
[
'
app.service
'
,
'
apollo.directive
'
,
'
app.util
'
,
'
toastr
'
,
'
angular-loading-bar
'
]);
var
application_module
=
angular
.
module
(
'
application
'
,
[
'
app.service
'
,
'
apollo.directive
'
,
'
app.util
'
,
'
toastr
'
,
'
angular-loading-bar
'
,
'
mwl.confirm
'
]);
//创建项目页面
var
create_app_module
=
angular
.
module
(
'
create_app
'
,
[
'
ngResource
'
,
'
apollo.directive
'
,
'
toastr
'
,
'
app.service
'
,
'
app.util
'
,
'
angular-loading-bar
'
]);
//配置同步页面
...
...
apollo-portal/src/main/resources/static/scripts/controller/app/ConfigNamespaceController.js
浏览文件 @
b75a4359
...
...
@@ -36,11 +36,14 @@ application_module.controller("ConfigNamespaceController",
}
setInterval
(
function
()
{
$
(
'
[data-tooltip="tooltip"]
'
).
tooltip
();
$
(
'
.namespace-view-table
'
).
bind
(
'
mousewheel DOMMouseScroll
'
,
function
(
e
)
{
$
(
'
.namespace-view-table
'
).
bind
(
'
mousewheel DOMMouseScroll
'
,
function
(
e
)
{
var
e0
=
e
.
originalEvent
,
delta
=
e0
.
wheelDelta
||
-
e0
.
detail
;
delta
=
e0
.
wheelDelta
||
-
e0
.
detail
;
this
.
scrollTop
+=
(
delta
<
0
?
1
:
-
1
)
*
30
;
this
.
scrollTop
+=
(
delta
<
0
?
1
:
-
1
)
*
30
;
e
.
preventDefault
();
});
},
2500
);
...
...
@@ -62,6 +65,7 @@ application_module.controller("ConfigNamespaceController",
};
var
MAX_ROW_SIZE
=
30
;
var
APPEND_ROW_SIZE
=
8
;
//把表格内容解析成文本
function
parseModel2Text
(
namespace
)
{
...
...
@@ -80,16 +84,17 @@ application_module.controller("ConfigNamespaceController",
itemCnt
++
;
});
namespace
.
itemCnt
=
itemCnt
>
MAX_ROW_SIZE
?
MAX_ROW_SIZE
:
itemCnt
+
3
;
namespace
.
itemCnt
=
itemCnt
>
MAX_ROW_SIZE
?
MAX_ROW_SIZE
:
itemCnt
+
APPEND_ROW_SIZE
;
return
result
;
}
////// text view oper //////
$scope
.
draft
=
{};
//保存草稿
$scope
.
s
aveDraft
=
function
(
namespace
)
{
$scope
.
draft
=
namespace
;
$scope
.
toCommitNamespace
=
{};
$scope
.
s
etCommitNamespace
=
function
(
namespace
)
{
$scope
.
toCommitNamespace
=
namespace
;
};
$scope
.
commitComment
=
''
;
...
...
@@ -97,16 +102,17 @@ application_module.controller("ConfigNamespaceController",
$scope
.
commitChange
=
function
()
{
ConfigService
.
modify_items
(
$scope
.
pageContext
.
appId
,
$scope
.
pageContext
.
env
,
$scope
.
pageContext
.
clusterName
,
$scope
.
draft
.
namespace
.
namespaceName
,
$scope
.
draft
.
text
,
$scope
.
draft
.
namespace
.
id
,
$scope
.
commitComment
).
then
(
$scope
.
toCommitNamespace
.
namespace
.
namespaceName
,
$scope
.
toCommitNamespace
.
text
,
$scope
.
toCommitNamespace
.
namespace
.
id
,
$scope
.
commitComment
).
then
(
function
(
result
)
{
toastr
.
success
(
"
更新成功
"
);
//refresh all namespace items
$rootScope
.
refreshNamespaces
();
$scope
.
draft
.
backupText
=
''
;
//清空备份文本
$scope
.
toggleTextEditStatus
(
$scope
.
draft
);
$scope
.
toCommitNamespace
.
commited
=
true
;
$scope
.
toggleTextEditStatus
(
$scope
.
toCommitNamespace
);
},
function
(
result
)
{
toastr
.
error
(
AppUtil
.
errorMsg
(
result
),
"
更新失败
"
);
...
...
@@ -117,11 +123,12 @@ application_module.controller("ConfigNamespaceController",
//文本编辑框状态切换
$scope
.
toggleTextEditStatus
=
function
(
namespace
)
{
namespace
.
isTextEditing
=
!
namespace
.
isTextEditing
;
if
(
namespace
.
isTextEditing
)
{
//切换为编辑状态,保存一下原来值
$scope
.
draft
.
backupText
=
namespace
.
text
;
if
(
namespace
.
isTextEditing
)
{
//切换为编辑状态
$scope
.
toCommitNamespace
.
commited
=
false
;
namespace
.
backupText
=
namespace
.
text
;
}
else
{
if
(
$scope
.
draft
.
backupText
)
{
//取消编辑,则复原
namespace
.
text
=
$scope
.
draft
.
backupText
;
if
(
!
$scope
.
toCommitNamespace
.
commited
)
{
//取消编辑,则复原
namespace
.
text
=
namespace
.
backupText
;
}
}
};
...
...
@@ -169,6 +176,20 @@ application_module.controller("ConfigNamespaceController",
$scope
.
item
.
oldValue
=
oldValue
;
};
var
toDeleteItemId
=
0
;
$scope
.
preDeleteItem
=
function
(
itemId
)
{
toDeleteItemId
=
itemId
;
};
$scope
.
deleteItem
=
function
()
{
ConfigService
.
delete_item
(
$rootScope
.
pageContext
.
env
,
toDeleteItemId
).
then
(
function
(
result
)
{
toastr
.
success
(
"
删除成功!
"
);
$rootScope
.
refreshNamespaces
();
},
function
(
result
)
{
toastr
.
error
(
AppUtil
.
errorMsg
(
result
),
"
删除失败
"
);
});
};
var
toOperationNamespaceName
=
''
;
//修改配置
$scope
.
editItem
=
function
(
namespace
,
item
)
{
...
...
apollo-portal/src/main/resources/static/scripts/directive.js
浏览文件 @
b75a4359
/** navbar */
directive_module
.
directive
(
'
apollonav
'
,
function
(
$compile
,
$window
,
AppService
,
EnvService
)
{
directive_module
.
directive
(
'
apollonav
'
,
function
(
$compile
,
$window
,
toastr
,
AppUtil
,
AppService
,
EnvService
)
{
return
{
restrict
:
'
E
'
,
templateUrl
:
'
../views/common/nav.html
'
,
...
...
apollo-portal/src/main/resources/static/scripts/services/ConfigService.js
浏览文件 @
b75a4359
...
...
@@ -35,6 +35,10 @@ appService.service("ConfigService", ['$resource', '$q', function ($resource, $q)
update_item
:
{
method
:
'
PUT
'
,
url
:
'
/apps/:appId/env/:env/clusters/:clusterName/namespaces/:namespaceName/item
'
},
delete_item
:
{
method
:
'
DELETE
'
,
url
:
'
/envs/:env/items/:itemId
'
}
});
...
...
@@ -158,6 +162,19 @@ appService.service("ConfigService", ['$resource', '$q', function ($resource, $q)
d
.
reject
(
result
);
});
return
d
.
promise
;
},
delete_item
:
function
(
env
,
itemId
)
{
var
d
=
$q
.
defer
();
config_source
.
delete_item
({
env
:
env
,
itemId
:
itemId
},
function
(
result
)
{
d
.
resolve
(
result
);
},
function
(
result
)
{
d
.
reject
(
result
);
});
return
d
.
promise
;
}
}
...
...
apollo-portal/src/main/resources/static/styles/common-style.css
浏览文件 @
b75a4359
...
...
@@ -15,6 +15,11 @@ a {
cursor
:
pointer
;
}
td
{
word-wrap
:
break-word
;
word-break
:
break-all
;
}
.logo
{
width
:
150px
;
height
:
50px
;
...
...
@@ -152,8 +157,6 @@ table th {
}
.project-info
td
{
word-wrap
:
break-word
;
word-break
:
break-all
;
border-bottom
:
1px
dotted
gray
;
padding
:
4px
6px
;
}
...
...
@@ -223,7 +226,7 @@ table th {
word-wrap
:
break-word
;
}
.namespace-view-table
.glyphicon
{
.namespace-view-table
.glyphicon
{
cursor
:
pointer
;
}
...
...
apollo-portal/src/main/resources/static/vendor/angular/angular-bootstrap-confirm.min.js
0 → 100644
浏览文件 @
b75a4359
/**
* angular-bootstrap-confirm - Displays a bootstrap confirmation popover when clicking the given element.
* @version v2.1.0
* @link https://github.com/mattlewis92/angular-bootstrap-confirm
* @license MIT
*/
!
function
(
n
,
t
){
"
object
"
==
typeof
exports
&&
"
object
"
==
typeof
module
?
module
.
exports
=
t
(
require
(
"
angular
"
),
require
(
"
angular-sanitize
"
)):
"
function
"
==
typeof
define
&&
define
.
amd
?
define
([
"
angular
"
,
"
angular-sanitize
"
],
t
):
"
object
"
==
typeof
exports
?
exports
.
angularBootstrapConfirmModuleName
=
t
(
require
(
"
angular
"
),
require
(
"
angular-sanitize
"
)):
n
.
angularBootstrapConfirmModuleName
=
t
(
n
.
angular
,
n
[
"
angular-sanitize
"
])}(
this
,
function
(
n
,
t
){
return
function
(
n
){
function
t
(
o
){
if
(
e
[
o
])
return
e
[
o
].
exports
;
var
i
=
e
[
o
]
=
{
exports
:{},
id
:
o
,
loaded
:
!
1
};
return
n
[
o
].
call
(
i
.
exports
,
i
,
i
.
exports
,
t
),
i
.
loaded
=!
0
,
i
.
exports
}
var
e
=
{};
return
t
.
m
=
n
,
t
.
c
=
e
,
t
.
p
=
""
,
t
(
0
)}([
function
(
n
,
t
,
e
){
"
use strict
"
;
var
o
=
e
(
1
),
i
=
e
(
2
);
e
(
3
),
e
(
1
);
var
s
=
"
angular-bootstrap-confirm.html
"
;
n
.
exports
=
o
.
module
(
"
mwl.confirm
"
,[
"
ngSanitize
"
,
"
ui.bootstrap.position
"
]).
run
([
"
$templateCache
"
,
function
(
n
){
n
.
put
(
s
,
i
)}]).
controller
(
"
PopoverConfirmCtrl
"
,[
"
$scope
"
,
"
$rootScope
"
,
"
$element
"
,
"
$attrs
"
,
"
$compile
"
,
"
$document
"
,
"
$window
"
,
"
$timeout
"
,
"
$injector
"
,
"
$templateRequest
"
,
"
$parse
"
,
"
confirmationPopoverDefaults
"
,
function
(
n
,
t
,
e
,
i
,
s
,
r
,
a
,
c
,
l
,
u
,
p
,
f
){
function
m
(
t
,
e
){
o
.
isDefined
(
t
)
&&
p
(
t
).
assign
(
n
,
e
)}
function
d
(
t
,
e
){
return
o
.
isDefined
(
t
)?
p
(
t
)(
n
):
e
}
function
v
(){
var
n
=
y
.
positionElements
(
e
,
x
.
popover
,
i
.
placement
||
x
.
defaults
.
placement
,
!
0
);
n
.
top
+=
"
px
"
,
n
.
left
+=
"
px
"
,
x
.
popover
.
css
(
n
)}
function
b
(){
var
n
=
i
.
focusButton
||
x
.
defaults
.
focusButton
;
if
(
n
){
var
t
=
n
+
"
-button
"
;
x
.
popover
[
0
].
getElementsByClassName
(
t
)[
0
].
focus
()}}
function
$
(){
x
.
isVisible
||
d
(
i
.
isDisabled
,
!
1
)
||
(
x
.
popover
.
css
({
display
:
"
block
"
}),
v
(),
b
(),
x
.
isVisible
=!
0
,
m
(
i
.
isOpen
,
!
0
))}
function
g
(){
x
.
isVisible
&&
(
x
.
popover
.
css
({
display
:
"
none
"
}),
x
.
isVisible
=!
1
,
m
(
i
.
isOpen
,
!
1
))}
function
h
(){
x
.
isVisible
?
g
():
$
(),
n
.
$apply
()}
function
C
(
t
){
!
x
.
isVisible
||
x
.
popover
[
0
].
contains
(
t
.
target
)
||
e
[
0
].
contains
(
t
.
target
)
||
(
g
(),
n
.
$apply
())}
var
x
=
this
;
x
.
defaults
=
f
,
x
.
$attrs
=
i
;
var
B
=
l
.
has
(
"
$uibPosition
"
)?
"
$uibPosition
"
:
"
$position
"
,
y
=
l
.
get
(
B
),
T
=
i
.
templateUrl
||
f
.
templateUrl
,
P
=
t
.
$new
(
!
0
);
P
.
vm
=
x
,
u
(
T
).
then
(
function
(
n
){
x
.
popover
=
o
.
element
(
n
),
x
.
popover
.
css
(
"
display
"
,
"
none
"
),
s
(
x
.
popover
)(
P
),
r
.
find
(
"
body
"
).
append
(
x
.
popover
)}),
x
.
isVisible
=!
1
,
x
.
showPopover
=
$
,
x
.
hidePopover
=
g
,
x
.
togglePopover
=
h
,
x
.
onConfirm
=
function
(){
d
(
i
.
onConfirm
)},
x
.
onCancel
=
function
(){
d
(
i
.
onCancel
)},
n
.
$watch
(
i
.
isOpen
,
function
(
n
){
c
(
function
(){
n
?
$
():
g
()})}),
e
.
bind
(
"
click
"
,
h
),
a
.
addEventListener
(
"
resize
"
,
v
),
r
.
bind
(
"
click
"
,
C
),
r
.
bind
(
"
touchend
"
,
C
),
n
.
$on
(
"
$destroy
"
,
function
(){
x
.
popover
.
remove
(),
e
.
unbind
(
"
click
"
,
h
),
a
.
removeEventListener
(
"
resize
"
,
v
),
r
.
unbind
(
"
click
"
,
C
),
r
.
unbind
(
"
touchend
"
,
C
),
P
.
$destroy
()})}]).
directive
(
"
mwlConfirm
"
,
function
(){
return
{
restrict
:
"
A
"
,
controller
:
"
PopoverConfirmCtrl
"
}}).
value
(
"
confirmationPopoverDefaults
"
,{
confirmText
:
"
Confirm
"
,
cancelText
:
"
Cancel
"
,
confirmButtonType
:
"
success
"
,
cancelButtonType
:
"
default
"
,
placement
:
"
top
"
,
focusButton
:
null
,
templateUrl
:
s
,
hideConfirmButton
:
!
1
,
hideCancelButton
:
!
1
}).
name
},
function
(
t
,
e
){
t
.
exports
=
n
},
function
(
n
,
t
){
n
.
exports
=
'
<div class="popover" ng-class="vm.$attrs.placement || vm.defaults.placement">
\n
<div class="arrow"></div>
\n
<h3 class="popover-title" ng-bind-html="vm.$attrs.title"></h3>
\n
<div class="popover-content">
\n
<p ng-bind-html="vm.$attrs.message"></p>
\n
<div class="row">
\n
<div
\n
class="col-xs-6"
\n
ng-if="!vm.$attrs.hideConfirmButton && !vm.defaults.hideConfirmButton"
\n
ng-class="{
\'
col-xs-offset-3
\'
: vm.$attrs.hideCancelButton || vm.defaults.hideCancelButton}">
\n
<button
\n
class="btn btn-block confirm-button"
\n
ng-class="
\'
btn-
\'
+ (vm.$attrs.confirmButtonType || vm.defaults.confirmButtonType)"
\n
ng-click="vm.onConfirm(); vm.hidePopover()"
\n
ng-bind-html="vm.$attrs.confirmText || vm.defaults.confirmText">
\n
</button>
\n
</div>
\n
<div
\n
class="col-xs-6"
\n
ng-if="!vm.$attrs.hideCancelButton && !vm.defaults.hideCancelButton"
\n
ng-class="{
\'
col-xs-offset-3
\'
: vm.$attrs.hideConfirmButton || vm.defaults.hideConfirmButton}">
\n
<button
\n
class="btn btn-block cancel-button"
\n
ng-class="
\'
btn-
\'
+ (vm.$attrs.cancelButtonType || vm.defaults.cancelButtonType)"
\n
ng-click="vm.onCancel(); vm.hidePopover()"
\n
ng-bind-html="vm.$attrs.cancelText || vm.defaults.cancelText">
\n
</button>
\n
</div>
\n
</div>
\n
</div>
\n
</div>
\n
'
},
function
(
n
,
e
){
n
.
exports
=
t
}])});
//# sourceMappingURL=angular-bootstrap-confirm.min.js.map
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录