[*] MQ раскрасил таблицу
This commit is contained in:
1 parent
90af02f6cb
commit
acbf7dc35b
5 files changed
+24
-6
No files matched your search
@@ -43,6 +43,7 @@
|
||||
|
||||
$image = new Thumbs($_SERVER['DOCUMENT_ROOT'] . $File->getPath());
|
||||
$image->thumb(300, 300);
|
||||
$image->watermark(UPLOADS_PATH . '/watermark_small.png', 'bottom-right', 50);
|
||||
$image->save();
|
||||
}
|
||||
|
||||
|
||||
+15
-3
@@ -99,7 +99,7 @@
|
||||
<div class="col-md-12r">
|
||||
<p class="lead">Задания в очереди</p>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-primary table-hover mb30">
|
||||
<table class="table table-primary <?/*table-hover*/?> mb30">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
@@ -124,8 +124,20 @@
|
||||
$arTasks = $MQ->getTasks(10, 'priority', 'asc');
|
||||
foreach($arTasks as $task) {
|
||||
?>
|
||||
<tr>
|
||||
<td><?=$task['in_progress'] === MQ::VALUE_Y ? '<span class="badge badge-success">R</span>' : '';?></td>
|
||||
<tr class="<?php
|
||||
if($task['active'] === MQ::VALUE_Y && $task['in_progress'] === MQ::VALUE_Y&& $task['status'] === 'ERROR') {
|
||||
echo 'alert-warning';
|
||||
} elseif($task['active'] === MQ::VALUE_N && $task['status'] === 'ERROR') {
|
||||
echo 'alert-danger';
|
||||
} elseif($task['in_progress'] === MQ::VALUE_Y) {
|
||||
echo 'alert-success';
|
||||
} elseif($task['in_progress'] === MQ::VALUE_N && $task['status'] === 'ERROR') {
|
||||
echo 'alert-danger';
|
||||
} elseif($task['active'] === MQ::VALUE_Y && $task['in_progress'] === MQ::VALUE_N) {
|
||||
echo 'alert-info';
|
||||
}
|
||||
?>">
|
||||
<td><?=$task['in_progress'] === MQ::VALUE_Y ? '<span class="badge badge-success">RUN</span>' : '';?></td>
|
||||
<td><?=$task['id'];?></td>
|
||||
<td><?=$task['active'] === MQ::VALUE_Y ? 'Да' : 'Нет';?></td>
|
||||
<td><?=$task['in_progress'] === MQ::VALUE_Y ? 'Да' : 'Нет';?></td>
|
||||
|
||||
@@ -10,6 +10,11 @@
|
||||
*/
|
||||
define('ROOT_PATH', $_SERVER['DOCUMENT_ROOT']);
|
||||
|
||||
/**
|
||||
* Путь до папки загрузок
|
||||
*/
|
||||
const UPLOADS_PATH = ROOT_PATH . '/uploads';
|
||||
|
||||
/**
|
||||
* Путь до директории с логами
|
||||
*/
|
||||
|
||||
@@ -731,7 +731,7 @@
|
||||
/**
|
||||
* Выводит изображение в браузер.
|
||||
*/
|
||||
public function output($quality = 100)
|
||||
public function output($quality = 100): void
|
||||
{
|
||||
switch ($this->type) {
|
||||
case 1:
|
||||
@@ -756,7 +756,7 @@
|
||||
/**
|
||||
* Выводит изображение в браузер и Сохраняет его.
|
||||
*/
|
||||
public function saveOut($filename, $quality = 100)
|
||||
public function saveOut($filename, $quality = 100): void
|
||||
{
|
||||
if (empty($filename)) {
|
||||
$filename = $this->filename;
|
||||
@@ -781,7 +781,7 @@
|
||||
readfile($filename);
|
||||
}
|
||||
|
||||
public function destroy()
|
||||
public function destroy(): void
|
||||
{
|
||||
imagedestroy($this->img);
|
||||
}
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
Reference in new issue
Block a user