1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-18 19:40:55 +01:00

Make it easier to ignore setup issues

Summary:
Ref T4331. Ref T5968. Users sometimes have trouble figuring out how to ignore issues. The option is a bit hard to spot, especially if you aren't familiar with interfaces yet.
Make it a button on the issue page itself instead.

Test Plan:
Normal issue:

{F199225}

Ignored issue:

{F199226}

Fatal issue:

{F199227}

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T4331, T5968

Differential Revision: https://secure.phabricator.com/D10420
This commit is contained in:
epriestley 2014-09-05 12:26:58 -07:00
parent adf7aa4487
commit 3958bf3677
6 changed files with 100 additions and 26 deletions

View file

@ -44,7 +44,7 @@ return array(
'rsrc/css/application/config/config-options.css' => '7fedf08b',
'rsrc/css/application/config/config-template.css' => '25d446d6',
'rsrc/css/application/config/config-welcome.css' => 'b0d16200',
'rsrc/css/application/config/setup-issue.css' => '69e640e7',
'rsrc/css/application/config/setup-issue.css' => '8f852bc0',
'rsrc/css/application/conpherence/menu.css' => 'e1e0fdf1',
'rsrc/css/application/conpherence/message-pane.css' => '11a393ca',
'rsrc/css/application/conpherence/notification.css' => '04a6e10a',
@ -811,7 +811,7 @@ return array(
'releeph-preview-branch' => 'b7a6f4a5',
'releeph-request-differential-create-dialog' => '8d8b92cd',
'releeph-request-typeahead-css' => '667a48ae',
'setup-issue-css' => '69e640e7',
'setup-issue-css' => '8f852bc0',
'sprite-apps-css' => 'd5baed0f',
'sprite-apps-large-css' => '20ec0cc0',
'sprite-conpherence-css' => '3b4a0487',

View file

@ -23,7 +23,7 @@ final class PhabricatorSetupCheckDaemons extends PhabricatorSetupCheck {
'The Phabricator daemons are not running, so Phabricator will not '.
'be able to perform background processing (including sending email, '.
'rebuilding search indexes, importing commits, cleaning up old data, '.
'running builds, etc.).'.
'and running builds).'.
"\n\n".
'Use %s to start daemons. See %s for more information.',
phutil_tag('tt', array(), 'bin/phd start'),

View file

@ -13,7 +13,7 @@ final class PhabricatorConfigIgnoreController
public function processRequest() {
$request = $this->getRequest();
$issue_uri = $this->getApplicationURI('issue');
$issue_uri = $this->getApplicationURI('issue/'.$this->issue.'/');
if ($request->isDialogFormPost()) {
$this->manageApplication();

View file

@ -55,22 +55,10 @@ final class PhabricatorConfigIssueListController
->addAttribute($issue->getSummary());
if (!$issue->getIsIgnored()) {
$item->setBarColor('yellow');
$item->addAction(
id(new PHUIListItemView())
->setIcon('fa-eye-slash')
->setWorkflow(true)
->setName(pht('Ignore'))
->setHref('/config/ignore/'.$issue->getIssueKey().'/'));
$list->addItem($item);
} else {
$item->addIcon('none', pht('Ignored'));
$item->addIcon('fa-eye-slash', pht('Ignored'));
$item->setDisabled(true);
$item->addAction(
id(new PHUIListItemView())
->setIcon('fa-eye')
->setWorkflow(true)
->setName(pht('Unignore'))
->setHref('/config/unignore/'.$issue->getIssueKey().'/'));
$item->setBarColor('none');
$ignored_items[] = $item;
}

View file

@ -107,12 +107,66 @@ final class PhabricatorSetupIssueView extends AphrontView {
}
$next = phutil_tag(
'div',
array(
'class' => 'setup-issue-next',
),
pht('To continue, resolve this problem and reload the page.'));
$actions = array();
if (!$issue->getIsFatal()) {
if ($issue->getIsIgnored()) {
$actions[] = javelin_tag(
'a',
array(
'href' => '/config/unignore/'.$issue->getIssueKey().'/',
'sigil' => 'workflow',
'class' => 'button grey',
),
pht('Unignore Setup Issue'));
} else {
$actions[] = javelin_tag(
'a',
array(
'href' => '/config/ignore/'.$issue->getIssueKey().'/',
'sigil' => 'workflow',
'class' => 'button grey',
),
pht('Ignore Setup Issue'));
}
$actions[] = javelin_tag(
'a',
array(
'href' => '/config/issue/'.$issue->getIssueKey().'/',
'class' => 'button grey',
'style' => 'float: right',
),
pht('Reload Page'));
}
if ($actions) {
$actions = phutil_tag(
'div',
array(
'class' => 'setup-issue-actions',
),
$actions);
}
if ($issue->getIsIgnored()) {
$status = phutil_tag(
'div',
array(
'class' => 'setup-issue-status',
),
pht(
'This issue is currently ignored, and does not show a global '.
'warning.'));
$next = null;
} else {
$status = null;
$next = phutil_tag(
'div',
array(
'class' => 'setup-issue-next',
),
pht('To continue, resolve this problem and reload the page.'));
}
$name = phutil_tag(
'div',
@ -121,15 +175,29 @@ final class PhabricatorSetupIssueView extends AphrontView {
),
$issue->getName());
$head = phutil_tag(
'div',
array(
'class' => 'setup-issue-head',
),
array($name, $status));
$tail = phutil_tag(
'div',
array(
'class' => 'setup-issue-tail',
),
array($actions, $next));
$issue = phutil_tag(
'div',
array(
'class' => 'setup-issue',
),
array(
$name,
$head,
$description,
$next,
$tail,
));
$debug_info = phutil_tag(

View file

@ -87,6 +87,25 @@
background-repeat: repeat-x;
}
.setup-issue-tail {
margin-top: 12px;
}
.setup-issue-status {
padding: 12px;
background: #f3f3f3;
color: #666666;
border-bottom: 1px solid #dfdfdf;
font-style: italic;
}
.setup-issue-actions {
padding: 12px;
background: #f3f3f3;
border-top: 1px solid #dfdfdf;
overflow: hidden;
}
.setup-issue-next {
padding: 12px;
border-top: 1px solid #BFCFDA;
@ -94,7 +113,6 @@
text-align: center;
font-size: 15px;
color: #2980b9;
margin-top: 12px;
}
.setup-issue-config {