@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Update Almanac for PHUITwoColumnView

Summary: Updates Almanac to the new layout, adds some header icons for interest.

Test Plan: Click on all the different almanac pages.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15381

+149 -82
+9 -9
resources/celerity/map.php
··· 7 7 */ 8 8 return array( 9 9 'names' => array( 10 - 'core.pkg.css' => '80c32191', 10 + 'core.pkg.css' => 'd5d34907', 11 11 'core.pkg.js' => '7d8faf57', 12 12 'darkconsole.pkg.js' => 'e7393ebb', 13 13 'differential.pkg.css' => '2de124c9', ··· 25 25 'rsrc/css/aphront/notification.css' => '7f684b62', 26 26 'rsrc/css/aphront/panel-view.css' => '8427b78d', 27 27 'rsrc/css/aphront/phabricator-nav-view.css' => 'ac79a758', 28 - 'rsrc/css/aphront/table-view.css' => 'aba95954', 28 + 'rsrc/css/aphront/table-view.css' => '036b6cdc', 29 29 'rsrc/css/aphront/tokenizer.css' => '056da01b', 30 30 'rsrc/css/aphront/tooltip.css' => '1a07aea8', 31 31 'rsrc/css/aphront/typeahead-browse.css' => 'd8581d2c', ··· 123 123 'rsrc/css/phui/phui-action-panel.css' => '91c7b835', 124 124 'rsrc/css/phui/phui-badge.css' => 'f25c3476', 125 125 'rsrc/css/phui/phui-big-info-view.css' => 'bd903741', 126 - 'rsrc/css/phui/phui-box.css' => '348bd872', 126 + 'rsrc/css/phui/phui-box.css' => 'c9e01148', 127 127 'rsrc/css/phui/phui-button.css' => 'a64a8de6', 128 128 'rsrc/css/phui/phui-chart.css' => '6bf6f78e', 129 129 'rsrc/css/phui/phui-crumbs-view.css' => '79d536e5', ··· 135 135 'rsrc/css/phui/phui-form-view.css' => '4a1a0f5e', 136 136 'rsrc/css/phui/phui-form.css' => 'aac1d51d', 137 137 'rsrc/css/phui/phui-head-thing.css' => '11731da0', 138 - 'rsrc/css/phui/phui-header-view.css' => '6152c91b', 138 + 'rsrc/css/phui/phui-header-view.css' => 'fc4acf14', 139 139 'rsrc/css/phui/phui-hovercard.css' => 'de1a2119', 140 140 'rsrc/css/phui/phui-icon-set-selector.css' => '1ab67aad', 141 141 'rsrc/css/phui/phui-icon.css' => '3f33ab57', ··· 155 155 'rsrc/css/phui/phui-status.css' => '888cedb8', 156 156 'rsrc/css/phui/phui-tag-view.css' => '9d5d4400', 157 157 'rsrc/css/phui/phui-timeline-view.css' => '2efceff8', 158 - 'rsrc/css/phui/phui-two-column-view.css' => '7c5d0741', 158 + 'rsrc/css/phui/phui-two-column-view.css' => 'cc0b8a09', 159 159 'rsrc/css/phui/workboards/phui-workboard-color.css' => 'ac6fe6a7', 160 160 'rsrc/css/phui/workboards/phui-workboard.css' => 'e6d89647', 161 161 'rsrc/css/phui/workboards/phui-workcard.css' => '3646fb96', ··· 524 524 'aphront-list-filter-view-css' => '5d6f0526', 525 525 'aphront-multi-column-view-css' => 'fd18389d', 526 526 'aphront-panel-view-css' => '8427b78d', 527 - 'aphront-table-view-css' => 'aba95954', 527 + 'aphront-table-view-css' => '036b6cdc', 528 528 'aphront-tokenizer-control-css' => '056da01b', 529 529 'aphront-tooltip-css' => '1a07aea8', 530 530 'aphront-typeahead-control-css' => 'd4f16145', ··· 803 803 'phui-action-panel-css' => '91c7b835', 804 804 'phui-badge-view-css' => 'f25c3476', 805 805 'phui-big-info-view-css' => 'bd903741', 806 - 'phui-box-css' => '348bd872', 806 + 'phui-box-css' => 'c9e01148', 807 807 'phui-button-css' => 'a64a8de6', 808 808 'phui-calendar-css' => 'ccabe893', 809 809 'phui-calendar-day-css' => 'd1cf6f93', ··· 820 820 'phui-form-css' => 'aac1d51d', 821 821 'phui-form-view-css' => '4a1a0f5e', 822 822 'phui-head-thing-view-css' => '11731da0', 823 - 'phui-header-view-css' => '6152c91b', 823 + 'phui-header-view-css' => 'fc4acf14', 824 824 'phui-hovercard' => '1bd28176', 825 825 'phui-hovercard-view-css' => 'de1a2119', 826 826 'phui-icon-set-selector-css' => '1ab67aad', ··· 843 843 'phui-tag-view-css' => '9d5d4400', 844 844 'phui-theme-css' => '027ba77e', 845 845 'phui-timeline-view-css' => '2efceff8', 846 - 'phui-two-column-view-css' => '7c5d0741', 846 + 'phui-two-column-view-css' => 'cc0b8a09', 847 847 'phui-workboard-color-css' => 'ac6fe6a7', 848 848 'phui-workboard-view-css' => 'e6d89647', 849 849 'phui-workcard-view-css' => '3646fb96',
+3 -4
src/applications/almanac/controller/AlmanacController.php
··· 158 158 ->setIcon('fa-plus'); 159 159 160 160 $header = id(new PHUIHeaderView()) 161 - ->setHeader(pht('Properties')) 161 + ->setHeader(pht('PROPERTIES')) 162 162 ->addActionLink($add_button); 163 163 164 164 return id(new PHUIObjectBoxView()) 165 165 ->setHeader($header) 166 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 166 167 ->setTable($table); 167 168 } 168 169 169 170 protected function addClusterMessage( 170 - PHUIObjectBoxView $box, 171 171 $positive, 172 172 $negative) { 173 173 ··· 194 194 $icon = id(new PHUIIconView()) 195 195 ->setIcon('fa-sitemap'); 196 196 197 - $error_view = id(new PHUIInfoView()) 197 + return id(new PHUIInfoView()) 198 198 ->setSeverity($severity) 199 199 ->setErrors( 200 200 array( 201 201 array($icon, ' ', $message, ' ', $doc_link), 202 202 )); 203 203 204 - $box->setInfoView($error_view); 205 204 } 206 205 207 206 protected function getPropertyDeleteURI($object) {
+28 -22
src/applications/almanac/controller/AlmanacDeviceViewController.php
··· 23 23 24 24 $title = pht('Device %s', $device->getName()); 25 25 26 - $property_list = $this->buildPropertyList($device); 27 - $action_list = $this->buildActionList($device); 28 - $property_list->setActionList($action_list); 26 + $properties = $this->buildPropertyList($device); 27 + $actions = $this->buildActionList($device); 29 28 30 29 $header = id(new PHUIHeaderView()) 31 30 ->setUser($viewer) 32 31 ->setHeader($device->getName()) 33 - ->setPolicyObject($device); 32 + ->setPolicyObject($device) 33 + ->setHeaderIcon('fa-server'); 34 34 35 - $box = id(new PHUIObjectBoxView()) 36 - ->setHeader($header) 37 - ->addPropertyList($property_list); 38 - 35 + $issue = null; 39 36 if ($device->isClusterDevice()) { 40 - $this->addClusterMessage( 41 - $box, 37 + $issue = $this->addClusterMessage( 42 38 pht('This device is bound to a cluster service.'), 43 39 pht( 44 40 'This device is bound to a cluster service. You do not have '. ··· 50 46 51 47 $crumbs = $this->buildApplicationCrumbs(); 52 48 $crumbs->addTextCrumb($device->getName()); 49 + $crumbs->setBorder(true); 53 50 54 51 $timeline = $this->buildTransactionTimeline( 55 52 $device, 56 53 new AlmanacDeviceTransactionQuery()); 57 54 $timeline->setShouldTerminate(true); 58 55 59 - return $this->newPage() 60 - ->setTitle($title) 61 - ->setCrumbs($crumbs) 62 - ->appendChild( 63 - array( 64 - $box, 56 + $view = id(new PHUITwoColumnView()) 57 + ->setHeader($header) 58 + ->setMainColumn(array( 59 + $issue, 65 60 $interfaces, 66 61 $this->buildAlmanacPropertiesTable($device), 67 62 $this->buildSSHKeysTable($device), 68 63 $this->buildServicesTable($device), 69 64 $timeline, 70 - )); 65 + )) 66 + ->setPropertyList($properties) 67 + ->setActionList($actions); 68 + 69 + return $this->newPage() 70 + ->setTitle($title) 71 + ->setCrumbs($crumbs) 72 + ->appendChild( 73 + array( 74 + $view, 75 + )); 71 76 } 72 77 73 78 private function buildPropertyList(AlmanacDevice $device) { ··· 123 128 ->setCanEdit($can_edit); 124 129 125 130 $header = id(new PHUIHeaderView()) 126 - ->setHeader(pht('Device Interfaces')) 131 + ->setHeader(pht('DEVICE INTERFACES')) 127 132 ->addActionLink( 128 133 id(new PHUIButtonView()) 129 134 ->setTag('a') ··· 135 140 136 141 return id(new PHUIObjectBoxView()) 137 142 ->setHeader($header) 143 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 138 144 ->setTable($table); 139 145 } 140 146 ··· 172 178 $upload_uri = '/auth/sshkey/upload/?objectPHID='.$device_phid; 173 179 174 180 $header = id(new PHUIHeaderView()) 175 - ->setHeader(pht('SSH Public Keys')) 181 + ->setHeader(pht('SSH PUBLIC KEYS')) 176 182 ->addActionLink( 177 183 id(new PHUIButtonView()) 178 184 ->setTag('a') ··· 196 202 197 203 return id(new PHUIObjectBoxView()) 198 204 ->setHeader($header) 205 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 199 206 ->setTable($table); 200 - 201 - 202 207 } 203 208 204 209 private function buildServicesTable(AlmanacDevice $device) { ··· 244 249 )); 245 250 246 251 return id(new PHUIObjectBoxView()) 247 - ->setHeaderText(pht('Bound Services')) 252 + ->setHeaderText(pht('BOUND SERVICES')) 253 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 248 254 ->setTable($table); 249 255 } 250 256
+19 -12
src/applications/almanac/controller/AlmanacNamespaceViewController.php
··· 21 21 22 22 $title = pht('Namespace %s', $namespace->getName()); 23 23 24 - $property_list = $this->buildPropertyList($namespace); 25 - $action_list = $this->buildActionList($namespace); 26 - $property_list->setActionList($action_list); 24 + $properties = $this->buildPropertyList($namespace); 25 + $actions = $this->buildActionList($namespace); 27 26 28 27 $header = id(new PHUIHeaderView()) 29 28 ->setUser($viewer) 30 29 ->setHeader($namespace->getName()) 31 - ->setPolicyObject($namespace); 32 - 33 - $box = id(new PHUIObjectBoxView()) 34 - ->setHeader($header) 35 - ->addPropertyList($property_list); 30 + ->setPolicyObject($namespace) 31 + ->setHeaderIcon('fa-asterisk'); 36 32 37 33 $crumbs = $this->buildApplicationCrumbs(); 38 34 $crumbs->addTextCrumb($namespace->getName()); 35 + $crumbs->setBorder(true); 39 36 40 37 $timeline = $this->buildTransactionTimeline( 41 38 $namespace, 42 39 new AlmanacNamespaceTransactionQuery()); 43 40 $timeline->setShouldTerminate(true); 44 41 42 + $view = id(new PHUITwoColumnView()) 43 + ->setHeader($header) 44 + ->setMainColumn(array( 45 + $timeline, 46 + )) 47 + ->setPropertyList($properties) 48 + ->setActionList($actions); 49 + 45 50 return $this->newPage() 46 51 ->setTitle($title) 47 52 ->setCrumbs($crumbs) 48 53 ->appendChild( 49 54 array( 50 - $box, 51 - $timeline, 52 - )); 55 + $view, 56 + )); 53 57 } 54 58 55 59 private function buildPropertyList(AlmanacNamespace $namespace) { 56 60 $viewer = $this->getViewer(); 57 61 58 62 $properties = id(new PHUIPropertyListView()) 59 - ->setUser($viewer); 63 + ->setUser($viewer) 64 + ->setObject($namespace); 65 + 66 + $properties->invokeWillRenderEvent(); 60 67 61 68 return $properties; 62 69 }
+17 -10
src/applications/almanac/controller/AlmanacNetworkViewController.php
··· 21 21 22 22 $title = pht('Network %s', $network->getName()); 23 23 24 - $property_list = $this->buildPropertyList($network); 25 - $action_list = $this->buildActionList($network); 26 - $property_list->setActionList($action_list); 24 + $properties = $this->buildPropertyList($network); 25 + $actions = $this->buildActionList($network); 27 26 28 27 $header = id(new PHUIHeaderView()) 29 28 ->setUser($viewer) 30 29 ->setHeader($network->getName()) 30 + ->setHeaderIcon('fa-globe') 31 31 ->setPolicyObject($network); 32 32 33 - $box = id(new PHUIObjectBoxView()) 34 - ->setHeader($header) 35 - ->addPropertyList($property_list); 36 - 37 33 $crumbs = $this->buildApplicationCrumbs(); 38 34 $crumbs->addTextCrumb($network->getName()); 35 + $crumbs->setBorder(true); 39 36 40 37 $timeline = $this->buildTransactionTimeline( 41 38 $network, 42 39 new AlmanacNetworkTransactionQuery()); 43 40 $timeline->setShouldTerminate(true); 44 41 42 + $view = id(new PHUITwoColumnView()) 43 + ->setHeader($header) 44 + ->setMainColumn(array( 45 + $timeline, 46 + )) 47 + ->setPropertyList($properties) 48 + ->setActionList($actions); 49 + 45 50 return $this->newPage() 46 51 ->setTitle($title) 47 52 ->setCrumbs($crumbs) 48 53 ->appendChild( 49 54 array( 50 - $box, 51 - $timeline, 55 + $view, 52 56 )); 53 57 } 54 58 ··· 56 60 $viewer = $this->getViewer(); 57 61 58 62 $properties = id(new PHUIPropertyListView()) 59 - ->setUser($viewer); 63 + ->setUser($viewer) 64 + ->setObject($network); 65 + 66 + $properties->invokeWillRenderEvent(); 60 67 61 68 return $properties; 62 69 }
+43 -19
src/applications/almanac/controller/AlmanacServiceViewController.php
··· 23 23 24 24 $title = pht('Service %s', $service->getName()); 25 25 26 - $property_list = $this->buildPropertyList($service); 27 - $action_list = $this->buildActionList($service); 28 - $property_list->setActionList($action_list); 26 + $properties = $this->buildPropertyList($service); 27 + $actions = $this->buildActionList($service); 28 + $details = $this->buildPropertySection($service); 29 29 30 30 $header = id(new PHUIHeaderView()) 31 31 ->setUser($viewer) 32 32 ->setHeader($service->getName()) 33 - ->setPolicyObject($service); 34 - 35 - $box = id(new PHUIObjectBoxView()) 36 - ->setHeader($header) 37 - ->addPropertyList($property_list); 33 + ->setPolicyObject($service) 34 + ->setHeaderIcon('fa-plug'); 38 35 36 + $issue = null; 39 37 if ($service->isClusterService()) { 40 - $this->addClusterMessage( 41 - $box, 38 + $issue = $this->addClusterMessage( 42 39 pht('This is a cluster service.'), 43 40 pht( 44 41 'This service is a cluster service. You do not have permission to '. ··· 49 46 50 47 $crumbs = $this->buildApplicationCrumbs(); 51 48 $crumbs->addTextCrumb($service->getName()); 49 + $crumbs->setBorder(true); 52 50 53 51 $timeline = $this->buildTransactionTimeline( 54 52 $service, 55 53 new AlmanacServiceTransactionQuery()); 56 54 $timeline->setShouldTerminate(true); 57 55 56 + $view = id(new PHUITwoColumnView()) 57 + ->setHeader($header) 58 + ->setMainColumn(array( 59 + $issue, 60 + $details, 61 + $bindings, 62 + $this->buildAlmanacPropertiesTable($service), 63 + $timeline, 64 + )) 65 + ->setPropertyList($properties) 66 + ->setActionList($actions); 67 + 58 68 return $this->newPage() 59 69 ->setTitle($title) 60 70 ->setCrumbs($crumbs) 61 71 ->appendChild( 62 72 array( 63 - $box, 64 - $bindings, 65 - $this->buildAlmanacPropertiesTable($service), 66 - $timeline, 67 - )); 73 + $view, 74 + )); 68 75 } 69 76 70 - private function buildPropertyList(AlmanacService $service) { 77 + private function buildPropertyList( 78 + AlmanacService $service) { 71 79 $viewer = $this->getViewer(); 72 80 73 - $properties = id(new PHUIPropertyListView()) 81 + $view = id(new PHUIPropertyListView()) 74 82 ->setUser($viewer) 75 83 ->setObject($service); 76 84 85 + $view->invokeWillRenderEvent(); 86 + 87 + return $view; 88 + } 89 + 90 + private function buildPropertySection( 91 + AlmanacService $service) { 92 + $viewer = $this->getViewer(); 93 + 94 + $properties = id(new PHUIPropertyListView()) 95 + ->setUser($viewer); 96 + 77 97 $properties->addProperty( 78 98 pht('Service Type'), 79 99 $service->getServiceImplementation()->getServiceTypeShortName()); 80 100 81 - return $properties; 101 + return id(new PHUIObjectBoxView()) 102 + ->setHeaderText(pht('DETAILS')) 103 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 104 + ->appendChild($properties); 82 105 } 83 106 84 107 private function buildActionList(AlmanacService $service) { ··· 126 149 ->setHideServiceColumn(true); 127 150 128 151 $header = id(new PHUIHeaderView()) 129 - ->setHeader(pht('Service Bindings')) 152 + ->setHeader(pht('SERVICE BINDINGS')) 130 153 ->addActionLink( 131 154 id(new PHUIButtonView()) 132 155 ->setTag('a') ··· 138 161 139 162 return id(new PHUIObjectBoxView()) 140 163 ->setHeader($header) 164 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 141 165 ->setTable($table); 142 166 } 143 167
+4 -2
src/view/phui/PHUIHeaderView.php
··· 313 313 $action_list); 314 314 } 315 315 316 + $icon = null; 316 317 if ($this->headerIcon) { 317 318 $icon = id(new PHUIIconView()) 318 - ->setIcon($this->headerIcon); 319 - $left[] = $icon; 319 + ->setIcon($this->headerIcon) 320 + ->addClass('phui-header-icon'); 320 321 } 321 322 322 323 $header_content = $this->header; ··· 338 339 ), 339 340 array( 340 341 $space_header, 342 + $icon, 341 343 $header_content, 342 344 )); 343 345
+2 -1
webroot/rsrc/css/aphront/table-view.css
··· 248 248 } 249 249 250 250 .aphront-table-view tr.no-data td { 251 - padding: 12px; 251 + padding: 16px; 252 252 text-align: center; 253 253 color: {$lightgreytext}; 254 254 font-style: italic; 255 + font-size: {$normalfontsize}; 255 256 } 256 257 257 258 .aphront-table-view td.thumb img {
+5
webroot/rsrc/css/phui/phui-box.css
··· 66 66 padding: 0; 67 67 } 68 68 69 + .phui-box.phui-box-blue-property .phui-header-action-link { 70 + margin-top: 0; 71 + margin-bottom: 0; 72 + } 73 + 69 74 .device .phui-box.phui-box-blue-property { 70 75 padding: 0; 71 76 }
+5
webroot/rsrc/css/phui/phui-header-view.css
··· 75 75 color: {$darkbluetext}; 76 76 } 77 77 78 + .phui-header-header .phui-header-icon { 79 + margin-right: 8px; 80 + color: {$lightbluetext}; 81 + } 82 + 78 83 .phui-object-box .phui-header-tall .phui-header-header, 79 84 .phui-document-view .phui-header-tall .phui-header-header { 80 85 font-size: 18px;
+14 -3
webroot/rsrc/css/phui/phui-two-column-view.css
··· 75 75 margin: 0 0 20px 0; 76 76 } 77 77 78 + .phui-two-column-view .phui-object-box.phui-object-box-collapsed { 79 + padding: 0; 80 + } 81 + 78 82 /* Timeline */ 79 83 80 84 .phui-two-column-view .phui-timeline-view { ··· 112 116 113 117 .phui-two-column-properties .phabricator-action-list-view { 114 118 padding-top: 4px; 119 + padding-bottom: 12px; 115 120 } 116 121 117 122 .device-desktop .phui-two-column-view .phui-property-list-container { ··· 128 133 129 134 .phui-two-column-properties .phui-property-list-stacked 130 135 .phui-property-list-properties .phui-property-list-key { 131 - margin: 20px 0 8px 0; 136 + margin: 4px 0 8px 0; 132 137 padding: 20px 4px 0; 133 138 border-top: 1px solid rgba({$alphablue}, .2); 134 139 } 135 140 136 141 .phui-two-column-properties .phui-property-list-stacked 137 142 .phui-property-list-properties .phui-property-list-value { 138 - margin: 0; 143 + margin: 0 0 20px 0; 139 144 padding: 0 4px; 140 145 } 141 146 142 147 .device-desktop .phui-two-column-properties .phui-property-list-container { 143 - padding: 0 0 20px 0; 148 + padding: 0; 144 149 } 145 150 146 151 .device .phui-two-column-properties .phui-property-list-stacked ··· 190 195 .device .phui-two-column-view .phui-property-list-text-content { 191 196 margin: 0 8px; 192 197 } 198 + 199 + /* Info View */ 200 + 201 + .phui-two-column-view .phui-two-column-content .phui-info-view { 202 + margin: 0 0 20px 0; 203 + }