mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-20 05:42:40 +01:00
Fixed T2630
Summary: Fixes T2630 Test Plan: Did not test yet. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Maniphest Tasks: T2630 Differential Revision: https://secure.phabricator.com/D5456
This commit is contained in:
parent
1df4357251
commit
0b1410b1d7
9 changed files with 43 additions and 15 deletions
|
@ -39,9 +39,9 @@ final class PhabricatorSetupCheckDatabase extends PhabricatorSetupCheck {
|
|||
->setName(pht('Can Not Connect to MySQL'))
|
||||
->setMessage($message)
|
||||
->setIsFatal(true)
|
||||
->addPhabricatorConfig('mysql.host')
|
||||
->addPhabricatorConfig('mysql.user')
|
||||
->addPhabricatorConfig('mysql.pass');
|
||||
->addRelatedPhabricatorConfig('mysql.host')
|
||||
->addRelatedPhabricatorConfig('mysql.user')
|
||||
->addRelatedPhabricatorConfig('mysql.pass');
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ final class PhabricatorSetupCheckFacebook extends PhabricatorSetupCheck {
|
|||
$this->newIssue('config.facebook.application-id')
|
||||
->setName(pht("Facebook Application ID Not Set"))
|
||||
->setMessage($message)
|
||||
->addPhabricatorConfig('facebook.auth-enabled')
|
||||
->addRelatedPhabricatorConfig('facebook.auth-enabled')
|
||||
->addPhabricatorConfig('facebook.application-id');
|
||||
}
|
||||
|
||||
|
@ -30,7 +30,7 @@ final class PhabricatorSetupCheckFacebook extends PhabricatorSetupCheck {
|
|||
$this->newIssue('config.facebook.application-secret')
|
||||
->setName(pht("Facebook Application Secret Not Set"))
|
||||
->setMessage($message)
|
||||
->addPhabricatorConfig('facebook.auth-enabled')
|
||||
->addRelatedPhabricatorConfig('facebook.auth-enabled')
|
||||
->addPhabricatorConfig('facebook.application-secret');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ final class PhabricatorSetupCheckImagemagick extends PhabricatorSetupCheck {
|
|||
->setName(pht(
|
||||
"'convert' binary not found or Imagemagick is not installed."))
|
||||
->setMessage($message)
|
||||
->addPhabricatorConfig('files.enable-imagemagick')
|
||||
->addRelatedPhabricatorConfig('files.enable-imagemagick')
|
||||
->addPhabricatorConfig('environment.append-paths');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ final class PhabricatorSetupCheckMail extends PhabricatorSetupCheck {
|
|||
->setShortName(pht('Missing Sendmail'))
|
||||
->setName(pht('No Sendmail Binary Found'))
|
||||
->setMessage($message)
|
||||
->addPhabricatorConfig('metamta.mail-adapter');
|
||||
->addRelatedPhabricatorConfig('metamta.mail-adapter');
|
||||
}
|
||||
break;
|
||||
case 'PhabricatorMailImplementationAmazonSESAdapter':
|
||||
|
@ -30,7 +30,7 @@ final class PhabricatorSetupCheckMail extends PhabricatorSetupCheck {
|
|||
$this->newIssue('config.can-send-as-user')
|
||||
->setName(pht("SES Can't Send As User"))
|
||||
->setMessage($message)
|
||||
->addPhabricatorConfig('metamta.mail-adapter')
|
||||
->addRelatedPhabricatorConfig('metamta.mail-adapter')
|
||||
->addPhabricatorConfig('metamta.can-send-as-user');
|
||||
}
|
||||
|
||||
|
@ -43,7 +43,7 @@ final class PhabricatorSetupCheckMail extends PhabricatorSetupCheck {
|
|||
$this->newIssue('config.amazon-ses.access-key')
|
||||
->setName(pht("Amazon SES Access Key Not Set"))
|
||||
->setMessage($message)
|
||||
->addPhabricatorConfig('metamta.mail-adapter')
|
||||
->addRelatedPhabricatorConfig('metamta.mail-adapter')
|
||||
->addPhabricatorConfig('amazon-ses.access-key');
|
||||
}
|
||||
|
||||
|
@ -56,7 +56,7 @@ final class PhabricatorSetupCheckMail extends PhabricatorSetupCheck {
|
|||
$this->newIssue('config.amazon-ses.secret-key')
|
||||
->setName(pht("Amazon SES Secret Key Not Set"))
|
||||
->setMessage($message)
|
||||
->addPhabricatorConfig('metamta.mail-adapter')
|
||||
->addRelatedPhabricatorConfig('metamta.mail-adapter')
|
||||
->addPhabricatorConfig('amazon-ses.secret-key');
|
||||
}
|
||||
|
||||
|
@ -73,7 +73,7 @@ final class PhabricatorSetupCheckMail extends PhabricatorSetupCheck {
|
|||
$this->newIssue('config.metamta.default-address')
|
||||
->setName(pht("No SES From Address Configured"))
|
||||
->setMessage($message)
|
||||
->addPhabricatorConfig('metamta.mail-adapter')
|
||||
->addRelatedPhabricatorConfig('metamta.mail-adapter')
|
||||
->addPhabricatorConfig('metamta.default-address');
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -43,7 +43,7 @@ final class PhabricatorSetupCheckMySQL extends PhabricatorSetupCheck {
|
|||
|
||||
$this->newIssue('mysql.mode')
|
||||
->setName(pht('MySQL STRICT_ALL_TABLES Mode Not Set'))
|
||||
->addPhabricatorConfig('phabricator.developer-mode')
|
||||
->addRelatedPhabricatorConfig('phabricator.developer-mode')
|
||||
->setSummary($summary)
|
||||
->setMessage($message);
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ final class PhabricatorSetupCheckPygment extends PhabricatorSetupCheck {
|
|||
->setName(pht('pygmentize Not Found'))
|
||||
->setSummary($summary)
|
||||
->setMessage($message)
|
||||
->addPhabricatorConfig('pygments.enabled')
|
||||
->addRelatedPhabricatorConfig('pygments.enabled')
|
||||
->addPhabricatorConfig('environment.append-paths');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@ final class PhabricatorSetupIssue {
|
|||
private $isIgnored = false;
|
||||
private $phpExtensions = array();
|
||||
private $phabricatorConfig = array();
|
||||
private $relatedPhabricatorConfig = array();
|
||||
private $phpConfig = array();
|
||||
private $commands = array();
|
||||
|
||||
|
@ -93,6 +94,15 @@ final class PhabricatorSetupIssue {
|
|||
return $this->phabricatorConfig;
|
||||
}
|
||||
|
||||
public function addRelatedPhabricatorConfig($phabricator_config) {
|
||||
$this->relatedPhabricatorConfig[] = $phabricator_config;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getRelatedPhabricatorConfig() {
|
||||
return $this->relatedPhabricatorConfig;
|
||||
}
|
||||
|
||||
public function addPHPExtension($php_extension) {
|
||||
$this->phpExtensions[] = $php_extension;
|
||||
return $this;
|
||||
|
|
|
@ -34,6 +34,12 @@ final class PhabricatorSetupIssueView extends AphrontView {
|
|||
$description[] = $this->renderPhabricatorConfig($configs);
|
||||
}
|
||||
|
||||
$related_configs = $issue->getRelatedPhabricatorConfig();
|
||||
if ($related_configs) {
|
||||
$description[] = $this->renderPhabricatorConfig($related_configs,
|
||||
$related = true);
|
||||
}
|
||||
|
||||
$commands = $issue->getCommands();
|
||||
if ($commands) {
|
||||
$run_these = pht("Run these %d command(s):", count($commands));
|
||||
|
@ -122,7 +128,7 @@ final class PhabricatorSetupIssueView extends AphrontView {
|
|||
));
|
||||
}
|
||||
|
||||
private function renderPhabricatorConfig(array $configs) {
|
||||
private function renderPhabricatorConfig(array $configs, $related = false) {
|
||||
$issue = $this->getIssue();
|
||||
|
||||
$table_info = phutil_tag(
|
||||
|
@ -184,10 +190,18 @@ final class PhabricatorSetupIssueView extends AphrontView {
|
|||
}
|
||||
if ($update) {
|
||||
$update = phutil_tag('ul', array(), $update);
|
||||
$update_info = phutil_tag(
|
||||
if (!$related) {
|
||||
|
||||
$update_info = phutil_tag(
|
||||
'p',
|
||||
array(),
|
||||
pht("You can update these %d value(s) here:", count($configs)));
|
||||
} else {
|
||||
$update_info = phutil_tag(
|
||||
'p',
|
||||
array(),
|
||||
pht("These %d configuration value(s) are related:", count($configs)));
|
||||
}
|
||||
} else {
|
||||
$update = null;
|
||||
$update_info = null;
|
||||
|
|
|
@ -9,6 +9,10 @@ abstract class PhabricatorBaseEnglishTranslation
|
|||
|
||||
public function getTranslations() {
|
||||
return array(
|
||||
'These %d configuration value(s) are related:' => array(
|
||||
'This configuration value is related:',
|
||||
'These configuration values are related:',
|
||||
),
|
||||
'Differential Revision(s)' => array(
|
||||
'Differential Revision',
|
||||
'Differential Revisions',
|
||||
|
|
Loading…
Reference in a new issue