| 1 |
<div class="wrap" ng-controller="wpStatelessProcessing" ng-init="init()"> |
| 2 |
|
| 3 |
<noscript> |
| 4 |
<p><em><?php _e('You must enable Javascript in order to use this feature!', ud_get_stateless_media()->domain); ?></em></p> |
| 5 |
</noscript> |
| 6 |
|
| 7 |
<div ng-show="errors.length" class="stateless-admin-notice admin-error"> |
| 8 |
<strong><?php _e('Errors encountered. Try reloading the page.', ud_get_stateless_media()->domain); ?></strong> |
| 9 |
<ul> |
| 10 |
<li ng-repeat="error in errors">{{error}}</li> |
| 11 |
</ul> |
| 12 |
</div> |
| 13 |
|
| 14 |
<div ng-show="processes.isLoading"><?php _e('Loading available processes...', ud_get_stateless_media()->domain); ?></div> |
| 15 |
|
| 16 |
<div class="metabox-holder" ng-show="processes.classes.length"> |
| 17 |
<p class="processing-hint"><strong><?php _e('Hint', ud_get_stateless_media()->domain) ?>:</strong> <?php _e('You can close this page once processing is started.', ud_get_stateless_media()->domain) ?></p> |
| 18 |
<div class="postbox-container"> |
| 19 |
|
| 20 |
<div class="postbox" ng-repeat="process in processes.classes"> |
| 21 |
<div class="postbox-header"> |
| 22 |
<h2 class="hndle"> |
| 23 |
<div class="title-holder" ng-bind-html="process.name"> |
| 24 |
</div> |
| 25 |
<span> |
| 26 |
<span title="<?php _e('Processing in progress...', ud_get_stateless_media()->domain) ?>" ng-show="process.is_running" class="loading dashicons dashicons-update"></span> |
| 27 |
<a ng-show="process.helper" href="javascript:;" data-position='{"edge":"left","align":"center"}' data-title="{{process.helper.title}}" data-text="{{process.helper.content}}" class="pointer dashicons dashicons-info"></a> |
| 28 |
</span> |
| 29 |
</h2> |
| 30 |
</div> |
| 31 |
<div class="inside"> |
| 32 |
<ul> |
| 33 |
<li><strong><?php _e('Total Items', ud_get_stateless_media()->domain) ?>:</strong> <span>{{process.total_items}}</span></li> |
| 34 |
</ul> |
| 35 |
<div class="options" ng-show="process.allow_limit"> |
| 36 |
<label><?php _e('Enable Limit', ud_get_stateless_media()->domain) ?> <input type="checkbox" ng-model="process.limit_enabled" ng-disabled="process.is_running" ng-change="process.limit = 0" /></label> |
| 37 |
<label ng-style="{visibility: process.limit_enabled || process.limit > 0 ? 'visible' : 'hidden'}"> |
| 38 |
<input ng-disabled="!process.limit_enabled || process.is_running" type="number" ng-model="process.limit" style="width:80px" /> |
| 39 |
</label> |
| 40 |
</div> |
| 41 |
<div class="options" ng-show="process.allow_sorting"> |
| 42 |
<label> |
| 43 |
<?php _e('Start from', ud_get_stateless_media()->domain) ?> |
| 44 |
<select ng-model="process.order" ng-disabled="process.is_running"> |
| 45 |
<option value="desc"><?php _e('newest', ud_get_stateless_media()->domain) ?></option> |
| 46 |
<option value="asc"><?php _e('oldest', ud_get_stateless_media()->domain) ?></option> |
| 47 |
</select> |
| 48 |
</label> |
| 49 |
</div> |
| 50 |
<div class="progress" ng-show="process.is_running"> |
| 51 |
<div class="bar-wrapper"> |
| 52 |
<div class="legend"> |
| 53 |
<strong class="total"><?php _e('Total', ud_get_stateless_media()->domain) ?>: {{process.getProgressTotal()}}</strong> |
| 54 |
<strong class="queued"><?php _e('Queued', ud_get_stateless_media()->domain) ?>: {{process.getQueuedTotal()}}</strong> |
| 55 |
<strong class="processed"><?php _e('Processed', ud_get_stateless_media()->domain) ?>: {{process.processed_items}}</strong> |
| 56 |
</div> |
| 57 |
<div class="bar total" ng-style="{'background-color': process.getProgressTotal() == process.getProcessedTotal() ? '#02ae7a' : false}"> |
| 58 |
<div class="bar queued" ng-style="{width: percentage(process.getQueuedTotal(), process.getProgressTotal()),'background-color': process.getProgressTotal() == process.getProcessedTotal() ? '#02ae7a' : false}"> |
| 59 |
<div class="bar processed" ng-style="{width: percentage(process.getProcessedTotal(), process.getQueuedTotal()), 'background-color': process.getProgressTotal() == process.getProcessedTotal() ? '#02ae7a' : false}"> </div> |
| 60 |
</div> |
| 61 |
</div> |
| 62 |
</div> |
| 63 |
</div> |
| 64 |
<div class="progress-notice" ng-show="process.notice.length && process.is_running"> |
| 65 |
<p ng-repeat="notice in process.notice" ng-bind-html="notice"></p> |
| 66 |
</div> |
| 67 |
<div class="actions"> |
| 68 |
<button type="button" class="button button-primary" ng-class="{disabled: !process.canRun()}" ng-click="!process.canRun() || process.run()"><?php _e('Run', ud_get_stateless_media()->domain) ?></button> |
| 69 |
<button type="button" class="button button-secondary" ng-class="{disabled: !process.canStop()}" ng-click="!process.canStop() || process.stop()"><?php _e('Stop', ud_get_stateless_media()->domain) ?></button> |
| 70 |
</div> |
| 71 |
</div> |
| 72 |
</div> |
| 73 |
</div> |
| 74 |
</div> |
| 75 |
|
| 76 |
</div> |