airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scnakand...@apache.org
Subject [1/2] airavata-php-gateway git commit: fixing AIRAVATA-1538
Date Thu, 23 Jul 2015 16:54:47 GMT
Repository: airavata-php-gateway
Updated Branches:
  refs/heads/0.15-release-branch 34d070cf2 -> 9d9202465


fixing AIRAVATA-1538


Project: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/commit/d1fc5139
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/d1fc5139
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/d1fc5139

Branch: refs/heads/0.15-release-branch
Commit: d1fc5139734420158585287da6d5400ba1d0d76d
Parents: 34d070c
Author: Supun Nakandala <scnakandala@apache.org>
Authored: Thu Jul 23 22:08:41 2015 +0530
Committer: Supun Nakandala <scnakandala@apache.org>
Committed: Thu Jul 23 22:08:41 2015 +0530

----------------------------------------------------------------------
 app/controllers/ApplicationController.php  | 11 +++++++++++
 app/views/application/deployment.blade.php | 11 +++++------
 app/views/application/interface.blade.php  | 10 +++++-----
 app/views/application/module.blade.php     | 23 +++++++++++++++++------
 4 files changed, 38 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/d1fc5139/app/controllers/ApplicationController.php
----------------------------------------------------------------------
diff --git a/app/controllers/ApplicationController.php b/app/controllers/ApplicationController.php
index adf3a4b..bde7829 100644
--- a/app/controllers/ApplicationController.php
+++ b/app/controllers/ApplicationController.php
@@ -40,6 +40,17 @@ class ApplicationController extends BaseController {
 	public function deleteAppModule()
 	{
         $this->beforeFilter('verifyeditadmin');
+        $data = AppUtilities::getAppInterfaceData();
+        foreach($data["appInterfaces"] as $appInterface){
+            foreach($appInterface->applicationModules as $appModule){
+                if($appModule == Input::get("appModuleId")){
+                    $errorMessage = "The selected app module is already assigned to " . $appInterface->applicationName
+                    . " interface. Hence it cannot be removed";
+                    return Redirect::to("app/module")->with("errorMessage", $errorMessage);
+                }
+            }
+        }
+
 		if( AppUtilities::deleteAppModule( Input::get("appModuleId") ) )
 			$message = "Module has been deleted successfully!";
 		else

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/d1fc5139/app/views/application/deployment.blade.php
----------------------------------------------------------------------
diff --git a/app/views/application/deployment.blade.php b/app/views/application/deployment.blade.php
index b2fb9e3..8595549 100644
--- a/app/views/application/deployment.blade.php
+++ b/app/views/application/deployment.blade.php
@@ -14,11 +14,6 @@
     <div id="page-wrapper">
 <div class="container-fluid">
     <div class="col-md-offset-2 col-md-8">
-        @if(Session::has("admin"))
-        <div class="row">
-            <button class="btn btn-default create-app-deployment">Create a new Application
Deployment</button>
-        </div>
-        @endif
         @if( count( $appDeployments) )
         @if( Session::has("message"))
         <div class="row">
@@ -30,7 +25,11 @@
         </div>
         {{ Session::forget("message") }}
         @endif
-
+        @if(Session::has("admin"))
+        <div class="row">
+            <button class="btn btn-default create-app-deployment">Create a new Application
Deployment</button>
+        </div>
+        @endif
         <div class="row">
             <div class="col-md-6">
                 <h3>Existing Application Deployments :</h3>

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/d1fc5139/app/views/application/interface.blade.php
----------------------------------------------------------------------
diff --git a/app/views/application/interface.blade.php b/app/views/application/interface.blade.php
index d428d63..6862914 100644
--- a/app/views/application/interface.blade.php
+++ b/app/views/application/interface.blade.php
@@ -14,11 +14,6 @@
     <div id="page-wrapper">
 <div class="container-fluid">
     <div class="col-md-offset-2 col-md-8">
-        @if(Session::has("admin"))
-        <div class="row">
-            <button class="btn btn-default create-app-interface">Create a new Application
Interface</button>
-        </div>
-        @endif
         @if( count( $appInterfaces) )
         @if( Session::has("message"))
         <div class="row">
@@ -30,6 +25,11 @@
         </div>
         {{ Session::forget("message") }}
         @endif
+        @if(Session::has("admin"))
+        <div class="row">
+            <button class="btn btn-default create-app-interface">Create a new Application
Interface</button>
+        </div>
+        @endif
         <div class="row">
 
             <div class="col-md-6">

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/d1fc5139/app/views/application/module.blade.php
----------------------------------------------------------------------
diff --git a/app/views/application/module.blade.php b/app/views/application/module.blade.php
index 604bb76..e75f4c4 100644
--- a/app/views/application/module.blade.php
+++ b/app/views/application/module.blade.php
@@ -14,12 +14,6 @@
     <div id="page-wrapper">
 <div class="container-fluid">
     <div class="col-md-offset-2 col-md-8">
-        @if(Session::has("admin"))
-        <button class="btn btn-default create-app-module" data-toggle="modal" data-target="#new-app-module-block">Create
-            a new Application Module
-        </button>
-        @endif
-
         @if( count( $modules) )
         @if( Session::has("message"))
         <div class="row">
@@ -31,6 +25,23 @@
         </div>
         {{ Session::forget("message") }}
         @endif
+        @if( Session::has("errorMessage"))
+        <div class="row">
+            <div class="alert alert-danger alert-dismissible" role="alert">
+                <button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span><span
+                        class="sr-only">Close</span></button>
+                {{ Session::get("errorMessage") }}
+            </div>
+        </div>
+        {{ Session::forget("errorMessage") }}
+        @endif
+        @if(Session::has("admin"))
+        <div class="row">
+            <button class="btn btn-default create-app-module" data-toggle="modal" data-target="#new-app-module-block">Create
+                a new Application Module
+            </button>
+        </div>
+        @endif
         <div class="row">
             <div class="col-md-6">
                 <h3>Existing Modules :</h3>


Mime
View raw message