airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sma...@apache.org
Subject svn commit: r1524685 - in /airavata/sandbox/gsoc2013/app: scripts/controllers/ApplicationDescriptor.js scripts/controllers/RegistryConnection.js scripts/controllers/executionInterfaceCntl.js views/builder.registerApplication.html
Date Thu, 19 Sep 2013 10:48:00 GMT
Author: smarru
Date: Thu Sep 19 10:48:00 2013
New Revision: 1524685

URL: http://svn.apache.org/r1524685
Log:
applying sanchit's patch for AIRAVATA-889

Removed:
    airavata/sandbox/gsoc2013/app/scripts/controllers/executionInterfaceCntl.js
Modified:
    airavata/sandbox/gsoc2013/app/scripts/controllers/ApplicationDescriptor.js
    airavata/sandbox/gsoc2013/app/scripts/controllers/RegistryConnection.js
    airavata/sandbox/gsoc2013/app/views/builder.registerApplication.html

Modified: airavata/sandbox/gsoc2013/app/scripts/controllers/ApplicationDescriptor.js
URL: http://svn.apache.org/viewvc/airavata/sandbox/gsoc2013/app/scripts/controllers/ApplicationDescriptor.js?rev=1524685&r1=1524684&r2=1524685&view=diff
==============================================================================
--- airavata/sandbox/gsoc2013/app/scripts/controllers/ApplicationDescriptor.js (original)
+++ airavata/sandbox/gsoc2013/app/scripts/controllers/ApplicationDescriptor.js Thu Sep 19
10:48:00 2013
@@ -46,6 +46,7 @@ angular.module('WebUI').controller('Appl
   $scope.isHPCConfiguration = false;
   $scope.isApplicationRegister = true;
   $scope.isEditApplication = false;
+  $scope.isCancel = false;
 
   // Data required to register new application
   $scope.serviceDescriptor = {
@@ -76,18 +77,51 @@ angular.module('WebUI').controller('Appl
     'stdError':'',
     'environmentVariables':[{name:'',value:''}]         //array of object of (name,value)
pair
   };
-  $scope.applicationHost=['LocalHost','lonestar','ranger','trestles'];
+  $scope.prevApplicationDescriptor;
+  $scope.applicationHost=['LocalHost','lonestar','stampede','trestles'];
+  $scope.jobTypes=['openMP','mpi','serial'];
 
-  // Callback to New Application Deployment
+  // Callback to Add New Application Deployment
   $scope.addApplicationDeployment = function() {
-    var appDesc = angular.copy($scope.applicationDescriptor);      //Json object are referenced
object
+    if ($scope.isCancel) {
+      var appDesc = angular.copy($scope.prevApplicationDescriptor);      //Json object are
referenced object
+      $scope.isCancel = false;
+    }
+    else {
+      var appDesc = angular.copy($scope.applicationDescriptor);
+    }
     $scope.serviceDescriptor.applicationDescriptors.push(appDesc);
     $scope.index=$scope.applicationHost.indexOf($scope.applicationDescriptor.hostDescName);
     $scope.applicationHost.splice( $scope.index,1);
-    $scope.applicationDescriptor={};
+    //$scope.applicationDescriptor={};
     $scope.isApplicationRegister=true;
     $scope.isNewDeployment=false;
   };
+  // Callback to Delete Application Deployment
+  $scope.deleteApplicationDeployment = function(index) {
+    var hostDescName = $scope.serviceDescriptor.applicationDescriptors[index].hostDescName;
+    $scope.applicationHost.push(hostDescName);
+    $scope.serviceDescriptor.applicationDescriptors.splice(index, 1);
+  };
+
+  // Callback to Edit Application Deployment
+  $scope.editApplicationDeployment = function(index) {
+    $scope.isEditApplication=true;
+    $scope.applicationDescriptor = $scope.serviceDescriptor.applicationDescriptors[index];
+    $scope.prevApplicationDescriptor=angular.copy($scope.applicationDescriptor);
+    $scope.deleteApplicationDeployment(index);
+    $scope.isNewDeployment=true;
+  };
+  // Callback to Cancel Application Deployment
+  $scope. cancelApplicationDeployment = function(index) {
+    if ($scope.isEditApplication) {
+      $scope.isCancel=true;
+      $scope.addApplicationDeployment();
+      $scope.isEditApplication=false;
+    }
+    $scope.isNewDeployment=false;
+  };
+
 
   // Callback to Add Application Descriptor to Registry
   $scope.saveApplicationDescriptor = function () {

Modified: airavata/sandbox/gsoc2013/app/scripts/controllers/RegistryConnection.js
URL: http://svn.apache.org/viewvc/airavata/sandbox/gsoc2013/app/scripts/controllers/RegistryConnection.js?rev=1524685&r1=1524684&r2=1524685&view=diff
==============================================================================
--- airavata/sandbox/gsoc2013/app/scripts/controllers/RegistryConnection.js (original)
+++ airavata/sandbox/gsoc2013/app/scripts/controllers/RegistryConnection.js Thu Sep 19 10:48:00
2013
@@ -27,7 +27,7 @@ angular.module('WebUI').controller('Regi
   $http.defaults.useXDomain = true;
   // Data required to connect to the registry
   $scope.registry =  {
-    'url': 'http://localhost:8080/airavata-registry/api',
+    'url': 'http://localhost:8080/airavata/services/registry',
     'gateway': 'default',
     'username': 'admin',
     'password': 'admin'

Modified: airavata/sandbox/gsoc2013/app/views/builder.registerApplication.html
URL: http://svn.apache.org/viewvc/airavata/sandbox/gsoc2013/app/views/builder.registerApplication.html?rev=1524685&r1=1524684&r2=1524685&view=diff
==============================================================================
--- airavata/sandbox/gsoc2013/app/views/builder.registerApplication.html (original)
+++ airavata/sandbox/gsoc2013/app/views/builder.registerApplication.html Thu Sep 19 10:48:00
2013
@@ -83,8 +83,8 @@ under the License.
             <tbody>
             <tr ng-repeat="appDesc in serviceDescriptor.applicationDescriptors">
               <td class="col-md-4">{{appDesc.hostDescName}}</td>
-              <td class="col-md-4"><a href ng-click=""><i class="icon-edit-sign"></i></a></td>
-              <td class="col-md-4"><a href ng-click="serviceDescriptor.applicationDescriptors.splice($index,
1)"><i class="icon-remove-sign"></i></a></td>
+              <td class="col-md-4"><a href ng-click="editApplicationDeployment($index);"><i
class="icon-edit-sign"></i></a></td>
+              <td class="col-md-4"><a href ng-click="deleteApplicationDeployment($index);"><i
class="icon-remove-sign"></i></a></td>
             </tr>
             </tbody>
           </table>
@@ -106,15 +106,16 @@ under the License.
   <form name="newAppDeployFrom" ng-show="isNewDeployment" class="form-horizontal">
     <fieldset>
       <div class="row">
+        <legend>{{newAppDeployFromLegend}}</legend>
         <div class="col-md-4">
-          <legend>{{newAppDeployFromLegend}}</legend>
           <div class="control-group">
-            <label class="control-label" for="applicationHost"> Application Host</label>
+            <label class="control-label" for="applicationHost"> Application Host
+              <a href="#/exec/addHost" data-toggle="tooltip" data-placement="right" title="Create
New Host"><i class="icon-plus-sign"></i></a>
+            </label>
             <div class="controls">
               <select id="applicationHost"  ng-model="applicationDescriptor.hostDescName"
ng-options="host for host in applicationHost" required>
                 <option value="">-Select-</option>
               </select>
-              <a href="#/exec/addHost" data-toggle="tooltip" data-placement="right" title="Create
New Host"><i class="icon-plus-sign"></i></a>
             </div>
           </div>
           <div class="control-group">
@@ -133,7 +134,7 @@ under the License.
           <div class="control-group">
             <label class="control-label" for="inputDirectory">Input Directory</label>
             <div class="controls">
-              <input type="url" id="inputDirectory" placeholder="Input Directory" ng-model="applicationDescriptor.inputDir">
+              <input type="text" id="inputDirectory" placeholder="Input Directory" ng-model="applicationDescriptor.inputDir">
             </div>
           </div>
           <div class="control-group">
@@ -152,7 +153,7 @@ under the License.
           <div class="control-group">
             <label class="control-label" for="inputSTDIN">STDIN</label>
             <div class="controls">
-              <input type="url" id="inputSTDIN" placeholder="Standard Input" ng-model="applicationDescriptor.stdIn">
+              <input type="text" id="inputSTDIN" placeholder="Standard Input" ng-model="applicationDescriptor.stdIn">
             </div>
           </div>
           <div class="control-group">
@@ -167,53 +168,105 @@ under the License.
               <input type="text" id="inputSTDERR" placeholder="Standard Error" ng-model="applicationDescriptor.stdError">
             </div>
           </div>
+          <h6>Environmental Variables</h6>
+          <div><a href ng-click="applicationDescriptor.environmentVariables.push({})"><i
class="icon-plus-sign"> Add Environment Variable</i></a></div>
+          <div class="controls-group">
+            <table style="width: 55%" id="tblEnvironmentalVar" class="table table-striped
table-bordered table-hovered table-condensed">
+              <thead>
+              <tr>
+                <th>Name</th>
+                <th>Value</th>
+                <th>Delete</th>
+              </tr>
+              </thead>
+              <tbody>
+              <tr ng-repeat="variables in applicationDescriptor.environmentVariables">
+                <td class="col-md-2">
+                  <input type="text" id="VarName" name="VarName" placeholder="Variable
Name" ng-model="variables.name" required>
+                </td>
+                <td class="col-md-1">
+                  <input type="number" id="VarValue" name="VarValue" placeholder="Variable
Value" ng-model="variables.value" required>
+                </td>
+                <td class="col-md-1">
+                  <a href ng-click="applicationDescriptor.environmentVariables.splice($index,
1)"><i class="icon-remove-sign"></i></a>
+                </td>
+              </tr>
+              </tbody>
+            </table>
+          </div>
         </div>
-        <div class="col-md-4">
-          <!--<legend>Locations</legend>
+        <div class="col-md-4" ng-hide="applicationDescriptor.hostDescName=='LocalHost'
|| applicationDescriptor.hostDescName=='' ">
+          <h6>HPC Configurations</h6>
           <div class="control-group">
-            <label class="control-label" for="inputDirectory">Input Directory</label>
+            <label class="control-label" for="jobType">Job Type</label>
             <div class="controls">
-              <input type="url" id="inputDirectory" placeholder="Input Directory" ng-model="applicationDescriptor.inputDir">
+              <select id="jobType"  ng-model="applicationDescriptor.jobType" ng-options="job
for job in jobTypes" required>
+                <option value="">-Select-</option>
+              </select>
             </div>
           </div>
           <div class="control-group">
-            <label class="control-label" for="outputDirectory">Output Directory</label>
+            <label class="control-label" for="ProjectNumber">Project Account Number</label>
             <div class="controls">
-              <input type="text" id="outputDirectory" placeholder="Output Directory" ng-model="applicationDescriptor.outputDir">
+              <input type="text" id="ProjectNumber" placeholder="Project Account Number"
ng-model="applicationDescriptor.projectNumber" required>
             </div>
           </div>
           <div class="control-group">
-            <label class="control-label" for="staticWorkingDir">Static Working Directory</label>
+            <label class="control-label" for="ProjectDescription">Project Account Description</label>
             <div class="controls">
-              <input type="text" id="staticWorkingDir" placeholder="Static Working Directory"
ng-model="applicationDescriptor.staticWorkingDir">
+              <input type="text" id="ProjectDescription" placeholder="Project Account
Description" ng-model="applicationDescriptor.projectDescription">
+            </div>
+          </div>
+          <div class="control-group">
+            <label class="control-label" for="QueueType">Queue Type</label>
+            <div class="controls">
+              <input type="text" id="QueueType" placeholder="Queue Type" ng-model="applicationDescriptor.queueName"
required>
+            </div>
+          </div>
+          <div class="control-group">
+            <label class="control-label" for="MaxWallTime">Max Wall Time</label>
+            <div class="controls">
+              <input type="number" id="MaxWallTime" placeholder="Max Wall Time" ng-model="applicationDescriptor.maxWallTime">
+            </div>
+          </div>
+          <div class="control-group">
+            <label class="control-label" for="CPUCount">CPU Count</label>
+            <div class="controls">
+              <input type="number" id="CPUCount" placeholder="CPU Count" ng-model="applicationDescriptor.cpuCount">
+            </div>
+          </div>
+          <div class="control-group">
+            <label class="control-label" for="NodeCount">Node Count</label>
+            <div class="controls">
+              <input type="number" id="NodeCount" placeholder="Node Count" ng-model="applicationDescriptor.nodeCount">
+            </div>
+          </div>
+          <div class="control-group">
+            <label class="control-label" for="ProcessorsPerNode">Processors Per Node</label>
+            <div class="controls">
+              <input type="number" id="ProcessorsPerNode" placeholder="Processors Per
Node" ng-model="applicationDescriptor.processorsPerNode">
+            </div>
+          </div>
+          <div class="control-group">
+            <label class="control-label" for="MinMemory">Min Memory</label>
+            <div class="controls">
+              <input type="number" id="minMemory" placeholder="Min Memory" ng-model="applicationDescriptor.minMemory">
             </div>
           </div>
-        --></div>
+          <div class="control-group">
+            <label class="control-label" for="MaxMemory">Max Memory</label>
+            <div class="controls">
+              <input type="number" id="MaxMemory" placeholder="Max Memory" ng-model="applicationDescriptor.maxMemory">
+            </div>
+          </div>
+        </div>
       </div>
       <div class="row control-group">
         <div class="controls">
-          <a href ng-click="addApplicationDeployment();" class="btn btn-primary">Update</a>
-          <a href ng-click="isNewDeployment=false" class="btn btn-default">Cancel</a>
+          <a href ng-click="applicationDescriptor.hostDescName == ''|| addApplicationDeployment();"
class="btn btn-primary">Update</a>
+          <a href ng-click="cancelApplicationDeployment();" class="btn">Cancel</a>
         </div>
       </div>
     </fieldset>
   </form>
 </div>
-
-<!--'environmentVariables':[{name:'',value:''}]
-$scope.applicationDescriptor = {
-'hostDescName':'Localhost',
-'executablePath':'',
-'workingDir':'',
-'jobType':'',
-'projectNumber':'',
-'projectDescription':'',
-'queueName':'',
-'maxWallTime':'',
-'cpuCount':'',
-'nodeCount':'',
-'processorsPerNode':'',
-'minMemory':'',
-'maxMemory':'',
-'
-};-->



Mime
View raw message