Initial setup of mycontroller
This commit is contained in:
366
www/partials/gateways/gateway-add-edit.html
Normal file
366
www/partials/gateways/gateway-add-edit.html
Normal file
@@ -0,0 +1,366 @@
|
||||
<!--
|
||||
|
||||
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="gatewaySerialDrivers.$resolved">
|
||||
<div ng-include src="'partials/common-html/loading.html'"></div>
|
||||
</div>
|
||||
|
||||
<div ng-show="gatewaySerialDrivers.$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-5">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ 'ENABLED' | translate }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input class="bootstrap-switch" id="bootstrap-switch-state" type="checkbox" ng-model="gateway.enabled" checked>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ 'NAME' | translate }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input class="form-control" placeholder="{{ 'GATEWAY_NAME' | translate }}" ng-model="gateway.name" required />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ 'RECONNECT_DELAY' | translate }}({{ 'SECONDS' | translate }})</label>
|
||||
<div class="col-sm-5">
|
||||
<input class="form-control" ng-model="gateway.reconnectDelay" placeholder="{{ 'SECONDS' | translate }}" pf-validation="cs.isNumber(input)" required />
|
||||
<span class="help-block">{{ 'VALIDATION_ERROR_NUMBER' | translate }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ 'TRANSMIT_DELAY' | translate }}({{ 'MILLISECONDS' | translate }})</label>
|
||||
<div class="col-sm-5">
|
||||
<input class="form-control" ng-model="gateway.txDelay" placeholder="{{ 'MILLISECONDS' | translate }}" pf-validation="cs.isNumber(input)" required />
|
||||
<span class="help-block">{{ 'VALIDATION_ERROR_NUMBER' | translate }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ 'ACK_ENABLED' | translate }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input class="bootstrap-switch" id="bootstrap-switch-state" type="checkbox" ng-model="gateway.ackEnabled" >
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-if="gateway.ackEnabled">
|
||||
<label class="col-sm-2 control-label">{{ 'STREAM_ACK_ENABLED' | translate }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input class="bootstrap-switch" id="bootstrap-switch-state" type="checkbox" ng-model="gateway.streamAckEnabled" >
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-if="gateway.ackEnabled">
|
||||
<label class="col-sm-2 control-label">{{ 'FAILED_RETRY_COUNT' | translate }}</label>
|
||||
<div class="col-sm-5">
|
||||
<input class="form-control" ng-model="gateway.failedRetryCount" placeholder="{{ 'FAILED_RETRY_COUNT' | translate }}" pf-validation="cs.isNumber(input)" required />
|
||||
<span class="help-block">{{ 'VALIDATION_ERROR_NUMBER' | translate }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-if="gateway.ackEnabled">
|
||||
<label class="col-sm-2 control-label">{{ 'ACK_WAIT_TIME' | translate }}({{ 'MILLISECONDS' | translate }})</label>
|
||||
<div class="col-sm-5">
|
||||
<input class="form-control" ng-model="gateway.ackWaitTime" placeholder="{{ 'MILLISECONDS' | translate }}" pf-validation="cs.isNumber(input)" required />
|
||||
<span class="help-block">{{ 'VALIDATION_ERROR_NUMBER' | translate }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ 'NETWORK_TYPE' | translate }}</label>
|
||||
<div class="col-sm-5">
|
||||
<select class="form-control" pf-select ng-change="updateGatewayTypes()"
|
||||
ng-options="gatewayNetworkType.id as gatewayNetworkType.displayName for gatewayNetworkType in gatewayNetworkTypes | orderBy:'displayName'" ng-model="gateway.networkType" required >
|
||||
<option value="" ng-hide="true"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-if="gateway.networkType">
|
||||
<label class="col-sm-2 control-label">{{ 'TYPE' | translate }}</label>
|
||||
<div class="col-sm-5">
|
||||
<select class="form-control" pf-select ng-options="gatewayType.id as gatewayType.displayName for gatewayType in gatewayTypes | orderBy:'displayName'" ng-model="gateway.type" ng-change="updateTypeChange()" required >
|
||||
<option value="" ng-hide="true"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Serial Gateway -->
|
||||
<div ng-if="gateway.type === 'Serial'">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ 'DRIVER' | translate }}</label>
|
||||
<div class="col-sm-5">
|
||||
<select class="form-control" pf-select ng-options="gatewaySerialDriver.id as gatewaySerialDriver.displayName for gatewaySerialDriver in gatewaySerialDrivers" ng-model="gateway.driver" required >
|
||||
<option value="" ng-hide="true"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ 'PORT_NAME' | translate }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input class="form-control" placeholder="{{ 'SERIAL_PORT_NAME_EXAMPLE' | translate }}" ng-model="gateway.portName" pf-validation="cs.isContainsSpace(input)" required />
|
||||
<span class="help-block">{{ 'VALIDATION_ERROR_NO_SPACE_ALLOWED' | translate }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ 'BAUD_RATE' | translate }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input class="form-control" placeholder="{{ 'SERIAL_BAUD_RATE_EXAMPLE' | translate }}" ng-model="gateway.baudRate" pf-validation="cs.isNumber(input)" required />
|
||||
<span class="help-block">{{ 'VALIDATION_ERROR_NUMBER' | translate }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Ethernet Gateway -->
|
||||
<div ng-if="gateway.type === 'Ethernet'">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ 'HOST_NAME' | translate }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input class="form-control" placeholder="{{ 'ETHERNET_HOST_NAME_EXAMPLE' | translate }}" ng-model="gateway.host" pf-validation="cs.isContainsSpace(input)" required />
|
||||
<span class="help-block">{{ 'VALIDATION_ERROR_NO_SPACE_ALLOWED' | translate }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ 'PORT' | translate }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input class="form-control" placeholder="{{ 'ETHERNET_PORT_EXAMPLE' | translate }}" ng-model="gateway.port" pf-validation="cs.isNumber(input)" required />
|
||||
<span class="help-block">{{ 'VALIDATION_ERROR_NUMBER' | translate }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ 'ALIVE_TEST_FREQUENCY' | translate }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input class="form-control" placeholder="{{ 'ETHERNET_ALIVE_TEST_FREQUENCY_EXAMPLE' | translate }}" ng-model="gateway.aliveFrequency" pf-validation="cs.isNumber(input)" required />
|
||||
<span class="help-block">{{ 'VALIDATION_ERROR_NUMBER' | translate }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- MQTT Gateway -->
|
||||
<div ng-if="gateway.type === 'MQTT'">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ 'QOS' | translate }}</label>
|
||||
<div class="col-sm-5">
|
||||
<select class="form-control" pf-select ng-model="gateway.qos" convert-to-number required>
|
||||
<option value="0">{{ 'QOS_0' | translate }}</option>
|
||||
<option value="1">{{ 'QOS_1' | translate }}</option>
|
||||
<option value="2">{{ 'QOS_2' | translate }}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ 'BROKET_HOST' | translate }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input class="form-control" placeholder="{{ 'MQTT_BROKER_HOST_EXAMPLE' | translate }}" ng-model="gateway.brokerHost" pf-validation="cs.isContainsSpace(input)" required />
|
||||
<span class="help-block">{{ 'VALIDATION_ERROR_NO_SPACE_ALLOWED' | translate }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ 'CLIENT_ID' | translate }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input class="form-control" placeholder="{{ 'MQTT_CLIENT_ID_EXAMPLE' | translate }}" ng-model="gateway.clientId" required />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ 'TOPIC_PUBLISH' | translate }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input class="form-control" placeholder="{{ 'MQTT_TOPIC_PUBLISH_EXAMPLE' | translate }}" ng-model="gateway.topicsPublish" required />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ 'TOPIC_SUBSCRIBE' | translate }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input class="form-control" placeholder="{{ 'MQTT_TOPIC_SUBSCRIBE_EXAMPLE' | translate }}" ng-model="gateway.topicsSubscribe" required />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ 'USERNAME' | translate }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input class="form-control" placeholder="{{ 'USERNAME' | translate }}" ng-model="gateway.username"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ 'PASSWORD' | translate }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input class="form-control" placeholder="{{ 'PASSWORD' | translate }}" ng-model="gateway.password"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Sparkfun [phant.io] Gateway -->
|
||||
<div ng-if="gateway.type === 'Sparkfun [phant.io]'">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ 'URL' | translate }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input class="form-control" placeholder="{{ 'URL' | translate }}" ng-model="gateway.url" pf-validation="cs.isContainsSpace(input)" required />
|
||||
<span class="help-block">{{ 'VALIDATION_ERROR_NO_SPACE_ALLOWED' | translate }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ 'TRUST_HOST' | translate }}</label>
|
||||
<div class="col-sm-5">
|
||||
<select class="form-control" pf-select ng-options="type.id as type.displayName for type in trustHostTypes | orderBy:'displayName'" ng-model="gateway.trustHostType" required >
|
||||
<option value="" ng-hide="true"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ 'PUBLIC_KEY' | translate }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input class="form-control" placeholder="{{ 'PUBLIC_KEY' | translate }}" ng-model="gateway.publicKey" pf-validation="cs.isContainsSpace(input)" required />
|
||||
<span class="help-block">{{ 'VALIDATION_ERROR_NO_SPACE_ALLOWED' | translate }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ 'PRIVATE_KEY' | translate }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input class="form-control" placeholder="{{ 'PRIVATE_KEY' | translate }}" ng-model="gateway.privateKey" pf-validation="cs.isContainsSpace(input)" />
|
||||
<span class="help-block">{{ 'VALIDATION_ERROR_NO_SPACE_ALLOWED' | translate }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ 'POLL_FREQUENCY_MINUTES' | translate }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input class="form-control" placeholder="{{ 'POLL_FREQUENCY_MINUTES' | translate }}" ng-model="gateway.pollFrequency" pf-validation="cs.isNumber(input)" required />
|
||||
<span class="help-block">{{ 'VALIDATION_ERROR_NUMBER' | translate }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ 'RECORDS_LIMIT' | translate }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input class="form-control" placeholder="{{ 'RECORDS_LIMIT' | translate }}" ng-model="gateway.recordsLimit" pf-validation="cs.isNumber(input)" required />
|
||||
<span class="help-block">{{ 'VALIDATION_ERROR_NUMBER' | translate }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Philips Hue Gateway -->
|
||||
<div ng-if="gateway.type === 'Hue bridge'">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ 'URL' | translate }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input class="form-control" placeholder="{{ 'URL' | translate }}" ng-model="gateway.url" pf-validation="cs.isContainsSpace(input)" required />
|
||||
<span class="help-block">{{ 'VALIDATION_ERROR_NO_SPACE_ALLOWED' | translate }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ 'AUTORIZED_USER' | translate }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input class="form-control" placeholder="{{ 'AUTORIZED_USER' | translate }}" ng-model="gateway.authorizedUser" pf-validation="cs.isContainsSpace(input)" required />
|
||||
<span class="help-block">{{ 'VALIDATION_ERROR_NO_SPACE_ALLOWED' | translate }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ 'POLL_FREQUENCY_MINUTES' | translate }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input class="form-control" placeholder="{{ 'POLL_FREQUENCY_MINUTES' | translate }}" ng-model="gateway.pollFrequency" pf-validation="cs.isNumber(input)" required />
|
||||
<span class="help-block">{{ 'VALIDATION_ERROR_NUMBER' | translate }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Weather Underground Gateway -->
|
||||
<div ng-if="gateway.type === 'Weather Underground'">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ 'TRUST_HOST' | translate }}</label>
|
||||
<div class="col-sm-5">
|
||||
<select class="form-control" pf-select ng-options="type.id as type.displayName for type in trustHostTypes | orderBy:'displayName'" ng-model="gateway.trustHostType" required >
|
||||
<option value="" ng-hide="true"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ 'MERGE_STATIONS' | translate }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input class="bootstrap-switch" id="bootstrap-switch-state" type="checkbox" ng-model="gateway.mergeAllStations">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ 'KEY' | translate }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input class="form-control" placeholder="{{ 'KEY' | translate }}" ng-model="gateway.apiKey" pf-validation="cs.isContainsSpace(input)" required />
|
||||
<span class="help-block">{{ 'VALIDATION_ERROR_NO_SPACE_ALLOWED' | translate }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ 'LOCATION' | translate }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input class="form-control" placeholder="{{ 'LOCATION' | translate }}" ng-model="gateway.location" pf-validation="cs.isContainsSpace(input)" required />
|
||||
<span class="help-block">{{ 'VALIDATION_ERROR_NO_SPACE_ALLOWED' | translate }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ 'LOCATION_IP' | translate }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input class="form-control" placeholder="{{ 'LOCATION_IP' | translate }}" ng-model="gateway.geoIp" pf-validation="cs.isContainsSpace(input)" />
|
||||
<span class="help-block">{{ 'VALIDATION_ERROR_NO_SPACE_ALLOWED' | translate }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ 'POLL_FREQUENCY_MINUTES' | translate }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input class="form-control" placeholder="{{ 'POLL_FREQUENCY_MINUTES' | translate }}" ng-model="gateway.pollFrequency" pf-validation="cs.isNumber(input)" required />
|
||||
<span class="help-block">{{ 'VALIDATION_ERROR_NUMBER' | translate }}</span>
|
||||
</div>
|
||||
</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 -->
|
||||
114
www/partials/gateways/gateways-detail.html
Normal file
114
www/partials/gateways/gateways-detail.html
Normal file
@@ -0,0 +1,114 @@
|
||||
<!--
|
||||
|
||||
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">
|
||||
|
||||
<!-- Loading icon disaplay -->
|
||||
<div ng-hide="resourceCount.$resolved">
|
||||
<div ng-include src="'partials/common-html/loading.html'"></div>
|
||||
</div>
|
||||
|
||||
<div ng-show="resourceCount.$resolved"> <!-- Main Message -->
|
||||
|
||||
<!-- Page Header -->
|
||||
<div ng-include src="'partials/common-html/header-list.html'"></div>
|
||||
|
||||
<div class=" container-fluid row"><!-- row1 -->
|
||||
<div class="row-cards-pf ">
|
||||
|
||||
<div class="col-xs-6 col-sm-6 col-lg-6">
|
||||
<div class="card-pf card-pf-utilization card-pf-accented">
|
||||
<div class="card-pf-heading">
|
||||
<h2 class="card-pf-title">{{ 'DETAILS' | translate }} <a class="btn btn-link pull-right" ui-sref="gatewaysAddEdit({ id: item.id })"><i class="fa fa-edit"></i> {{ 'EDIT' | translate }} </a></h2>
|
||||
</div>
|
||||
<div class="card-pf-body">
|
||||
<dl class="dl-horizontal">
|
||||
<dt>{{ 'NAME' | translate }}</dt> <dd>{{item.name}}</dd>
|
||||
<dt>{{ 'ENABLED' | translate }}</dt> <dd>{{item.enabled? 'ENABLED' : 'DISABLED' | translate }}</dd>
|
||||
<dt>{{ 'TRANSMIT_DELAY' | translate }}</dt><dd>{{item.txDelay}} {{ 'MILLISECONDS_SHORT' | translate }}</dd>
|
||||
<dt>{{ 'ACK_ENABLED' | translate }}</dt> <dd>{{item.ackEnabled? 'ENABLED' : 'DISABLED' | translate }}</dd>
|
||||
<span ng-if="item.ackEnabled">
|
||||
<dt>{{ 'STREAM_ACK_ENABLED' | translate }}</dt> <dd>{{item.streamAckEnabled? 'ENABLED' : 'DISABLED' | translate }}</dd>
|
||||
<dt>{{ 'FAILED_RETRY_COUNT' | translate }}</dt><dd>{{item.failedRetryCount}}</dd>
|
||||
<dt>{{ 'ACK_WAIT_TIME' | translate }}</dt><dd>{{item.ackWaitTime}} {{ 'MILLISECONDS_SHORT' | translate }}</dd>
|
||||
</span>
|
||||
<dt>{{ 'TYPE' | translate }}</dt> <dd>{{item.type}}</dd>
|
||||
<dt>{{ 'NETWORK_TYPE' | translate }}</dt> <dd>{{item.networkType}}</dd>
|
||||
<dt>{{ 'CONNECTION_DETAILS' | translate }}</dt> <dd>{{item.connectionDetails}}</dd>
|
||||
<dt>{{ 'STATUS' | translate }}</dt>
|
||||
<dd>
|
||||
<span class="card-pf-aggregate-status-notification">
|
||||
<span ng-show="item.state.toLowerCase() === 'up'">
|
||||
{{ 'UP' | translate }} <i class="fa fa-arrow-circle-o-up text-color-green fa-lg"></i>
|
||||
</span>
|
||||
<span ng-show="item.state.toLowerCase() === 'down'">
|
||||
{{ 'DOWN' | translate }} <i class="fa fa-arrow-circle-o-down text-color-red fa-lg"></i>
|
||||
</span>
|
||||
<span ng-show="item.state.toLowerCase() === 'unavailable'">
|
||||
{{ 'UNAVAILABLE' | translate }} <i class="fa fa-question-circle text-color-gray fa-lg"></i>
|
||||
</span>
|
||||
</span>
|
||||
</dd>
|
||||
<dt>{{ 'STATUS_SINCE' | translate }}</dt> <dd><span uib-tooltip="{{item.statusSince | date:mchelper.cfg.dateFormat:mchelper.cfg.timezone}}" tooltip-placement="right" am-time-ago="item.statusSince"></span></dd>
|
||||
<dt>{{ 'STATUS_MESSAGE' | translate }}</dt> <dd>{{item.statusMessage}}</dd>
|
||||
<dt>{{ 'TOPOLOGY' | translate }}</dt> <dd><a class="mc-inline-editer-ab" ui-sref="dashboardTopology({ resourceType: 'Gateway', resourceId: item.id})"><span class="pficon pficon-topology mc-icon-lg"></span></a></dd>
|
||||
|
||||
<legend><small>{{ 'RESOURCES' | translate }}</small></legend>
|
||||
<dt><span class="fa fa-sitemap mc-icon-md-3"></span>{{ 'NODES' | translate }}</dt>
|
||||
<dd>
|
||||
<a class="mc-inline-editer-ab" ng-if="resourceCount.nodes > 0" ui-sref="nodesList({ gatewayId: item.id})">{{resourceCount.nodes}}</a>
|
||||
<span ng-if="resourceCount.nodes == 0">{{resourceCount.nodes}}</span>
|
||||
</dd>
|
||||
<dt><span class="fa fa-eye mc-icon-md-3"></span>{{ 'SENSORS' | translate }}</dt>
|
||||
<dd>
|
||||
<span>{{resourceCount.sensors}}</span>
|
||||
</dd>
|
||||
<dt><span class="pficon pficon-replicator mc-icon-md-3"></span>{{ 'RESOURCES_GROUPS' | translate }}</dt>
|
||||
<dd>
|
||||
<a class="mc-inline-editer-ab" ng-if="resourceCount.resourcesGroups > 0" ui-sref="resourcesGroupList({ resourceType:resourceCount.resourceType, resourceId: resourceCount.resourceId})">{{resourceCount.resourcesGroups}}</a>
|
||||
<span ng-if="resourceCount.resourcesGroups == 0">{{resourceCount.resourcesGroups}}</span>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-6 col-sm-6 col-lg-6">
|
||||
<div class="card-pf card-pf-utilization card-pf-accented">
|
||||
<div class="card-pf-heading">
|
||||
<h2 class="card-pf-title">{{ 'STATISTICS' | translate }}</h2>
|
||||
</div>
|
||||
<div class="card-pf-body">
|
||||
<dl class="dl-horizontal">
|
||||
<dt>{{ 'AVERAGE_TIME' | translate }}</dt> <dd>{{statistics.timeAverage | number: 2}} {{ 'MILLISECONDS_SHORT' | translate }}</dd>
|
||||
<dt>{{ 'LAST_MINUTE_AVERAGE' | translate }}</dt> <dd>{{statistics.timeAverageLastMinute | number: 2}} {{ 'MILLISECONDS_SHORT' | translate }}</dd>
|
||||
<dt>{{ 'LAST_MESSAGE' | translate }}</dt> <dd>{{statistics.timeLastMessage}} {{ 'MILLISECONDS_SHORT' | translate }} <span ng-if="statistics.timestamp != 0">| </span><span uib-tooltip="{{item.statusSince | date:mchelper.cfg.dateFormat:mchelper.cfg.timezone}}" tooltip-placement="right" am-time-ago="statistics.timestamp"></span></dd>
|
||||
<dt>{{ 'LAST_MINUTE_RATE' | translate }}</dt> <dd>{{statistics.countLastMinute}}</dd>
|
||||
<dt>{{ 'COUNT' | translate }} ({{ 'TOTAL' | translate }} | Tx)</dt><dd>{{statistics.count}} | {{statistics.txCount}}</dd>
|
||||
<dt>{{ 'FAILURE_COUNT' | translate }}</dt><dd>{{statistics.countFailure}} | {{statistics.percentageFailure | number: 2}}%</dd>
|
||||
<dt>{{ 'MESSAGES_IN_QUEUE' | translate }}</dt> <dd>{{statistics.sizeQueue}}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div><!-- /row1 -->
|
||||
|
||||
</div> <!-- Main Message -->
|
||||
|
||||
</div> <!-- Container-fluid -->
|
||||
118
www/partials/gateways/gateways-list.html
Normal file
118
www/partials/gateways/gateways-list.html
Normal file
@@ -0,0 +1,118 @@
|
||||
<!--
|
||||
|
||||
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="queryResponse.$resolved">
|
||||
<div ng-include src="'partials/common-html/loading.html'"></div>
|
||||
</div>
|
||||
|
||||
<div ng-show="queryResponse.$resolved"> <!-- Main Message -->
|
||||
|
||||
<!-- Page Header -->
|
||||
<div ng-include src="'partials/common-html/header-list.html'"></div>
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="btn-toolbar pull-right" role="toolbar">
|
||||
<div class="btn-group mc-side-space" ng-show="filteredList.length > 0">
|
||||
<label class="mc-align-center mc-top-space-5px">Showing {{(query.pageLimit * (query.page - 1))+1}} to {{getMin(getMin(query.pageLimit * query.page, queryResponse.query.totalItems), queryResponse.query.filteredCount)}} of {{queryResponse.query.totalItems}} items</label>
|
||||
</div>
|
||||
|
||||
<div class="btn-group" role="group" aria-label="" ng-show="filteredList.length > 0">
|
||||
<!-- Single button -->
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" ng-disabled="itemIds.length == 0">
|
||||
{{ 'ACTIONS' | translate }} <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li ng-class="{'disabled': itemIds.length == 0}"><a href='' ng-click="itemIds.length == 0 || delete()" class="text-danger"><i class="fa fa-lg fa-trash"></i> {{ 'DELETE' | translate }}</a></li>
|
||||
<li ng-class="{'disabled': itemIds.length != 1}"><a href='' ng-click="itemIds.length != 1 || edit()" class="text-default"><i class="fa fa-lg fa-edit"></i> {{ 'EDIT' | translate }}</a></li>
|
||||
<li ng-class="{'disabled': itemIds.length == 0}"><a href='' ng-click="itemIds.length == 0 || enable()" class="text-default"><i class="fa fa-lg fa-circle"></i> {{ 'ENABLE' | translate }}</a></li>
|
||||
<li ng-class="{'disabled': itemIds.length == 0}"><a href='' ng-click="itemIds.length == 0 || disable()" class="text-danger"><i class="fa fa-lg fa-circle-thin"></i> {{ 'DISABLE' | translate }}</a></li>
|
||||
<li ng-class="{'disabled': itemIds.length == 0}"><a href='' ng-click="itemIds.length == 0 || reload()" class="text-danger"><i class="fa fa-lg fa-retweet"></i> {{ 'RELOAD' | translate }}</a></li>
|
||||
<li ng-class="{'disabled': itemIds.length == 0}"><a href='' ng-click="itemIds.length == 0 || discover()" class="text-default"><i class="fa fa-lg fa-search"></i> {{ 'DISCOVER' | translate }}</a></li>
|
||||
<li ng-class="{'disabled': itemIds.length == 0}"><a href='' ng-click="itemIds.length == 0 || refreshNodesInfo()" class="text-default"><i class="fa fa-lg fa-refresh"></i> {{ 'REFRESH_NODES_INFO' | translate }}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div ng-show="mchelper.user.permission === 'Super admin'" class="btn-group" role="group">
|
||||
<a class="btn btn-primary" type="button" ui-sref="gatewaysAddEdit"><i class="fa fa-plus"></i> {{ 'ADD' | translate }}</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="pull-right mc-v-margin" ng-show="filteredList.length > 0">
|
||||
<div pf-sort id="itemsSort" config="sortConfig"></div>
|
||||
</div>
|
||||
|
||||
<div pf-filter id="itemsFilter" config="filterConfig" ng-show="queryResponse.query.totalItems > 0"></div>
|
||||
</div>
|
||||
|
||||
<!-- Display No Items on system -->
|
||||
<div ng-include src="'partials/common-html/no-items-system.html'"></div>
|
||||
|
||||
<!-- Display When no data on table -->
|
||||
<div ng-include src="'partials/common-html/no-items-filter.html'"></div>
|
||||
|
||||
<div ng-show="filteredList.length > 0">
|
||||
<!-- Table -->
|
||||
<table class="table table-hover table-bordered table-striped mc-table">
|
||||
<thead>
|
||||
<th class="mc-align-center"><input type="checkbox" ng-checked="itemIds.length == filteredList.length" ng-click="selectAllItems()"></th>
|
||||
<th>{{ 'ENABLED' | translate }}</th>
|
||||
<th>{{ 'NAME' | translate }}</th>
|
||||
<th>{{ 'TYPE' | translate }}</th>
|
||||
<th>{{ 'NETWORK_TYPE' | translate }}</th>
|
||||
<th>{{ 'CONNECTION_DETAILS' | translate }}</th>
|
||||
<th>{{ 'STATUS' | translate }}</th>
|
||||
<th>{{ 'STATUS_SINCE' | translate }}</th>
|
||||
<th>{{ 'STATUS_MESSAGE' | translate }}</th>
|
||||
<th></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr dir-paginate="item in filteredList | itemsPerPage: query.pageLimit" total-items="queryResponse.query.totalItems" current-page="currentPage"
|
||||
ng-class="{'mc-selected': itemIds.indexOf(item.id) != -1}" ng-click="selectItem(item)">
|
||||
<td class="mc-align-center"><input type="checkbox" ng-checked="itemIds.indexOf(item.id) != -1"></td>
|
||||
<td class="text-center">
|
||||
<i ng-show="item.enabled" class="text-success fa fa-circle fa-lg" uib-tooltip="{{ 'ENABLED' | translate }}"></i>
|
||||
<i ng-hide="item.enabled" class="text-danger fa fa-circle-o fa-lg" uib-tooltip="{{ 'DISABLED' | translate }}"></i>
|
||||
</td>
|
||||
<td>{{item.name}}</td>
|
||||
<td>{{item.type}}</td>
|
||||
<td>{{item.networkType}}</td>
|
||||
<td>{{item.connectionDetails}}</td>
|
||||
<td class="text-center">
|
||||
<i uib-tooltip="{{ 'DOWN' | translate }}" ng-show="item.state == 'Down'" class="pficon pficon-error-circle-o fa-lg"></i>
|
||||
<i uib-tooltip="{{ 'UNAVAILABLE' | translate }}" ng-show="item.state == 'Unavailable'" class="pficon pficon-help text-color-gray fa-lg"></i>
|
||||
<i uib-tooltip="{{ 'UP' | translate }}" ng-show="item.state == 'Up'" class="pficon pficon-ok fa-lg"></i>
|
||||
</td>
|
||||
<td><span uib-tooltip="{{item.statusSince | date:mchelper.cfg.dateFormat:mchelper.cfg.timezone}}" tooltip-placement="left" am-time-ago="item.statusSince"></span></td>
|
||||
<td>{{item.statusMessage}}</td>
|
||||
<td class="mc-align-center">
|
||||
<a class="btn btn-link" ui-sref="gatewaysDetail({'id':item.id})"><i class="fa fa-chevron-circle-right fa-lg" tooltip="{{ 'VIEW_DETAILS' | translate }}" tooltip-trigger tooltip-placement="top"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<dir-pagination-controls class="pull-right" boundary-links="true" on-page-change="pageChanged(newPageNumber)"></dir-pagination-controls>
|
||||
</div>
|
||||
|
||||
</div> <!-- Main Message -->
|
||||
|
||||
</div> <!-- Container-fluid -->
|
||||
Reference in New Issue
Block a user