294 lines
13 KiB
PHP
294 lines
13 KiB
PHP
<div class="panel panel-flat" style="background-color: aliceblue;">
|
|
<div align="center" style="text-align:center;color:red;font-weight:bold;"><?= $message ?></div>
|
|
<div class="panel-body">
|
|
|
|
<div class="row">
|
|
<div class="col-lg-8">
|
|
<!-- Current server load -->
|
|
<div class="panel">
|
|
<div class="panel-heading">
|
|
<h5>OAuth2 Tokens</h5>
|
|
<div class="heading-elements">
|
|
<table>
|
|
<tr>
|
|
<td><?= $links ?></td>
|
|
<td><?= $token_provider ?></td>
|
|
</tr>
|
|
</table>
|
|
<button style="background-color:red;font-weight:bold;color:white;" onclick="return DeleteMemberData(<?= $member_id ?>);">Delete User's E-mails, OAuth2 tokens, Pull jobs and Threads</button>
|
|
</div>
|
|
</div>
|
|
<div class="panel-body">
|
|
<div>
|
|
<form id="oauth2-tokens-form">
|
|
<div class="form-group row">
|
|
<div class="email">
|
|
<label for="email" class="font-weight-bold col-lg-1 col-form-label mt-10">
|
|
Email
|
|
</label>
|
|
<div class="col-lg-12">
|
|
<input type="search" name="email" id="email" class="form-control">
|
|
</div>
|
|
</div>
|
|
<div class="updated">
|
|
<label for="start_date" class="font-weight-bold col-lg-1 col-form-label mt-10">
|
|
Updated
|
|
</label>
|
|
<div class="search-by-range">
|
|
<div class="col-lg-6">
|
|
<input type="search" name="start_date" id="start_date" class="form-control">
|
|
</div>
|
|
<div class="col-lg-6">
|
|
<input type="search" name="end_date" id="end_date" class="form-control">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<input type="button" name="search-oauth2-tokens" id="search-oauth2-tokens" value="Search" class="btn btn-info" />
|
|
</div>
|
|
<input type="hidden" name="member_id" value='<?= $member_id ?>'>
|
|
</form>
|
|
|
|
</div>
|
|
<div id="pagination-oauth2-tokens"></div>
|
|
<table id="oauth2-tokens-list" class="table-bordered table-condensed table-hover table-striped table-condensed col-lg-12" style="padding:0px; background-color:aliceblue;">
|
|
<thead class="bg-indigo">
|
|
<th>Email</th>
|
|
<th>Name</th>
|
|
<th>Provider</th>
|
|
<th>Created</th>
|
|
<th>Updated</th>
|
|
<th>Expires</th>
|
|
<th>Access Type</th>
|
|
</thead>
|
|
<tbody></tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<!-- /current server load -->
|
|
</div>
|
|
<div class="col-lg-4">
|
|
<!-- Current server load -->
|
|
<div class="panel">
|
|
<div class="panel-heading">
|
|
<div class="panel-body">
|
|
<div>
|
|
<form id="oauth2-pull-jobs-form">
|
|
<div class="form-group">
|
|
<div class="completed">
|
|
<label for="start_date">
|
|
Completed
|
|
</label>
|
|
<div class="search-by-range">
|
|
<div class="col-lg-6">
|
|
<input type="search" name="start_date" id="start_date" class="form-control">
|
|
</div>
|
|
<div class="col-lg-6">
|
|
<input type="search" name="end_date" id="end_date" class="form-control">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<input type="button" name="search-oauth2-pull-jobs" id="search-oauth2-pull-jobs" value="Search" class="btn btn-info" />
|
|
|
|
</div>
|
|
<input type="hidden" name="member_id" value='<?= $member_id ?>'>
|
|
</form>
|
|
</div>
|
|
<div id="pagination-oauth2-pull-jobs"></div>
|
|
<table id="oauth2-pull-jobs-list" class="table-bordered table-condensed table-hover table-striped table-condensed col-lg-12" style="padding:0px; background-color:aliceblue;">
|
|
<thead class="bg-indigo">
|
|
<th>Created</th>
|
|
<th>Started</th>
|
|
<th>Completed</th>
|
|
</thead>
|
|
<tbody></tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- /current server load -->
|
|
</div>
|
|
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-lg-12">
|
|
<div class="panel">
|
|
<div class="panel-heading">
|
|
<h5>OAuth2 Pull Threads</h5>
|
|
<div class="heading-elements">
|
|
|
|
</div>
|
|
</div>
|
|
<div class="panel-body">
|
|
<div>
|
|
<form id="oauth2-pull-threads-form">
|
|
<div class="form-group">
|
|
<div class="search_term">
|
|
<label for="search_term" class="font-weight-bold col-lg-6 col-form-label">
|
|
Search Term
|
|
</label>
|
|
<div class="col-lg-12">
|
|
<input type="search" name="search_term" id="search_term" class="form-control">
|
|
</div>
|
|
</div>
|
|
<div class="date">
|
|
<label for="start_date" class="font-weight-bold col-lg-1 col-form-label">
|
|
Completed
|
|
</label>
|
|
<div class="search-by-range">
|
|
<div class="col-lg-6">
|
|
<input type="search" name="start_date" id="start_date" class="form-control">
|
|
</div>
|
|
<div class="col-lg-6">
|
|
<input type="search" name="end_date" id="end_date" class="form-control">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<input type="hidden" name="member_id" value='<?= $member_id ?>'>
|
|
<input type="button" name="search-oauth2-pull-threads" id="search-oauth2-pull-threads" value="Search" class="btn btn-info" />
|
|
</div>
|
|
</form>
|
|
</div>
|
|
<div id="pagination-oauth2-pull-threads"></div>
|
|
<table id="oauth2-pull-threads-list" class="table-bordered table-condensed table-hover table-striped table-condensed col-lg-12" style="padding:0px; background-color:aliceblue;">
|
|
<thead class="bg-indigo">
|
|
<th>Created</th>
|
|
<th>Started</th>
|
|
<th>Completed</th>
|
|
<th>Item Count</th>
|
|
<th>Search Term</th>
|
|
<th>Search From</th>
|
|
<th>Failed</th>
|
|
</thead>
|
|
<tbody></tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script src="/assets/js/plugins/pickers/datepicker.js"></script>
|
|
<script type="text/javascript" src="/assets/js/app.js"></script>
|
|
<script type="text/javascript" src="/assets/js/pages/oauth2/list.js"></script>
|
|
<!-- <script type="text/javascript">
|
|
function addMemberCard(card_id, member_id) {
|
|
if (!confirm('Confirm Add Card to Account')) {
|
|
return false;
|
|
}
|
|
$('#cardDiv' + card_id).html('Processing...');
|
|
$('#cardButton' + card_id).prop('disabled', true);
|
|
$.ajax({
|
|
url: "/member/addMemberCard?proc=PROCESS&card_id=" + card_id + "&member_id=" + member_id
|
|
}).done(function(data) {
|
|
$('#cardDiv' + card_id).html(data);
|
|
$('#cardButton' + card_id).prop('disabled', false);
|
|
});
|
|
return false;
|
|
}
|
|
|
|
function deleteMemberCard(card_id, member_id) {
|
|
if (!confirm('Confirm Remove Card')) {
|
|
return false;
|
|
}
|
|
$('#cardDeleteDiv' + card_id).html('Processing...');
|
|
$('#cardButton' + card_id).prop('disabled', true);
|
|
$.ajax({
|
|
url: "/member/deleteMemberCard?proc=PROCESS&card_id=" + card_id + "&member_id=" + member_id
|
|
}).done(function(data) {
|
|
$('#cardDeleteDiv' + card_id).html(data);
|
|
$('#cardButton' + card_id).prop('disabled', false);
|
|
});
|
|
return false;
|
|
|
|
|
|
}
|
|
|
|
|
|
function viewTrackedAdvice(tracked_id) {
|
|
|
|
$('#lineoption').html('Processing...');
|
|
// $('#acc' + member_id).prop('disabled', true);
|
|
$.ajax({
|
|
url: "/member/viewTrackedAdvice?proc=PROCESS&tracked_id=" + tracked_id
|
|
}).done(function(data) {
|
|
$('#lineoption').html(data);
|
|
// $('#acc' + member_id).prop('disabled', false);
|
|
});
|
|
return false;
|
|
}
|
|
|
|
function getSlideCards(element, member_id, card_category) {
|
|
let str = element.href;
|
|
let pos = str.indexOf("#/");
|
|
let opos = pos;
|
|
while (pos != -1) {
|
|
pos = str.indexOf("#/", pos + 1);
|
|
if (pos == -1) break;
|
|
opos = pos;
|
|
}
|
|
if (opos == -1) {
|
|
opos = -2;
|
|
str = "0";
|
|
}
|
|
let offset = str.substring(opos + 2);
|
|
return getSlideCardsReal(offset, member_id, card_category);
|
|
}
|
|
|
|
function getSlideCardsReal(offset, member_id, card_category) {
|
|
// &member_id=<?= $member_id ?>
|
|
$('#transp_detail').html('Processing...');
|
|
$('#acc' + member_id).prop('disabled', true);
|
|
$.ajax({
|
|
url: "/member/viewMemberAction/" + offset + "?proc=PROCESS&action_name=MCARDS&member_id=" + member_id + "&limit=<?= $limit ?>&offset=" + offset + "&card_category=" + card_category
|
|
}).done(function(data) {
|
|
$('#transp_detail').html(data);
|
|
$('#acc' + member_id).prop('disabled', false);
|
|
});
|
|
return false;
|
|
}
|
|
|
|
function DeleteMemberData(member_id) {
|
|
if (confirm('Are you sure you want to delete all user\'s E-mails, OAuth2 tokens, Pull jobs and Threads')) {
|
|
viewMemberAction('OAUTH2_DELETE', member_id);
|
|
}
|
|
return false;
|
|
}
|
|
|
|
$(function() {
|
|
$('select[name=card_category]').change(function() {
|
|
getSlideCardsReal(0, <?= $member_id ?>, this.value == '' ? '0' : this.value);
|
|
});
|
|
});
|
|
//initMap();
|
|
//
|
|
-->
|
|
<!-- </script> -->
|
|
|
|
<style>
|
|
#oauth2-tokens-form .form-group,
|
|
#oauth2-pull-jobs-form .form-group,
|
|
#oauth2-pull-threads-form .form-group {
|
|
display: flex;
|
|
align-items: flex-end;
|
|
}
|
|
|
|
.updated,
|
|
.completed,
|
|
.date {
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.search-by-range {
|
|
display: flex;
|
|
align-items: flex-end;
|
|
}
|
|
|
|
.search-by-range div {
|
|
padding: 1px;
|
|
}
|
|
|
|
.panel-heading {
|
|
padding: 15px 0px;
|
|
}
|
|
</style>
|