Optionally show all fields of AN statsping in admin area
This commit is contained in:
parent
091e37c134
commit
990e803192
@ -5,30 +5,68 @@ require_once (__DIR__ . '/../internals/website.php');
|
||||
/** @var URLRoute $ROUTE */ global $ROUTE;
|
||||
/** @var Website $SITE */ global $SITE;
|
||||
|
||||
$mode = isset($_GET['mode']) ? $_GET['mode'] : '';
|
||||
|
||||
?>
|
||||
<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>
|
||||
<?php if ($mode == 'short'): ?>
|
||||
<th>Version</th>
|
||||
<th>Provider</th>
|
||||
<th>NoteCount</th>
|
||||
<th>LastChanged</th>
|
||||
<th>CreatedAt</th>
|
||||
<th>Comment</th>
|
||||
<?php elseif ($mode == 'full'): ?>
|
||||
<th>ClientID</th>
|
||||
<th>Version</th>
|
||||
<th>Provider</th>
|
||||
<th>NoteCount</th>
|
||||
<th>LastChanged</th>
|
||||
<th>CreatedAt</th>
|
||||
<th>Comment</th>
|
||||
<th>RawFolderRepo</th>
|
||||
<th>RawFolderRepoMode</th>
|
||||
<th>GitMirror</th>
|
||||
<th>GitMirrorPush</th>
|
||||
<th>Theme</th>
|
||||
<th>LaunchOnBoot</th>
|
||||
<th>EmulateHierarchicalStructure</th>
|
||||
<th>HasEditedAdvancedSettings</th>
|
||||
<th>AdvancedSettingsDiff</th>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($SITE->modules->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>
|
||||
<?php if ($mode == 'short'): ?>
|
||||
<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>
|
||||
<?php elseif ($mode == 'full'): ?>
|
||||
<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>
|
||||
<td><?php echo $entry['RawFolderRepo']; ?></td>
|
||||
<td><?php echo $entry['RawFolderRepoMode']; ?></td>
|
||||
<td><?php echo $entry['GitMirror']; ?></td>
|
||||
<td><?php echo $entry['GitMirrorPush']; ?></td>
|
||||
<td><?php echo $entry['Theme']; ?></td>
|
||||
<td><?php echo $entry['LaunchOnBoot']; ?></td>
|
||||
<td><?php echo $entry['EmulateHierarchicalStructure']; ?></td>
|
||||
<td><?php echo $entry['HasEditedAdvancedSettings']; ?></td>
|
||||
<td><?php echo $entry['AdvancedSettingsDiff']; ?></td>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
|
@ -991,6 +991,10 @@ html, body {
|
||||
color: #FF0000;
|
||||
}
|
||||
|
||||
.admin_ajax_gitfield {
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
#loginform div {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
1
www/data/css/styles.min.css
vendored
1
www/data/css/styles.min.css
vendored
@ -189,6 +189,7 @@ html,body{margin:0;padding:0;height:100%}
|
||||
.boxedcontent.successbox{background-color:#168b00;color:#222;border:1px solid #444;font-weight:bold;text-align:center}
|
||||
.boxedcontent.successbox .bc_data{padding-top:2px;padding-bottom:2px}
|
||||
.admin_ajax_gitfield_error{color:red}
|
||||
.admin_ajax_gitfield{white-space:pre}
|
||||
#loginform div{display:flex;flex-direction:column}
|
||||
#loginform div button{margin:10px 0;padding:0}
|
||||
.loginerror{display:flex;background:#f44;color:#222;border:1px solid #a44;border-radius:2px;font-weight:bold;padding:0 5px;margin:5px 0 20px 0}
|
||||
|
@ -139,4 +139,8 @@
|
||||
|
||||
.admin_ajax_gitfield_error {
|
||||
color: $COL_ADMIN_ERROR;
|
||||
}
|
||||
|
||||
.admin_ajax_gitfield {
|
||||
white-space: pre;
|
||||
}
|
@ -119,7 +119,8 @@ $connected = true; try { $SITE->modules->Database(); } catch (Exception $e) { $c
|
||||
</div>
|
||||
<br/>
|
||||
<div id="an_ajax_target"></div>
|
||||
<a class="button" href="javascript:startAjaxReplace('#an_ajax_target', '/api/alephnote::show?secret=<?php echo $SITE->config['ajax_secret'] ?>')">Show</a>
|
||||
<a class="button" href="javascript:startAjaxReplace('#an_ajax_target', '/api/alephnote::show?secret=<?php echo $SITE->config['ajax_secret'] ?>&mode=short')">Show (short)</a>
|
||||
<a class="button" href="javascript:startAjaxReplace('#an_ajax_target', '/api/alephnote::show?secret=<?php echo $SITE->config['ajax_secret'] ?>&mode=full')" >Show (full)</a>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div class="bc_data keyvaluelist admindberr">Database not connected.</div>
|
||||
|
Loading…
Reference in New Issue
Block a user