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/09 03:11:04 UTC

[1/2] stratos git commit: fix incorrect status return on cartridge not found [jira-1378]

Repository: stratos
Updated Branches:
  refs/heads/master 647cd411a -> dcf405c6a


fix incorrect status return on cartridge not found  [jira-1378]


Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/f5a9ef5c
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/f5a9ef5c
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/f5a9ef5c

Branch: refs/heads/master
Commit: f5a9ef5c0a6fd3817a54e2b6d1a32ea698e0b75f
Parents: 647cd41
Author: Dakshika Jayathilaka <si...@gmail.com>
Authored: Sat May 9 06:17:01 2015 +0530
Committer: Dakshika Jayathilaka <si...@gmail.com>
Committed: Sat May 9 06:17:01 2015 +0530

----------------------------------------------------------------------
 .../java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/f5a9ef5c/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java
index a6637fd..d308e6e 100644
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java
@@ -323,7 +323,7 @@ public class StratosApiV41 extends AbstractApi {
         List<CartridgeBean> cartridges = StratosApiV41Utils.getAvailableCartridges(null, false, getConfigContext());
         if (cartridges == null || cartridges.isEmpty()) {
             return Response.status(Response.Status.NOT_FOUND).entity(new StatusResponseBean(
-                    Response.Status.CONFLICT.getStatusCode(), "No cartridges found")).build();
+                    Response.Status.NOT_FOUND.getStatusCode(), "No cartridges found")).build();
         }
         CartridgeBean[] cartridgeArray = cartridges.toArray(new CartridgeBean[cartridges.size()]);
         return Response.ok().entity(cartridgeArray).build();


[2/2] stratos git commit: update listing with REST API changes

Posted by da...@apache.org.
update listing with REST API changes


Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/dcf405c6
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/dcf405c6
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/dcf405c6

Branch: refs/heads/master
Commit: dcf405c6ac6cf5b0b0baa8ab23aab8c7a9d4971f
Parents: f5a9ef5
Author: Dakshika Jayathilaka <si...@gmail.com>
Authored: Sat May 9 06:39:45 2015 +0530
Committer: Dakshika Jayathilaka <si...@gmail.com>
Committed: Sat May 9 06:39:45 2015 +0530

----------------------------------------------------------------------
 .../console/configure_form.jag                        | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/dcf405c6/components/org.apache.stratos.manager.console/console/configure_form.jag
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/configure_form.jag b/components/org.apache.stratos.manager.console/console/configure_form.jag
index 7a18854..aa6df6b 100644
--- a/components/org.apache.stratos.manager.console/console/configure_form.jag
+++ b/components/org.apache.stratos.manager.console/console/configure_form.jag
@@ -77,7 +77,7 @@ if(isEdit == false && elements.action != 'new') {
             formTitle = "Network Partition",
                     buttonText = "Network Partition";
             list_data = util.RESTCalls.getPartitions();
-            if (list_data && list_data.length === 0) {
+            if (list_data.statusCode == '404') {
                 list_data = null;
             }
             break;
@@ -86,9 +86,7 @@ if(isEdit == false && elements.action != 'new') {
             formTitle = "Auto-scaling Policie",
                     buttonText = "Auto-scaling Policy";
             list_data = util.RESTCalls.getPolicyAutoScales();
-            if (list_data && list_data.length === 0) {
-                list_data = null;
-            }else if(list_data.errorCode == '404'){ //TODO: need to fix this right way
+            if(list_data.statusCode == '404'){
                 list_data = null;
             }
             break;
@@ -97,7 +95,7 @@ if(isEdit == false && elements.action != 'new') {
             formTitle = "Deployment Policie",
                     buttonText = "Deployment Policy";
             list_data = util.RESTCalls.getPolicyDeployments();
-            if (list_data && list_data.length === 0) {
+            if (list_data.statusCode == '404') {
                 list_data = null;
             }
             break;
@@ -106,7 +104,7 @@ if(isEdit == false && elements.action != 'new') {
             formTitle = "Cartridge",
                     buttonText = "Cartridge Definition";
             list_data = util.RESTCalls.getCartridges();
-            if (list_data && list_data.length === 0) {
+            if (list_data.statusCode == '404') {
                 list_data = null;
             }
             break;
@@ -115,7 +113,7 @@ if(isEdit == false && elements.action != 'new') {
             formTitle = "Cartridge Group Definition",
                     buttonText = "Cartridge Group Definition";
             list_data = util.RESTCalls.getGroups();
-            if (list_data && list_data.length === 0) {
+            if (list_data.statusCode == '404') {
                 list_data = null;
             }
             break;
@@ -124,7 +122,7 @@ if(isEdit == false && elements.action != 'new') {
             formTitle = "Kubernetes Cluster",
                     buttonText = "Kubernetes Cluster";
             list_data = util.RESTCalls.getKubernetesClusters();
-            if (list_data == null) {
+            if (list_data.statusCode == '404') {
                 list_data = null; //TODO endpoint doesn't return correct info
             }
             break;