1
0

/admin/ alephnote

This commit is contained in:
2018-01-27 00:28:32 +01:00
parent e1fec28368
commit acc6443b55
15 changed files with 263 additions and 76 deletions

1
www/ajax/.htaccess Normal file
View File

@@ -0,0 +1 @@
Deny from all

View File

@@ -0,0 +1,36 @@
<?php
require_once (__DIR__ . '/../internals/base.php');
require_once (__DIR__ . '/../internals/database.php');
require_once (__DIR__ . '/../internals/alephnoteStatistics.php');
Database::connect();
?>
<div class="stripedtable_container">
<table class="stripedtable">
<thead>
<tr>
<th>ClientID</th>
<th>Version</th>
<th>Provider</th>
<th>NoteCount</th>
<th>LastChanged</th>
<th>CreatedAt</th>
<th>Comment</th>
</tr>
</thead>
<tbody>
<?php foreach (AlephNoteStatistics::getAllActiveEntriesOrdered() as $entry): ?>
<tr>
<td><?php echo $entry['ClientID']; ?></td>
<td><?php echo $entry['Version']; ?></td>
<td><?php echo $entry['ProviderStr']; ?></td>
<td><?php echo $entry['NoteCount']; ?></td>
<td><?php echo $entry['LastChanged']; ?></td>
<td><?php echo $entry['CreatedAt']; ?></td>
<td><?php echo $entry['Comment']; ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>

14
www/ajax/egh_redraw.php Normal file
View File

@@ -0,0 +1,14 @@
<?php
require_once (__DIR__ . '/../internals/base.php');
require_once (__DIR__ . '/../extern/egh/ExtendedGitGraph.php');
require_once (__DIR__ . '/../internals/mikeschergitgraph.php');
set_time_limit(900); // 15min
$v = MikescherGitGraph::create();
$v->init();
$v->updateFromCache();
$v->generate();
file_put_contents(__DIR__ . '/../dynamic/egh.html', $v->getAll());

15
www/ajax/egh_refresh.php Normal file
View File

@@ -0,0 +1,15 @@
<?php
require_once (__DIR__ . '/../internals/base.php');
require_once (__DIR__ . '/../extern/egh/ExtendedGitGraph.php');
require_once (__DIR__ . '/../internals/mikeschergitgraph.php');
set_time_limit(900); // 15min
$v = MikescherGitGraph::create();
$v->init();
$v->updateFromRemotes();
$v->generate();
file_put_contents(__DIR__ . '/../dynamic/egh.html', $v->getAll());

10
www/ajax/egh_status.php Normal file
View File

@@ -0,0 +1,10 @@
<?php
if (session_status() !== PHP_SESSION_ACTIVE) session_start();
if (key_exists('ajax_progress_egh_refresh', $_SESSION))
echo $_SESSION['ajax_progress_egh_refresh'];
else
echo '[[ NO SESSION STARTED ]]';
return;