|
| 1 | +<?php |
| 2 | +/*========================================================================= |
| 3 | + MIDAS Server |
| 4 | + Copyright (c) Kitware SAS. 26 rue Louis Guérin. 69100 Villeurbanne, FRANCE |
| 5 | + All rights reserved. |
| 6 | + More information http://www.kitware.com |
| 7 | +
|
| 8 | + Licensed under the Apache License, Version 2.0 (the "License"); |
| 9 | + you may not use this file except in compliance with the License. |
| 10 | + You may obtain a copy of the License at |
| 11 | +
|
| 12 | + http://www.apache.org/licenses/LICENSE-2.0.txt |
| 13 | +
|
| 14 | + Unless required by applicable law or agreed to in writing, software |
| 15 | + distributed under the License is distributed on an "AS IS" BASIS, |
| 16 | + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 17 | + See the License for the specific language governing permissions and |
| 18 | + limitations under the License. |
| 19 | +=========================================================================*/ |
| 20 | + |
| 21 | +$this->declareVars('jobs', 'jobsErrors', 'pageTitle'); |
| 22 | +$this->headTitle($this->escape($this->pageTitle)); |
| 23 | +?> |
| 24 | + |
| 25 | +<div class="viewMain"> |
| 26 | + <h1><?php echo $this->escape($this->pageTitle); ?></h1> |
| 27 | + <p>Visit the Midas Platform |
| 28 | + <a href="http://www.kitware.com/midaswiki/index.php/Documentation/Latest/User/Administration/ConfigurePlugins#Task_Scheduler">wiki |
| 29 | + pages</a> for instructions on completing the installation of the task scheduler.</a></p> |
| 30 | + <?php |
| 31 | + if (!empty($this->jobs)) { |
| 32 | + ?> |
| 33 | + <h2>Scheduled Tasks</h2> |
| 34 | + <table> |
| 35 | + <tr> |
| 36 | + <th>Name</th> |
| 37 | + <th>Date</th> |
| 38 | + <th>Parameters (JSON)</th> |
| 39 | + <th>Actions</th> |
| 40 | + </tr> |
| 41 | + <?php |
| 42 | + foreach ($this->jobs as $job) { |
| 43 | + ?> |
| 44 | + <tr> |
| 45 | + <td> |
| 46 | + <?php echo $this->escape($job->getTask()); ?> |
| 47 | + </td> |
| 48 | + <td> |
| 49 | + <?php echo $this->escape($job->getFireTime()); ?> |
| 50 | + </td> |
| 51 | + <td qtip='<?php echo $this->escape(str_replace("'", '"', $job->getParams())); ?>'> |
| 52 | + <?php echo $this->escape(substr($job->getParams(), 0, 30)); ?> |
| 53 | + </td> |
| 54 | + <td> |
| 55 | + <a href="<?php echo $this->url(array('module' => 'scheduler', 'controller' => 'run', 'action' => 'index')); ?>?id=<?php echo $this->escape($job->getKey()); ?>">Run |
| 56 | + Now</a> |
| 57 | + </td> |
| 58 | + </tr> |
| 59 | + <?php |
| 60 | + } |
| 61 | + ?> |
| 62 | + </table> |
| 63 | + <?php |
| 64 | + } |
| 65 | + if (!empty($this->jobsErrors)) { |
| 66 | + ?> |
| 67 | + <h2>Last Failed Tasks</h2> |
| 68 | + <table> |
| 69 | + <tr> |
| 70 | + <th>Name</th> |
| 71 | + <th>Date</th> |
| 72 | + <th>Parameters (JSON)</th> |
| 73 | + </tr> |
| 74 | + <?php |
| 75 | + foreach ($this->jobsErrors as $job) { |
| 76 | + ?> |
| 77 | + <tr> |
| 78 | + <td> |
| 79 | + <?php echo $this->escape($job->getTask()); ?> |
| 80 | + </td> |
| 81 | + <td> |
| 82 | + <?php echo $this->escape($job->getFireTime()); ?> |
| 83 | + </td> |
| 84 | + <td qtip="<?php echo $this->escape($job->getParams()); ?>"> |
| 85 | + <?php echo $this->escape(substr($job->getParams(), 0, 30)); ?> |
| 86 | + </td> |
| 87 | + </tr> |
| 88 | + <?php |
| 89 | + } |
| 90 | + ?> |
| 91 | + </table> |
| 92 | + <?php |
| 93 | + } |
| 94 | + ?> |
| 95 | + <p><a href="<?php echo $this->url(array('controller' => 'admin', 'action' => 'index'), 'default'); ?>#tabs-modules">« Back to Modules Administration</a></p> |
| 96 | +</div> |
| 97 | + |
0 commit comments