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
b676c35d
Commit
b676c35d
authored
Jul 14, 2016
by
lepdou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
88e2987d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
18 deletions
+11
-18
ConfigBaseInfoController.js
...tic/scripts/controller/config/ConfigBaseInfoController.js
+10
-14
ReleaseHistoryController.js
...tic/scripts/controller/config/ReleaseHistoryController.js
+1
-4
No files found.
apollo-portal/src/main/resources/static/scripts/controller/config/ConfigBaseInfoController.js
View file @
b676c35d
...
...
@@ -7,13 +7,12 @@ application_module.controller("ConfigBaseInfoController",
var
appId
=
AppUtil
.
parseParams
(
$location
.
$$url
).
appid
;
//load session storage to recovery scene
var
env
=
sessionStorage
.
getItem
(
appId
+
"+env"
),
clusterName
=
sessionStorage
.
getItem
(
appId
+
"+cluster"
);
var
scene
=
JSON
.
parse
(
sessionStorage
.
getItem
(
appId
));
var
pageContext
=
{
appId
:
appId
,
env
:
env
?
env
:
''
,
clusterName
:
clusterName
?
clusterName
:
'default'
env
:
scene
?
scene
.
env
:
''
,
clusterName
:
scene
?
scene
.
cluster
:
'default'
};
$rootScope
.
pageContext
=
pageContext
;
...
...
@@ -58,8 +57,7 @@ application_module.controller("ConfigBaseInfoController",
parentNode
=
[];
//default selection from session storage or first env & first cluster
if
((
pageContext
.
env
&&
pageContext
.
env
==
env
.
env
&&
pageContext
.
clusterName
==
cluster
.
name
)
||
(
!
pageContext
.
env
&&
envIdx
==
0
&&
clusterIdx
==
0
))
{
if
(
pageContext
.
env
==
env
.
env
&&
pageContext
.
clusterName
==
cluster
.
name
)
{
clusterNode
.
state
=
{};
clusterNode
.
state
.
selected
=
true
;
}
...
...
@@ -94,15 +92,13 @@ application_module.controller("ConfigBaseInfoController",
$rootScope
.
pageContext
.
clusterName
=
data
.
text
;
}
//session storage
//appId+env = env
//appId+cluster = cluster
//storage scene
sessionStorage
.
setItem
(
$rootScope
.
pageContext
.
appId
+
"+env"
,
$rootScope
.
pageContext
.
env
);
sessionStorage
.
setItem
(
$rootScope
.
pageContext
.
appId
+
"+cluster"
,
$rootScope
.
pageContext
.
clusterName
);
$rootScope
.
pageContext
.
appId
,
JSON
.
stringify
({
env
:
$rootScope
.
pageContext
.
env
,
cluster
:
$rootScope
.
pageContext
.
clusterName
})
);
$rootScope
.
refreshNamespaces
();
}
...
...
apollo-portal/src/main/resources/static/scripts/controller/config/ReleaseHistoryController.js
View file @
b676c35d
...
...
@@ -35,10 +35,7 @@ release_history_module.controller("ReleaseHistoryController",
var
hasParseNamepaceType
=
false
;
result
.
forEach
(
function
(
release
)
{
if
(
!
hasParseNamepaceType
){
$scope
.
isTextFile
=
release
.
baseInfo
.
namespaceName
.
indexOf
(
".xml"
)
>
0
||
release
.
baseInfo
.
namespaceName
.
indexOf
(
".json"
)
>
0
||
release
.
baseInfo
.
namespaceName
.
indexOf
(
".yml"
)
>
0
||
release
.
baseInfo
.
namespaceName
.
indexOf
(
".yaml"
)
>
0
;
$scope
.
isTextFile
=
/
([^\s]
+
(?=\.(
json|yaml|yml|xml
)
$
))
/gi
.
test
(
release
.
baseInfo
.
namespaceName
);
hasParseNamepaceType
=
true
;
}
$scope
.
releases
.
push
(
release
);
...
...
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