Feature/add voice call history job
This commit is contained in:
@@ -34,7 +34,7 @@ include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php")
|
|||||||
small ref="table">
|
small ref="table">
|
||||||
|
|
||||||
<template v-slot:top-buttons>
|
<template v-slot:top-buttons>
|
||||||
<button type="button" class="btn btn-primary" @click="refresh" data-toggle="tooltip" data-placement="bottom" title="Refreshing to often will run into API-Rate Limits and will cause errors">
|
<button type="button" class="btn btn-primary" @click="refresh" data-toggle="tooltip" data-placement="bottom" title="Refreshing too often will run into API-Rate limits and will cause errors.">
|
||||||
<template v-if="refreshLoading">
|
<template v-if="refreshLoading">
|
||||||
<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>
|
<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>
|
||||||
</template>
|
</template>
|
||||||
@@ -61,7 +61,10 @@ include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php")
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-slot:status="{ row }">
|
<template v-slot:status="{ row }">
|
||||||
<i v-if="!row.dst_device_extension" class="fas fa-phone-arrow-up-right"></i>
|
#bind class fa-shake if status is ringing
|
||||||
|
<i v-if="!row.dst_device_extension && row.status !== 'Ringing'" class="fas fa-phone-arrow-up-right"></i>
|
||||||
|
<i v-else-if="!row.dst_device_extension && row.status === 'Ringing'" class="fas fa-phone-arrow-up-right fa-shake"></i>
|
||||||
|
<i v-else-if="row.status === 'Ringing'" class="fas fa-phone-arrow-down-left fa-shake"></i>
|
||||||
<i v-else class="fas fa-phone-arrow-down-left"></i>
|
<i v-else class="fas fa-phone-arrow-down-left"></i>
|
||||||
{{ row.status }}
|
{{ row.status }}
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ class VoiceCallHistoryJobController extends mfBaseController {
|
|||||||
die(json_encode($return));
|
die(json_encode($return));
|
||||||
}
|
}
|
||||||
|
|
||||||
private function runJobs(): array {
|
public function runJobs(): array {
|
||||||
VoiceCallHistoryJobModel::createJobsUntilToday();
|
VoiceCallHistoryJobModel::createJobsUntilToday();
|
||||||
|
|
||||||
$jobs = VoiceCallHistoryJobModel::getJobsNotDone();
|
$jobs = VoiceCallHistoryJobModel::getJobsNotDone();
|
||||||
|
|||||||
21
scripts/voice/run-voice-call-history-job.php
Normal file
21
scripts/voice/run-voice-call-history-job.php
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
#!/usr/bin/php
|
||||||
|
<?php
|
||||||
|
|
||||||
|
//require 'vendor/autoload.php';
|
||||||
|
require("../../config/config.php");
|
||||||
|
|
||||||
|
define('FRONKDB_SQLDEBUG',false);
|
||||||
|
error_reporting(E_ALL & ~(E_NOTICE | E_STRICT | E_DEPRECATED));
|
||||||
|
|
||||||
|
require_once(LIBDIR."/mvcfronk/mfRouter/mfRouter.php");
|
||||||
|
require_once(LIBDIR."/mvcfronk/mfBase/mfBaseModel.php");
|
||||||
|
require_once(LIBDIR."/mvcfronk/mfBase/mfBaseController.php");
|
||||||
|
|
||||||
|
$me = new User(1);
|
||||||
|
|
||||||
|
define("INTERNAL_USER_ID", $me->id);
|
||||||
|
define("INTERNAL_USER_USERNAME", $me->username);
|
||||||
|
|
||||||
|
$voiceCallHistoryJobController = new VoiceCallHistoryJobController(false);
|
||||||
|
|
||||||
|
$voiceCallHistoryJobController->runJobs();
|
||||||
Reference in New Issue
Block a user