blob: 8bd30d72bbc3168e2ce42fae931334afc896136f [file] [log] [blame]
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<div ng-controller="ApplicationDescriptor">
<form role="form" name="registerApplicationForm" ng-submit="saveApplicationDescriptor();" ng-hide="isNewDeployment">
<fieldset>
<legend>{{regAppFormLegend}}</legend>
<div class="form-group">
<label class="control-label" for="inputServiceName">Application Name</label>
<div class="controls">
<input class="form-control" type="text" id="inputServiceName" name="ServiceName" placeholder="Service Name" ng-model="serviceDescriptor.serviceName" required>
</div>
</div>
<div class="form-group">
<label class="control-label" for="tblParameters">Application Parameters</label>
<div class="controls">
<div><a href ng-click="serviceDescriptor.parameters.push({})"><i class="icon-plus-sign"> Add Parameter</i></a></div>
<table id="tblParameters" class="table table-striped table-bordered table-hovered table-condensed">
<thead>
<tr>
<th>I/O</th>
<th>Parameter Name</th>
<th>Type</th>
<th>Description</th>
<th>Delete</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="parameter in serviceDescriptor.parameters">
<td class="col-md-2">
<select class="form-control" id="parameterIO" name="ParameterIO" ng-model="parameter.io" ng-options="io for io in parameterIO" required>
<option value="">-Select-</option>
</select>
</td>
<td class="col-md-3">
<input class="form-control" type="text" id="inputParameterName" name="ParameterName" placeholder="Parameter Name" ng-model="parameter.name" required>
</td>
<td class="col-md-3">
<select class="form-control" id="parameterType" name="ParameterType" ng-model="parameter.type" ng-options="type for type in parameterType" required>
<option value="">-Select-</option>
</select>
</td>
<td class="col-md-3">
<input class="form-control" type="text" id="parameterDescription" name="ParameterDescription" placeholder="Parameter Description" ng-model="parameter.description">
</td>
<td class="col-md-1">
<a href ng-click="serviceDescriptor.parameters.splice($index, 1)"><i class="icon-remove-sign"></i></a>
</td>
</tr>
</tbody>
</table>
<label class="checkbox">
<input type="checkbox" ng-model="advancedFileStaging"> Advanced: Force input file staging to working directory
</label>
</div>
</div>
<div class="form-group">
<label class="control-label" for="tblDeployedApp">Deployments</label>
<div class="controls">
<table style="width: 55%" id="tblDeployedApp" class="table table-striped table-bordered table-hovered table-condensed">
<thead>
<tr>
<th>Deployment Name</th>
<th>Edit</th>
<th>Delete</th>
</tr>
</thead>
<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="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>
<label class="checkbox">
<input type="checkbox" ng-model="isNewDeployment"> New Deployment
</label>
<!--a href ng-click="newDeployment();">New Deployment</a-->
</div>
</div>
<div class="control-group">
<div class="controls">
<button type="submit" class="btn btn-primary">Register</button>
<!--button type="submit" ng-disabled="launchWorkflowForm.$invalid" class="btn btn-primary">Run</button-->
<a class="btn btn-default" href="#/exec">Cancel</a>
</div>
</div>
</fieldset>
</form>
<form name="newAppDeployFrom" ng-show="isNewDeployment" class="form-horizontal" role="form">
<fieldset>
<div class="row">
<legend>{{newAppDeployFromLegend}}</legend>
<div class="col-md-6">
<div class="form-group">
<label class="col-md-5 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="col-md-7">
<select class="form-control" id="applicationHost" ng-model="applicationDescriptor.hostDescName" ng-options="host for host in applicationHost" required>
<option value="">-Select-</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-md-5 control-label" for="executablePath">Executable Path</label>
<div class="col-md-7">
<input class="form-control" type="text" id="executablePath" placeholder="Executable Path" ng-model="applicationDescriptor.executablePath" required>
</div>
</div>
<div class="form-group">
<label class="col-md-5 control-label" for="scratchWorkingDirectory">Scratch Working Directory</label>
<div class="col-md-7">
<input class="form-control" type="text" id="scratchWorkingDirectory" placeholder="Scratch Working Directory" ng-model="applicationDescriptor.workingDir" required>
</div>
</div>
<h5 >Locations</h5 >
<div class="form-group">
<label class="col-md-5 control-label" for="inputDirectory">Input Directory</label>
<div class="col-md-7">
<input class="form-control" type="text" id="inputDirectory" placeholder="Input Directory" ng-model="applicationDescriptor.inputDir">
</div>
</div>
<div class="form-group">
<label class="col-md-5 control-label" for="outputDirectory">Output Directory</label>
<div class="col-md-7">
<input class="form-control" type="text" id="outputDirectory" placeholder="Output Directory" ng-model="applicationDescriptor.outputDir">
</div>
</div>
<div class="form-group">
<label class="col-md-5 control-label" for="staticWorkingDir">Static Working Directory</label>
<div class="col-md-7">
<input class="form-control" type="text" id="staticWorkingDir" placeholder="Static Working Directory" ng-model="applicationDescriptor.staticWorkingDir">
</div>
</div>
<h5 >Program Data</h5 >
<div class="form-group">
<label class="col-md-5 control-label" for="inputSTDIN">STDIN</label>
<div class="col-md-7">
<input class="form-control" type="text" id="inputSTDIN" placeholder="Standard Input" ng-model="applicationDescriptor.stdIn">
</div>
</div>
<div class="form-group">
<label class="col-md-5 control-label" for="inputSTDOUT">STDOUT</label>
<div class="col-md-7">
<input class="form-control" type="text" id="inputSTDOUT" placeholder="Standard Output" ng-model="applicationDescriptor.stdOut">
</div>
</div>
<div class="form-group">
<label class="col-md-5 control-label" for="inputSTDERR">STDERR</label>
<div class="col-md-7">
<input class="form-control" type="text" id="inputSTDERR" placeholder="Standard Error" ng-model="applicationDescriptor.stdError">
</div>
</div>
</div>
<div class="col-md-6" ng-hide="applicationDescriptor.hostDescName=='LocalHost' || applicationDescriptor.hostDescName=='' ">
<h5 >HPC Configurations</h5 >
<div class="form-group">
<label class="col-md-5 control-label" for="jobType">Job Type</label>
<div class="col-md-7">
<select class="form-control" id="jobType" ng-model="applicationDescriptor.jobType" ng-options="job for job in jobTypes" required>
<option value="">-Select-</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-md-5 control-label" for="ProjectNumber">Project Account Number</label>
<div class="col-md-7">
<input class="form-control" type="text" id="ProjectNumber" placeholder="Project Account Number" ng-model="applicationDescriptor.projectNumber" required>
</div>
</div>
<div class="form-group">
<label class="col-md-5 control-label" for="ProjectDescription">Project Account Description</label>
<div class="col-md-7">
<input class="form-control" type="text" id="ProjectDescription" placeholder="Project Account Description" ng-model="applicationDescriptor.projectDescription">
</div>
</div>
<div class="form-group">
<label class="col-md-5 control-label" for="QueueType">Queue Type</label>
<div class="col-md-7">
<input class="form-control" type="text" id="QueueType" placeholder="Queue Type" ng-model="applicationDescriptor.queueName" required>
</div>
</div>
<div class="form-group">
<label class="col-md-5 control-label" for="MaxWallTime">Max Wall Time</label>
<div class="col-md-7">
<input class="form-control" type="number" id="MaxWallTime" placeholder="Max Wall Time" ng-model="applicationDescriptor.maxWallTime">
</div>
</div>
<div class="form-group">
<label class="col-md-5 control-label" for="CPUCount">CPU Count</label>
<div class="col-md-7">
<input class="form-control" type="number" id="CPUCount" placeholder="CPU Count" ng-model="applicationDescriptor.cpuCount">
</div>
</div>
<div class="form-group">
<label class="col-md-5 control-label" for="NodeCount">Node Count</label>
<div class="col-md-7">
<input class="form-control" type="number" id="NodeCount" placeholder="Node Count" ng-model="applicationDescriptor.nodeCount">
</div>
</div>
<div class="form-group">
<label class="col-md-5 control-label" for="ProcessorsPerNode">Processors Per Node</label>
<div class="col-md-7">
<input class="form-control" type="number" id="ProcessorsPerNode" placeholder="Processors Per Node" ng-model="applicationDescriptor.processorsPerNode">
</div>
</div>
<div class="form-group">
<label class="col-md-5 control-label" for="MinMemory">Min Memory</label>
<div class="col-md-7">
<input class="form-control" type="number" id="minMemory" placeholder="Min Memory" ng-model="applicationDescriptor.minMemory">
</div>
</div>
<div class="form-group">
<label class="col-md-5 control-label" for="MaxMemory">Max Memory</label>
<div class="col-md-7">
<input class="form-control" type="number" id="MaxMemory" placeholder="Max Memory" ng-model="applicationDescriptor.maxMemory">
</div>
</div>
</div>
</div>
<div class="row">
<h5 >Environmental Variables</h5 >
<div><a href ng-click="applicationDescriptor.environmentVariables.push({})"><i class="icon-plus-sign"> Add Environment Variable</i></a></div>
<div class="form-group">
<table 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-5">
<input class="form-control" type="text" id="VarName" name="VarName" placeholder="Variable Name" ng-model="variables.name" required>
</td>
<td class="col-md-6">
<input class="form-control" 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="row form-group">
<div class="col-md-offset-4 col-md-8">
<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>