Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15409942
D20361.id48612.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
6 KB
Referenced Files
None
Subscribers
None
D20361.id48612.diff
View Options
diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php
--- a/src/__phutil_library_map__.php
+++ b/src/__phutil_library_map__.php
@@ -2907,6 +2907,7 @@
'PhabricatorDashboardApplication' => 'applications/dashboard/application/PhabricatorDashboardApplication.php',
'PhabricatorDashboardArchiveController' => 'applications/dashboard/controller/PhabricatorDashboardArchiveController.php',
'PhabricatorDashboardArrangeController' => 'applications/dashboard/controller/PhabricatorDashboardArrangeController.php',
+ 'PhabricatorDashboardConsoleController' => 'applications/dashboard/controller/PhabricatorDashboardConsoleController.php',
'PhabricatorDashboardController' => 'applications/dashboard/controller/PhabricatorDashboardController.php',
'PhabricatorDashboardDAO' => 'applications/dashboard/storage/PhabricatorDashboardDAO.php',
'PhabricatorDashboardDashboardHasPanelEdgeType' => 'applications/dashboard/edge/PhabricatorDashboardDashboardHasPanelEdgeType.php',
@@ -8867,6 +8868,7 @@
'PhabricatorDashboardApplication' => 'PhabricatorApplication',
'PhabricatorDashboardArchiveController' => 'PhabricatorDashboardController',
'PhabricatorDashboardArrangeController' => 'PhabricatorDashboardProfileController',
+ 'PhabricatorDashboardConsoleController' => 'PhabricatorDashboardController',
'PhabricatorDashboardController' => 'PhabricatorController',
'PhabricatorDashboardDAO' => 'PhabricatorLiskDAO',
'PhabricatorDashboardDashboardHasPanelEdgeType' => 'PhabricatorEdgeType',
diff --git a/src/applications/dashboard/application/PhabricatorDashboardApplication.php b/src/applications/dashboard/application/PhabricatorDashboardApplication.php
--- a/src/applications/dashboard/application/PhabricatorDashboardApplication.php
+++ b/src/applications/dashboard/application/PhabricatorDashboardApplication.php
@@ -10,6 +10,10 @@
return '/dashboard/';
}
+ public function getTypeaheadURI() {
+ return '/dashboard/console/';
+ }
+
public function getShortDescription() {
return pht('Create Custom Pages');
}
@@ -42,6 +46,7 @@
'create/' => 'PhabricatorDashboardEditController',
'edit/(?:(?P<id>\d+)/)?' => 'PhabricatorDashboardEditController',
'install/(?:(?P<id>\d+)/)?' => 'PhabricatorDashboardInstallController',
+ 'console/' => 'PhabricatorDashboardConsoleController',
'addpanel/(?P<id>\d+)/' => 'PhabricatorDashboardAddPanelController',
'movepanel/(?P<id>\d+)/' => 'PhabricatorDashboardMovePanelController',
'removepanel/(?P<id>\d+)/'
diff --git a/src/applications/dashboard/controller/PhabricatorDashboardConsoleController.php b/src/applications/dashboard/controller/PhabricatorDashboardConsoleController.php
new file mode 100644
--- /dev/null
+++ b/src/applications/dashboard/controller/PhabricatorDashboardConsoleController.php
@@ -0,0 +1,72 @@
+<?php
+
+final class PhabricatorDashboardConsoleController
+ extends PhabricatorDashboardController {
+
+ public function shouldAllowPublic() {
+ return true;
+ }
+
+ public function handleRequest(AphrontRequest $request) {
+ $viewer = $request->getViewer();
+
+ $menu = id(new PHUIObjectItemListView())
+ ->setUser($viewer)
+ ->setBig(true);
+
+ $menu->addItem(
+ id(new PHUIObjectItemView())
+ ->setHeader(pht('Portals'))
+ ->setImageIcon('fa-compass')
+ ->setHref('/portal/')
+ ->setClickable(true)
+ ->addAttribute(
+ pht(
+ 'Portals are collections of dashboards, links, and other '.
+ 'resources that can provide a high-level overview of a '.
+ 'project.')));
+
+ $menu->addItem(
+ id(new PHUIObjectItemView())
+ ->setHeader(pht('Dashboards'))
+ ->setImageIcon('fa-dashboard')
+ ->setHref($this->getApplicationURI('/'))
+ ->setClickable(true)
+ ->addAttribute(
+ pht(
+ 'Dashboards organize panels, creating a cohesive page for '.
+ 'analysis or action.')));
+
+ $menu->addItem(
+ id(new PHUIObjectItemView())
+ ->setHeader(pht('Panels'))
+ ->setImageIcon('fa-line-chart')
+ ->setHref($this->getApplicationURI('panel/'))
+ ->setClickable(true)
+ ->addAttribute(
+ pht(
+ 'Panels show queries, charts, and other information to provide '.
+ 'insight on a particular topic.')));
+
+ $crumbs = $this->buildApplicationCrumbs();
+ $crumbs->addTextCrumb(pht('Console'));
+ $crumbs->setBorder(true);
+
+ $title = pht('Dashboard Console');
+
+ $box = id(new PHUIObjectBoxView())
+ ->setHeaderText($title)
+ ->setBackground(PHUIObjectBoxView::WHITE_CONFIG)
+ ->setObjectList($menu);
+
+ $view = id(new PHUITwoColumnView())
+ ->setFixed(true)
+ ->setFooter($box);
+
+ return $this->newPage()
+ ->setTitle($title)
+ ->setCrumbs($crumbs)
+ ->appendChild($view);
+ }
+
+}
diff --git a/src/applications/dashboard/controller/PhabricatorDashboardListController.php b/src/applications/dashboard/controller/PhabricatorDashboardListController.php
--- a/src/applications/dashboard/controller/PhabricatorDashboardListController.php
+++ b/src/applications/dashboard/controller/PhabricatorDashboardListController.php
@@ -28,9 +28,6 @@
->setViewer($user)
->addNavigationItems($nav->getMenu());
- $nav->addLabel(pht('Panels'));
- $nav->addFilter('panel/', pht('Manage Panels'));
-
$nav->selectFilter(null);
return $nav;
diff --git a/src/applications/dashboard/controller/portal/PhabricatorDashboardPortalController.php b/src/applications/dashboard/controller/portal/PhabricatorDashboardPortalController.php
--- a/src/applications/dashboard/controller/portal/PhabricatorDashboardPortalController.php
+++ b/src/applications/dashboard/controller/portal/PhabricatorDashboardPortalController.php
@@ -4,9 +4,13 @@
extends PhabricatorDashboardController {
protected function buildApplicationCrumbs() {
- $crumbs = parent::buildApplicationCrumbs();
+ $crumbs = new PHUICrumbsView();
- $crumbs->addTextCrumb(pht('Portals'), '/portal/');
+ $crumbs->addCrumb(
+ id(new PHUICrumbView())
+ ->setHref('/portal/')
+ ->setName(pht('Portals'))
+ ->setIcon('fa-compass'));
return $crumbs;
}
diff --git a/src/view/page/PhabricatorStandardPageView.php b/src/view/page/PhabricatorStandardPageView.php
--- a/src/view/page/PhabricatorStandardPageView.php
+++ b/src/view/page/PhabricatorStandardPageView.php
@@ -872,7 +872,10 @@
// mobile navigation menu from.
$application_menu = $controller->buildApplicationMenu();
if (!$application_menu) {
- $application_menu = $this->getNavigation()->getMenu();
+ $navigation = $this->getNavigation();
+ if ($navigation) {
+ $application_menu = $navigation->getMenu();
+ }
}
$this->applicationMenu = $application_menu;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Mar 20, 6:03 AM (2 w, 3 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7709082
Default Alt Text
D20361.id48612.diff (6 KB)
Attached To
Mode
D20361: Make Portals reachable without knowing the URI
Attached
Detach File
Event Timeline
Log In to Comment