blob: d30a282e5c0e6951be5d50f1933bbfb1c2ad1cff [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="HostDescriptor">
<form class="form-horizontal" role="form" name="addhostForm" style="padding:10px;" novalidate ng-submit="saveHostDescriptor();">
<fieldset>
<legend>Register Host</legend>
<div class="form-group">
<label for="inputHostId" class="col-lg-3 control-label">Host Id</label>
<div class="col-lg-9">
<input class="form-control" type="text" id="inputHostId" name="hostId" placeholder="Host Id" ng-model="addHost.hostId" ng-pattern="/^[a-zA-Z0-9]{4,10}$/" required>
<div class="text-error" ng-show="addhostForm.hostId.$dirty && addhostForm.hostId.$invalid">
<small class="text-error" ng-show="addhostForm.hostId.$error.required"> *Required.</small>
<small class="text-error" ng-show="addhostForm.hostId.$error.pattern"> Alpha-Numeric values between 4-10 characters.</small>
</div>
</div>
</div>
<div class="form-group">
<label class="col-lg-3 control-label" for="inputHostAddress">Host Address</label>
<div class="col-lg-9">
<input class="form-control" type="url" id="inputHostAddress" name="hostAddress" placeholder="Host Address" ng-model="addHost.hostAddress" required>
<div class="text-error" ng-show="addhostForm.hostAddress.$dirty && addhostForm.hostAddress.$invalid">
<small class="text-error" ng-show="addhostForm.hostAddress.$error.required"> *Required.</small>
<small class="text-error" ng-show="addhostForm.hostAddress.$error.url"> URL Expected. </small>
</div>
</div>
</div>
<div class="form-group">
<label class="col-lg-3 control-label" for="resourceProtocol">Resource Protocol</label>
<div class="col-lg-9">
<select class="form-control" id="resourceProtocol" name="rp" ng-model="addHost.resourceProtocol" ng-options="protocol.name for protocol in protocols" required>
<option value="">-- Select Protocol --</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-lg-3 control-label" ng-show="addHost.resourceProtocol.configuration" for="gramEndpoint">Gram Endpoint</label>
<div class="col-lg-9">
<input class="form-control" type="url" id="gramEndpoint" name="gramep" placeholder="Gram Endpoint" ng-model="addHost.gramEndpoint" ng-show="addHost.resourceProtocol.configuration" ng-required="addHost.resourceProtocol.configuration">
<div class="text-error" ng-show="addhostForm.gramep.$dirty && addhostForm.gramep.$invalid">
<small class="text-error" ng-show="addhostForm.gramep.$error.required"> *Required.</small>
<small class="text-error" ng-show="addhostForm.gramep.$error.url"> URL Expected. </small>
</div>
</div>
</div>
<div class="form-group">
<label class="col-lg-3 control-label" ng-show="addHost.resourceProtocol.configuration" for="gridFTPEndpoint">Grid FTP Endpoint</label>
<div class="col-lg-9">
<input class="form-control" type="url" id="gridFTPEndpoint" name="gridep" placeholder="Grid FTP Endpoint" ng-model="addHost.gridFTPEndpoint" ng-show="addHost.resourceProtocol.configuration" ng-required="addHost.resourceProtocol.configuration">
<div class="text-error" ng-show="addhostForm.gridep.$dirty && addhostForm.gridep.$invalid">
<small class="text-error" ng-show="addhostForm.gridep.$error.required"> *Required.</small>
<small class="text-error" ng-show="addhostForm.gridep.$error.url"> URL Expected. </small>
</div>
</div>
</div>
<div class="form-group">
<div class="col-lg-offset-3 col-lg-9">
<button type="submit" ng-disabled="addhostForm.$invalid" class="btn btn-primary">Save</button>
<a class="btn btn-default" href="#/exec">Cancel</a>
</div>
</div>
</fieldset>
</form>
</div>