PluginProbe
WP-Stateless – Google Cloud Storage / trunk
WP-Stateless – Google Cloud Storage vtrunk
4.4.3 2.1.7 2.1.8 2.1.9 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 2.2.7 2.3.0 2.3.1 2.3.2 3.0 3.0.1 3.0.2 3.0.3 3.0.4 3.1.0 3.1.1 3.2.0 3.2.1 3.2.2 All 62 releases
← All changes | static/views/processing_interface.php +72 -68 3.1.0trunk View file →
@@ -1,82 +1,86 @@
1 -<div class="wrap" ng-controller="wpStatelessProcessing" ng-init="init()">
1 +<div class="wrap">
2 2
3 - <?php if (ud_get_stateless_media('sm.mode') === 'stateless') : ?>
4 - <p><strong><?php _e('Currently, WP-Stateless cannot sync media files in Stateless mode. If you need to upload all your local media files to GCS, try syncing in Ephemeral mode instead and then switch back to Stateless.', ud_get_stateless_media()->domain); ?></strong></p>
5 -</div>
6 -<?php return;
7 - endif; ?>
3 + <div id="errors" class="stateless-admin-notice admin-error">
4 + <strong><?php _e('Errors encountered. Try reloading the page.', ud_get_stateless_media()->domain); ?></strong>
5 + <ul></ul>
6 + </div>
8 7
9 -<noscript>
10 - <p><em><?php _e('You must enable Javascript in order to use this feature!', ud_get_stateless_media()->domain); ?></em></p>
11 -</noscript>
8 + <div class="metabox-holder processes-holder">
9 + <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>
10 +
11 + <div class="postbox-container">
12 + <?php foreach ($processes as $process) : ?>
12 13
13 -<div ng-show="errors.length" class="stateless-admin-notice admin-error">
14 - <strong><?php _e('Errors encountered. Try reloading the page.', ud_get_stateless_media()->domain); ?></strong>
15 - <ul>
16 - <li ng-repeat="error in errors">{{error}}</li>
17 - </ul>
18 -</div>
14 + <div class="postbox" data-id="<?php echo preg_replace('/[^a-zA-Z0-9]/', '', $process->id); ?>">
19 15
20 -<div ng-show="processes.isLoading"><?php _e('Loading available processes...', ud_get_stateless_media()->domain); ?></div>
16 + <div class="postbox-header">
17 + <h2 class="hndle">
18 + <div class="title-holder"><?php echo $process->name; ?></div>
21 19
22 -<div class="metabox-holder" ng-show="processes.classes.length">
23 - <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>
24 - <div class="postbox-container">
20 + <span>
21 + <span title="<?php _e('Processing in progress...', ud_get_stateless_media()->domain) ?>" class="loading dashicons dashicons-update"></span>
25 22
26 - <div class="postbox" ng-repeat="process in processes.classes">
27 - <div class="postbox-header">
28 - <h2 class="hndle">
29 - <div class="title-holder" ng-bind-html="process.name">
23 + <?php if ($process->helper) : ?>
24 + <a href="javascript:;" data-position='{"edge":"left","align":"center"}' data-title="<?php echo $process->helper['title']; ?>" data-text="<?php echo $process->helper['content']; ?>" class="pointer dashicons dashicons-info"></a>
25 + <?php endif; ?>
26 + </span>
27 + </h2>
30 28 </div>
31 - <span>
32 - <span title="<?php _e('Processing in progress...', ud_get_stateless_media()->domain) ?>" ng-show="process.is_running" class="loading dashicons dashicons-update"></span>
33 - <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>
34 - </span>
35 - </h2>
36 - </div>
37 - <div class="inside">
38 - <ul>
39 - <li><strong><?php _e('Total Items', ud_get_stateless_media()->domain) ?>:</strong> <span>{{process.total_items}}</span></li>
40 - </ul>
41 - <div class="options" ng-show="process.allow_limit">
42 - <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>
43 - <label ng-style="{visibility: process.limit_enabled || process.limit > 0 ? 'visible' : 'hidden'}">
44 - <input ng-disabled="!process.limit_enabled || process.is_running" type="number" ng-model="process.limit" style="width:80px" />
45 - </label>
46 - </div>
47 - <div class="options" ng-show="process.allow_sorting">
48 - <label>
49 - <?php _e('Start from', ud_get_stateless_media()->domain) ?>
50 - <select ng-model="process.order" ng-disabled="process.is_running">
51 - <option value="desc"><?php _e('newest', ud_get_stateless_media()->domain) ?></option>
52 - <option value="asc"><?php _e('oldest', ud_get_stateless_media()->domain) ?></option>
53 - </select>
54 - </label>
55 - </div>
56 - <div class="progress" ng-show="process.is_running">
57 - <div class="bar-wrapper">
58 - <div class="legend">
59 - <strong class="total"><?php _e('Total', ud_get_stateless_media()->domain) ?>: {{process.getProgressTotal()}}</strong>
60 - <strong class="queued"><?php _e('Queued', ud_get_stateless_media()->domain) ?>: {{process.getQueuedTotal()}}</strong>
61 - <strong class="processed"><?php _e('Processed', ud_get_stateless_media()->domain) ?>: {{process.processed_items}}</strong>
29 +
30 + <div class="inside">
31 + <ul>
32 + <li><strong><?php _e('Total Items', ud_get_stateless_media()->domain) ?>:</strong> <span><?php echo $process->total_items; ?></span></li>
33 + </ul>
34 +
35 + <?php if ($process->allow_limit) : ?>
36 + <div class="options">
37 + <label><?php _e('Enable Limit', ud_get_stateless_media()->domain) ?> <input type="checkbox" class="limit_enabled"/></label>
38 +
39 + <label class="limit_field">
40 + <input type="number" style="width:80px" />
41 + </label>
42 + </div>
43 + <?php endif; ?>
44 +
45 + <?php if ($process->allow_sorting) : ?>
46 + <div class="options">
47 + <label>
48 + <?php _e('Start from', ud_get_stateless_media()->domain) ?>
49 + <select class="order_value">
50 + <option value="desc" selected><?php _e('newest', ud_get_stateless_media()->domain) ?></option>
51 + <option value="asc"><?php _e('oldest', ud_get_stateless_media()->domain) ?></option>
52 + </select>
53 + </label>
54 + </div>
55 + <?php endif; ?>
56 +
57 + <div class="progress">
58 + <div class="bar-wrapper">
59 + <div class="legend">
60 + <strong class="total"><?php _e('Total', ud_get_stateless_media()->domain) ?>: <span></span></strong>
61 + <strong class="queued"><?php _e('Queued', ud_get_stateless_media()->domain) ?>: <span></span></strong>
62 + <strong class="processed"><?php _e('Processed', ud_get_stateless_media()->domain) ?>: <span></span></strong>
63 + </div>
64 +
65 + <div class="bar total">
66 + <div class="bar queued">
67 + <div class="bar processed">&nbsp;</div>
68 + </div>
69 + </div>
70 + </div>
62 71 </div>
63 - <div class="bar total" ng-style="{'background-color': process.getProgressTotal() == process.getProcessedTotal() ? '#02ae7a' : false}">
64 - <div class="bar queued" ng-style="{width: percentage(process.getQueuedTotal(), process.getProgressTotal()),'background-color': process.getProgressTotal() == process.getProcessedTotal() ? '#02ae7a' : false}">
65 - <div class="bar processed" ng-style="{width: percentage(process.getProcessedTotal(), process.getQueuedTotal()), 'background-color': process.getProgressTotal() == process.getProcessedTotal() ? '#02ae7a' : false}">&nbsp;</div>
66 - </div>
72 +
73 + <div class="progress-notice"></div>
74 +
75 + <div class="actions">
76 + <button type="button" class="button button-primary disabled"><?php _e('Run', ud_get_stateless_media()->domain) ?></button>
77 + <button type="button" class="button button-secondary disabled"><?php _e('Stop', ud_get_stateless_media()->domain) ?></button>
67 78 </div>
79 +
68 80 </div>
69 81 </div>
70 - <div class="progress-notice" ng-show="process.notice.length && process.is_running">
71 - <p ng-repeat="notice in process.notice" ng-bind-html="notice"></p>
72 - </div>
73 - <div class="actions">
74 - <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>
75 - <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>
76 - </div>
77 - </div>
82 + <?php endforeach; ?>
78 83 </div>
79 84 </div>
85 +
80 86 </div>
81 -
82 -</div>