From f2f5371d89f94625416c4a6a42d4e9d9fd06a112 Mon Sep 17 00:00:00 2001 From: Julius Härtl Date: Thu, 29 Mar 2018 17:12:03 +0200 Subject: Add overview settings section MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- settings/templates/settings/admin/overview.php | 172 +++++++++++++++++++++++++ settings/templates/settings/admin/server.php | 136 +------------------ 2 files changed, 173 insertions(+), 135 deletions(-) create mode 100644 settings/templates/settings/admin/overview.php (limited to 'settings') diff --git a/settings/templates/settings/admin/overview.php b/settings/templates/settings/admin/overview.php new file mode 100644 index 00000000000..2bddd1f9c3e --- /dev/null +++ b/settings/templates/settings/admin/overview.php @@ -0,0 +1,172 @@ + + * + * @author Arthur Schiwon + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +/** @var \OCP\IL10N $l */ +/** @var array $_ */ + +?> + +
+

t('Security & setup warnings'));?>

+

t('It\'s important for the security and performance of your instance that everything is configured correctly. To help you with that we are doing some automatic checks. Please see the Tips & Tricks section and the documentation for more information.'));?>

+
    + +
  • + t('PHP does not seem to be setup properly to query system environment variables. The test with getenv("PATH") only returns an empty response.')); ?>
    + t('Please check the installation documentation ↗ for PHP configuration notes and the PHP configuration of your server, especially when using php-fpm.', link_to_docs('admin-php-fpm'))); ?> +
  • + +
  • + t('The Read-Only config has been enabled. This prevents setting some configurations via the web-interface. Furthermore, the file needs to be made writable manually for every update.')); ?> +
  • + +
  • + t('PHP is apparently set up to strip inline doc blocks. This will make several core apps inaccessible.')); ?>
    + t('This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator.')); ?> +
  • + +
  • + t('Your database does not run with "READ COMMITTED" transaction isolation level. This can cause problems when multiple actions are executed in parallel.')); ?> +
  • + $data) { + ?> +
  • + t('%1$s below version %2$s is installed, for stability and performance reasons it is recommended to update to a newer %1$s version.', $data)); ?> +
  • + +
  • + t('The PHP module \'fileinfo\' is missing. It is strongly recommended to enable this module to get the best results with MIME type detection.')); ?> +
  • + +
  • + t('Transactional file locking is disabled, this might lead to issues with race conditions. Enable \'filelocking.enabled\' in config.php to avoid these problems. See the documentation ↗ for more information.', link_to_docs('admin-transactional-locking'))); ?> +
  • + +
  • + t('System locale can not be set to a one which supports UTF-8.')); + ?> +
    + t('This means that there might be problems with certain characters in filenames.')); + ?> +
    + t('It is strongly proposed to install the required packages on your system to support one of the following locales: %s.', [$locales])); + ?> +
  • + +
  • + t('If your installation is not installed at the root of the domain and uses system Cron, there can be issues with the URL generation. To avoid these problems, please set the "overwrite.cli.url" option in your config.php file to the webroot path of your installation (Suggested: "%s")', $_['suggestedOverwriteCliUrl'])); ?> +
  • + +
  • + t('It was not possible to execute the cron job via CLI. The following technical errors have appeared:')); ?> +
    +
      + error)) {?> +
    1. error) ?> hint) ?>
    2. + +
    +
  • + + getDateTimeFormatter(); + $absolute_time = $formatter->formatDateTime($_['lastcron'], 'long', 'long'); + if (time() - $_['lastcron'] > 3600): ?> +
  • + t("Last background job execution ran %s. Something seems wrong.", [$relative_time]));?> + t('Check the background job settings')); ?> +
  • + + +
+ +
+
+ + + + +
+
+ +
+
+ +
+ +

t('Version'));?>

+

getTitle()); ?>

+
diff --git a/settings/templates/settings/admin/server.php b/settings/templates/settings/admin/server.php index d467577f610..8dc00e26e56 100644 --- a/settings/templates/settings/admin/server.php +++ b/settings/templates/settings/admin/server.php @@ -26,134 +26,6 @@ ?> -
-

t('Security & setup warnings'));?>

-

t('It\'s important for the security and performance of your instance that everything is configured correctly. To help you with that we are doing some automatic checks. Please see the Tips & Tricks section and the documentation for more information.'));?>

-
    - -
  • - t('PHP does not seem to be setup properly to query system environment variables. The test with getenv("PATH") only returns an empty response.')); ?>
    - t('Please check the installation documentation ↗ for PHP configuration notes and the PHP configuration of your server, especially when using php-fpm.', link_to_docs('admin-php-fpm'))); ?> -
  • - -
  • - t('The Read-Only config has been enabled. This prevents setting some configurations via the web-interface. Furthermore, the file needs to be made writable manually for every update.')); ?> -
  • - -
  • - t('PHP is apparently set up to strip inline doc blocks. This will make several core apps inaccessible.')); ?>
    - t('This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator.')); ?> -
  • - -
  • - t('Your database does not run with "READ COMMITTED" transaction isolation level. This can cause problems when multiple actions are executed in parallel.')); ?> -
  • - $data) { - ?> -
  • - t('%1$s below version %2$s is installed, for stability and performance reasons it is recommended to update to a newer %1$s version.', $data)); ?> -
  • - -
  • - t('The PHP module \'fileinfo\' is missing. It is strongly recommended to enable this module to get the best results with MIME type detection.')); ?> -
  • - -
  • - t('Transactional file locking is disabled, this might lead to issues with race conditions. Enable \'filelocking.enabled\' in config.php to avoid these problems. See the documentation ↗ for more information.', link_to_docs('admin-transactional-locking'))); ?> -
  • - -
  • - t('System locale can not be set to a one which supports UTF-8.')); - ?> -
    - t('This means that there might be problems with certain characters in filenames.')); - ?> -
    - t('It is strongly proposed to install the required packages on your system to support one of the following locales: %s.', [$locales])); - ?> -
  • - -
  • - t('If your installation is not installed at the root of the domain and uses system Cron, there can be issues with the URL generation. To avoid these problems, please set the "overwrite.cli.url" option in your config.php file to the webroot path of your installation (Suggested: "%s")', $_['suggestedOverwriteCliUrl'])); ?> -
  • - -
  • - t('It was not possible to execute the cron job via CLI. The following technical errors have appeared:')); ?> -
    -
      - error)) {?> -
    1. error) ?> hint) ?>
    2. - -
    -
  • - -
- -
-
- - - - -
-
- -
-
-

t('Background jobs'));?>

@@ -220,10 +92,4 @@ } ?>

-
- -
- -

t('Version'));?>

-

getTitle()); ?>

-
+ \ No newline at end of file -- cgit v1.2.3 From 82ff26f4ec358402b94ae975b0e691b9cc41b84e Mon Sep 17 00:00:00 2001 From: Julius Härtl Date: Thu, 29 Mar 2018 17:16:07 +0200 Subject: Fix styling of system check list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- settings/css/settings.scss | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'settings') diff --git a/settings/css/settings.scss b/settings/css/settings.scss index a040ee6195a..0dc418af01a 100644 --- a/settings/css/settings.scss +++ b/settings/css/settings.scss @@ -1101,6 +1101,7 @@ table.grid td.date { #security-warning li { list-style: initial; margin: 10px 0; + list-style-position: inside; } #security-warning-state span { @@ -1260,13 +1261,16 @@ doesnotexist:-o-prefocus, .strengthify-wrapper { height: 50px; background-position: left center; } - .errors, .warnings { - color: #ce3702; + .errors, .errors a { + color: $color-error; + } + .warnings, .warnings a { + color: $color-warning; } } #security-warning > ul { - color: #ce3702; + color: $color-error; } #admin-tips li { -- cgit v1.2.3 From d30109c31661f6039e3f2035dce67b462820488c Mon Sep 17 00:00:00 2001 From: Julius Härtl Date: Thu, 29 Mar 2018 17:21:27 +0200 Subject: Make mail settings form width equal MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- lib/private/Settings/Admin/Additional.php | 86 ------------------------------- lib/private/Settings/Admin/Mail.php | 86 +++++++++++++++++++++++++++++++ settings/css/settings.scss | 3 +- 3 files changed, 88 insertions(+), 87 deletions(-) delete mode 100644 lib/private/Settings/Admin/Additional.php create mode 100644 lib/private/Settings/Admin/Mail.php (limited to 'settings') diff --git a/lib/private/Settings/Admin/Additional.php b/lib/private/Settings/Admin/Additional.php deleted file mode 100644 index 46a0d654f57..00000000000 --- a/lib/private/Settings/Admin/Additional.php +++ /dev/null @@ -1,86 +0,0 @@ - - * - * @author Arthur Schiwon - * @author Joas Schilling - * @author Lukas Reschke - * - * @license GNU AGPL version 3 or any later version - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - -namespace OC\Settings\Admin; - -use OCP\AppFramework\Http\TemplateResponse; -use OCP\IConfig; -use OCP\Settings\ISettings; - -class Additional implements ISettings { - /** @var IConfig */ - private $config; - - /** - * @param IConfig $config - */ - public function __construct(IConfig $config) { - $this->config = $config; - } - - /** - * @return TemplateResponse - */ - public function getForm() { - $parameters = [ - // Mail - 'sendmail_is_available' => (bool) \OC_Helper::findBinaryPath('sendmail'), - 'mail_domain' => $this->config->getSystemValue('mail_domain', ''), - 'mail_from_address' => $this->config->getSystemValue('mail_from_address', ''), - 'mail_smtpmode' => $this->config->getSystemValue('mail_smtpmode', ''), - 'mail_smtpsecure' => $this->config->getSystemValue('mail_smtpsecure', ''), - 'mail_smtphost' => $this->config->getSystemValue('mail_smtphost', ''), - 'mail_smtpport' => $this->config->getSystemValue('mail_smtpport', ''), - 'mail_smtpauthtype' => $this->config->getSystemValue('mail_smtpauthtype', ''), - 'mail_smtpauth' => $this->config->getSystemValue('mail_smtpauth', false), - 'mail_smtpname' => $this->config->getSystemValue('mail_smtpname', ''), - 'mail_smtppassword' => $this->config->getSystemValue('mail_smtppassword', ''), - ]; - - if ($parameters['mail_smtppassword'] !== '') { - $parameters['mail_smtppassword'] = '********'; - } - - return new TemplateResponse('settings', 'settings/admin/additional-mail', $parameters, ''); - } - - /** - * @return string the section ID, e.g. 'sharing' - */ - public function getSection() { - return 'server'; - } - - /** - * @return int whether the form should be rather on the top or bottom of - * the admin section. The forms are arranged in ascending order of the - * priority values. It is required to return a value between 0 and 100. - * - * E.g.: 70 - */ - public function getPriority() { - return 0; - } -} diff --git a/lib/private/Settings/Admin/Mail.php b/lib/private/Settings/Admin/Mail.php new file mode 100644 index 00000000000..46a0d654f57 --- /dev/null +++ b/lib/private/Settings/Admin/Mail.php @@ -0,0 +1,86 @@ + + * + * @author Arthur Schiwon + * @author Joas Schilling + * @author Lukas Reschke + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +namespace OC\Settings\Admin; + +use OCP\AppFramework\Http\TemplateResponse; +use OCP\IConfig; +use OCP\Settings\ISettings; + +class Additional implements ISettings { + /** @var IConfig */ + private $config; + + /** + * @param IConfig $config + */ + public function __construct(IConfig $config) { + $this->config = $config; + } + + /** + * @return TemplateResponse + */ + public function getForm() { + $parameters = [ + // Mail + 'sendmail_is_available' => (bool) \OC_Helper::findBinaryPath('sendmail'), + 'mail_domain' => $this->config->getSystemValue('mail_domain', ''), + 'mail_from_address' => $this->config->getSystemValue('mail_from_address', ''), + 'mail_smtpmode' => $this->config->getSystemValue('mail_smtpmode', ''), + 'mail_smtpsecure' => $this->config->getSystemValue('mail_smtpsecure', ''), + 'mail_smtphost' => $this->config->getSystemValue('mail_smtphost', ''), + 'mail_smtpport' => $this->config->getSystemValue('mail_smtpport', ''), + 'mail_smtpauthtype' => $this->config->getSystemValue('mail_smtpauthtype', ''), + 'mail_smtpauth' => $this->config->getSystemValue('mail_smtpauth', false), + 'mail_smtpname' => $this->config->getSystemValue('mail_smtpname', ''), + 'mail_smtppassword' => $this->config->getSystemValue('mail_smtppassword', ''), + ]; + + if ($parameters['mail_smtppassword'] !== '') { + $parameters['mail_smtppassword'] = '********'; + } + + return new TemplateResponse('settings', 'settings/admin/additional-mail', $parameters, ''); + } + + /** + * @return string the section ID, e.g. 'sharing' + */ + public function getSection() { + return 'server'; + } + + /** + * @return int whether the form should be rather on the top or bottom of + * the admin section. The forms are arranged in ascending order of the + * priority values. It is required to return a value between 0 and 100. + * + * E.g.: 70 + */ + public function getPriority() { + return 0; + } +} diff --git a/settings/css/settings.scss b/settings/css/settings.scss index 0dc418af01a..c668cc7adbe 100644 --- a/settings/css/settings.scss +++ b/settings/css/settings.scss @@ -1168,7 +1168,8 @@ table.grid td.date { width: 300px; text-align: right; } - select:nth-child(2) { + select:nth-child(2), + input { width: 143px; } } -- cgit v1.2.3 From f6f0f5be4095b0551ae522889c503cf6150b1a6c Mon Sep 17 00:00:00 2001 From: Julius Härtl Date: Tue, 27 Mar 2018 16:08:23 +0200 Subject: Add separator between settings sections MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- settings/css/settings.scss | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'settings') diff --git a/settings/css/settings.scss b/settings/css/settings.scss index c668cc7adbe..30798f0ba8d 100644 --- a/settings/css/settings.scss +++ b/settings/css/settings.scss @@ -882,6 +882,10 @@ span.version { margin: 8px 0; } margin-bottom: 0; + /* use 2nd child since app-navigation-toggle is the first */ + &:not(:nth-child(2)) { + border-top: 1px solid $color-border; + } } .personal-settings-setting-box .section { -- cgit v1.2.3 From 8b0c6c6df12fb7c44f3e87f69737bb2a34752cac Mon Sep 17 00:00:00 2001 From: Julius Härtl Date: Mon, 9 Apr 2018 21:49:03 +0200 Subject: Do not hide additional settings if there are only legacy forms MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- lib/private/Settings/Manager.php | 2 +- settings/Controller/CommonSettingsTrait.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'settings') diff --git a/lib/private/Settings/Manager.php b/lib/private/Settings/Manager.php index 68f43a60c90..becc670c6f9 100644 --- a/lib/private/Settings/Manager.php +++ b/lib/private/Settings/Manager.php @@ -227,7 +227,7 @@ class Manager implements IManager { // built-in sections $sections = [ 0 => [new Section('overview', $this->l->t('Overview'), 0, $this->url->imagePath('settings', 'admin.svg'))], - 1 => [new Section('server', $this->l->t('Basic settings'), 0, $this->url->imagePath('settings', 'admin.svg'))], + 1 => [new Section('server', $this->l->t('Basic settings'), 0, $this->url->imagePath('core', 'actions/settings-dark.svg'))], 5 => [new Section('sharing', $this->l->t('Sharing'), 0, $this->url->imagePath('core', 'actions/share.svg'))], 10 => [new Section('security', $this->l->t('Security'), 0, $this->url->imagePath('core', 'actions/password.svg'))], 45 => [new Section('encryption', $this->l->t('Encryption'), 0, $this->url->imagePath('core', 'actions/password.svg'))], diff --git a/settings/Controller/CommonSettingsTrait.php b/settings/Controller/CommonSettingsTrait.php index 3d314d9ed53..10fc0d84bbd 100644 --- a/settings/Controller/CommonSettingsTrait.php +++ b/settings/Controller/CommonSettingsTrait.php @@ -66,7 +66,7 @@ trait CommonSettingsTrait { } else if($type === 'personal') { $settings = $this->settingsManager->getPersonalSettings($section->getID()); } - if (empty($settings)) { + if (empty($settings) && !($section->getID() === 'additional' && count(\OC_App::getForms('admin')) > 0)) { continue; } -- cgit v1.2.3 From 2b840250c3b96a3eaed383819ec4a10b1f2211db Mon Sep 17 00:00:00 2001 From: Julius Härtl Date: Tue, 17 Apr 2018 18:49:08 +0200 Subject: Move documentation link in relation to the heading MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- apps/federatedfilesharing/templates/settings-admin.php | 13 ++++++++----- apps/federation/css/settings-admin.css | 4 ++++ settings/css/settings.scss | 7 +++++++ 3 files changed, 19 insertions(+), 5 deletions(-) (limited to 'settings') diff --git a/apps/federatedfilesharing/templates/settings-admin.php b/apps/federatedfilesharing/templates/settings-admin.php index 8d04169ea89..187d75f21ac 100644 --- a/apps/federatedfilesharing/templates/settings-admin.php +++ b/apps/federatedfilesharing/templates/settings-admin.php @@ -6,11 +6,14 @@ script('federatedfilesharing', 'settings-admin'); -
-

t('Federated Cloud Sharing'));?>

- +
+

+ t('Federated Cloud Sharing'));?> + +

+

t('Adjust how people can share between servers.')); ?>

diff --git a/apps/federation/css/settings-admin.css b/apps/federation/css/settings-admin.css index 3fd5f5aea6d..c4c846bd812 100644 --- a/apps/federation/css/settings-admin.css +++ b/apps/federation/css/settings-admin.css @@ -26,3 +26,7 @@ vertical-align: middle; margin-left: 10px; } + +#ocFederationAddServer #serverUrl { + width: 300px; +} diff --git a/settings/css/settings.scss b/settings/css/settings.scss index 30798f0ba8d..14900a52af9 100644 --- a/settings/css/settings.scss +++ b/settings/css/settings.scss @@ -886,6 +886,13 @@ span.version { &:not(:nth-child(2)) { border-top: 1px solid $color-border; } + + /* correctly display help icons next to headings */ + h2 .icon-info { + padding: 6px 20px; + vertical-align: text-bottom; + display: inline-block; + } } .personal-settings-setting-box .section { -- cgit v1.2.3 From 4251856218c55fad1524d22c038365efc396dfbf Mon Sep 17 00:00:00 2001 From: Julius Härtl Date: Tue, 17 Apr 2018 19:17:12 +0200 Subject: Increase space of settings headers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- settings/css/settings.scss | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'settings') diff --git a/settings/css/settings.scss b/settings/css/settings.scss index 14900a52af9..7a12e4f7d95 100644 --- a/settings/css/settings.scss +++ b/settings/css/settings.scss @@ -877,10 +877,6 @@ span.version { } .section { - h2.app-name { - display: block; - margin: 8px 0; - } margin-bottom: 0; /* use 2nd child since app-navigation-toggle is the first */ &:not(:nth-child(2)) { @@ -888,10 +884,13 @@ span.version { } /* correctly display help icons next to headings */ - h2 .icon-info { - padding: 6px 20px; - vertical-align: text-bottom; - display: inline-block; + h2 { + margin-bottom: 22px; + .icon-info { + padding: 6px 20px; + vertical-align: text-bottom; + display: inline-block; + } } } -- cgit v1.2.3 From 1f2f7019319cd9f4cfa759be35aea0d888beaba8 Mon Sep 17 00:00:00 2001 From: Julius Härtl Date: Tue, 17 Apr 2018 19:19:58 +0200 Subject: Readd space in app store view MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- settings/css/settings.scss | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'settings') diff --git a/settings/css/settings.scss b/settings/css/settings.scss index 7a12e4f7d95..2d687f9dad1 100644 --- a/settings/css/settings.scss +++ b/settings/css/settings.scss @@ -1036,6 +1036,10 @@ span.version { &.apps-experimental { flex-basis: 90%; } + h2.app-name { + display: block; + margin: 8px 0; + } } .app-description { p { @@ -1074,6 +1078,7 @@ span.version { position: absolute; padding-left: 6px; padding-top: 15px; + .enable { position: relative; top: -1px; -- cgit v1.2.3 From e81b1399d49e64fb3cf93217a4c17d1a4764580e Mon Sep 17 00:00:00 2001 From: Julius Härtl Date: Tue, 17 Apr 2018 20:13:50 +0200 Subject: Remove border from personal settings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- settings/css/settings.scss | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'settings') diff --git a/settings/css/settings.scss b/settings/css/settings.scss index 2d687f9dad1..b54083827af 100644 --- a/settings/css/settings.scss +++ b/settings/css/settings.scss @@ -153,6 +153,11 @@ input { width: 100%; } } +#personal-settings { + .section { + border: 0; + } +} #personal-settings { display: grid; -- cgit v1.2.3