From 60314405d854fb7e9ab09b0ea4d25045e1d8dea8 Mon Sep 17 00:00:00 2001 From: nachoparker Date: Thu, 5 Apr 2018 00:24:05 +0200 Subject: ncp-web: make config.php into a table --- changelog.md | 6 +++++- ncp-web/index.php | 33 +++++++++++++++++++++++++-------- ncp-web/ncp-launcher.php | 12 ++++++------ ncp-web/ncp.css | 10 +++------- 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;
+
+
+
+
+
HTML; ?> -
-
-
-
-
@@ -200,9 +200,26 @@ HTML;

__("Nextcloud configuration"); ?>

", $config ); - echo "$config"; + // print Nextcloud config table + include( '/var/www/nextcloud/config/config.php' ); + + echo ''; + foreach ( $CONFIG as $key => $val ) + { + echo ''; + if ( gettype( $val ) == "array" ) + { + echo ""; + echo "'; + } + else + echo ""; + echo ''; + } + echo '
$key"; + foreach ( $val as $k => $v ) + echo ""; + echo '
$k$v
$key$val
'; ?>
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 = '
'; foreach( $output as $line ) { $table .= ""; $fields = explode( "|", $line ); $table .= ""; - $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 .= ""; + $table .= ""; $table .= ""; } $table .= "
$fields[0]$fields[1]$fields[1]
"; @@ -185,7 +185,7 @@ else exec( "bash /usr/local/bin/ncp-suggestions \"" . implode( "\n", $output ) . '"', $out, $ret ); foreach( $out as $line ) if ( $line != "" ) - $suggestions .= "

‣ $line

"; + $suggestions .= "

‣ $line

"; } // 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 } -- cgit v1.2.3