Skip to content

Commit

Permalink
Merge pull request #129 from nextcloud/feature/noid/api-info-json-format
Browse files Browse the repository at this point in the history
Adds tooltip to make people aware of API JSON format
  • Loading branch information
MorrisJobke committed Oct 26, 2018
2 parents 743fe8c + c097275 commit 4d7d606
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 4 additions & 3 deletions js/script.js
Expand Up @@ -25,7 +25,7 @@
swapUsageLine,
cpuLoadChart,
cpuLoadLine,
activeusersChart,
activeUsersChart,
sharesChart;

$(document).ready(function () {
Expand All @@ -41,6 +41,7 @@
setHumanReadableSizeToElement("phpUploadMaxSize");
setHumanReadableSizeToElement("systemDiskFreeSpace");

$('#ocsEndPoint span.icon-info').tooltip({placement: 'top'});
initMonitoringLinkToClipboard();
$("#monitoring-endpoint-url").on('click', function() {
$(this).select();
Expand Down Expand Up @@ -209,10 +210,10 @@
stepSize = 1;
}

if (typeof activeusersChart === 'undefined') {
if (typeof activeUsersChart === 'undefined') {
var ctx = document.getElementById("activeuserscanvas");

activeusersChart = new Chart(ctx, {
activeUsersChart = new Chart(ctx, {
type: 'line',
data: {
labels: [
Expand Down
3 changes: 2 additions & 1 deletion templates/settings-admin.php
Expand Up @@ -84,5 +84,6 @@
<div>
<input type="text" readonly="readonly" id="monitoring-endpoint-url" value="<?php echo p($_['ocs']); ?>" />
<a class="clipboardButton icon icon-clippy" data-clipboard-target="#monitoring-endpoint-url"></a>
</div>
<span class="icon-info svg" title="" data-original-title="<?php p($l->t('Did you know?')); ?> <?php p($l->t('Appending "?format=json" at the end of the URL gives you the result in JSON format!')); ?>"></span>
</div>
</div>

0 comments on commit 4d7d606

Please sign in to comment.