You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by da...@apache.org on 2015/05/11 15:11:19 UTC
[1/2] stratos git commit: fix status with API changes
Repository: stratos
Updated Branches:
refs/heads/master 6998c5142 -> 4b332007f
fix status with API changes
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/dbf7d596
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/dbf7d596
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/dbf7d596
Branch: refs/heads/master
Commit: dbf7d596176d4de49e547036171e76b7e78bdc83
Parents: e7cbd33
Author: Dakshika Jayathilaka <si...@gmail.com>
Authored: Mon May 11 18:22:00 2015 +0530
Committer: Dakshika Jayathilaka <si...@gmail.com>
Committed: Mon May 11 18:22:00 2015 +0530
----------------------------------------------------------------------
.../console/controllers/rest/rest_calls.jag | 44 +++++++-------------
1 file changed, 16 insertions(+), 28 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/dbf7d596/components/org.apache.stratos.manager.console/console/controllers/rest/rest_calls.jag
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/controllers/rest/rest_calls.jag b/components/org.apache.stratos.manager.console/console/controllers/rest/rest_calls.jag
index d062389..1fe0df2 100644
--- a/components/org.apache.stratos.manager.console/console/controllers/rest/rest_calls.jag
+++ b/components/org.apache.stratos.manager.console/console/controllers/rest/rest_calls.jag
@@ -31,6 +31,10 @@ RESTCalls = new function(){
return this.send("POST","/networkPartitions", partitionDefinition);
};
+ this.updatePartitionDefinition = function(partitionDefinition){
+ return this.send("PUT","/networkPartitions", partitionDefinition);
+ };
+
this.deployCartridgeDefinition = function(cartridgeDefinition){
return this.send("POST","/cartridges", cartridgeDefinition);
};
@@ -329,28 +333,20 @@ RESTCalls = new function(){
log.error("Error in the programme flow.");
}
if (response.xhr.status >= 200 && response.xhr.status < 300) { //if success
- if(response.data != null && response.data != undefined && parse(response.data).successMessage != undefined) {
- session.put("get-status", { "message": parse(response.data).successMessage , "status": "success" });
- } else {
- session.put("get-status", { "message": "success" , "status": "success" });
- }
+ if(response.data != null && response.data != undefined) {
+ session.put("get-status", { "message": parse(response.data).message , "status": "success" });
+ }
} else if (response.xhr.status >= 300 && response.xhr.status < 400) { //if redirects
if(response.data != null && response.data != undefined) {
- session.put("get-status", { "message": parse(response.data).errorMessage , "status": "warning" } );
- }else{
- session.put("get-status", { "message": response.xhr.status + ' '+ response.xhr.statusText , "status": "warning"});
+ session.put("get-status", { "message": parse(response.data).message , "status": "warning" } );
}
} else if (response.xhr.status >= 400 && response.xhr.status < 500) { //if client error
if(response.data != null && response.data != undefined) {
- session.put("get-status",{ "message": parse(response.data).errorMessage, "status": "warning" } );
- }else{
- session.put("get-status", { "message": response.xhr.status + ' '+ response.xhr.statusText , "status": "warning"});
+ session.put("get-status",{ "message": parse(response.data).message, "status": "error" } );
}
} else if (response.xhr.status >= 500 && response.xhr.status < 600) { //if server error
if(response.data != null && response.data != undefined) {
- session.put("get-status", { "message": parse(response.data).errorMessage, "status": "warning" } );
- }else{
- session.put("get-status", { "message": response.xhr.status + ' '+ response.xhr.statusText , "status": "warning"});
+ session.put("get-status", { "message": parse(response.data).message, "status": "error" } );
}
} else {
session.put("get-status", "Unknown response!");
@@ -390,28 +386,20 @@ RESTCalls = new function(){
log.error("Error in the programme flow.");
}
if (response.xhr.status >= 200 && response.xhr.status < 300) { //if success
- if(response.data != null && response.data != undefined && parse(response.data).successMessage != undefined) {
- session.put("deploy-status", { "message": parse(response.data).successMessage , "status": "success" });
- } else {
- session.put("deploy-status", { "message": "success" , "status": "success" });
- }
+ if(response.data != null && response.data != undefined) {
+ session.put("deploy-status", { "message": parse(response.data).message , "status": "success" });
+ }
} else if (response.xhr.status >= 300 && response.xhr.status < 400) { //if redirects
if(response.data != null && response.data != undefined) {
- session.put("deploy-status",{ "message": parse(response.data).errorMessage, "status": "warning" } );
- }else{
- session.put("deploy-status", { "message": response.xhr.status + ' '+ response.xhr.statusText , "status": "warning"});
+ session.put("deploy-status",{ "message": parse(response.data).message, "status": "warning" } );
}
} else if (response.xhr.status >= 400 && response.xhr.status < 500) { //if client error
if(response.data != null && response.data != undefined) {
- session.put("deploy-status", { "message": parse(response.data).errorMessage, "status": "error"});
- }else{
- session.put("deploy-status", { "message": response.xhr.status + ' '+ response.xhr.statusText , "status": "error"});
+ session.put("deploy-status", { "message": parse(response.data).message, "status": "error"});
}
} else if (response.xhr.status >= 500 && response.xhr.status < 600) { //if server error
if(response.data != null && response.data != undefined) {
- session.put("deploy-status", { "message": parse(response.data).errorMessage, "status": "error"});
- }else{
- session.put("deploy-status", { "message": response.xhr.status + ' '+ response.xhr.statusText , "status": "error"});
+ session.put("deploy-status", { "message": parse(response.data).message, "status": "error"});
}
} else {
session.put("deploy-status", "Unknown response!");
[2/2] stratos git commit: Merge branch 'master' of
https://git-wip-us.apache.org/repos/asf/stratos
Posted by da...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/stratos
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/4b332007
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/4b332007
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/4b332007
Branch: refs/heads/master
Commit: 4b332007f17ca14cedb31282647bb0f0abfa491f
Parents: dbf7d59 6998c51
Author: Dakshika Jayathilaka <si...@gmail.com>
Authored: Mon May 11 18:40:59 2015 +0530
Committer: Dakshika Jayathilaka <si...@gmail.com>
Committed: Mon May 11 18:40:59 2015 +0530
----------------------------------------------------------------------
.../rest/endpoint/api/StratosApiV41.java | 1 +
tools/stratos-installer/conf/setup.conf | 5 ----
tools/stratos-installer/setup.sh | 25 --------------------
tools/stratos-installer/start-servers.sh | 5 ----
4 files changed, 1 insertion(+), 35 deletions(-)
----------------------------------------------------------------------