stratos-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject [1/2] git commit: fixing tenant activation issue and password as text in GUI
Date Thu, 06 Feb 2014 11:52:46 GMT
Updated Branches:
  refs/heads/master c35a5f083 -> 10fda6e85


fixing tenant activation issue and password as text in GUI


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

Branch: refs/heads/master
Commit: f47579857bb3f0e2fc211b92c67af2761289a565
Parents: f1d0461
Author: rekathiru <rthirunavukkarasu23@gmail.com>
Authored: Thu Feb 6 17:23:02 2014 +0530
Committer: rekathiru <rthirunavukkarasu23@gmail.com>
Committed: Thu Feb 6 17:23:02 2014 +0530

----------------------------------------------------------------------
 .../console/config/console.json                    |  2 +-
 .../console/controllers/manageTenants.jag          | 17 +++++++++++++++++
 .../themes/theme1/partials/tenant_management.hbs   |  4 ++++
 .../console/themes/theme1/partials/tenant_new.hbs  |  4 ++--
 .../themes/theme1/ui/js/tenant_management.js       | 10 ++++++++--
 .../console/util/utility.jag                       |  9 +++++++++
 6 files changed, 41 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f4757985/components/org.apache.stratos.manager.console/console/config/console.json
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/config/console.json b/components/org.apache.stratos.manager.console/console/config/console.json
index 3e60bd8..049fa30 100644
--- a/components/org.apache.stratos.manager.console/console/config/console.json
+++ b/components/org.apache.stratos.manager.console/console/config/console.json
@@ -1,6 +1,6 @@
 {
     "backendServerConfiguration":{
-        "url":"https://localhost:9443/stratos/admin"
+        "url":"https://localhost:9445/stratos/admin"
     },
 
     "oauthConfiguration":{

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f4757985/components/org.apache.stratos.manager.console/console/controllers/manageTenants.jag
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/controllers/manageTenants.jag
b/components/org.apache.stratos.manager.console/console/controllers/manageTenants.jag
new file mode 100644
index 0000000..64f4fca
--- /dev/null
+++ b/components/org.apache.stratos.manager.console/console/controllers/manageTenants.jag
@@ -0,0 +1,17 @@
+<%
+(function(){
+    var log = new Log("controller.manage.tenants");
+    var utils = require('/util/utility.jag');
+    var tenantDomain = request.getParameter("foo").trim();
+    var state = request.getParameter("state").trim();
+    //log.info("tenant domain: " + tenantDomain + " state is: " + state);
+    if(state == "activate") {
+        utils.consoleAppUtil.activateTenant(tenantDomain);
+        response.sendRedirect(request.getContextPath() + '/tenant_management.jag');
+    } else if(state == "deactivate") {
+        utils.consoleAppUtil.deactivateTenant(tenantDomain);
+        response.sendRedirect(request.getContextPath() + '/tenant_management.jag');
+    }
+
+}());
+%>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f4757985/components/org.apache.stratos.manager.console/console/themes/theme1/partials/tenant_management.hbs
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/themes/theme1/partials/tenant_management.hbs
b/components/org.apache.stratos.manager.console/console/themes/theme1/partials/tenant_management.hbs
index 9fc50ca..7a1164c 100644
--- a/components/org.apache.stratos.manager.console/console/themes/theme1/partials/tenant_management.hbs
+++ b/components/org.apache.stratos.manager.console/console/themes/theme1/partials/tenant_management.hbs
@@ -88,5 +88,9 @@
         </div>
     </div>
 </div>
+<form action="{{url "/controllers/manageTenants.jag"}}" id="manageTenantsForm">
+<input type="hidden" value="" id="foo" name="foo" />
+<input type="hidden" value="" id="state" name="state" />
+</form>
 <script src="{{url "/themes/theme1/ui/js/utils.js"}}"></script>
 <script src="{{url "/themes/theme1/ui/js/tenant_management.js"}}"></script>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f4757985/components/org.apache.stratos.manager.console/console/themes/theme1/partials/tenant_new.hbs
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/themes/theme1/partials/tenant_new.hbs
b/components/org.apache.stratos.manager.console/console/themes/theme1/partials/tenant_new.hbs
index ad88283..743738e 100644
--- a/components/org.apache.stratos.manager.console/console/themes/theme1/partials/tenant_new.hbs
+++ b/components/org.apache.stratos.manager.console/console/themes/theme1/partials/tenant_new.hbs
@@ -38,11 +38,11 @@
 
             <div class="col-md-3 padding-remover-left">
                 <label  class="required">Admin Password:</label>
-                <input name="adminPassword" type="text"/>
+                <input name="adminPassword" type="password"/>
             </div>
             <div class="col-md-3">
                 <label class="required">Admin Password (Repeat):</label>
-                <input type="text"/>
+                <input type="password"/>
             </div>
 
             <div class="clearfix"></div>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f4757985/components/org.apache.stratos.manager.console/console/themes/theme1/ui/js/tenant_management.js
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/themes/theme1/ui/js/tenant_management.js
b/components/org.apache.stratos.manager.console/console/themes/theme1/ui/js/tenant_management.js
index 4ac84b0..aab3f8b 100644
--- a/components/org.apache.stratos.manager.console/console/themes/theme1/ui/js/tenant_management.js
+++ b/components/org.apache.stratos.manager.console/console/themes/theme1/ui/js/tenant_management.js
@@ -23,8 +23,14 @@ function manage_selected(action){
 }
 function manage_one(action,obj){
     if(action == "activate"){
-        alert('activate-' + $(obj).attr('data-domain'));
+        $('#foo').val($(obj).attr('data-domain'));
+        $('#state').val(action);
+        $('#manageTenantsForm').submit();
+        //alert('activate-' + $(obj).attr('data-domain'));
     }else if(action == "deactivate"){
-        alert('deactivate-' + $(obj).attr('data-domain'));
+        //alert('deactivate-' + $(obj).attr('data-domain'));
+         $('#foo').val($(obj).attr('data-domain'));
+         $('#state').val(action);
+        $('#manageTenantsForm').submit();
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f4757985/components/org.apache.stratos.manager.console/console/util/utility.jag
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/util/utility.jag b/components/org.apache.stratos.manager.console/console/util/utility.jag
index a883585..240f223 100644
--- a/components/org.apache.stratos.manager.console/console/util/utility.jag
+++ b/components/org.apache.stratos.manager.console/console/util/utility.jag
@@ -101,6 +101,15 @@ consoleAppUtil = new function(){
         return this.send("POST","/cartridge/definition",lbDefinition).data;
     };
 
+    this.activateTenant = function(tenantDomain){
+            return this.send("POST","/tenant/activate/" + tenantDomain,{}).data;
+            };
+
+    this.deactivateTenant = function(tenantDomain){
+        return this.send("POST","/tenant/deactivate/" + tenantDomain,{}).data;
+    };
+
+
     this.deployPartitionDefinition = function(partitionDefinition){
         return this.send("POST","/policy/deployment/partition",partitionDefinition).data;
     };


Mime
View raw message