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
b16ef121
Commit
b16ef121
authored
May 04, 2016
by
lepdou
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #170 from lepdou/lepdou_master
bugfix release name
parents
cfe37bed
cb602922
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
19 additions
and
21 deletions
+19
-21
ReleaseService.java
...ain/java/com/ctrip/apollo/biz/service/ReleaseService.java
+1
-0
NamespaceTextModel.java
...m/ctrip/apollo/portal/entity/form/NamespaceTextModel.java
+1
-10
application.yml
apollo-portal/src/main/resources/application.yml
+1
-1
AppConfigController.js
...rces/static/scripts/controller/app/AppConfigController.js
+3
-2
SyncConfigController.js
...ces/static/scripts/controller/app/SyncConfigController.js
+2
-0
ConfigService.js
...c/main/resources/static/scripts/services/ConfigService.js
+2
-3
app.html
apollo-portal/src/main/resources/static/views/app.html
+3
-2
sync.html
apollo-portal/src/main/resources/static/views/sync.html
+6
-2
ConfigServiceTest.java
.../test/java/com/ctrip/apollo/portal/ConfigServiceTest.java
+0
-1
No files found.
apollo-biz/src/main/java/com/ctrip/apollo/biz/service/ReleaseService.java
View file @
b16ef121
...
...
@@ -67,6 +67,7 @@ public class ReleaseService {
release
.
setReleaseKey
(
ReleaseKeyGenerator
.
generateReleaseKey
(
namespace
));
release
.
setDataChangeCreatedTime
(
new
Date
());
release
.
setDataChangeCreatedBy
(
owner
);
release
.
setDataChangeLastModifiedBy
(
owner
);
release
.
setName
(
name
);
release
.
setComment
(
comment
);
release
.
setAppId
(
namespace
.
getAppId
());
...
...
apollo-portal/src/main/java/com/ctrip/apollo/portal/entity/form/NamespaceTextModel.java
View file @
b16ef121
...
...
@@ -12,12 +12,11 @@ public class NamespaceTextModel implements Verifiable {
private
String
namespaceName
;
private
int
namespaceId
;
private
String
configText
;
private
String
modifyBy
;
private
String
comment
;
@Override
public
boolean
isInvalid
(){
return
StringUtils
.
isContainEmpty
(
appId
,
env
,
clusterName
,
namespaceName
,
configText
,
modifyBy
)
||
namespaceId
<=
0
;
return
StringUtils
.
isContainEmpty
(
appId
,
env
,
clusterName
,
namespaceName
,
configText
)
||
namespaceId
<=
0
;
}
public
String
getAppId
()
{
return
appId
;
...
...
@@ -67,14 +66,6 @@ public class NamespaceTextModel implements Verifiable {
this
.
configText
=
configText
;
}
public
String
getModifyBy
()
{
return
modifyBy
;
}
public
void
setModifyBy
(
String
modifyBy
)
{
this
.
modifyBy
=
modifyBy
;
}
public
String
getComment
()
{
return
comment
;
}
...
...
apollo-portal/src/main/resources/application.yml
View file @
b16ef121
...
...
@@ -17,4 +17,4 @@ ctrip:
apollo
:
portal
:
env
:
dev
env
:
dev
,fat
apollo-portal/src/main/resources/static/scripts/controller/app/AppConfigController.js
View file @
b16ef121
...
...
@@ -159,7 +159,7 @@ application_module.controller("AppConfigController",
$scope
.
commitChange
=
function
()
{
ConfigService
.
modify_items
(
$scope
.
pageContext
.
appId
,
$scope
.
pageContext
.
env
,
$scope
.
pageContext
.
clusterName
,
$scope
.
draft
.
namespace
.
namespaceName
,
$scope
.
draft
.
text
,
$scope
.
draft
.
namespace
.
id
,
$scope
.
commitComment
,
currentUser
).
then
(
$scope
.
draft
.
namespace
.
id
,
$scope
.
commitComment
).
then
(
function
(
result
)
{
toastr
.
success
(
"更新成功"
);
//refresh all namespace items
...
...
@@ -205,10 +205,11 @@ application_module.controller("AppConfigController",
releaseNamespace
=
namespace
;
};
$scope
.
releaseComment
=
''
;
$scope
.
releaseTitle
=
''
;
$scope
.
release
=
function
()
{
ConfigService
.
release
(
$scope
.
pageContext
.
appId
,
$scope
.
pageContext
.
env
,
$scope
.
pageContext
.
clusterName
,
releaseNamespace
.
namespace
.
namespaceName
,
currentUser
,
releaseNamespace
.
namespace
.
namespaceName
,
$scope
.
releaseTitle
,
$scope
.
releaseComment
).
then
(
function
(
result
)
{
toastr
.
success
(
"发布成功"
);
...
...
apollo-portal/src/main/resources/static/scripts/controller/app/SyncConfigController.js
View file @
b16ef121
...
...
@@ -72,7 +72,9 @@ sync_item_module.controller("SyncItemController",
$scope
.
syncItems
=
function
()
{
ConfigService
.
sync_items
(
$scope
.
pageContext
.
namespaceName
,
parseSyncSourceData
()).
then
(
function
(
result
)
{
$scope
.
syncItemStep
+=
1
;
$scope
.
syncSuccess
=
true
;
},
function
(
result
)
{
$scope
.
syncSuccess
=
false
;
toastr
.
error
(
AppUtil
.
errorMsg
(
result
));
});
};
...
...
apollo-portal/src/main/resources/static/scripts/services/ConfigService.js
View file @
b16ef121
...
...
@@ -59,7 +59,7 @@ appService.service("ConfigService", ['$resource', '$q', function ($resource, $q)
return
d
.
promise
;
},
modify_items
:
function
(
appId
,
env
,
clusterName
,
namespaceName
,
configText
,
namespaceId
,
comment
,
modifyBy
)
{
modify_items
:
function
(
appId
,
env
,
clusterName
,
namespaceName
,
configText
,
namespaceId
,
comment
)
{
var
d
=
$q
.
defer
();
config_source
.
modify_items
({
appId
:
appId
,
...
...
@@ -70,8 +70,7 @@ appService.service("ConfigService", ['$resource', '$q', function ($resource, $q)
{
configText
:
configText
,
namespaceId
:
namespaceId
,
comment
:
comment
,
modifyBy
:
modifyBy
comment
:
comment
},
function
(
result
)
{
d
.
resolve
(
result
);
...
...
apollo-portal/src/main/resources/static/views/app.html
View file @
b16ef121
...
...
@@ -334,12 +334,13 @@
<h4
class=
"modal-title"
>
发布
</h4>
</div>
<div
class=
"modal-body"
>
<textarea
rows=
"4"
class=
"form-control"
style=
"width:570px;"
ng-model=
"releaseComment"
<input
type=
"text"
class=
"form-control"
placeholder=
"input release title"
ng-model=
"releaseTitle"
required=
"required"
>
<textarea
rows=
"4"
class=
"form-control"
style=
"margin-top: 15px;"
ng-model=
"releaseComment"
placeholder=
"input release log...."
></textarea>
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
关闭
</button>
<button
type=
"
button
"
class=
"btn btn-primary"
data-dismiss=
"modal"
ng-click=
"release()"
>
提交
<button
type=
"
submit
"
class=
"btn btn-primary"
data-dismiss=
"modal"
ng-click=
"release()"
>
提交
</button>
</div>
</div>
...
...
apollo-portal/src/main/resources/static/views/sync.html
View file @
b16ef121
...
...
@@ -162,9 +162,13 @@
<!--step 3-->
<div
class=
"row text-center"
ng-show=
"syncItemStep == 3"
>
<div
class=
"row text-center"
ng-show=
"syncItemStep == 3
&& syncSuccess
"
>
<img
src=
"../img/sync-succ.png"
style=
"height: 100px; width: 100px"
>
<h3>
同步成功!
</h3>
<h3
>
同步成功!
</h3>
</div>
<div
class=
"row text-center"
ng-show=
"syncItemStep == 3 && !syncSuccess"
>
<img
src=
"../img/sync-error.png"
style=
"height: 100px; width: 100px"
>
<h3
>
同步失败!
</h3>
</div>
</div>
...
...
apollo-portal/src/test/java/com/ctrip/apollo/portal/ConfigServiceTest.java
View file @
b16ef121
...
...
@@ -100,7 +100,6 @@ public class ConfigServiceTest {
NamespaceTextModel
model
=
new
NamespaceTextModel
();
model
.
setEnv
(
"DEV"
);
model
.
setModifyBy
(
"ll"
);
model
.
setNamespaceName
(
namespaceName
);
model
.
setClusterName
(
clusterName
);
model
.
setAppId
(
appId
);
...
...
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