добавил блок кнопок для управление очередью в ручную и добавил метод в БД
This commit is contained in:
1 parent
7630929590
commit
6fecc17306
7 files changed
+116
-26
No files matched your search
+14
-6
@@ -53,7 +53,7 @@
|
||||
<li><a href=""><i class="glyphicon glyphicon-home"></i></a></li>
|
||||
<li>Командная PHP строка</li>
|
||||
</ul>
|
||||
<h4>Командная PHP строка</h4>
|
||||
<h4>Командная строка</h4>
|
||||
</div>
|
||||
</div><!-- media -->
|
||||
</div><!-- pageheader -->
|
||||
@@ -75,11 +75,14 @@
|
||||
foreach ($userCodes as $code) {
|
||||
$element = unserialize($code['value']);
|
||||
?>
|
||||
<button class="btn btn-primary button-get" type="button"
|
||||
onClick="addUseSection(this, <?= $code['id'] ?>, '<?= base64_encode(
|
||||
$element['code']
|
||||
); ?>');"><?= $element['name']; ?></button>
|
||||
<button class="btn btn-danger button-delete" type="button" onclick="deleteUserCode(<?= $code['id'] ?>)">X</button>
|
||||
<div class="phpcmdButton">
|
||||
<button class="btn btn-primary button-get" type="button"
|
||||
onClick="addUseSection(this, <?= $code['id'] ?>, '<?= base64_encode(
|
||||
$element['code']
|
||||
); ?>');"><?= $element['name']; ?></button>
|
||||
<button class="btn btn-danger button-delete" type="button" onclick="deleteUserCode(<?= $code['id'] ?>)">X
|
||||
</button>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
@@ -186,5 +189,10 @@
|
||||
margin-left: -5px;
|
||||
border-radius: 0px 3px 3px 0px;
|
||||
}
|
||||
|
||||
.phpcmdButton {
|
||||
display: inline-block;
|
||||
margin: 3px;
|
||||
}
|
||||
</style>
|
||||
<?php require_once __DIR__ . '/inc/footer.php'; ?>
|
||||
+30
-1
@@ -69,8 +69,25 @@
|
||||
</div><!-- panel -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">Ручное управление</h4>
|
||||
<p>Данная вкладка служит для отладки.</p>
|
||||
</div><!-- panel-heading -->
|
||||
<div class="panel-body">
|
||||
<div class="btn-list" id="manualControl">
|
||||
<button id="restart" class="btn btn-warning">Рестарт воркеров</button>
|
||||
<button id="clear" class="btn btn-danger">Очистка очереди</button>
|
||||
<button id="start" class="btn btn-success">Запуск воркера</button>
|
||||
<button id="restart" class="btn btn-info">Info</button>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- panel -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
@@ -155,5 +172,17 @@
|
||||
}
|
||||
}, 500);
|
||||
});
|
||||
|
||||
$(document).ready(function () {
|
||||
$('#manualControl #start').on('click', function () {
|
||||
$.ajax({
|
||||
url: '../core/cron.php',
|
||||
cache: false,
|
||||
success: function (data) {
|
||||
console.log('Worker started');
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php require_once __DIR__ . '/inc/footer.php'; ?>
|
||||
Reference in new issue
Block a user