@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.

Drydock and Almanac: add welcome pages

Summary:
Premising that I still consider Almanac, Drydock and Harbormaster as dark magic, and premising that all my knowledge about these components is here:

https://en.wikibooks.org/wiki/Phabricator_Administrator%27s_Handbook/Continuous_integration

(Above guide linked from [[Community Resources]])

Hoping to be useful, I've added some welcome pages, precious to newcomers, with the goal to lower a bit the learning barrier to these tricky components.

## Drydock Blueprints

Screenshot of the new welcome page in {nav Drydock > Blueprints}:

{F2243109}

Since Drydock Blueprints are deeply dependent to {nav Almanac}, we added an extra blue button to see its homepage.

So, you are then 2-clicks away from...

## Almanac Services

Screenshot of the new welcome page in {nav Almanac > Services}:

{F2243110}

Since Almanac Services are deeply dependent to {nav Almanac > Devices}, we added an extra blue button to see them.

So, you are then 1-click away from...

## Almanac Devices

Screenshot of the new welcome page in {nav Almanac > Devices}:

{F2243112}

Since Almanac Devices are deeply dependent to {nav Almanac > Networks}, we added an extra blue button to see them.

So, you are then 1-click away from...

## Almanac Networks

Screenshot of the new welcome page in {nav Almanac Networks}:

{F2243111}

And, that's it.

## Notes

Ref T15018

----

After this change, at least 1 newcomer will love Phorge at the maximum level. and they will never again be able to use the proprietary GitHub.

bwahaha

Test Plan:
Visit all the following pages, forcing the welcome "new user interface" mode:

http://phorge.localhost/drydock/blueprint/?nux=1

http://phorge.localhost/almanac/service/?nux=1

http://phorge.localhost/almanac/device/?nux=1

http://phorge.localhost/almanac/network/?nux=1

Test all action buttons.

Write a comment with "yesyes" or "bwahaha" or "chadyes" in production too.

Reviewers: O1 Blessed Committers, aklapper

Reviewed By: O1 Blessed Committers, aklapper

Subscribers: aklapper, tobiaswiese, Matthew, Cigaryno

Maniphest Tasks: T15018

Differential Revision: https://we.phorge.it/D25675

+103
+26
src/applications/almanac/query/AlmanacDeviceSearchEngine.php
··· 137 137 return $result; 138 138 } 139 139 140 + protected function getNewUserBody() { 141 + $see_network = id(new PHUIButtonView()) 142 + ->setTag('a') 143 + ->setText(pht('See Networks')) 144 + ->setHref('/almanac/network/'); 145 + 146 + $create_button = id(new PHUIButtonView()) 147 + ->setTag('a') 148 + ->setText(pht('Create a Device')) 149 + ->setHref('/almanac/device/edit/') 150 + ->setIcon('fa-plus') 151 + ->setColor(PHUIButtonView::GREEN); 152 + 153 + $app_name = pht('Devices'); 154 + $view = id(new PHUIBigInfoView()) 155 + ->setIcon('fa-server') 156 + ->setTitle(pht('Welcome to %s', $app_name)) 157 + ->setDescription( 158 + pht( 159 + 'Use Almanac devices to catalogue your build hosts '. 160 + 'and their SSH ports your network, and more.')) 161 + ->addAction($see_network) 162 + ->addAction($create_button); 163 + 164 + return $view; 165 + } 140 166 }
+21
src/applications/almanac/query/AlmanacNetworkSearchEngine.php
··· 87 87 88 88 return $result; 89 89 } 90 + 91 + protected function getNewUserBody() { 92 + $create_button = id(new PHUIButtonView()) 93 + ->setTag('a') 94 + ->setText(pht('Create a Network')) 95 + ->setHref('/almanac/network/edit/') 96 + ->setIcon('fa-plus') 97 + ->setColor(PHUIButtonView::GREEN); 98 + 99 + $app_name = pht('Networks'); 100 + $view = id(new PHUIBigInfoView()) 101 + ->setIcon('fa-globe') 102 + ->setTitle(pht('Welcome to %s', $app_name)) 103 + ->setDescription( 104 + pht( 105 + 'Use Almanac networks to catalogue private and public '. 106 + 'computer networks.')) 107 + ->addAction($create_button); 108 + 109 + return $view; 110 + } 90 111 }
+28
src/applications/almanac/query/AlmanacServiceSearchEngine.php
··· 115 115 116 116 return $result; 117 117 } 118 + 119 + protected function getNewUserBody() { 120 + $see_devices = id(new PHUIButtonView()) 121 + ->setTag('a') 122 + ->setText(pht('See Devices')) 123 + ->setHref('/almanac/device/'); 124 + 125 + $create_button = id(new PHUIButtonView()) 126 + ->setTag('a') 127 + ->setText(pht('Create a Service')) 128 + ->setHref('/almanac/service/edit/') 129 + ->setIcon('fa-plus') 130 + ->setColor(PHUIButtonView::GREEN); 131 + 132 + 133 + $app_name = pht('Services'); 134 + $view = id(new PHUIBigInfoView()) 135 + ->setIcon('fa-plug') 136 + ->setTitle(pht('Welcome to %s', $app_name)) 137 + ->setDescription( 138 + pht( 139 + 'Services describe pools of devices, and '. 140 + 'they are available to Drydock for CI/CD, and more.')) 141 + ->addAction($see_devices) 142 + ->addAction($create_button); 143 + 144 + return $view; 145 + } 118 146 }
+28
src/applications/drydock/query/DrydockBlueprintSearchEngine.php
··· 138 138 return $result; 139 139 } 140 140 141 + protected function getNewUserBody() { 142 + $see_almanac_button = id(new PHUIButtonView()) 143 + ->setTag('a') 144 + ->setText(pht('See Almanac services')) 145 + ->setHref('/almanac/service/'); 146 + 147 + $create_button = id(new PHUIButtonView()) 148 + ->setTag('a') 149 + ->setText(pht('Create a Blueprint')) 150 + ->setHref('/drydock/blueprint/edit/') 151 + ->setIcon('fa-plus') 152 + ->setColor(PHUIButtonView::GREEN); 153 + 154 + $app_name = pht('Blueprints'); 155 + $view = id(new PHUIBigInfoView()) 156 + ->setIcon('fa-map-o') 157 + ->setTitle(pht('Welcome to %s', $app_name)) 158 + ->setDescription( 159 + pht( 160 + 'Blueprints allow to lease fresh working copies of repositories, '. 161 + 'on your Drydock devices, when needed by CI/CD workflows, and more. '. 162 + 'Blueprints lease services defined in your Almanac.')) 163 + ->addAction($see_almanac_button) 164 + ->addAction($create_button); 165 + 166 + return $view; 167 + } 168 + 141 169 }