Skip to content
Snippets Groups Projects
DeploymentAdd.html 7.01 KiB
Newer Older
trantzas's avatar
trantzas committed
<div class="page-header" >
	<div class="container">
		<div class="row">
			<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
				<h1 id="headerTitle">Request new deployment</h1>
				<h4>user: {{newdeployment.owner.username}}</h4>

				<form class="form-horizontal" name="form" role="form" ng-submit="submitNewAppDeployment()" id="addApplicationForm">
				
					<div class="form-group">
						<label for="app.name" class="col-sm-2 control-label">MP</label>
						<div class="col-sm-10">
							<select class="form-control" ng-model="newdeployment.mp" ng-options="e.name for e in manoplatforms" required><option></option></select>
						</div>
					</div>

					<div class="form-group">
						<label for="app.name" class="col-sm-2 control-label">NSD</label>
						<div class="col-sm-10">
							<select class="form-control" ng-model="newdeployment.experiment" ng-options="e.packagingFormat +'/'+ e.name +' (By: '+ e.owner.name + ' - Public: '+ e.published+' )' for e in experiments  | filter: {packagingFormat:newdeployment.mp.name}" ng-change="updatePlacements()" required><option></option></select>
						</div>
					</div>

					<div class="form-group">
						<label for="app.name" class="col-sm-2 control-label">NSDOBDs</label>
						<div class="col-sm-10">
							<select class="form-control" ng-model="newdeployment.obd" ng-options="e.obMANOprovider.supportedMANOplatform.name+'/'+e.obMANOprovider.name+'/'+e.experimentMANOProviderID+'/'+newdeployment.experiment.name+', NSD OSM ID:'+e.deployId for e in experimentobds | filter: {experimentMANOProviderID:newdeployment.experiment.name} | filter:newdeployment.mp.name"><option></option></select>
						</div>
					</div>

					<div class="form-group">
						<label for="app.name" class="col-sm-2 control-label">Mentor</label>
						<div class="col-sm-10">
							<select class="form-control" ng-model="newdeployment.mentor" ng-options="e.name +' ( email:'+ e.email +' )' for e in mentorusers"  required ></select>
						</div>
					</div>

					<div class="form-group">
						<label for="app.name" class="col-sm-2 control-label">Infrastructure</label>
						<div class="col-sm-10">
							<select class="form-control" ng-model="newdeployment.infrastructureForAll" ng-options="e.mp.name+'/'+e.name+', VIM id:'+ e.vimid  for e in infrastructures| filter:newdeployment.obd.obMANOprovider.name"  ng-change="updatePlacements()" required><option></option></select>
							<p class="help-block">Select Infrastructure to place all constituent VNFs</p>
						</div>
					</div>

					<div class="form-group">
						<label for="newdeployment.placements" class="col-sm-2 control-label">Constituent VNF Placement:</label>
						<div class="col-sm-10">
							<div id="tableExtensions" class="table-editable">
							    <table class="table">
							      <tr>
							        <th>constituent VNF</th>
							        <th>Infrastructure</th>
							        <th></th>
							      </tr>
							      <tr class="" ng-repeat="ext in newdeployment.vxfPlacements">
							        <td>{{ext.constituentVxF.vnfdidRef}} [ membervnfIndex:{{ext.constituentVxF.membervnfIndex}} ]</td>
							        <td> <select class="form-control" ng-model="ext.infrastructure" ng-options="e.mp.name+'/'+e.name+', VIM id:'+ e.vimid  for e in infrastructures| filter:newdeployment.obd.obMANOprovider.name" ng-required="true" required><option></option></select>
							         </td>
							       
							      </tr>
							      
							    </table>
							  </div>
							<p class="help-block">You optionally can select separate Infrastructure to place all each constituent VNFs</p>
						</div>
					</div>
					<div class="form-group">
						<label for="newdeployment.instantiationconfig" class="col-sm-2 control-label">Instantiation Configuration</label>
						<div class="col-sm-10">
							<textarea class="form-control"   rows="5"  ng-model="newdeployment.instantiationconfig" value="" placeholder="" /></textarea>
							<p class="help-block">*If an instantiation configuration is provided the rest of the UI configuration will be ignored.</p>						
						</div>
					</div>														
					<div class="form-group">
						<label for="app.name" class="col-sm-2 control-label">Name</label>
						<div class="col-sm-10">
							<input type="text" class="form-control"  ng-model="newdeployment.name" value="" placeholder="enter an alias for your requested deployment" required/>
						</div>
					</div>
					<div class="form-group">
						<label for="vxf.longDescription" class="col-sm-2 control-label">Description</label>
						<div class="col-sm-10">
							<textarea class="form-control"   rows="5"  ng-model="newdeployment.description" value="" placeholder="" /></textarea>
						</div>
					</div>
					<div class="form-group">
						<label for="app.name" class="col-sm-2 control-label">Tentative Start Date</label>
						<div class="col-sm-10">
							 <md-datepicker ng-model="newdeployment.startReqDate" md-placeholder="Enter date" md-date-locale ="{ msgOpenCalendar: 'Open a special calendar' }" ></md-datepicker>
						</div>
						<label for="app.name" class="col-sm-2 control-label">Tentative Start Time (UTC)</label>
						<div class="col-sm-10">
							<select style='width:100px;float:left;' class="form-control" ng-model="newdeployment.startReqHour" ng-options="option as option for option in ['00', '01', '02', '03','04', '05','06', '07','08', '09','10', '11','12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23']" ng-init="newdeployment.startReqHour='00'" required ></select>
							<select style='width:100px;float:left;' class="form-control" ng-model="newdeployment.startReqMinute" ng-options="option as option for option in minutes"  ng-init="newdeployment.startReqMinute='00'" required ></select>
						</div>						
					</div>
					<div class="form-group">
						<label for="app.name" class="col-sm-2 control-label">Tentative End Date</label>
						<div class="col-sm-10">
							 <md-datepicker ng-model="newdeployment.endReqDate" md-placeholder="Enter date" md-date-locale ="{ msgOpenCalendar: 'Open a special calendar' }" ></md-datepicker>
						</div>
						<label for="app.name" class="col-sm-2 control-label">Tentative End Time (UTC)</label>
						<div class="col-sm-10">
							<select style='width:100px;float:left;' class="form-control" ng-model="newdeployment.endReqHour" ng-options="option as option for option in ['00', '01', '02', '03','04', '05','06', '07','08', '09','10', '11','12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23']" ng-init="newdeployment.endReqHour='00'" required ></select>
							<select style='width:100px;float:left;' class="form-control" ng-model="newdeployment.endReqMinute" ng-options="option as option for option in minutes"  ng-init="newdeployment.endReqMinute='00'" required ></select>
							<!-- ['00', '05', '10', '15', '20', '25', '30', '35', '40', '45', '50', '55'] -->
						</div>						
					</div>
																		
					<div class="form-group">
						<div class="col-sm-offset-2 col-sm-10">
							<input class="btn btn-default" type="submit" value="Request deployment" />
						</div>
					</div>
				</form>

			</div>
		</div>
	</div>
</div>