first commit
This commit is contained in:
@@ -0,0 +1,164 @@
|
||||
<div class="row">
|
||||
|
||||
<div class="col-lg-7">
|
||||
<!-- Recent Members -->
|
||||
|
||||
<div class="panel panel-flat" style="background-color:#CEE0D7;">
|
||||
<form method="post" action="?" autocomplete="off">
|
||||
<fieldset>
|
||||
<table>
|
||||
<tr>
|
||||
<td>Last Run: </td>
|
||||
<td><input type="text" class="form-control" style="width:100px;" id="from_last_run" name="from_last_run" value="<?= isset($oauth2_pulls_params['from_last_run']) ? $oauth2_pulls_params['from_last_run'] : '' ?>"></td>
|
||||
<td> - </td>
|
||||
<td><input type="text" class="form-control" style="width:100px;" id="to_last_run" name="to_last_run" value="<?= isset($oauth2_pulls_params['to_last_run']) ? $oauth2_pulls_params['to_last_run'] : '' ?>"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Elapsed: </td>
|
||||
<td><input type="text" class="form-control" style="width:100px;" id="from_elapsed" name="from_elapsed" value="<?= isset($oauth2_pulls_params['from_elapsed']) ? $oauth2_pulls_params['from_elapsed'] : '' ?>"></td>
|
||||
<td> - </td>
|
||||
<td><input type="text" class="form-control" style="width:100px;" id="to_elapsed" name="to_elapsed" value="<?= isset($oauth2_pulls_params['to_elapsed']) ? $oauth2_pulls_params['to_elapsed'] : '' ?>"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Oauth2 Token ID: </td>
|
||||
<td><input type="text" class="form-control" style="width:100px;" id="oauth2_token_id" name="oauth2_token_id" value="<?= isset($oauth2_pulls_params['oauth2_token_id']) ? $oauth2_pulls_params['oauth2_token_id'] : '' ?>"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Member ID: </td>
|
||||
<td><input type="text" class="form-control" style="width:100px;" id="member_id" name="member_id" value="<?= isset($oauth2_pulls_params['member_id']) ? $oauth2_pulls_params['member_id'] : '' ?>"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<div>
|
||||
<label for="email" style="margin-right: 6rem;">Email:</label>
|
||||
<input type="text" class="form-control" style="width:217px; display: inline-block" id="email" name="email" value="<?= isset($oauth2_pulls_params['email']) ? $oauth2_pulls_params['email'] : '' ?>">
|
||||
</div>
|
||||
<input type="submit" name="filter" value="Filter" />
|
||||
</fieldset>
|
||||
</form>
|
||||
<div class="panel-heading">
|
||||
<h6 class="panel-title">OAuth2 pulls Gmail</h6>
|
||||
<div class="heading-elements">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="oauth2_pulls" class="table-responsive">
|
||||
<?= $oauth2_pulls_links ?>
|
||||
<?= $oauth2_pulls ?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Recent Members -->
|
||||
</div>
|
||||
|
||||
<?php if ($member_id > 0) { ?>
|
||||
<div class="col-lg-5">
|
||||
<!-- Recent Members -->
|
||||
<div class="panel panel-flat" style="background-color:#CEE0D7;">
|
||||
<div class="panel-heading">
|
||||
<h6 class="panel-title">OAuth2 threads (latest) for <?= $member["member"] ?></h6>
|
||||
<div class="heading-elements">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div id="oauth2_threads" class="table-responsive">
|
||||
<div align="center">
|
||||
<h1>Duration</h1>
|
||||
</div>
|
||||
<canvas id="canvas_oauth2_threads_duration_chart"></canvas>
|
||||
<div align="center">
|
||||
<h1>Count</h1>
|
||||
</div>
|
||||
<canvas id="canvas_oauth2_threads_count_chart"></canvas>
|
||||
<?= $oauth2_threads ?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Recent Members -->
|
||||
</div>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="/assets/js/plugins/pickers/datepicker.js"></script>
|
||||
<script type="text/javascript">
|
||||
function viewStats(member_id) {
|
||||
if (member_id != null && member_id > 0) {
|
||||
document.location = '/member/viewLocateMember?member_id=' + member_id;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function viewPulls(member_id, oauth2_token_id) {
|
||||
if (member_id != null && member_id > 0 && oauth2_token_id != null && oauth2_token_id > 0) {
|
||||
document.location = '?member_id=' + member_id + '&oauth2_token_id=' + oauth2_token_id;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
$('input[name="filter"]').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
$(this).closest('form').attr('action', '/bkoreport/oauth2pulls/0').submit();
|
||||
})
|
||||
|
||||
// Datepicker
|
||||
$("input[name='from_last_run']").datepicker({
|
||||
defaultDate: "+1w",
|
||||
changeMonth: true,
|
||||
numberOfMonths: 3,
|
||||
format: "yyyy-mm-dd",
|
||||
onClose: function(selectedDate) {
|
||||
$("#from_last_run").datepicker("option", "minDate", selectedDate);
|
||||
}
|
||||
});
|
||||
|
||||
$("input[name='to_last_run']").datepicker({
|
||||
defaultDate: "+1w",
|
||||
changeMonth: true,
|
||||
numberOfMonths: 3,
|
||||
format: "yyyy-mm-dd",
|
||||
onClose: function(selectedDate) {
|
||||
$("input[name='to_last_run']").datepicker("option", "minDate", selectedDate);
|
||||
}
|
||||
});
|
||||
})
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
var ctxDuration = document.getElementById("canvas_oauth2_threads_duration_chart");
|
||||
var durationPieChart = new Chart(ctxDuration, {
|
||||
type: 'doughnut',
|
||||
data: {
|
||||
datasets: [{
|
||||
data: [<?= isset($oauth2_threads_duration_values)
|
||||
? implode(',', $oauth2_threads_duration_values)
|
||||
: "" ?>],
|
||||
backgroundColor: ["#0074D9", "#FF4136", "#2ECC40", "#FF851B", "#7FDBFF", "#B10DC9", "#FFDC00", "#001f3f", "#39CCCC", "#01FF70", "#85144b", "#F012BE", "#3D9970", "#111111", "#AAAAAA"]
|
||||
}],
|
||||
labels: ['<?= implode("','", $oauth2_threads_duration_labels) ?>']
|
||||
},
|
||||
options: {
|
||||
|
||||
}
|
||||
});
|
||||
var ctxCount = document.getElementById("canvas_oauth2_threads_count_chart");
|
||||
var countPieChart = new Chart(ctxCount, {
|
||||
type: 'doughnut',
|
||||
data: {
|
||||
datasets: [{
|
||||
data: [<?= implode(',', $oauth2_threads_count_values) ?>],
|
||||
backgroundColor: ["#0074D9", "#FF4136", "#2ECC40", "#FF851B", "#7FDBFF", "#B10DC9", "#FFDC00", "#001f3f", "#39CCCC", "#01FF70", "#85144b", "#F012BE", "#3D9970", "#111111", "#AAAAAA"]
|
||||
}],
|
||||
labels: ['<?= implode("','", $oauth2_threads_count_labels) ?>']
|
||||
},
|
||||
options: {
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//initMap();
|
||||
// -->
|
||||
</script>
|
||||
Reference in New Issue
Block a user