Initial setup of mycontroller
This commit is contained in:
120
www/partials/resources-logs/resources-logs-list.html
Normal file
120
www/partials/resources-logs/resources-logs-list.html
Normal file
@@ -0,0 +1,120 @@
|
||||
<!--
|
||||
|
||||
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" role="group" aria-label="" ng-show="filteredList.length > 0 && mchelper.user.permission === 'Super admin'">
|
||||
|
||||
<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>
|
||||
|
||||
<!-- Number of items per page -->
|
||||
<div class="btn-group mc-side-space">
|
||||
<select pf-select ng-model="itemsPerPage" ng-change="updateItemsPerPage(itemsPerPage)">
|
||||
<option value="" ng-hide="true"></option>
|
||||
<option value="10">10 items per page</option>
|
||||
<option value="25">25 items per page</option>
|
||||
<option value="50">50 items per page</option>
|
||||
<option value="100">100 items per page</option>
|
||||
<option value="250">250 items per page</option>
|
||||
<option value="500">500 items per page</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- 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>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div ng-show="mchelper.user.permission === 'Super admin'" class="btn-group" role="group" ng-show="queryResponse.query.totalItems > 0">
|
||||
<a class="btn btn-primary" type="button" ui-sref="resourcesLogsPurge">{{ 'PURGE' | translate }}</a>
|
||||
</div>
|
||||
|
||||
<div ng-show="mchelper.user.permission === 'Super admin'" class="btn-group" role="group" ng-show="queryResponse.query.totalItems > 0">
|
||||
<button class="btn btn-default" type="button" ng-click="getAllItems()">
|
||||
<i class="fa fa-refresh"></i> {{ 'REFRESH' | translate }}</button>
|
||||
</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>{{ 'TIME' | translate }}</th>
|
||||
<th>{{ 'LEVEL' | translate }}</th>
|
||||
<th>{{ 'TYPE' | translate }}</th>
|
||||
<th>{{ 'RESOURCE' | translate }}</th>
|
||||
<th>{{ 'DIRECTION' | translate }}</th>
|
||||
<th>{{ 'MESSAGE_TYPE' | translate }}</th>
|
||||
<th>{{ 'MESSAGE' | translate }}</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr dir-paginate="item in filteredList | itemsPerPage: query.pageLimit" total-items="queryResponse.query.filteredCount" 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="mc-single-row">{{item.timestamp | date:mchelper.cfg.dateFormat:mchelper.cfg.timezone}}</td>
|
||||
<td>{{item.logLevel}}</td>
|
||||
<td>{{item.resourceType}}</td>
|
||||
<td ng-bind-html="item.resource | mcResourceRepresentation"></td>
|
||||
<td>{{item.logDirection}}</td>
|
||||
<td>{{item.messageType}}</td>
|
||||
<td ng-bind-html="item.message | mcResourceRepresentation"></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 -->
|
||||
115
www/partials/resources-logs/resources-logs-purge.html
Normal file
115
www/partials/resources-logs/resources-logs-purge.html
Normal file
@@ -0,0 +1,115 @@
|
||||
<!--
|
||||
|
||||
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><!-- div-main -->
|
||||
<form class="form-horizontal">
|
||||
<div class="col-md-5">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ 'RESOURCE' | translate }}</label>
|
||||
<div class="col-sm-4 mc-form-fixer-left">
|
||||
<select class="form-control" pf-select ng-options="rT.displayName as rT.displayName for rT in resourceTypes"
|
||||
ng-change="resourcesList = getResources(resourcesLogs.resourceType);resourcesLogs.resourceId=''" ng-model="resourcesLogs.resourceType">
|
||||
<option value="" ng-hide="true"></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-6 mc-form-fixer" ng-hide="resourcesLogs.resourceType === null || resourcesLogs.resourceType === undefined || resourcesLogs.resourceType === ''"><!-- List Resource -->
|
||||
<select class="form-control" pf-select data-live-search="true" ng-model="resourcesLogs.resourceId">
|
||||
<option value="" ng-hide="true"></option>
|
||||
<option ng-repeat="res in resourcesList" ng-bind-html="res.displayName | mcResourceRepresentation" value="{{res.id}}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ 'MESSAGE_TYPE' | translate }}</label>
|
||||
<div class="col-sm-10 mc-form-fixer-left">
|
||||
<select class="form-control" pf-select ng-options="mt.displayName as mt.displayName for mt in messageTypes" ng-model="resourcesLogs.messageType">
|
||||
<option value="" ng-hide="true"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ 'LOG_DIRECTION' | translate }}</label>
|
||||
<div class="col-sm-10 mc-form-fixer-left">
|
||||
<select class="form-control" pf-select ng-options="ld.displayName as ld.displayName for ld in logDirections" ng-model="resourcesLogs.logDirection">
|
||||
<option value="" ng-hide="true"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ 'LOG_LEVEL' | translate }}</label>
|
||||
<div class="col-sm-10 mc-form-fixer-left">
|
||||
<select class="form-control" pf-select ng-options="ll.displayName as ll.displayName for ll in logLevels" ng-model="resourcesLogs.logLevel">
|
||||
<option value="" ng-hide="true"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ 'MESSAGE_CONTAINS' | translate }}</label>
|
||||
<div class="col-sm-10 mc-form-fixer-left">
|
||||
<input class="form-control" placeholder="Message contains" ng-model="resourcesLogs.message"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ 'PURGE_BEFORE' | translate }}</label>
|
||||
|
||||
<div class="col-sm-10 mc-form-fixer-left">
|
||||
<div class="dropdown">
|
||||
<a class="dropdown-toggle" id="datetime1" role="button" data-toggle="dropdown" data-target="#" href="">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control mc-show-disabled" data-ng-model="pBeforeString" ng-readonly="true">
|
||||
<span class="input-group-addon">
|
||||
<i class="fa fa-calendar fa-lg"></i>
|
||||
</span>
|
||||
</div>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
|
||||
<datetimepicker data-ng-model="purgeBefore" data-on-set-time="pBeforeString = getDateTimeDisplayFormat(newDate)" data-datetimepicker-config="{ dropdownSelector: '#datetime1', minuteStep:1 }"/>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Include save form buttons -->
|
||||
<div ng-include src="'partials/common-html/save-form.html'"></div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div><!-- div-main -->
|
||||
|
||||
</div> <!-- Main Message -->
|
||||
</div> <!-- container -->
|
||||
Reference in New Issue
Block a user