Allow for integration of custom php file into ddashboard

This commit is contained in:
phl0 2017-10-12 14:02:54 +02:00
parent 432f2d4646
commit cd178e433e
No known key found for this signature in database
GPG key ID: 48EA1E640798CA9A
17 changed files with 107 additions and 1 deletions

3
.gitignore vendored
View file

@ -1,4 +1,5 @@
Links.txt
config/config.php
config/DMRNetwork.txt
notes.txt
notes.txt
custom.php

View file

@ -177,6 +177,23 @@ if (!defined("SHOWCPU") AND !defined("SHOWDISK") AND !defined("SHOWRPTINFO") AND
define("SHOWLH", "on");
define("SHOWLOCALTX", "on");
}
if (defined("SHOWCUSTOM")) {
print "<div class=\"panel panel-default\">\n";
print "<div class=\"panel-heading\">";
echo _("Custom Info");
print "<span class=\"pull-right clickable\"><i class=\"glyphicon glyphicon-chevron-up\"></i></span></div>\n";
print "<div class=\"panel-body\">\n";
$custom = 'custom.php';
if (file_exists($custom)) {
include $custom;
} else {
print "<div class=\"alert alert-danger\" role=\"alert\">";
echo _("File custom.php not found! Did you forget to create it?");
print "</div>\n";
}
print "</div>\n";
print "</div>\n";
}
if (defined("SHOWCPU")) {
include "include/sysinfo_ajax.php";
showLapTime("sysinfo");

View file

@ -17,6 +17,14 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: index.php:183
msgid "Custom Info"
msgstr "Custom info"
#: index.php:191
msgid "File custom.php not found! Did you forget to create it?"
msgstr "File custom.php not found! Did you forget to create it?"
#: include/sysinfo_ajax.php:3
msgid "System Info"
msgstr "System Information"

Binary file not shown.

View file

@ -17,6 +17,14 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: index.php:183
msgid "Custom Info"
msgstr "Benutzerdefinierte Informationen"
#: index.php:191
msgid "File custom.php not found! Did you forget to create it?"
msgstr "Datei custom.php nicht gefunden. Hast du vergessen, diese anzulegen?"
#: include/sysinfo_ajax.php:3
msgid "System Info"
msgstr "System Informationen"

Binary file not shown.

View file

@ -17,6 +17,14 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: index.php:183
msgid "Custom Info"
msgstr "Custom info"
#: index.php:191
msgid "File custom.php not found! Did you forget to create it?"
msgstr "File custom.php not found! Did you forget to create it?"
#: include/sysinfo_ajax.php:3
msgid "System Info"
msgstr ""

Binary file not shown.

View file

@ -17,6 +17,14 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: index.php:183
msgid "Custom Info"
msgstr "Custom info"
#: index.php:191
msgid "File custom.php not found! Did you forget to create it?"
msgstr "File custom.php not found! Did you forget to create it?"
#: include/sysinfo_ajax.php:3
msgid "System Info"
msgstr ""

View file

@ -18,6 +18,14 @@ msgstr ""
"X-Generator: Poedit 1.8.12\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: index.php:183
msgid "Custom Info"
msgstr "Custom info"
#: index.php:191
msgid "File custom.php not found! Did you forget to create it?"
msgstr "File custom.php not found! Did you forget to create it?"
#: include/sysinfo_ajax.php:3
msgid "System Info"
msgstr "Información de Sistema"

View file

@ -18,6 +18,14 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"Language: fr\n"
#: index.php:183
msgid "Custom Info"
msgstr "Custom info"
#: index.php:191
msgid "File custom.php not found! Did you forget to create it?"
msgstr "File custom.php not found! Did you forget to create it?"
#: include/sysinfo_ajax.php:3
msgid "System Info"
msgstr "Informations sur le système"

View file

@ -16,6 +16,14 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Language-Team: pl\n"
#: index.php:183
msgid "Custom Info"
msgstr "Custom info"
#: index.php:191
msgid "File custom.php not found! Did you forget to create it?"
msgstr "File custom.php not found! Did you forget to create it?"
#: include/sysinfo_ajax.php:3
msgid "System Info"
msgstr "Informacja systemu"

View file

@ -17,6 +17,14 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: index.php:183
msgid "Custom Info"
msgstr "Custom info"
#: index.php:191
msgid "File custom.php not found! Did you forget to create it?"
msgstr "File custom.php not found! Did you forget to create it?"
#: include/sysinfo_ajax.php:3
msgid "System Info"
msgstr "Informação do sistema"

View file

@ -17,6 +17,14 @@ msgstr ""
"Language-Team: ru\n"
"X-Generator: Poedit 1.8.12\n"
#: index.php:183
msgid "Custom Info"
msgstr "Custom info"
#: index.php:191
msgid "File custom.php not found! Did you forget to create it?"
msgstr "File custom.php not found! Did you forget to create it?"
#: include/sysinfo_ajax.php:3
msgid "System Info"
msgstr "Информация о системе"

View file

@ -16,6 +16,14 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Language-Team: sv\n"
#: index.php:183
msgid "Custom Info"
msgstr "Custom info"
#: index.php:191
msgid "File custom.php not found! Did you forget to create it?"
msgstr "File custom.php not found! Did you forget to create it?"
#: include/sysinfo_ajax.php:3
msgid "System Info"
msgstr "System information"

View file

@ -17,6 +17,10 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: include/index.php:183
msgid "Custom Info"
msgstr ""
#: include/sysinfo_ajax.php:3
msgid "System Info"
msgstr ""

View file

@ -271,6 +271,10 @@ foreach ($files as $file) {
<span class="input-group-addon" id="REFRESHAFTER" style="width: 300px"><?php echo _("Refresh page after in seconds"); ?></span>
<input type="text" value="<?php echo constant("REFRESHAFTER") ?>" name="REFRESHAFTER" class="form-control" placeholder="60" aria-describedby="REFRESHAFTER" required data-fv-notempty-message="Value is required">
</div>
<div class="input-group">
<span class="input-group-addon" id="SHOWCUSTOM" style="width: 300px"><?php echo _("Show Custom Info"); ?></span>
<div class="panel-body"><input type="checkbox" name="SHOWCUSTOM" <?php if (defined("SHOWCUSTOM")) echo "checked" ?>></div>
</div>
<div class="input-group">
<span class="input-group-addon" id="SHOWCPU" style="width: 300px"><?php echo _("Show System Info"); ?></span>
<div class="panel-body"><input type="checkbox" name="SHOWCPU" <?php if (defined("SHOWCPU")) echo "checked" ?>></div>