Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
superrain51
apollo
提交
8c54b3a7
apollo
项目概览
superrain51
/
apollo
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
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,体验更适合开发者的 AI 搜索 >>
提交
8c54b3a7
编写于
1月 03, 2017
作者:
L
lepdou
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
format json & config.html adapt small screen
上级
3ddf3e6b
变更
12
展开全部
隐藏空白更改
内联
并排
Showing
12 changed file
with
311 addition
and
202 deletion
+311
-202
apollo-portal/src/main/resources/static/config.html
apollo-portal/src/main/resources/static/config.html
+183
-172
apollo-portal/src/main/resources/static/img/hide_sidebar.png
apollo-portal/src/main/resources/static/img/hide_sidebar.png
+0
-0
apollo-portal/src/main/resources/static/img/show_sidebar.png
apollo-portal/src/main/resources/static/img/show_sidebar.png
+0
-0
apollo-portal/src/main/resources/static/scripts/controller/config/ConfigBaseInfoController.js
...tic/scripts/controller/config/ConfigBaseInfoController.js
+26
-0
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/directive.js
.../src/main/resources/static/scripts/directive/directive.js
+1
-0
apollo-portal/src/main/resources/static/scripts/directive/namespace-panel-directive.js
...ces/static/scripts/directive/namespace-panel-directive.js
+2
-2
apollo-portal/src/main/resources/static/scripts/directive/show-text-modal-directive.js
...ces/static/scripts/directive/show-text-modal-directive.js
+16
-0
apollo-portal/src/main/resources/static/styles/common-style.css
...-portal/src/main/resources/static/styles/common-style.css
+33
-1
apollo-portal/src/main/resources/static/views/common/nav.html
...lo-portal/src/main/resources/static/views/common/nav.html
+18
-5
apollo-portal/src/main/resources/static/views/component/namespace-panel-master-tab.html
...es/static/views/component/namespace-panel-master-tab.html
+26
-20
apollo-portal/src/main/resources/static/views/component/show-text-modal.html
...ain/resources/static/views/component/show-text-modal.html
+5
-2
未找到文件。
apollo-portal/src/main/resources/static/config.html
浏览文件 @
8c54b3a7
此差异已折叠。
点击以展开。
apollo-portal/src/main/resources/static/img/hide_sidebar.png
0 → 100644
浏览文件 @
8c54b3a7
3.3 KB
apollo-portal/src/main/resources/static/img/show_sidebar.png
0 → 100644
浏览文件 @
8c54b3a7
3.3 KB
apollo-portal/src/main/resources/static/scripts/controller/config/ConfigBaseInfoController.js
浏览文件 @
8c54b3a7
...
...
@@ -208,6 +208,7 @@ function ConfigBaseInfoController($rootScope, $scope, $location, toastr, EventMa
}));
EventManager
.
emit
(
EventManager
.
EventType
.
REFRESH_NAMESPACE
);
$rootScope
.
showSideBar
=
false
;
}
});
...
...
@@ -298,5 +299,30 @@ function ConfigBaseInfoController($rootScope, $scope, $location, toastr, EventMa
};
}
var
VIEW_MODE_SWITCH_WIDTH
=
1156
;
if
(
window
.
innerWidth
<=
VIEW_MODE_SWITCH_WIDTH
)
{
$rootScope
.
viewMode
=
2
;
$rootScope
.
showSideBar
=
false
;
}
else
{
$rootScope
.
viewMode
=
1
;
}
$rootScope
.
adaptScreenSize
=
function
()
{
if
(
window
.
innerWidth
<=
VIEW_MODE_SWITCH_WIDTH
)
{
$rootScope
.
viewMode
=
2
;
}
else
{
$rootScope
.
viewMode
=
1
;
$rootScope
.
showSideBar
=
false
;
}
};
$
(
window
).
resize
(
function
(){
$scope
.
$apply
(
function
(){
$rootScope
.
adaptScreenSize
();
});
});
}
apollo-portal/src/main/resources/static/scripts/controller/config/ConfigNamespaceController.js
浏览文件 @
8c54b3a7
...
...
@@ -313,6 +313,7 @@ function controller($rootScope, $scope, toastr, AppUtil, EventManager, ConfigSer
}
new
Clipboard
(
'
.clipboard
'
);
}
apollo-portal/src/main/resources/static/scripts/directive/directive.js
浏览文件 @
8c54b3a7
...
...
@@ -8,6 +8,7 @@ directive_module.directive('apollonav',
replace
:
true
,
link
:
function
(
scope
,
element
,
attrs
)
{
scope
.
sourceApps
=
[];
scope
.
copyedApps
=
[];
...
...
apollo-portal/src/main/resources/static/scripts/directive/namespace-panel-directive.js
浏览文件 @
8c54b3a7
...
...
@@ -416,6 +416,8 @@ function directive($window, toastr, AppUtil, EventManager, PermissionService, Na
namespace
.
baseInfo
.
clusterName
,
namespace
.
baseInfo
.
namespaceName
)
.
then
(
function
(
result
)
{
namespace
.
isLatestReleaseLoaded
=
true
;
if
(
!
result
)
{
namespace
.
latestReleaseInstances
=
{};
namespace
.
latestReleaseInstances
.
total
=
0
;
...
...
@@ -430,8 +432,6 @@ function directive($window, toastr, AppUtil, EventManager, PermissionService, Na
namespace
.
latestReleaseInstances
=
result
;
namespace
.
latestReleaseInstancesPage
++
;
})
namespace
.
isLatestReleaseLoaded
=
true
;
});
}
else
{
InstanceService
.
findInstancesByRelease
(
scope
.
env
,
...
...
apollo-portal/src/main/resources/static/scripts/directive/show-text-modal-directive.js
浏览文件 @
8c54b3a7
...
...
@@ -10,7 +10,23 @@ function showTextModalDirective() {
text
:
'
=
'
},
link
:
function
(
scope
)
{
scope
.
$watch
(
'
text
'
,
init
);
function
init
()
{
scope
.
jsonObject
=
undefined
;
if
(
isJsonText
(
scope
.
text
))
{
scope
.
jsonObject
=
JSON
.
parse
(
scope
.
text
);
}
}
function
isJsonText
(
text
)
{
try
{
JSON
.
parse
(
text
);
}
catch
(
e
)
{
return
false
;
}
return
true
;
}
}
}
}
...
...
apollo-portal/src/main/resources/static/styles/common-style.css
浏览文件 @
8c54b3a7
...
...
@@ -207,6 +207,38 @@ table th {
margin-top
:
20px
;
}
.side-bar
{
position
:
absolute
;
width
:
195px
;
top
:
85px
;
left
:
15px
;
margin-bottom
:
25px
;
background
:
#f1f2f7
;
z-index
:
2
;
}
.position-absolute
{
position
:
absolute
;
}
.position-fix
{
position
:
fixed
;
}
.view-mode-1
{
margin-left
:
235px
;
padding-right
:
15px
;
}
.view-mode-2
{
padding
:
0
15px
;
}
.side-bar-switch
{
padding
:
10px
10px
;
margin-right
:
30px
;
}
.node-treeview
{
color
:
#797979
;
}
...
...
@@ -241,7 +273,6 @@ table th {
}
.panel-heading
.header-buttons
{
/*float: right;*/
min-width
:
405px
;
}
...
...
@@ -744,3 +775,4 @@ table th {
.search-focus
{
background
:
#fff
;
}
apollo-portal/src/main/resources/static/views/common/nav.html
浏览文件 @
8c54b3a7
<nav
class=
"navbar navbar-default"
>
<div
class=
"container-fluid"
>
<div
class=
"navbar-header"
>
<img
class=
"navbar-brand side-bar-switch cursor-pointer"
src=
"../../img/show_sidebar.png"
onMouseOver=
"this.style.background='#f1f2f7'"
onMouseOut=
"this.style.background='#fff'"
data-tooltip=
"tooltip"
data-placement=
"bottom"
title=
"显示导航栏"
ng-show=
"viewMode == 2 && !showSideBar"
ng-click=
"showSideBar = !showSideBar"
>
<img
class=
"navbar-brand side-bar-switch cursor-pointer"
src=
"../../img/hide_sidebar.png"
onMouseOver=
"this.style.background='#f1f2f7'"
onMouseOut=
"this.style.background='#fff'"
data-tooltip=
"tooltip"
data-placement=
"bottom"
title=
"隐藏导航栏"
ng-show=
"viewMode == 2 && showSideBar"
ng-click=
"showSideBar = !showSideBar"
>
<a
class=
"navbar-brand logo"
href=
"/"
>
<b>
Apollo 配置中心
</b>
</a>
...
...
@@ -11,14 +22,15 @@
<ul
class=
"nav navbar-nav navbar-right"
>
<li>
<a
href=
"http://conf.ctripcorp.com/display/FRAM/Apollo"
target=
"_blank"
>
<span
class=
"glyphicon glyphicon-question-sign"
></span>
帮助
</a>
<span
class=
"glyphicon glyphicon-question-sign"
></span>
帮助
</a>
</li>
<li
class=
"dropdown"
>
<a
class=
"dropdown-toggle"
data-toggle=
"dropdown"
role=
"button"
aria-haspopup=
"true"
aria-expanded=
"false"
><span
class=
"glyphicon glyphicon-user"
></span>
{{userName}}
<span
class=
"caret"
></span></a>
aria-expanded=
"false"
><span
class=
"glyphicon glyphicon-user"
></span>
{{userName}}
<span
class=
"caret"
></span></a>
<ul
class=
"dropdown-menu"
>
<li><a
href=
"/user/logout"
>
退出
</a></li>
</ul>
...
...
@@ -27,7 +39,8 @@
<div
class=
"navbar-form navbar-right form-inline"
role=
"search"
>
<div
class=
"form-group"
>
<input
type=
"text"
class=
"form-control search-input"
placeholder=
"搜索项目(项目ID、项目名)"
style=
"width: 350px"
<input
type=
"text"
class=
"form-control search-input"
placeholder=
"搜索项目(项目ID、项目名)"
style=
"width: 350px"
ng-model=
"searchKey"
ng-change=
"changeSearchKey()"
ng-focus=
"changeSearchKey()"
>
<div
class=
"row app-list"
ng-show=
"shouldShowAppList"
>
...
...
apollo-portal/src/main/resources/static/views/component/namespace-panel-master-tab.html
浏览文件 @
8c54b3a7
...
...
@@ -736,31 +736,37 @@
<!--instance view-->
<div
class=
"panel panel-default instance-view"
ng-show=
"namespace.viewType == 'instance'"
>
<div
class=
"panel-heading"
>
<div
class=
"row
text-right"
style=
"padding-right: 15px;
"
>
<div
class=
"row"
>
<div
class=
"btn-group btn-group-sm"
role=
"group"
>
<button
type=
"button"
class=
"btn btn-default"
ng-class=
"{'btn-primary':namespace.instanceViewType == 'latest_release'}"
ng-click=
"switchInstanceViewType(namespace, 'latest_release')"
>
使用最新配置的实例
<span
class=
"badge"
ng-bind=
"namespace.latestReleaseInstances.total"
></span>
</button>
<button
type=
"button"
class=
"btn btn-default"
ng-class=
"{'btn-primary':namespace.instanceViewType == 'not_latest_release'}"
ng-click=
"switchInstanceViewType(namespace, 'not_latest_release')"
>
使用非最新配置的实例
<div
class=
"col-md-5"
>
<small>
实例说明:只展示最近一天访问过Apollo的实例
</small>
</div>
<div
class=
"col-md-7 text-right"
>
<div
class=
"btn-group btn-group-sm"
role=
"group"
>
<button
type=
"button"
class=
"btn btn-default"
ng-class=
"{'btn-primary':namespace.instanceViewType == 'latest_release'}"
ng-click=
"switchInstanceViewType(namespace, 'latest_release')"
>
使用最新配置的实例
<span
class=
"badge"
ng-bind=
"namespace.latestReleaseInstances.total"
></span>
</button>
<button
type=
"button"
class=
"btn btn-default"
ng-class=
"{'btn-primary':namespace.instanceViewType == 'not_latest_release'}"
ng-click=
"switchInstanceViewType(namespace, 'not_latest_release')"
>
使用非最新配置的实例
<span
class=
"badge"
ng-bind=
"namespace.instancesCount - namespace.latestReleaseInstances.total"
></span>
</button>
<button
type=
"button"
class=
"btn btn-default"
ng-class=
"{'btn-primary':namespace.instanceViewType == 'all'}"
ng-click=
"switchInstanceViewType(namespace, 'all')"
>
所有实例
<span
class=
"badge"
ng-bind=
"namespace.instancesCount"
></span>
</button>
<button
type=
"button"
class=
"btn btn-default"
ng-class=
"{'btn-primary':namespace.instanceViewType == 'all'}"
ng-click=
"switchInstanceViewType(namespace, 'all')"
>
所有实例
<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>
</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>
...
...
apollo-portal/src/main/resources/static/views/component/show-text-modal.html
浏览文件 @
8c54b3a7
...
...
@@ -7,8 +7,11 @@
<h4
class=
"modal-title"
>
查看
</h4>
</div>
<pre
id=
"watchText"
class=
"modal-body no-radius"
style=
"margin-bottom: 0"
ng-bind=
"text"
>
<pre
class=
"modal-body no-radius"
style=
"margin-bottom: 0"
ng-show=
"!jsonObject"
ng-bind=
"text"
>
</pre>
<pre
class=
"modal-body no-radius"
style=
"margin-bottom: 0"
ng-show=
"jsonObject"
ng-bind=
"jsonObject | json:4"
>
</pre>
</div>
</div>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录