Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
apollo
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
apollo
Commits
725dd069
Commit
725dd069
authored
Nov 29, 2018
by
乐兜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hidden namespace's body when namespace's size bigger than 2
parent
f1ead47e
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
49 additions
and
50 deletions
+49
-50
apollo-portal/src/main/resources/static/config.html
apollo-portal/src/main/resources/static/config.html
+1
-0
apollo-portal/src/main/resources/static/login.html
apollo-portal/src/main/resources/static/login.html
+0
-1
apollo-portal/src/main/resources/static/scripts/controller/config/ConfigNamespaceController.js
...ic/scripts/controller/config/ConfigNamespaceController.js
+1
-0
apollo-portal/src/main/resources/static/scripts/directive/namespace-panel-directive.js
...ces/static/scripts/directive/namespace-panel-directive.js
+5
-5
apollo-portal/src/main/resources/static/styles/common-style.css
...-portal/src/main/resources/static/styles/common-style.css
+1
-3
apollo-portal/src/main/resources/static/views/component/namespace-panel-branch-tab.html
...es/static/views/component/namespace-panel-branch-tab.html
+11
-17
apollo-portal/src/main/resources/static/views/component/namespace-panel-header.html
...ources/static/views/component/namespace-panel-header.html
+28
-11
apollo-portal/src/main/resources/static/views/component/namespace-panel-master-tab.html
...es/static/views/component/namespace-panel-master-tab.html
+2
-13
No files found.
apollo-portal/src/main/resources/static/config.html
View file @
725dd069
...
@@ -214,6 +214,7 @@
...
@@ -214,6 +214,7 @@
pre-delete-item=
"preDeleteItem"
pre-delete-item=
"preDeleteItem"
show-text=
"showText"
show-text=
"showText"
show-no-modify-permission-dialog=
"showNoModifyPermissionDialog"
show-no-modify-permission-dialog=
"showNoModifyPermissionDialog"
show-body=
"namespaces.length == 1"
pre-create-branch=
"preCreateBranch"
pre-create-branch=
"preCreateBranch"
pre-delete-branch=
"preDeleteBranch"
>
pre-delete-branch=
"preDeleteBranch"
>
</apollonspanel>
</apollonspanel>
...
...
apollo-portal/src/main/resources/static/login.html
View file @
725dd069
...
@@ -7,7 +7,6 @@
...
@@ -7,7 +7,6 @@
<link
rel=
"stylesheet"
type=
"text/css"
href=
"vendor/bootstrap/css/bootstrap.min.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"vendor/bootstrap/css/bootstrap.min.css"
>
<link
rel=
"stylesheet"
href=
"vendor/font-awesome.min.css"
>
<link
rel=
"stylesheet"
href=
"vendor/font-awesome.min.css"
>
<style
type=
"text/css"
>
<style
type=
"text/css"
>
@import
url(https://fonts.googleapis.com/css?family=Roboto:400,300,100,700,500)
;
body
{
body
{
padding-top
:
90px
;
padding-top
:
90px
;
...
...
apollo-portal/src/main/resources/static/scripts/controller/config/ConfigNamespaceController.js
View file @
725dd069
...
@@ -129,6 +129,7 @@ function controller($rootScope, $scope, toastr, AppUtil, EventManager, ConfigSer
...
@@ -129,6 +129,7 @@ function controller($rootScope, $scope, toastr, AppUtil, EventManager, ConfigSer
$scope
.
namespaces
.
forEach
(
function
(
namespace
,
index
)
{
$scope
.
namespaces
.
forEach
(
function
(
namespace
,
index
)
{
if
(
namespace
.
baseInfo
.
namespaceName
==
result
.
baseInfo
.
namespaceName
)
{
if
(
namespace
.
baseInfo
.
namespaceName
==
result
.
baseInfo
.
namespaceName
)
{
$scope
.
namespaces
[
index
]
=
result
;
$scope
.
namespaces
[
index
]
=
result
;
$scope
.
namespaces
[
index
].
showNamespaceBody
=
true
;
}
}
});
});
...
...
apollo-portal/src/main/resources/static/scripts/directive/namespace-panel-directive.js
View file @
725dd069
...
@@ -21,7 +21,8 @@ function directive($window, toastr, AppUtil, EventManager, PermissionService, Na
...
@@ -21,7 +21,8 @@ function directive($window, toastr, AppUtil, EventManager, PermissionService, Na
showNoModifyPermissionDialog
:
'
=
'
,
showNoModifyPermissionDialog
:
'
=
'
,
preCreateBranch
:
'
=
'
,
preCreateBranch
:
'
=
'
,
preDeleteBranch
:
'
=
'
,
preDeleteBranch
:
'
=
'
,
showMergeAndPublishGrayTips
:
'
=
'
showMergeAndPublishGrayTips
:
'
=
'
,
showBody
:
"
=?
"
},
},
link
:
function
(
scope
)
{
link
:
function
(
scope
)
{
...
@@ -89,8 +90,9 @@ function directive($window, toastr, AppUtil, EventManager, PermissionService, Na
...
@@ -89,8 +90,9 @@ function directive($window, toastr, AppUtil, EventManager, PermissionService, Na
namespace
.
displayControl
=
{
namespace
.
displayControl
=
{
currentOperateBranch
:
'
master
'
,
currentOperateBranch
:
'
master
'
,
showSearchInput
:
false
,
showSearchInput
:
false
,
show
:
true
show
:
scope
.
showBody
};
};
scope
.
showNamespaceBody
=
namespace
.
showNamespaceBody
?
true
:
scope
.
showBody
;
namespace
.
viewItems
=
namespace
.
items
;
namespace
.
viewItems
=
namespace
.
items
;
namespace
.
isPropertiesFormat
=
namespace
.
format
==
'
properties
'
;
namespace
.
isPropertiesFormat
=
namespace
.
format
==
'
properties
'
;
namespace
.
isTextEditing
=
false
;
namespace
.
isTextEditing
=
false
;
...
@@ -380,10 +382,8 @@ function directive($window, toastr, AppUtil, EventManager, PermissionService, Na
...
@@ -380,10 +382,8 @@ 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
.
showNamespaceBody
=
true
;
scope
.
namespace
.
displayControl
.
show
=
true
;
}
}
scope
.
namespace
.
displayControl
.
currentOperateBranch
=
branchName
;
scope
.
namespace
.
displayControl
.
currentOperateBranch
=
branchName
;
...
...
apollo-portal/src/main/resources/static/styles/common-style.css
View file @
725dd069
...
@@ -407,9 +407,7 @@ table th {
...
@@ -407,9 +407,7 @@ table th {
}
}
.namespace-panel
.namespace-attribute-public
{
.namespace-panel
.namespace-attribute-public
{
background
:
#31708f
;
margin-right
:
5px
;
width
:
40px
;
cursor
:
pointer
;
}
}
.namespace-panel
.second-panel-heading
.nav-tabs
{
.namespace-panel
.second-panel-heading
.nav-tabs
{
...
...
apollo-portal/src/main/resources/static/views/component/namespace-panel-branch-tab.html
View file @
725dd069
...
@@ -8,21 +8,15 @@
...
@@ -8,21 +8,15 @@
<span
class=
"cursor-pointer"
<span
class=
"cursor-pointer"
data-toggle=
"collapse"
data-target=
"#BODY{{namespace.branch.id}}"
aria-expanded=
"false"
data-toggle=
"collapse"
data-target=
"#BODY{{namespace.branch.id}}"
aria-expanded=
"false"
ng-click=
"namespace.branch.displayControl.show = !namespace.branch.displayControl.show"
>
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>
<
span
class=
"label label-info no-radius namespace-label"
ng-bind=
"namespace.format"
></span
>
<
b
class=
"namespace-name"
ng-bind=
"namespace.viewName"
></b
>
<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"
>
有修改
<span
class=
"badge label badge-white namespace-label"
<span
class=
"badge label badge-white namespace-label"
ng-bind=
"namespace.branch.itemModifiedCnt"
></span>
ng-bind=
"namespace.branch.itemModifiedCnt"
></span>
</span>
</span>
<span
class=
"label label-primary no-radius namespace-label"
<span
class=
"label label-primary no-radius namespace-label"
ng-show=
"namespace.branch.lockOwner"
>
当前修改者:
ng-show=
"namespace.branch.lockOwner"
>
当前修改者:
<span
ng-bind=
"namespace.branch.lockOwner"
></span>
<span
ng-bind=
"namespace.branch.lockOwner"
></span>
</span>
</span>
</div>
</div>
...
@@ -52,7 +46,7 @@
...
@@ -52,7 +46,7 @@
</header>
</header>
<div
id=
"BODY{{namespace.branch.id}}"
class=
"collapse in
"
>
<div
id=
"BODY{{namespace.branch.id}}"
ng-class=
"{'collapse in': showNamespaceBody, 'collapse' : !showNamespaceBody}
"
>
<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.isConfigHidden"
>
ng-show=
"namespace.isConfigHidden"
>
<span
style=
"color: red"
>
您不是该项目的管理员,也没有该Namespace的编辑或发布权限,无法查看配置信息。
</span>
<span
style=
"color: red"
>
您不是该项目的管理员,也没有该Namespace的编辑或发布权限,无法查看配置信息。
</span>
...
@@ -262,11 +256,11 @@
...
@@ -262,11 +256,11 @@
<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"
ng-if=
"config.isModified && config.oldValue && !config.isDeleted"
ng-if=
"config.isModified && config.oldValue && !config.isDeleted"
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>
...
...
apollo-portal/src/main/resources/static/views/component/namespace-panel-header.html
View file @
725dd069
<header
class=
"row namespace-attribute-panel"
>
<header
class=
"row namespace-attribute-panel"
>
<div
class=
"text-center namespace-attribute-public"
>
<div
class=
"row"
>
<span
data-tooltip=
"tooltip"
data-placement=
"bottom"
<div
class=
"col-md-6"
style=
"padding-bottom:5px;"
>
title=
"私有namespace({{namespace.baseInfo.namespaceName}})的配置只能被AppId为{{appId}}的客户端读取到"
<span
class=
"text-center namespace-attribute-public label label-primary no-radius"
>
ng-show=
"!namespace.isPublic"
>
私有
</span>
<span
data-tooltip=
"tooltip"
data-placement=
"bottom"
title=
"私有namespace({{namespace.baseInfo.namespaceName}})的配置只能被AppId为{{appId}}的客户端读取到"
ng-show=
"!namespace.isPublic"
>
私有
</span>
<span
data-tooltip=
"tooltip"
data-placement=
"top"
<span
data-tooltip=
"tooltip"
data-placement=
"top"
title=
"namespace({{namespace.baseInfo.namespaceName}})的配置能被任何客户端读取到"
title=
"namespace({{namespace.baseInfo.namespaceName}})的配置能被任何客户端读取到"
ng-show=
"namespace.isPublic && namespace.parentAppId == namespace.baseInfo.appId"
>
公共
</span>
ng-show=
"namespace.isPublic && namespace.parentAppId == namespace.baseInfo.appId"
>
公共
</span>
<span
data-tooltip=
"tooltip"
data-placement=
"top"
<span
data-tooltip=
"tooltip"
data-placement=
"top"
title=
"namespace({{namespace.baseInfo.namespaceName}})的配置将会覆盖公共namespace的配置, 且合并之后的配置只能被AppId为{{appId}}的客户端读取到"
title=
"namespace({{namespace.baseInfo.namespaceName}})的配置将会覆盖公共namespace的配置, 且合并之后的配置只能被AppId为{{appId}}的客户端读取到"
ng-show=
"namespace.isPublic && namespace.isLinkedNamespace"
ng-show=
"namespace.isPublic && namespace.isLinkedNamespace"
ng-click=
"goToParentAppConfigPage(namespace)"
>
关联
</span>
ng-click=
"goToParentAppConfigPage(namespace)"
>
关联
</span>
</span>
<span
class=
"text-center namespace-attribute-public label label-info no-radius"
>
<span
ng-bind=
"namespace.format"
style=
"width:30px;"
></span>
</span>
</div>
<div
class=
"col-md-6 text-right"
style=
"padding-right:23px;"
>
<span
data-toggle=
"collapse"
data-target=
"#BODY{{namespace.branch.id}}"
aria-expanded=
"false"
>
<span
class=
"label no-radius cursor-pointer"
data-toggle=
"collapse"
data-target=
"#BODY{{namespace.id}}"
aria-expanded=
"false"
ng-click=
"showNamespaceBody = !showNamespaceBody"
>
<a
><small>
[展开/收缩]
</small></a>
</span>
</span>
</div>
</div>
</div>
</header>
</header>
...
...
apollo-portal/src/main/resources/static/views/component/namespace-panel-master-tab.html
View file @
725dd069
...
@@ -7,18 +7,7 @@
...
@@ -7,18 +7,7 @@
<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"
>
<span
class=
"cursor-pointer"
<b
class=
"namespace-name"
ng-bind=
"namespace.viewName"
></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-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"
>
有修改
有修改
...
@@ -94,7 +83,7 @@
...
@@ -94,7 +83,7 @@
<div
id=
"BODY{{namespace.id}}"
class=
"collapse in
"
>
<div
id=
"BODY{{namespace.id}}"
ng-class=
"{'collapse in': showNamespaceBody, 'collapse' : !showNamespaceBody}
"
>
<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.isConfigHidden"
>
ng-show=
"namespace.isConfigHidden"
>
<span
style=
"color: red"
>
您不是该项目的管理员,也没有该Namespace的编辑或发布权限,无法查看配置信息。
</span>
<span
style=
"color: red"
>
您不是该项目的管理员,也没有该Namespace的编辑或发布权限,无法查看配置信息。
</span>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment