@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 Harbormaster for two column

Summary: Updates the Harbormaster UI to match the new two column everywhere else.

Test Plan: Did best I could, tested builds, plans, steps, buildables. Unable to test lint/unit locally, I need to set that up. Kick the tires for me pls. :3

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

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

authored by

Chad Little and committed by
chad
d76652b3 0856a36e

+261 -244
+3 -3
resources/celerity/map.php
··· 7 7 */ 8 8 return array( 9 9 'names' => array( 10 - 'core.pkg.css' => 'befbf333', 10 + 'core.pkg.css' => '9acdee84', 11 11 'core.pkg.js' => '7d8faf57', 12 12 'darkconsole.pkg.js' => 'e7393ebb', 13 13 'differential.pkg.css' => '7ba78475', ··· 155 155 'rsrc/css/phui/phui-spacing.css' => '042804d6', 156 156 'rsrc/css/phui/phui-status.css' => '37309046', 157 157 'rsrc/css/phui/phui-tag-view.css' => '6bbd83e2', 158 - 'rsrc/css/phui/phui-timeline-view.css' => 'a0173eba', 158 + 'rsrc/css/phui/phui-timeline-view.css' => '6e342216', 159 159 'rsrc/css/phui/phui-two-column-view.css' => '9c43b599', 160 160 'rsrc/css/phui/workboards/phui-workboard-color.css' => 'ac6fe6a7', 161 161 'rsrc/css/phui/workboards/phui-workboard.css' => 'e6d89647', ··· 845 845 'phui-status-list-view-css' => '37309046', 846 846 'phui-tag-view-css' => '6bbd83e2', 847 847 'phui-theme-css' => '027ba77e', 848 - 'phui-timeline-view-css' => 'a0173eba', 848 + 'phui-timeline-view-css' => '6e342216', 849 849 'phui-two-column-view-css' => '9c43b599', 850 850 'phui-workboard-color-css' => 'ac6fe6a7', 851 851 'phui-workboard-view-css' => 'e6d89647',
-1
src/applications/differential/controller/DifferentialRevisionViewController.php
··· 1166 1166 ->setBuildable($diff->getBuildable()) 1167 1167 ->setUnitMessages($diff->getUnitMessages()) 1168 1168 ->setLimit(5) 1169 - ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 1170 1169 ->setShowViewAll(true); 1171 1170 } 1172 1171
+69 -64
src/applications/harbormaster/controller/HarbormasterBuildViewController.php
··· 22 22 23 23 $title = pht('Build %d', $id); 24 24 25 - $header = id(new PHUIHeaderView()) 25 + $page_header = id(new PHUIHeaderView()) 26 26 ->setHeader($title) 27 27 ->setUser($viewer) 28 - ->setPolicyObject($build); 28 + ->setPolicyObject($build) 29 + ->setHeaderIcon('fa-cubes'); 29 30 30 31 if ($build->isRestarting()) { 31 - $header->setStatus('fa-exclamation-triangle', 'red', pht('Restarting')); 32 + $page_header->setStatus( 33 + 'fa-exclamation-triangle', 'red', pht('Restarting')); 32 34 } else if ($build->isPausing()) { 33 - $header->setStatus('fa-exclamation-triangle', 'red', pht('Pausing')); 35 + $page_header->setStatus( 36 + 'fa-exclamation-triangle', 'red', pht('Pausing')); 34 37 } else if ($build->isResuming()) { 35 - $header->setStatus('fa-exclamation-triangle', 'red', pht('Resuming')); 38 + $page_header->setStatus( 39 + 'fa-exclamation-triangle', 'red', pht('Resuming')); 36 40 } else if ($build->isAborting()) { 37 - $header->setStatus('fa-exclamation-triangle', 'red', pht('Aborting')); 41 + $page_header->setStatus( 42 + 'fa-exclamation-triangle', 'red', pht('Aborting')); 38 43 } 39 44 40 - $box = id(new PHUIObjectBoxView()) 41 - ->setHeader($header); 42 - 43 - $actions = $this->buildActionList($build); 44 - $this->buildPropertyLists($box, $build, $actions); 45 + $curtain = $this->buildCurtainView($build); 46 + $properties = $this->buildPropertyList($build); 45 47 46 48 $crumbs = $this->buildApplicationCrumbs(); 47 49 $this->addBuildableCrumb($crumbs, $build->getBuildable()); 48 50 $crumbs->addTextCrumb($title); 51 + $crumbs->setBorder(true); 49 52 50 53 if ($generation === null || $generation > $build->getBuildGeneration() || 51 54 $generation < 0) { ··· 85 88 foreach ($build_targets as $build_target) { 86 89 $header = id(new PHUIHeaderView()) 87 90 ->setHeader($build_target->getName()) 88 - ->setUser($viewer); 91 + ->setUser($viewer) 92 + ->setHeaderIcon('fa-bullseye'); 89 93 90 94 $target_box = id(new PHUIObjectBoxView()) 95 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 91 96 ->setHeader($header); 92 97 93 - $properties = new PHUIPropertyListView(); 98 + $property_list = new PHUIPropertyListView(); 94 99 95 100 $target_artifacts = idx($artifacts, $build_target->getPHID(), array()); 96 101 ··· 107 112 108 113 if ($links) { 109 114 $links = phutil_implode_html(phutil_tag('br'), $links); 110 - $properties->addProperty( 115 + $property_list->addProperty( 111 116 pht('External Link'), 112 117 $links); 113 118 } 114 119 115 120 $status_view = new PHUIStatusListView(); 116 - 117 121 $item = new PHUIStatusItemView(); 118 122 119 123 $status = $build_target->getTargetStatus(); ··· 168 172 } 169 173 } 170 174 171 - $properties->addProperty( 175 + $property_list->addProperty( 172 176 pht('When'), 173 177 phutil_implode_html(" \xC2\xB7 ", $when)); 174 178 175 - $properties->addProperty(pht('Status'), $status_view); 179 + $property_list->addProperty(pht('Status'), $status_view); 176 180 177 - $target_box->addPropertyList($properties, pht('Overview')); 181 + $target_box->addPropertyList($property_list, pht('Overview')); 178 182 179 183 $step = $build_target->getBuildStep(); 180 184 ··· 182 186 $description = $step->getDescription(); 183 187 if ($description) { 184 188 $description = new PHUIRemarkupView($viewer, $description); 185 - $properties->addSectionHeader( 189 + $property_list->addSectionHeader( 186 190 pht('Description'), PHUIPropertyListView::ICON_SUMMARY); 187 - $properties->addTextContent($description); 191 + $property_list->addTextContent($description); 188 192 } 189 193 } else { 190 194 $target_box->setFormErrors( ··· 196 200 } 197 201 198 202 $details = $build_target->getDetails(); 199 - $properties = new PHUIPropertyListView(); 203 + $property_list = new PHUIPropertyListView(); 200 204 foreach ($details as $key => $value) { 201 - $properties->addProperty($key, $value); 205 + $property_list->addProperty($key, $value); 202 206 } 203 - $target_box->addPropertyList($properties, pht('Configuration')); 207 + $target_box->addPropertyList($property_list, pht('Configuration')); 204 208 205 209 $variables = $build_target->getVariables(); 206 - $properties = new PHUIPropertyListView(); 207 - $properties->addRawContent($this->buildProperties($variables)); 208 - $target_box->addPropertyList($properties, pht('Variables')); 210 + $property_list = new PHUIPropertyListView(); 211 + $property_list->addRawContent($this->buildProperties($variables)); 212 + $target_box->addPropertyList($property_list, pht('Variables')); 209 213 210 214 $artifacts_tab = $this->buildArtifacts($build_target, $target_artifacts); 211 - $properties = new PHUIPropertyListView(); 212 - $properties->addRawContent($artifacts_tab); 213 - $target_box->addPropertyList($properties, pht('Artifacts')); 215 + $property_list = new PHUIPropertyListView(); 216 + $property_list->addRawContent($artifacts_tab); 217 + $target_box->addPropertyList($property_list, pht('Artifacts')); 214 218 215 219 $build_messages = idx($messages, $build_target->getPHID(), array()); 216 - $properties = new PHUIPropertyListView(); 217 - $properties->addRawContent($this->buildMessages($build_messages)); 218 - $target_box->addPropertyList($properties, pht('Messages')); 220 + $property_list = new PHUIPropertyListView(); 221 + $property_list->addRawContent($this->buildMessages($build_messages)); 222 + $target_box->addPropertyList($property_list, pht('Messages')); 219 223 220 - $properties = new PHUIPropertyListView(); 221 - $properties->addProperty( 224 + $property_list = new PHUIPropertyListView(); 225 + $property_list->addProperty( 222 226 pht('Build Target ID'), 223 227 $build_target->getID()); 224 - $properties->addProperty( 228 + $property_list->addProperty( 225 229 pht('Build Target PHID'), 226 230 $build_target->getPHID()); 227 - $target_box->addPropertyList($properties, pht('Metadata')); 231 + $target_box->addPropertyList($property_list, pht('Metadata')); 228 232 229 233 $targets[] = $target_box; 230 234 ··· 236 240 new HarbormasterBuildTransactionQuery()); 237 241 $timeline->setShouldTerminate(true); 238 242 239 - return $this->buildApplicationPage( 240 - array( 241 - $crumbs, 242 - $box, 243 + $view = id(new PHUITwoColumnView()) 244 + ->setHeader($page_header) 245 + ->setCurtain($curtain) 246 + ->setMainColumn(array( 247 + $properties, 243 248 $targets, 244 249 $timeline, 245 - ), 246 - array( 247 - 'title' => $title, 248 250 )); 251 + 252 + return $this->newPage() 253 + ->setTitle($title) 254 + ->setCrumbs($crumbs) 255 + ->appendChild($view); 256 + 249 257 } 250 258 251 259 private function buildArtifacts( ··· 342 350 343 351 $log_box = id(new PHUIObjectBoxView()) 344 352 ->setHeader($header) 353 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 345 354 ->setForm($log_view); 346 355 347 356 if ($is_empty) { ··· 432 441 )); 433 442 } 434 443 435 - private function buildActionList(HarbormasterBuild $build) { 436 - $request = $this->getRequest(); 437 - $viewer = $request->getUser(); 444 + private function buildCurtainView(HarbormasterBuild $build) { 445 + $viewer = $this->getViewer(); 438 446 $id = $build->getID(); 439 447 440 - $list = id(new PhabricatorActionListView()) 441 - ->setUser($viewer) 442 - ->setObject($build); 448 + $curtain = $this->newCurtainView($build); 443 449 444 450 $can_restart = 445 451 $build->canRestartBuild() && ··· 465 471 $viewer, 466 472 HarbormasterBuildCommand::COMMAND_ABORT); 467 473 468 - $list->addAction( 474 + $curtain->addAction( 469 475 id(new PhabricatorActionView()) 470 476 ->setName(pht('Restart Build')) 471 477 ->setIcon('fa-repeat') ··· 474 480 ->setWorkflow(true)); 475 481 476 482 if ($build->canResumeBuild()) { 477 - $list->addAction( 483 + $curtain->addAction( 478 484 id(new PhabricatorActionView()) 479 485 ->setName(pht('Resume Build')) 480 486 ->setIcon('fa-play') ··· 482 488 ->setDisabled(!$can_resume) 483 489 ->setWorkflow(true)); 484 490 } else { 485 - $list->addAction( 491 + $curtain->addAction( 486 492 id(new PhabricatorActionView()) 487 493 ->setName(pht('Pause Build')) 488 494 ->setIcon('fa-pause') ··· 491 497 ->setWorkflow(true)); 492 498 } 493 499 494 - $list->addAction( 500 + $curtain->addAction( 495 501 id(new PhabricatorActionView()) 496 502 ->setName(pht('Abort Build')) 497 503 ->setIcon('fa-exclamation-triangle') ··· 499 505 ->setDisabled(!$can_abort) 500 506 ->setWorkflow(true)); 501 507 502 - return $list; 508 + return $curtain; 503 509 } 504 510 505 - private function buildPropertyLists( 506 - PHUIObjectBoxView $box, 507 - HarbormasterBuild $build, 508 - PhabricatorActionListView $actions) { 509 - $request = $this->getRequest(); 510 - $viewer = $request->getUser(); 511 + private function buildPropertyList(HarbormasterBuild $build) { 512 + $viewer = $this->getViewer(); 511 513 512 514 $properties = id(new PHUIPropertyListView()) 513 - ->setUser($viewer) 514 - ->setObject($build) 515 - ->setActionList($actions); 516 - $box->addPropertyList($properties); 515 + ->setUser($viewer); 517 516 518 517 $handles = id(new PhabricatorHandleQuery()) 519 518 ->setViewer($viewer) ··· 538 537 $properties->addProperty( 539 538 pht('Status'), 540 539 $this->getStatus($build)); 540 + 541 + return id(new PHUIObjectBoxView()) 542 + ->setHeaderText(pht('PROPERTIES')) 543 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 544 + ->appendChild($properties); 545 + 541 546 } 542 547 543 548 private function getStatus(HarbormasterBuild $build) {
+33 -34
src/applications/harbormaster/controller/HarbormasterBuildableViewController.php
··· 35 35 $header = id(new PHUIHeaderView()) 36 36 ->setHeader($title) 37 37 ->setUser($viewer) 38 - ->setPolicyObject($buildable); 39 - 40 - $box = id(new PHUIObjectBoxView()) 41 - ->setHeader($header); 38 + ->setPolicyObject($buildable) 39 + ->setHeaderIcon('fa-recycle'); 42 40 43 41 $timeline = $this->buildTransactionTimeline( 44 42 $buildable, 45 43 new HarbormasterBuildableTransactionQuery()); 46 44 $timeline->setShouldTerminate(true); 47 45 48 - $actions = $this->buildActionList($buildable); 49 - $this->buildPropertyLists($box, $buildable, $actions); 46 + $curtain = $this->buildCurtainView($buildable); 47 + $properties = $this->buildPropertyList($buildable); 50 48 51 49 $crumbs = $this->buildApplicationCrumbs(); 52 50 $crumbs->addTextCrumb($buildable->getMonogram()); 51 + $crumbs->setBorder(true); 53 52 54 - return $this->buildApplicationPage( 55 - array( 56 - $crumbs, 57 - $box, 53 + $view = id(new PHUITwoColumnView()) 54 + ->setHeader($header) 55 + ->setCurtain($curtain) 56 + ->setMainColumn(array( 57 + $properties, 58 58 $lint, 59 59 $unit, 60 60 $build_list, 61 61 $timeline, 62 - ), 63 - array( 64 - 'title' => $title, 65 62 )); 63 + 64 + return $this->newPage() 65 + ->setTitle($title) 66 + ->setCrumbs($crumbs) 67 + ->appendChild($view); 68 + 66 69 } 67 70 68 - private function buildActionList(HarbormasterBuildable $buildable) { 69 - $request = $this->getRequest(); 70 - $viewer = $request->getUser(); 71 + private function buildCurtainView(HarbormasterBuildable $buildable) { 72 + $viewer = $this->getViewer(); 71 73 $id = $buildable->getID(); 72 74 73 - $list = id(new PhabricatorActionListView()) 74 - ->setUser($viewer) 75 - ->setObject($buildable); 75 + $curtain = $this->newCurtainView($buildable); 76 76 77 77 $can_edit = PhabricatorPolicyFilter::hasCapability( 78 78 $viewer, ··· 117 117 $resume_uri = "buildable/{$id}/resume/"; 118 118 $abort_uri = "buildable/{$id}/abort/"; 119 119 120 - $list->addAction( 120 + $curtain->addAction( 121 121 id(new PhabricatorActionView()) 122 122 ->setIcon('fa-repeat') 123 123 ->setName(pht('Restart All Builds')) ··· 125 125 ->setWorkflow(true) 126 126 ->setDisabled(!$can_restart || !$can_edit)); 127 127 128 - $list->addAction( 128 + $curtain->addAction( 129 129 id(new PhabricatorActionView()) 130 130 ->setIcon('fa-pause') 131 131 ->setName(pht('Pause All Builds')) ··· 133 133 ->setWorkflow(true) 134 134 ->setDisabled(!$can_pause || !$can_edit)); 135 135 136 - $list->addAction( 136 + $curtain->addAction( 137 137 id(new PhabricatorActionView()) 138 138 ->setIcon('fa-play') 139 139 ->setName(pht('Resume All Builds')) ··· 141 141 ->setWorkflow(true) 142 142 ->setDisabled(!$can_resume || !$can_edit)); 143 143 144 - $list->addAction( 144 + $curtain->addAction( 145 145 id(new PhabricatorActionView()) 146 146 ->setIcon('fa-exclamation-triangle') 147 147 ->setName(pht('Abort All Builds')) ··· 149 149 ->setWorkflow(true) 150 150 ->setDisabled(!$can_abort || !$can_edit)); 151 151 152 - return $list; 152 + return $curtain; 153 153 } 154 154 155 - private function buildPropertyLists( 156 - PHUIObjectBoxView $box, 157 - HarbormasterBuildable $buildable, 158 - PhabricatorActionListView $actions) { 159 - $request = $this->getRequest(); 160 - $viewer = $request->getUser(); 155 + private function buildPropertyList(HarbormasterBuildable $buildable) { 156 + $viewer = $this->getViewer(); 161 157 162 158 $properties = id(new PHUIPropertyListView()) 163 - ->setUser($viewer) 164 - ->setObject($buildable) 165 - ->setActionList($actions); 166 - $box->addPropertyList($properties); 159 + ->setUser($viewer); 167 160 168 161 $container_phid = $buildable->getContainerPHID(); 169 162 $buildable_phid = $buildable->getBuildablePHID(); ··· 184 177 ? pht('Manual Buildable') 185 178 : pht('Automatic Buildable')); 186 179 180 + return id(new PHUIObjectBoxView()) 181 + ->setHeaderText(pht('PROPERTIES')) 182 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 183 + ->appendChild($properties); 187 184 } 188 185 189 186 private function buildBuildList(HarbormasterBuildable $buildable) { ··· 279 276 280 277 $box = id(new PHUIObjectBoxView()) 281 278 ->setHeaderText(pht('Builds')) 279 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 282 280 ->appendChild($build_list); 283 281 284 282 return $box; ··· 330 328 331 329 $lint = id(new PHUIObjectBoxView()) 332 330 ->setHeader($lint_header) 331 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 333 332 ->setTable($lint_table); 334 333 } else { 335 334 $lint = null;
+13 -6
src/applications/harbormaster/controller/HarbormasterLintMessagesController.php
··· 45 45 $crumbs = $this->buildApplicationCrumbs(); 46 46 $this->addBuildableCrumb($crumbs, $buildable); 47 47 $crumbs->addTextCrumb(pht('Lint')); 48 + $crumbs->setBorder(true); 48 49 49 50 $title = array( 50 51 $buildable->getMonogram(), 51 52 pht('Lint'), 52 53 ); 53 54 54 - return $this->buildApplicationPage( 55 - array( 56 - $crumbs, 55 + $header = id(new PHUIHeaderView()) 56 + ->setHeader($title); 57 + 58 + $view = id(new PHUITwoColumnView()) 59 + ->setHeader($header) 60 + ->setFooter(array( 57 61 $lint, 58 - ), 59 - array( 60 - 'title' => $title, 61 62 )); 63 + 64 + return $this->newPage() 65 + ->setTitle($title) 66 + ->setCrumbs($crumbs) 67 + ->appendChild($view); 68 + 62 69 } 63 70 64 71 }
+38 -53
src/applications/harbormaster/controller/HarbormasterPlanViewController.php
··· 24 24 $header = id(new PHUIHeaderView()) 25 25 ->setHeader($plan->getName()) 26 26 ->setUser($viewer) 27 - ->setPolicyObject($plan); 27 + ->setPolicyObject($plan) 28 + ->setHeaderIcon('fa-ship'); 28 29 29 - $box = id(new PHUIObjectBoxView()) 30 - ->setHeader($header); 31 - 32 - $actions = $this->buildActionList($plan); 33 - $this->buildPropertyLists($box, $plan, $actions); 30 + $curtain = $this->buildCurtainView($plan); 34 31 35 32 $crumbs = $this->buildApplicationCrumbs(); 36 33 $crumbs->addTextCrumb(pht('Plan %d', $id)); 34 + $crumbs->setBorder(true); 37 35 38 36 list($step_list, $has_any_conflicts, $would_deadlock) = 39 37 $this->buildStepList($plan); 40 38 39 + $error = null; 41 40 if ($would_deadlock) { 42 - $box->setFormErrors( 43 - array( 44 - pht( 45 - 'This build plan will deadlock when executed, due to '. 46 - 'circular dependencies present in the build plan. '. 47 - 'Examine the step list and resolve the deadlock.'), 48 - )); 41 + $error = pht('This build plan will deadlock when executed, due to '. 42 + 'circular dependencies present in the build plan. '. 43 + 'Examine the step list and resolve the deadlock.'); 49 44 } else if ($has_any_conflicts) { 50 45 // A deadlocking build will also cause all the artifacts to be 51 46 // invalid, so we just skip showing this message if that's the 52 47 // case. 53 - $box->setFormErrors( 54 - array( 55 - pht( 56 - 'This build plan has conflicts in one or more build steps. '. 57 - 'Examine the step list and resolve the listed errors.'), 58 - )); 48 + $error = pht('This build plan has conflicts in one or more build steps. '. 49 + 'Examine the step list and resolve the listed errors.'); 50 + } 51 + 52 + if ($error) { 53 + $error = id(new PHUIInfoView()) 54 + ->setSeverity(PHUIInfoView::SEVERITY_WARNING) 55 + ->appendChild($error); 59 56 } 60 57 61 - return $this->buildApplicationPage( 62 - array( 63 - $crumbs, 64 - $box, 58 + $view = id(new PHUITwoColumnView()) 59 + ->setHeader($header) 60 + ->setCurtain($curtain) 61 + ->setMainColumn(array( 62 + $error, 65 63 $step_list, 66 64 $timeline, 67 - ), 68 - array( 69 - 'title' => $title, 70 65 )); 66 + 67 + return $this->newPage() 68 + ->setTitle($title) 69 + ->setCrumbs($crumbs) 70 + ->appendChild($view); 71 71 } 72 72 73 73 private function buildStepList(HarbormasterBuildPlan $plan) { ··· 206 206 207 207 $step_box = id(new PHUIObjectBoxView()) 208 208 ->setHeader($header) 209 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 209 210 ->appendChild($step_list); 210 211 211 212 return array($step_box, $has_any_conflicts, $is_deadlocking); 212 213 } 213 214 214 - private function buildActionList(HarbormasterBuildPlan $plan) { 215 + private function buildCurtainView(HarbormasterBuildPlan $plan) { 215 216 $viewer = $this->getViewer(); 216 217 $id = $plan->getID(); 217 218 218 - $list = id(new PhabricatorActionListView()) 219 - ->setUser($viewer) 220 - ->setObject($plan); 219 + $curtain = $this->newCurtainView($plan); 221 220 222 221 $can_edit = PhabricatorPolicyFilter::hasCapability( 223 222 $viewer, 224 223 $plan, 225 224 PhabricatorPolicyCapability::CAN_EDIT); 226 225 227 - $list->addAction( 226 + $curtain->addAction( 228 227 id(new PhabricatorActionView()) 229 228 ->setName(pht('Edit Plan')) 230 229 ->setHref($this->getApplicationURI("plan/edit/{$id}/")) ··· 233 232 ->setIcon('fa-pencil')); 234 233 235 234 if ($plan->isDisabled()) { 236 - $list->addAction( 235 + $curtain->addAction( 237 236 id(new PhabricatorActionView()) 238 237 ->setName(pht('Enable Plan')) 239 238 ->setHref($this->getApplicationURI("plan/disable/{$id}/")) ··· 241 240 ->setDisabled(!$can_edit) 242 241 ->setIcon('fa-check')); 243 242 } else { 244 - $list->addAction( 243 + $curtain->addAction( 245 244 id(new PhabricatorActionView()) 246 245 ->setName(pht('Disable Plan')) 247 246 ->setHref($this->getApplicationURI("plan/disable/{$id}/")) ··· 252 251 253 252 $can_run = ($can_edit && $plan->canRunManually()); 254 253 255 - $list->addAction( 254 + $curtain->addAction( 256 255 id(new PhabricatorActionView()) 257 256 ->setName(pht('Run Plan Manually')) 258 257 ->setHref($this->getApplicationURI("plan/run/{$id}/")) ··· 260 259 ->setDisabled(!$can_run) 261 260 ->setIcon('fa-play-circle')); 262 261 263 - return $list; 264 - } 262 + $curtain->addPanel( 263 + id(new PHUICurtainPanelView()) 264 + ->setHeaderText(pht('Created')) 265 + ->appendChild(phabricator_datetime($plan->getDateCreated(), $viewer))); 265 266 266 - private function buildPropertyLists( 267 - PHUIObjectBoxView $box, 268 - HarbormasterBuildPlan $plan, 269 - PhabricatorActionListView $actions) { 270 - $request = $this->getRequest(); 271 - $viewer = $request->getUser(); 272 - 273 - $properties = id(new PHUIPropertyListView()) 274 - ->setUser($viewer) 275 - ->setObject($plan) 276 - ->setActionList($actions); 277 - $box->addPropertyList($properties); 278 - 279 - $properties->addProperty( 280 - pht('Created'), 281 - phabricator_datetime($plan->getDateCreated(), $viewer)); 282 - 267 + return $curtain; 283 268 } 284 269 285 270 private function buildArtifactList(
+25 -19
src/applications/harbormaster/controller/HarbormasterStepAddController.php
··· 40 40 } 41 41 42 42 $groups = mgroup($all, 'getBuildStepGroupKey'); 43 - $lists = array(); 43 + $boxes = array(); 44 44 45 45 $enabled_groups = HarbormasterBuildStepGroup::getAllEnabledGroups(); 46 46 foreach ($enabled_groups as $group) { 47 47 $list = id(new PHUIObjectItemListView()) 48 - ->setHeader($group->getGroupName()) 49 48 ->setNoDataString( 50 - pht( 51 - 'This group has no available build steps.')); 49 + pht('This group has no available build steps.')); 52 50 53 51 $steps = idx($groups, $group->getGroupKey(), array()); 54 52 ··· 76 74 $list->addItem($item); 77 75 } 78 76 79 - $lists[] = $list; 77 + $box = id(new PHUIObjectBoxView()) 78 + ->setHeaderText($group->getGroupName()) 79 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 80 + ->appendChild($list); 81 + 82 + $boxes[] = $box; 80 83 } 81 84 82 85 $crumbs = $this->buildApplicationCrumbs() 83 86 ->addTextCrumb($plan_title, $cancel_uri) 84 - ->addTextCrumb(pht('Add Build Step')); 87 + ->addTextCrumb(pht('Add Build Step')) 88 + ->setBorder(true); 85 89 86 - $box = id(new PHUIObjectBoxView()) 87 - ->setHeaderText(pht('Add Build Step')) 88 - ->appendChild($lists); 90 + $title = array($plan_title, pht('Add Build Step')); 89 91 90 - return $this->buildApplicationPage( 91 - array( 92 - $crumbs, 93 - $box, 94 - ), 95 - array( 96 - 'title' => array( 97 - $plan_title, 98 - pht('Add Build Step'), 99 - ), 92 + $header = id(new PHUIHeaderView()) 93 + ->setHeader(pht('Add Build Step')) 94 + ->setHeaderIcon('fa-plus-square'); 95 + 96 + $view = id(new PHUITwoColumnView()) 97 + ->setHeader($header) 98 + ->setFooter(array( 99 + $boxes, 100 100 )); 101 + 102 + return $this->newPage() 103 + ->setTitle($title) 104 + ->setCrumbs($crumbs) 105 + ->appendChild($view); 106 + 101 107 } 102 108 103 109 }
+19 -9
src/applications/harbormaster/controller/HarbormasterStepEditController.php
··· 184 184 185 185 if ($is_new) { 186 186 $submit = pht('Create Build Step'); 187 - $header = pht('New Step: %s', $implementation->getName()); 187 + $header = id(new PHUIHeaderView()) 188 + ->setHeader(pht('New Step: %s', $implementation->getName())) 189 + ->setHeaderIcon('fa-plus-square'); 188 190 $crumbs->addTextCrumb(pht('Add Step')); 189 191 } else { 190 192 $submit = pht('Save Build Step'); 191 - $header = pht('Edit Step: %s', $implementation->getName()); 193 + $header = id(new PHUIHeaderView()) 194 + ->setHeader(pht('Edit Step: %s', $implementation->getName())) 195 + ->setHeaderIcon('fa-pencil'); 192 196 $crumbs->addTextCrumb(pht('Step %d', $step->getID()), $cancel_uri); 193 197 $crumbs->addTextCrumb(pht('Edit Step')); 194 198 } 199 + $crumbs->setBorder(true); 195 200 196 201 $form->appendChild( 197 202 id(new AphrontFormSubmitControl()) ··· 199 204 ->addCancelButton($cancel_uri)); 200 205 201 206 $box = id(new PHUIObjectBoxView()) 202 - ->setHeaderText($header) 207 + ->setHeaderText(pht('Step')) 203 208 ->setValidationException($validation_exception) 209 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 204 210 ->setForm($form); 205 211 206 212 $variables = $this->renderBuildVariablesTable(); ··· 215 221 $timeline->setShouldTerminate(true); 216 222 } 217 223 218 - return $this->buildApplicationPage( 219 - array( 220 - $crumbs, 224 + $view = id(new PHUITwoColumnView()) 225 + ->setHeader($header) 226 + ->setFooter(array( 221 227 $box, 222 228 $variables, 223 229 $timeline, 224 - ), 225 - array( 226 - 'title' => $implementation->getName(), 227 230 )); 231 + 232 + return $this->newPage() 233 + ->setTitle($implementation->getName()) 234 + ->setCrumbs($crumbs) 235 + ->appendChild($view); 236 + 228 237 } 229 238 230 239 private function renderBuildVariablesTable() { ··· 254 263 255 264 return id(new PHUIObjectBoxView()) 256 265 ->setHeaderText(pht('Build Variables')) 266 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 257 267 ->appendChild($form); 258 268 } 259 269
+26 -25
src/applications/harbormaster/controller/HarbormasterStepViewController.php
··· 29 29 $crumbs = $this->buildApplicationCrumbs(); 30 30 $crumbs->addTextCrumb(pht('Plan %d', $plan_id), $plan_uri); 31 31 $crumbs->addTextCrumb(pht('Step %d', $id)); 32 + $crumbs->setBorder(true); 32 33 33 - $box = id(new PHUIObjectBoxView()) 34 - ->setHeaderText(pht('Build Step %d: %s', $id, $step->getName())); 34 + $header = id(new PHUIHeaderView()) 35 + ->setHeader(pht('Build Step %d: %s', $id, $step->getName())) 36 + ->setHeaderIcon('fa-chevron-circle-right'); 35 37 36 38 $properties = $this->buildPropertyList($step, $field_list); 37 - $actions = $this->buildActionList($step); 38 - $properties->setActionList($actions); 39 - 40 - $box->addPropertyList($properties); 39 + $curtain = $this->buildCurtainView($step); 41 40 42 41 $timeline = $this->buildTransactionTimeline( 43 42 $step, 44 43 new HarbormasterBuildStepTransactionQuery()); 45 44 $timeline->setShouldTerminate(true); 46 45 47 - return $this->buildApplicationPage( 48 - array( 49 - $crumbs, 50 - $box, 46 + $view = id(new PHUITwoColumnView()) 47 + ->setHeader($header) 48 + ->setCurtain($curtain) 49 + ->setMainColumn(array( 50 + $properties, 51 51 $timeline, 52 - ), 53 - array( 54 - 'title' => pht('Step %d', $id), 55 52 )); 53 + 54 + return $this->newPage() 55 + ->setTitle(pht('Step %d', $id)) 56 + ->setCrumbs($crumbs) 57 + ->appendChild($view); 58 + 56 59 } 57 60 58 61 private function buildPropertyList( ··· 61 64 $viewer = $this->getViewer(); 62 65 63 66 $view = id(new PHUIPropertyListView()) 64 - ->setUser($viewer) 65 - ->setObject($step); 67 + ->setUser($viewer); 66 68 67 69 try { 68 70 $implementation = $step->getStepImplementation(); ··· 92 94 $viewer, 93 95 $view); 94 96 95 - $view->invokeWillRenderEvent(); 96 - 97 97 $description = $step->getDescription(); 98 98 if (strlen($description)) { 99 99 $view->addSectionHeader( ··· 103 103 new PHUIRemarkupView($viewer, $description)); 104 104 } 105 105 106 - return $view; 106 + return id(new PHUIObjectBoxView()) 107 + ->setHeaderText(pht('PROPERTIES')) 108 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 109 + ->appendChild($view); 107 110 } 108 111 109 112 110 - private function buildActionList(HarbormasterBuildStep $step) { 113 + private function buildCurtainView(HarbormasterBuildStep $step) { 111 114 $viewer = $this->getViewer(); 112 115 $id = $step->getID(); 113 116 114 - $list = id(new PhabricatorActionListView()) 115 - ->setUser($viewer) 116 - ->setObject($step); 117 + $curtain = $this->newCurtainView($step); 117 118 118 119 $can_edit = PhabricatorPolicyFilter::hasCapability( 119 120 $viewer, 120 121 $step, 121 122 PhabricatorPolicyCapability::CAN_EDIT); 122 123 123 - $list->addAction( 124 + $curtain->addAction( 124 125 id(new PhabricatorActionView()) 125 126 ->setName(pht('Edit Step')) 126 127 ->setHref($this->getApplicationURI("step/edit/{$id}/")) ··· 128 129 ->setDisabled(!$can_edit) 129 130 ->setIcon('fa-pencil')); 130 131 131 - $list->addAction( 132 + $curtain->addAction( 132 133 id(new PhabricatorActionView()) 133 134 ->setName(pht('Delete Step')) 134 135 ->setHref($this->getApplicationURI("step/delete/{$id}/")) ··· 136 137 ->setDisabled(!$can_edit) 137 138 ->setIcon('fa-times')); 138 139 139 - return $list; 140 + return $curtain; 140 141 } 141 142 142 143
+13 -6
src/applications/harbormaster/controller/HarbormasterUnitMessageListController.php
··· 41 41 $crumbs = $this->buildApplicationCrumbs(); 42 42 $this->addBuildableCrumb($crumbs, $buildable); 43 43 $crumbs->addTextCrumb(pht('Unit Tests')); 44 + $crumbs->setBorder(true); 44 45 45 46 $title = array( 46 47 $buildable->getMonogram(), 47 48 pht('Unit Tests'), 48 49 ); 49 50 50 - return $this->buildApplicationPage( 51 - array( 52 - $crumbs, 51 + $header = id(new PHUIHeaderView()) 52 + ->setHeader($buildable->getMonogram().' '.pht('Unit Tests')); 53 + 54 + $view = id(new PHUITwoColumnView()) 55 + ->setHeader($header) 56 + ->setFooter(array( 53 57 $unit, 54 - ), 55 - array( 56 - 'title' => $title, 57 58 )); 59 + 60 + return $this->newPage() 61 + ->setTitle($title) 62 + ->setCrumbs($crumbs) 63 + ->appendChild($view); 64 + 58 65 } 59 66 60 67 }
+19 -12
src/applications/harbormaster/controller/HarbormasterUnitMessageViewController.php
··· 38 38 ->setStatus($status_icon, $status_color, $status_label); 39 39 40 40 $properties = $this->buildPropertyListView($message); 41 - $actions = $this->buildActionView($message, $build); 42 - 43 - $properties->setActionList($actions); 41 + $curtain = $this->buildCurtainView($message, $build); 44 42 45 43 $unit = id(new PHUIObjectBoxView()) 46 44 ->setHeader($header) ··· 54 52 "/harbormaster/unit/{$buildable_id}/"); 55 53 56 54 $crumbs->addTextCrumb(pht('Unit %d', $id)); 55 + $crumbs->setBorder(true); 57 56 58 57 $title = array( 59 58 $display_name, 60 59 $buildable->getMonogram(), 61 60 ); 62 61 62 + $view = id(new PHUITwoColumnView()) 63 + ->setHeader($header) 64 + ->setCurtain($curtain) 65 + ->setMainColumn(array( 66 + $unit, 67 + )); 68 + 63 69 return $this->newPage() 64 70 ->setTitle($title) 65 71 ->setCrumbs($crumbs) 66 - ->appendChild($unit); 72 + ->appendChild($view); 67 73 } 68 74 69 75 private function buildPropertyListView( 70 76 HarbormasterBuildUnitMessage $message) { 71 - $request = $this->getRequest(); 72 - $viewer = $request->getUser(); 77 + $viewer = $this->getViewer(); 73 78 74 79 $view = id(new PHUIPropertyListView()) 75 80 ->setUser($viewer); ··· 81 86 $details = $message->getUnitMessageDetails(); 82 87 if (strlen($details)) { 83 88 // TODO: Use the log view here, once it gets cleaned up. 89 + // Shenanigans below. 84 90 $details = phutil_tag( 85 91 'div', 86 92 array( ··· 100 106 PHUIPropertyListView::ICON_TESTPLAN); 101 107 $view->addTextContent($details); 102 108 103 - return $view; 109 + return id(new PHUIObjectBoxView()) 110 + ->setHeaderText(pht('PROPERTIES')) 111 + ->appendChild($view); 104 112 } 105 113 106 - private function buildActionView( 114 + private function buildCurtainView( 107 115 HarbormasterBuildUnitMessage $message, 108 116 HarbormasterBuild $build) { 109 117 $viewer = $this->getViewer(); 110 118 111 - $view = id(new PhabricatorActionListView()) 112 - ->setUser($viewer); 119 + $curtain = $this->newCurtainView($build); 113 120 114 - $view->addAction( 121 + $curtain->addAction( 115 122 id(new PhabricatorActionView()) 116 123 ->setName(pht('View Build')) 117 124 ->setHref($build->getURI()) 118 125 ->setIcon('fa-wrench')); 119 126 120 - return $view; 127 + return $curtain; 121 128 } 122 129 }
+2 -11
src/applications/harbormaster/view/HarbormasterUnitSummaryView.php
··· 7 7 private $limit; 8 8 private $excuse; 9 9 private $showViewAll; 10 - private $background; 11 10 12 11 public function setBuildable(HarbormasterBuildable $buildable) { 13 12 $this->buildable = $buildable; ··· 31 30 32 31 public function setShowViewAll($show_view_all) { 33 32 $this->showViewAll = $show_view_all; 34 - return $this; 35 - } 36 - 37 - public function setBackground($background) { 38 - $this->background = $background; 39 33 return $this; 40 34 } 41 35 ··· 79 73 } 80 74 81 75 $box = id(new PHUIObjectBoxView()) 82 - ->setHeader($header); 76 + ->setHeader($header) 77 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY); 83 78 84 79 $table = id(new HarbormasterUnitPropertyView()) 85 80 ->setUnitMessages($messages); ··· 108 103 } 109 104 110 105 $box->setTable($table); 111 - 112 - if ($this->background) { 113 - $box->setBackground($this->background); 114 - } 115 106 116 107 return $box; 117 108 }
+1 -1
webroot/rsrc/css/phui/phui-timeline-view.css
··· 46 46 width: 9px; 47 47 height: 9px; 48 48 border-radius: 2px; 49 - margin-left: 74px; 49 + margin-left: 76px; 50 50 } 51 51 52 52 .device-desktop .phui-timeline-wedge {