Initial setup of mycontroller
This commit is contained in:
117
www/partials/backup/automatic-backup-settings.html
Normal file
117
www/partials/backup/automatic-backup-settings.html
Normal file
@@ -0,0 +1,117 @@
|
||||
<!--
|
||||
|
||||
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 mc-top-space-1x"> <!-- Container-fluid -->
|
||||
|
||||
<!-- Loading icon disaplay -->
|
||||
<div ng-hide="item.$resolved">
|
||||
<div ng-include src="'partials/common-html/loading.html'"></div>
|
||||
</div>
|
||||
|
||||
<div ng-show="item.$resolved"> <!-- Main Message -->
|
||||
|
||||
<!-- Email settings -->
|
||||
<div class="col-md-12">
|
||||
<div class="card-pf card-pf-accented">
|
||||
<div class="card-pf-heading"><h2 class="card-pf-title"><i class="fa fa-database"></i> {{ 'BACKUP_SETTINGS' | translate }}</h2></div>
|
||||
<div class="card-pf-body">
|
||||
<form class="form-horizontal" name="mcBackupSettingsForm">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ 'BACKUP_LOCATION' | translate }}</label>
|
||||
<div class="col-sm-7">
|
||||
<input ng-show="editEnable.backupSettings" class="form-control" placeholder="{{ 'BACKUP_LOCATION' | translate }}" ng-model="item.backupLocation" required />
|
||||
<div ng-hide="editEnable.backupSettings">{{item.backupLocation}}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<legend><small>{{ 'AUTOMATIC_BACKUP_SETTINGS' | translate }}</small></legend>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ 'STATUS' | translate }}</label>
|
||||
<div class="col-sm-5">
|
||||
<input bs-switch ng-change="editEnable.backupSettings = true" ng-model="item.enabled" type="checkbox"
|
||||
switch-animate="true" switch-handle-width="50px" switch-label-width="3px"
|
||||
switch-off-color="default" switch-on-color="primary" ng-true-value="true"
|
||||
ng-false-value="false" switch-on-text="{{ 'ON' | translate }}" switch-off-text="{{ 'OFF' | translate }}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div ng-if="item.enabled">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ 'BACKUP_FILE_PREFIX' | translate }}</label>
|
||||
<div class="col-sm-7">
|
||||
<input ng-show="editEnable.backupSettings" class="form-control" placeholder="{{ 'BACKUP_FILE_PREFIX' | translate }}" ng-model="item.prefix" pf-validation="cs.isContainsSpace(input)" required />
|
||||
<span class="help-block">{{ 'VALIDATION_ERROR_NO_SPACE_ALLOWED' | translate }}</span>
|
||||
<div ng-hide="editEnable.backupSettings">{{item.prefix}}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ 'BACKUP_EVERY' | translate }}</label>
|
||||
<div class="col-sm-4" ng-show="editEnable.backupSettings">
|
||||
<input ng-show="editEnable.backupSettings" class="form-control" placeholder="{{ 'BACKUP_EVERY' | translate }}" ng-model="$parent.intervalLocal" pf-validation="cs.isNumber(input)" required />
|
||||
<span class="help-block">{{ 'VALIDATION_ERROR_NUMBER' | translate }}</span>
|
||||
</div>
|
||||
<div ng-if="!editEnable.backupSettings" class="col-sm-7">
|
||||
<div>{{$parent.intervalLocal}} {{$parent.intervalTimeConstantString}}</div>
|
||||
</div>
|
||||
<div class="col-sm-3" ng-show="editEnable.backupSettings" >
|
||||
<select class="form-control" pf-select ng-model="$parent.intervalTimeConstant" required>
|
||||
<option value="" ng-hide="true"></option>
|
||||
<option value="60000">{{ 'MINUTES' | translate }}</option>
|
||||
<option value="3600000">{{ 'HOURS' | translate }}</option>
|
||||
<option value="86400000">{{ 'DAYS' | translate }}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ 'RETAIN_MAX' | translate }}</label>
|
||||
<div class="col-sm-7">
|
||||
<input ng-show="editEnable.backupSettings" class="form-control" placeholder="{{ 'RETAIN_MAX' | translate }}" ng-model="item.retainMax" pf-validation="cs.isNumber(input)" required />
|
||||
<span class="help-block">{{ 'VALIDATION_ERROR_NUMBER' | translate }}</span>
|
||||
<div ng-hide="editEnable.backupSettings">{{item.retainMax}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div ng-if="item.enabled && !editEnable.backupSettings">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ 'NEXT_EXECUTION' | translate }}</label>
|
||||
<div class="col-sm-7">
|
||||
<div><span>{{item.nextFire | date:mchelper.cfg.dateFormat:mchelper.cfg.timezone}}</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<div class="form-actions text-right">
|
||||
<button type="button" class="btn btn-default" class="button" ng-hide="editEnable.backupSettings" ng-click="editEnable.backupSettings = true">{{ 'EDIT' | translate }}</button>
|
||||
<button type="button" class="btn btn-default" class="button" ng-show="editEnable.backupSettings" ng-click="resetSettings();editEnable.backupSettings = false">{{ 'CANCEL' | translate }}</button>
|
||||
<button type="button" class="btn btn-primary" ng-click="save()" ng-show="editEnable.backupSettings" ng-disabled="saveProgress || mcBackupSettingsForm.$invalid">
|
||||
<div ng-show="saveProgress" class="spinner spinner-xs"></div>
|
||||
{{ 'SAVE' | translate }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div> <!-- Main Message -->
|
||||
</div> <!-- container -->
|
||||
95
www/partials/backup/backup-list.html
Normal file
95
www/partials/backup/backup-list.html
Normal file
@@ -0,0 +1,95 @@
|
||||
<!--
|
||||
|
||||
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>
|
||||
<!-- Single button -->
|
||||
<div class="btn-group" ng-if="filteredList.length > 0">
|
||||
<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 || restoreItemFn()" class="text-default"><i class="fa fa-lg fa-undo"></i> {{ 'RESTORE' | translate }}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- Single button -->
|
||||
<div class="btn-group" role="group">
|
||||
<a class="btn btn-default" type="button" ui-sref="settingsBackupAuto">{{ 'SETTINGS' | translate }}</a></a>
|
||||
</div>
|
||||
<!-- Single button -->
|
||||
<div class="btn-group" role="group">
|
||||
<a class="btn btn-primary" ng-disabled="disableRunBackup" type="button" ng-click="backupNow()">{{ 'RUN_BACKUP' | translate }}</a></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- for now always hide sort by. this moment this feature not supported -->
|
||||
<div class="pull-right mc-v-margin" ng-show="false">
|
||||
<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>{{ 'FILE_NAME' | translate }}</th>
|
||||
<th>{{ 'FILE_SIZE' | translate }}</th>
|
||||
<th>{{ 'BACKUP_ON' | translate }}</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.name) != -1}" ng-click="selectItem(item)">
|
||||
<td class="mc-align-center"><input type="checkbox" ng-checked="itemIds.indexOf(item.name) != -1"></td>
|
||||
<td>{{item.name}}</td>
|
||||
<td>{{item.size | byteToFriendlyConvertor}}</td>
|
||||
<td><span uib-tooltip="{{item.timestamp | date:mchelper.cfg.dateFormat:mchelper.cfg.timezone}}" tooltip-placement="left" am-time-ago="item.timestamp"></span></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 -->
|
||||
|
||||
36
www/partials/backup/restore-confirmation-modal.html
Normal file
36
www/partials/backup/restore-confirmation-modal.html
Normal file
@@ -0,0 +1,36 @@
|
||||
<!--
|
||||
|
||||
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>
|
||||
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true" ng-click="cancel()">
|
||||
<span class="pficon pficon-close"></span>
|
||||
</button>
|
||||
<div class="modal-title"><b>{{header}}</b></div>
|
||||
</div>
|
||||
|
||||
<div class="modal-body modal-body-text-only">
|
||||
<small ng-bind-html="rebootMsg"></small>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-default" ng-click="cancel()"><i class="fa fa-close"></i> {{ 'CANCEL' | translate }}</button>
|
||||
<button class="btn btn-danger" ng-click="restore()"><i class="fa fa-undo"></i> {{ 'RESTORE' | translate }}</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
Reference in New Issue
Block a user