Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
apollo
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
openSource
apollo
Commits
27e29e67
Commit
27e29e67
authored
Oct 08, 2016
by
zhangle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
config page show tips when app not created
parent
5654fc41
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
42 additions
and
20 deletions
+42
-20
config.html
apollo-portal/src/main/resources/static/config.html
+13
-3
404.png
apollo-portal/src/main/resources/static/img/404.png
+0
-0
ConfigBaseInfoController.js
...tic/scripts/controller/config/ConfigBaseInfoController.js
+23
-16
common-style.css
...-portal/src/main/resources/static/styles/common-style.css
+5
-0
namespace-panel.html
...ain/resources/static/views/component/namespace-panel.html
+1
-1
No files found.
apollo-portal/src/main/resources/static/config.html
View file @
27e29e67
...
@@ -20,8 +20,17 @@
...
@@ -20,8 +20,17 @@
<!--具体配置信息-->
<!--具体配置信息-->
<div
class=
"row config-info-container"
>
<div
class=
"row config-info-container"
>
<!--tag导航-->
<div
ng-controller=
"ConfigBaseInfoController"
>
<div
class=
"col-md-3 col-xs-3 col-sm-3"
ng-controller=
"ConfigBaseInfoController"
>
<div
class=
"J_appNotFound hidden row text-center app-not-found"
ng-show=
"notFoundApp"
>
<img
src=
"img/404.png"
>
<br>
<p>
<span
ng-bind=
"pageContext.appId"
></span>
不存在,
<a
href=
"/app.html"
>
点击创建
</a>
</p>
</div>
<div
class=
"J_appFound hidden col-md-3 col-xs-3 col-sm-3"
ng-show=
"!notFoundApp"
>
<div
id=
"treeview"
></div>
<div
id=
"treeview"
></div>
<!--app info-->
<!--app info-->
<section
class=
"panel"
>
<section
class=
"panel"
>
...
@@ -66,6 +75,7 @@
...
@@ -66,6 +75,7 @@
</div>
</div>
</section>
</section>
<a
class=
"list-group-item"
ng-show=
"missEnvs.length > 0"
ng-click=
"createAppInMissEnv()"
>
<a
class=
"list-group-item"
ng-show=
"missEnvs.length > 0"
ng-click=
"createAppInMissEnv()"
>
<div
class=
"row icon-text icon-plus-orange"
>
<div
class=
"row icon-text icon-plus-orange"
>
<p
class=
"btn-title ng-binding"
>
补缺环境
</p>
<p
class=
"btn-title ng-binding"
>
补缺环境
</p>
...
@@ -99,7 +109,7 @@
...
@@ -99,7 +109,7 @@
</div>
</div>
</div>
<!--namespaces-->
<!--namespaces-->
<div
class=
"col-md-9 col-xs-9 col-sm-9 config-item-container hide"
ng-controller=
"ConfigNamespaceController"
>
<div
class=
"col-md-9 col-xs-9 col-sm-9 config-item-container hide"
ng-controller=
"ConfigNamespaceController"
>
...
...
apollo-portal/src/main/resources/static/img/404.png
0 → 100644
View file @
27e29e67
6.18 KB
apollo-portal/src/main/resources/static/scripts/controller/config/ConfigBaseInfoController.js
View file @
27e29e67
application_module
.
controller
(
"ConfigBaseInfoController"
,
application_module
.
controller
(
"ConfigBaseInfoController"
,
[
'$rootScope'
,
'$scope'
,
'$location'
,
'toastr'
,
'AppService'
,
'PermissionService'
,
[
'$rootScope'
,
'$scope'
,
'$location'
,
'toastr'
,
'AppService'
,
'PermissionService'
,
'AppUtil'
,
'AppUtil'
,
ConfigBaseInfoController
]);
function
(
$rootScope
,
$scope
,
$location
,
toastr
,
AppService
,
PermissionService
,
function
ConfigBaseInfoController
(
$rootScope
,
$scope
,
$location
,
toastr
,
AppService
,
PermissionService
,
AppUtil
)
{
AppUtil
)
{
var
appId
=
AppUtil
.
parseParams
(
$location
.
$$url
).
appid
;
var
appId
=
AppUtil
.
parseParams
(
$location
.
$$url
).
appid
;
...
@@ -40,14 +41,28 @@ application_module.controller("ConfigBaseInfoController",
...
@@ -40,14 +41,28 @@ application_module.controller("ConfigBaseInfoController",
$rootScope
.
pageContext
=
pageContext
;
$rootScope
.
pageContext
=
pageContext
;
////// load cluster nav tree //////
$scope
.
notFoundApp
=
true
;
////// app info //////
AppService
.
load
(
$rootScope
.
pageContext
.
appId
).
then
(
function
(
result
)
{
$scope
.
notFoundApp
=
false
;
$scope
.
appBaseInfo
=
result
;
$scope
.
appBaseInfo
.
orgInfo
=
result
.
orgName
+
'('
+
result
.
orgId
+
')'
;
loadNavTree
();
$
(
".J_appFound"
).
removeClass
(
"hidden"
);
},
function
(
result
)
{
$
(
".J_appNotFound"
).
removeClass
(
"hidden"
);
});
function
loadNavTree
()
{
AppService
.
load_nav_tree
(
$rootScope
.
pageContext
.
appId
).
then
(
function
(
result
)
{
AppService
.
load_nav_tree
(
$rootScope
.
pageContext
.
appId
).
then
(
function
(
result
)
{
var
navTree
=
[];
var
navTree
=
[];
var
nodes
=
AppUtil
.
collectData
(
result
);
var
nodes
=
AppUtil
.
collectData
(
result
);
if
(
!
nodes
||
nodes
.
length
==
0
)
{
if
(
!
nodes
||
nodes
.
length
==
0
)
{
toastr
.
error
(
"加载环境信息出错
"
);
toastr
.
error
(
"系统出错,请重试或联系系统负责人
"
);
return
;
return
;
}
}
//default first env if session storage is empty
//default first env if session storage is empty
...
@@ -149,24 +164,16 @@ application_module.controller("ConfigBaseInfoController",
...
@@ -149,24 +164,16 @@ application_module.controller("ConfigBaseInfoController",
$rootScope
.
envMapClusters
=
envMapClusters
;
$rootScope
.
envMapClusters
=
envMapClusters
;
},
function
(
result
)
{
},
function
(
result
)
{
toastr
.
error
(
AppUtil
.
errorMsg
(
result
),
"加载导航出错"
);
toastr
.
error
(
AppUtil
.
errorMsg
(
result
),
"系统出错,请重试或联系系统负责人"
);
});
////// app info //////
AppService
.
load
(
$rootScope
.
pageContext
.
appId
).
then
(
function
(
result
)
{
$scope
.
appBaseInfo
=
result
;
$scope
.
appBaseInfo
.
orgInfo
=
result
.
orgName
+
'('
+
result
.
orgId
+
')'
;
},
function
(
result
)
{
toastr
.
error
(
AppUtil
.
errorMsg
(
result
),
"加载App信息出错"
);
});
});
}
////// 补缺失的环境 //////
////// 补缺失的环境 //////
$scope
.
missEnvs
=
[];
$scope
.
missEnvs
=
[];
AppService
.
find_miss_envs
(
$rootScope
.
pageContext
.
appId
).
then
(
function
(
result
)
{
AppService
.
find_miss_envs
(
$rootScope
.
pageContext
.
appId
).
then
(
function
(
result
)
{
$scope
.
missEnvs
=
AppUtil
.
collectData
(
result
);
$scope
.
missEnvs
=
AppUtil
.
collectData
(
result
);
},
function
(
result
)
{
},
function
(
result
)
{
console
.
log
(
AppUtil
.
errorMsg
(
result
));
});
});
$scope
.
createAppInMissEnv
=
function
()
{
$scope
.
createAppInMissEnv
=
function
()
{
...
@@ -211,5 +218,5 @@ application_module.controller("ConfigBaseInfoController",
...
@@ -211,5 +218,5 @@ application_module.controller("ConfigBaseInfoController",
$
(
"#masterNoPermissionDialog"
).
modal
(
'show'
);
$
(
"#masterNoPermissionDialog"
).
modal
(
'show'
);
}
}
}]);
}
apollo-portal/src/main/resources/static/styles/common-style.css
View file @
27e29e67
...
@@ -541,3 +541,8 @@ table th {
...
@@ -541,3 +541,8 @@ table th {
border-color
:
#a94442
;
border-color
:
#a94442
;
}
}
.app-not-found
{
padding-top
:
50px
;
font-size
:
18px
;
}
apollo-portal/src/main/resources/static/views/component/namespace-panel.html
View file @
27e29e67
...
@@ -57,7 +57,7 @@
...
@@ -57,7 +57,7 @@
<img
src=
"img/sync.png"
>
<img
src=
"img/sync.png"
>
同步配置
同步配置
</a>
</a>
<a
type=
"button"
class=
"btn btn-d
anger
btn-sm J_tableview_btn"
<a
type=
"button"
class=
"btn btn-d
efault
btn-sm J_tableview_btn"
data-tooltip=
"tooltip"
data-placement=
"bottom"
title=
"您没有任何配置权限,请申请"
data-tooltip=
"tooltip"
data-placement=
"bottom"
title=
"您没有任何配置权限,请申请"
ng-click=
"showNoModifyPermissionDialog()"
ng-click=
"showNoModifyPermissionDialog()"
ng-show=
"!namespace.hasModifyPermission && !namespace.hasReleasePermission"
>
ng-show=
"!namespace.hasModifyPermission && !namespace.hasReleasePermission"
>
...
...
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