Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/nextcloudpi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornachoparker <nacho@ownyourbits.com>2018-04-05 01:24:05 +0300
committernachoparker <nacho@ownyourbits.com>2018-04-05 01:31:12 +0300
commit60314405d854fb7e9ab09b0ea4d25045e1d8dea8 (patch)
treee90827fe00a31112e2fe3de9fa28d74786cc3764
parent16e245cf697a88917d07fc0f72af4d27edc1e34b (diff)
ncp-web: make config.php into a tablev0.53.21
-rw-r--r--changelog.md6
-rw-r--r--ncp-web/index.php33
-rw-r--r--ncp-web/ncp-launcher.php12
-rw-r--r--ncp-web/ncp.css10
4 files changed, 39 insertions, 22 deletions
diff --git a/changelog.md b/changelog.md
index 735fc062..a6df76b6 100644
--- a/changelog.md
+++ b/changelog.md
@@ -1,5 +1,9 @@
-[v0.53.19](https://github.com/nextcloud/nextcloudpi/commit/18d1dd4) (2018-04-04) ncp-web: check for updates upon first run
+[v0.53.21](https://github.com/nextcloud/nextcloudpi/commit/89f2b3e) (2018-04-05) ncp-web: make config.php into a table
+
+[v0.53.20](https://github.com/nextcloud/nextcloudpi/commit/e0e9455) (2018-04-04) ncp-web: check for updates upon first run
+
+[v0.53.19](https://github.com/nextcloud/nextcloudpi/commit/88e965c) (2018-04-04) ncp-web: replace textarea with div for output
[v0.53.18](https://github.com/nextcloud/nextcloudpi/commit/e7b76b6) (2018-04-04) ncp-web: refresh sidebar after launching actions
diff --git a/ncp-web/index.php b/ncp-web/index.php
index 0f6f1451..575c5a3c 100644
--- a/ncp-web/index.php
+++ b/ncp-web/index.php
@@ -125,6 +125,11 @@ HTML;
<div class="icon-dashboard"></div>
</div>
</div>
+ <div id="config-btn">
+ <div id="expand">
+ <div class="icon-config"></div>
+ </div>
+ </div>
<?php
if ( file_exists( 'wizard' ) )
echo <<<HTML
@@ -137,11 +142,6 @@ HTML;
</a>
HTML;
?>
- <div id="config-btn">
- <div id="expand">
- <div class="icon-config"></div>
- </div>
- </div>
<a href="https://github.com/nextcloud/nextcloudpi/wiki" target="_blank" tabindex="1">
<div id="nc-button">
<div id="expand">
@@ -200,9 +200,26 @@ HTML;
<h2 class="text-title"><?php echo $l->__("Nextcloud configuration"); ?></h2>
<div id="nc-config-box" class="table-wrapper">
<?php
- $config = file_get_contents( '/var/www/nextcloud/config/config.php' );
- $config = str_replace( "\n", "<br>", $config );
- echo "$config";
+ // print Nextcloud config table
+ include( '/var/www/nextcloud/config/config.php' );
+
+ echo '<table class="dashtable">';
+ foreach ( $CONFIG as $key => $val )
+ {
+ echo '<tr>';
+ if ( gettype( $val ) == "array" )
+ {
+ echo "<td>$key</td>";
+ echo "<td><table>";
+ foreach ( $val as $k => $v )
+ echo "<tr><td>$k</td><td class=\"val-field\">$v</td></tr>";
+ echo '</table></td>';
+ }
+ else
+ echo "<td>$key</td><td class=\"val-field\">$val</td>";
+ echo '</tr>';
+ }
+ echo '</table>';
?>
</div>
</div>
diff --git a/ncp-web/ncp-launcher.php b/ncp-web/ncp-launcher.php
index 62bf09ef..9c870cd1 100644
--- a/ncp-web/ncp-launcher.php
+++ b/ncp-web/ncp-launcher.php
@@ -157,23 +157,23 @@ else
exec( 'bash /usr/local/bin/ncp-diag', $output, $ret );
// info table
- $table = '<table id="dashtable">';
+ $table = '<table class="dashtable">';
foreach( $output as $line )
{
$table .= "<tr>";
$fields = explode( "|", $line );
$table .= "<td>$fields[0]</td>";
- $class = "";
+ $class = 'val-field';
if ( strpos( $fields[1], "up" ) !== false
|| strpos( $fields[1], "ok" ) !== false
|| strpos( $fields[1], "open" ) !== false )
- $class = 'class="ok-field"';
+ $class = 'ok-field';
if ( strpos( $fields[1], "down" ) !== false
|| strpos( $fields[1], "error" ) !== false )
- $class = 'class="error-field"';
+ $class = 'error-field';
- $table .= "<td $class>$fields[1]</td>";
+ $table .= "<td class=\"$class\">$fields[1]</td>";
$table .= "</tr>";
}
$table .= "</table>";
@@ -185,7 +185,7 @@ else
exec( "bash /usr/local/bin/ncp-suggestions \"" . implode( "\n", $output ) . '"', $out, $ret );
foreach( $out as $line )
if ( $line != "" )
- $suggestions .= "<p class=\"warn-field\">‣ $line</p>";
+ $suggestions .= "<p class=\"val-field\">‣ $line</p>";
}
// return JSON
diff --git a/ncp-web/ncp.css b/ncp-web/ncp.css
index f3a6496a..2db2bb97 100644
--- a/ncp-web/ncp.css
+++ b/ncp-web/ncp.css
@@ -1275,16 +1275,16 @@ a#versionlink:hover {
color: red;
}
-.warn-field{
+.val-field{
color: gray;
}
-#dashtable tr {
+.dashtable tr {
height: 25px;
border-bottom: 1px solid #ebebeb;
}
-#dashtable td {
+.dashtable td {
border-bottom: 1px solid #ebebeb;
}
@@ -1292,10 +1292,6 @@ a#versionlink:hover {
margin-bottom: 1em;
}
-#nc-config-box {
- color: gray;
-}
-
.hidden {
display:none
}