77 lines
3.3 KiB
HTML
77 lines
3.3 KiB
HTML
<!--
|
|
|
|
Copyright (C) 2015-2016 Jeeva Kandasamy (jkandasa@gmail.com)
|
|
|
|
Licensed 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 class="container-fluid"> <!-- Container-fluid -->
|
|
|
|
<!-- Loading icon disaplay -->
|
|
<div ng-hide="resourceTypes.$resolved">
|
|
<div ng-include src="'partials/common-html/loading.html'"></div>
|
|
</div>
|
|
|
|
<div ng-show="resourceTypes.$resolved"> <!-- Main Message -->
|
|
|
|
<!-- Page Header -->
|
|
<div ng-include src="'partials/common-html/header-add-update.html'"></div>
|
|
|
|
<div>
|
|
<form class="form-horizontal" name="mcForm">
|
|
<div class="col-md-6">
|
|
|
|
<legend><small>{{ 'RESOURCE' | translate }}</small></legend>
|
|
|
|
<div class="form-group"><!-- List Resource -->
|
|
<label class="col-sm-2 control-label">{{ 'RESOURCE' | translate }}</label>
|
|
<div class="col-sm-3 mc-form-fixer-left">
|
|
<select class="form-control" pf-select ng-options="rT.displayName as rT.displayName for rT in resourceTypes"
|
|
ng-change="dspResources = getResources(groupMap.resourceType); groupMap.resourceId = ''" ng-model="groupMap.resourceType" required >
|
|
<option value="" ng-hide="true"></option>
|
|
</select>
|
|
</div>
|
|
<div class="col-sm-7 mc-form-fixer" ng-show="groupMap.resourceType === 'Gateway' || groupMap.resourceType === 'Node' || groupMap.resourceType === 'Sensor' || groupMap.resourceType === 'Sensor variable'">
|
|
<select class="form-control" pf-select data-live-search="true" ng-model="groupMap.resourceId" required >
|
|
<option value="" ng-hide="true"></option>
|
|
<option ng-repeat="res in dspResources" ng-bind-html="res.displayName | mcResourceRepresentation" value="{{res.id}}" ng-selected="res.id == groupMap.resourceId"></option>
|
|
</select>
|
|
</div>
|
|
</div><!-- List Resource -->
|
|
|
|
<legend><small>{{ 'PAYLOAD' | translate }}</small></legend>
|
|
|
|
<div class="form-group">
|
|
<label class="col-sm-2 control-label">{{ 'ON' | translate }}</label>
|
|
<div class="col-sm-10 mc-form-fixer-left">
|
|
<input class="form-control" placeholder="{{ 'PAYLOAD_ON' | translate }}" ng-model="groupMap.payloadOn" required />
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label class="col-sm-2 control-label">{{ 'OFF' | translate }}</label>
|
|
<div class="col-sm-10 mc-form-fixer-left">
|
|
<input class="form-control" placeholder="{{ 'PAYLOAD_OFF' | translate }}" ng-model="groupMap.payloadOff" required />
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Include save form buttons -->
|
|
<div ng-include src="'partials/common-html/save-form.html'"></div>
|
|
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
</div> <!-- Main Message -->
|
|
</div> <!-- container -->
|