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
7e1355d1
Commit
7e1355d1
authored
Jul 08, 2016
by
lepdou
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:ctripcorp/apollo
parents
a93ec78b
20abd55d
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
6 deletions
+9
-6
ItemSetService.java
...om/ctrip/framework/apollo/biz/service/ItemSetService.java
+3
-0
ConfigController.java
.../framework/apollo/portal/controller/ConfigController.java
+0
-1
FileTextResolver.java
...k/apollo/portal/service/txtresolver/FileTextResolver.java
+4
-3
NamespaceController.js
...esources/static/scripts/controller/NamespaceController.js
+1
-1
namespace-panel-directive.js
...ces/static/scripts/directive/namespace-panel-directive.js
+1
-1
No files found.
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/service/ItemSetService.java
View file @
7e1355d1
...
...
@@ -50,6 +50,9 @@ public class ItemSetService {
Item
entity
=
BeanUtils
.
transfrom
(
Item
.
class
,
item
);
Item
beforeUpdateItem
=
itemService
.
findOne
(
entity
.
getId
());
if
(
beforeUpdateItem
!=
null
){
beforeUpdateItem
=
BeanUtils
.
transfrom
(
Item
.
class
,
beforeUpdateItem
);
}
entity
.
setDataChangeLastModifiedBy
(
operator
);
Item
updatedItem
=
itemService
.
update
(
entity
);
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/controller/ConfigController.java
View file @
7e1355d1
...
...
@@ -51,7 +51,6 @@ public class ConfigController {
model
.
setEnv
(
env
);
model
.
setNamespaceName
(
namespaceName
);
configService
.
updateConfigItemByText
(
model
);
}
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/service/txtresolver/FileTextResolver.java
View file @
7e1355d1
...
...
@@ -21,19 +21,20 @@ public class FileTextResolver implements ConfigTextResolver {
return
changeSets
;
}
if
(
CollectionUtils
.
isEmpty
(
baseItems
))
{
changeSets
.
addCreateItem
(
createItem
(
namespaceId
,
configText
));
changeSets
.
addCreateItem
(
createItem
(
namespaceId
,
0
,
configText
));
}
else
{
ItemDTO
beforeItem
=
baseItems
.
get
(
0
);
if
(!
configText
.
equals
(
beforeItem
.
getValue
()))
{
//update
changeSets
.
addUpdateItem
(
createItem
(
namespaceId
,
configText
));
changeSets
.
addUpdateItem
(
createItem
(
namespaceId
,
beforeItem
.
getId
(),
configText
));
}
}
return
changeSets
;
}
private
ItemDTO
createItem
(
long
namespaceId
,
String
value
)
{
private
ItemDTO
createItem
(
long
namespaceId
,
long
itemId
,
String
value
)
{
ItemDTO
item
=
new
ItemDTO
();
item
.
setId
(
itemId
);
item
.
setNamespaceId
(
namespaceId
);
item
.
setValue
(
value
);
item
.
setKey
(
ConfigConsts
.
CONFIG_FILE_CONTENT_KEY
);
...
...
apollo-portal/src/main/resources/static/scripts/controller/NamespaceController.js
View file @
7e1355d1
...
...
@@ -112,7 +112,7 @@ namespace_module.controller("LinkNamespaceController",
}
else
{
//private的直接link并且跳转到授权页面
$window
.
location
.
href
=
"/namespace/role.html?#/appid="
+
$scope
.
appId
+
"&namespaceName="
+
$scope
.
appNamespace
.
name
;
+
"&namespaceName="
+
result
.
name
;
}
},
1000
);
},
function
(
result
)
{
...
...
apollo-portal/src/main/resources/static/scripts/directive/namespace-panel-directive.js
View file @
7e1355d1
...
...
@@ -26,7 +26,7 @@ directive_module.directive('apollonspanel',
LOG
:
'log'
};
var
MIN_ROW_SIZE
=
3
0
;
var
MIN_ROW_SIZE
=
1
0
;
scope
.
switchView
=
switchView
;
...
...
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