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
11886fc9
Unverified
Commit
11886fc9
authored
Dec 16, 2017
by
张乐
Committed by
GitHub
Dec 16, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #885 from nobodyiam/fix-text-namespace-diff-view
fix text namespace diff view when releaseId is provided in url
parents
deb492eb
a89ad717
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
1 deletion
+16
-1
ReleaseHistoryController.js
...tic/scripts/controller/config/ReleaseHistoryController.js
+16
-1
No files found.
apollo-portal/src/main/resources/static/scripts/controller/config/ReleaseHistoryController.js
View file @
11886fc9
...
...
@@ -71,7 +71,10 @@ function releaseHistoryController($scope, $location, AppUtil,
if
(
$scope
.
pageContext
.
releaseHistoryId
==
history
.
id
)
{
defaultToShowReleaseHistory
=
history
;
}
else
if
(
$scope
.
pageContext
.
releaseId
==
history
.
releaseId
)
{
history
.
viewType
=
CONFIG_VIEW_TYPE
.
ALL
;
// text namespace doesn't support ALL view
if
(
!
$scope
.
isTextNamespace
)
{
history
.
viewType
=
CONFIG_VIEW_TYPE
.
ALL
;
}
defaultToShowReleaseHistory
=
history
;
}
});
...
...
@@ -93,6 +96,9 @@ function releaseHistoryController($scope, $location, AppUtil,
$scope
.
pageContext
.
namespaceName
)
.
then
(
function
(
result
)
{
$scope
.
isTextNamespace
=
result
.
format
!=
"properties"
;
if
(
$scope
.
isTextNamespace
)
{
fixTextNamespaceViewType
();
}
})
}
...
...
@@ -107,6 +113,15 @@ function releaseHistoryController($scope, $location, AppUtil,
}
function
fixTextNamespaceViewType
()
{
$scope
.
releaseHistories
.
forEach
(
function
(
history
)
{
// text namespace doesn't support ALL view
if
(
history
.
viewType
==
CONFIG_VIEW_TYPE
.
ALL
)
{
switchConfigViewType
(
history
,
CONFIG_VIEW_TYPE
.
DIFF
);
}
});
}
function
switchConfigViewType
(
history
,
viewType
)
{
history
.
viewType
=
viewType
;
...
...
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