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
1f8f11b5
Commit
1f8f11b5
authored
May 04, 2016
by
lepdou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
release bugfix
parent
cfe37bed
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
18 additions
and
20 deletions
+18
-20
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
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 @
1f8f11b5
...
@@ -67,6 +67,7 @@ public class ReleaseService {
...
@@ -67,6 +67,7 @@ public class ReleaseService {
release
.
setReleaseKey
(
ReleaseKeyGenerator
.
generateReleaseKey
(
namespace
));
release
.
setReleaseKey
(
ReleaseKeyGenerator
.
generateReleaseKey
(
namespace
));
release
.
setDataChangeCreatedTime
(
new
Date
());
release
.
setDataChangeCreatedTime
(
new
Date
());
release
.
setDataChangeCreatedBy
(
owner
);
release
.
setDataChangeCreatedBy
(
owner
);
release
.
setDataChangeLastModifiedBy
(
owner
);
release
.
setName
(
name
);
release
.
setName
(
name
);
release
.
setComment
(
comment
);
release
.
setComment
(
comment
);
release
.
setAppId
(
namespace
.
getAppId
());
release
.
setAppId
(
namespace
.
getAppId
());
...
...
apollo-portal/src/main/java/com/ctrip/apollo/portal/entity/form/NamespaceTextModel.java
View file @
1f8f11b5
...
@@ -12,12 +12,11 @@ public class NamespaceTextModel implements Verifiable {
...
@@ -12,12 +12,11 @@ public class NamespaceTextModel implements Verifiable {
private
String
namespaceName
;
private
String
namespaceName
;
private
int
namespaceId
;
private
int
namespaceId
;
private
String
configText
;
private
String
configText
;
private
String
modifyBy
;
private
String
comment
;
private
String
comment
;
@Override
@Override
public
boolean
isInvalid
(){
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
()
{
public
String
getAppId
()
{
return
appId
;
return
appId
;
...
@@ -67,14 +66,6 @@ public class NamespaceTextModel implements Verifiable {
...
@@ -67,14 +66,6 @@ public class NamespaceTextModel implements Verifiable {
this
.
configText
=
configText
;
this
.
configText
=
configText
;
}
}
public
String
getModifyBy
()
{
return
modifyBy
;
}
public
void
setModifyBy
(
String
modifyBy
)
{
this
.
modifyBy
=
modifyBy
;
}
public
String
getComment
()
{
public
String
getComment
()
{
return
comment
;
return
comment
;
}
}
...
...
apollo-portal/src/main/resources/static/scripts/controller/app/AppConfigController.js
View file @
1f8f11b5
...
@@ -159,7 +159,7 @@ application_module.controller("AppConfigController",
...
@@ -159,7 +159,7 @@ application_module.controller("AppConfigController",
$scope
.
commitChange
=
function
()
{
$scope
.
commitChange
=
function
()
{
ConfigService
.
modify_items
(
$scope
.
pageContext
.
appId
,
$scope
.
pageContext
.
env
,
$scope
.
pageContext
.
clusterName
,
ConfigService
.
modify_items
(
$scope
.
pageContext
.
appId
,
$scope
.
pageContext
.
env
,
$scope
.
pageContext
.
clusterName
,
$scope
.
draft
.
namespace
.
namespaceName
,
$scope
.
draft
.
text
,
$scope
.
draft
.
namespace
.
namespaceName
,
$scope
.
draft
.
text
,
$scope
.
draft
.
namespace
.
id
,
$scope
.
commitComment
,
currentUser
).
then
(
$scope
.
draft
.
namespace
.
id
,
$scope
.
commitComment
).
then
(
function
(
result
)
{
function
(
result
)
{
toastr
.
success
(
"更新成功"
);
toastr
.
success
(
"更新成功"
);
//refresh all namespace items
//refresh all namespace items
...
@@ -205,10 +205,11 @@ application_module.controller("AppConfigController",
...
@@ -205,10 +205,11 @@ application_module.controller("AppConfigController",
releaseNamespace
=
namespace
;
releaseNamespace
=
namespace
;
};
};
$scope
.
releaseComment
=
''
;
$scope
.
releaseComment
=
''
;
$scope
.
releaseTitle
=
''
;
$scope
.
release
=
function
()
{
$scope
.
release
=
function
()
{
ConfigService
.
release
(
$scope
.
pageContext
.
appId
,
$scope
.
pageContext
.
env
,
ConfigService
.
release
(
$scope
.
pageContext
.
appId
,
$scope
.
pageContext
.
env
,
$scope
.
pageContext
.
clusterName
,
$scope
.
pageContext
.
clusterName
,
releaseNamespace
.
namespace
.
namespaceName
,
currentUser
,
releaseNamespace
.
namespace
.
namespaceName
,
$scope
.
releaseTitle
,
$scope
.
releaseComment
).
then
(
$scope
.
releaseComment
).
then
(
function
(
result
)
{
function
(
result
)
{
toastr
.
success
(
"发布成功"
);
toastr
.
success
(
"发布成功"
);
...
...
apollo-portal/src/main/resources/static/scripts/controller/app/SyncConfigController.js
View file @
1f8f11b5
...
@@ -72,7 +72,9 @@ sync_item_module.controller("SyncItemController",
...
@@ -72,7 +72,9 @@ sync_item_module.controller("SyncItemController",
$scope
.
syncItems
=
function
()
{
$scope
.
syncItems
=
function
()
{
ConfigService
.
sync_items
(
$scope
.
pageContext
.
namespaceName
,
parseSyncSourceData
()).
then
(
function
(
result
)
{
ConfigService
.
sync_items
(
$scope
.
pageContext
.
namespaceName
,
parseSyncSourceData
()).
then
(
function
(
result
)
{
$scope
.
syncItemStep
+=
1
;
$scope
.
syncItemStep
+=
1
;
$scope
.
syncSuccess
=
true
;
},
function
(
result
)
{
},
function
(
result
)
{
$scope
.
syncSuccess
=
false
;
toastr
.
error
(
AppUtil
.
errorMsg
(
result
));
toastr
.
error
(
AppUtil
.
errorMsg
(
result
));
});
});
};
};
...
...
apollo-portal/src/main/resources/static/scripts/services/ConfigService.js
View file @
1f8f11b5
...
@@ -59,7 +59,7 @@ appService.service("ConfigService", ['$resource', '$q', function ($resource, $q)
...
@@ -59,7 +59,7 @@ appService.service("ConfigService", ['$resource', '$q', function ($resource, $q)
return
d
.
promise
;
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
();
var
d
=
$q
.
defer
();
config_source
.
modify_items
({
config_source
.
modify_items
({
appId
:
appId
,
appId
:
appId
,
...
@@ -70,8 +70,7 @@ appService.service("ConfigService", ['$resource', '$q', function ($resource, $q)
...
@@ -70,8 +70,7 @@ appService.service("ConfigService", ['$resource', '$q', function ($resource, $q)
{
{
configText
:
configText
,
configText
:
configText
,
namespaceId
:
namespaceId
,
namespaceId
:
namespaceId
,
comment
:
comment
,
comment
:
comment
modifyBy
:
modifyBy
},
function
(
result
)
{
},
function
(
result
)
{
d
.
resolve
(
result
);
d
.
resolve
(
result
);
...
...
apollo-portal/src/main/resources/static/views/app.html
View file @
1f8f11b5
...
@@ -334,12 +334,13 @@
...
@@ -334,12 +334,13 @@
<h4
class=
"modal-title"
>
发布
</h4>
<h4
class=
"modal-title"
>
发布
</h4>
</div>
</div>
<div
class=
"modal-body"
>
<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>
placeholder=
"input release log...."
></textarea>
</div>
</div>
<div
class=
"modal-footer"
>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
关闭
</button>
<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>
</button>
</div>
</div>
</div>
</div>
...
...
apollo-portal/src/main/resources/static/views/sync.html
View file @
1f8f11b5
...
@@ -162,9 +162,13 @@
...
@@ -162,9 +162,13 @@
<!--step 3-->
<!--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"
>
<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>
</div>
</div>
...
...
apollo-portal/src/test/java/com/ctrip/apollo/portal/ConfigServiceTest.java
View file @
1f8f11b5
...
@@ -100,7 +100,6 @@ public class ConfigServiceTest {
...
@@ -100,7 +100,6 @@ public class ConfigServiceTest {
NamespaceTextModel
model
=
new
NamespaceTextModel
();
NamespaceTextModel
model
=
new
NamespaceTextModel
();
model
.
setEnv
(
"DEV"
);
model
.
setEnv
(
"DEV"
);
model
.
setModifyBy
(
"ll"
);
model
.
setNamespaceName
(
namespaceName
);
model
.
setNamespaceName
(
namespaceName
);
model
.
setClusterName
(
clusterName
);
model
.
setClusterName
(
clusterName
);
model
.
setAppId
(
appId
);
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