1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-22 10:18:48 +02:00
Commit graph

7231 commits

Author SHA1 Message Date
epriestley
cfa4156441 Make dashboard application launchable
Summary:
Ref T4980. This isn't quite ready to unbeta yet, but it's good enough to be shown in the launch view.

Also, name it "Dashboards" in the UI.

Test Plan: Viewed launcher, saw Dashboards. Clicked it, got to dashboard main page.

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T4980

Differential Revision: https://secure.phabricator.com/D9650
2014-06-22 08:05:19 -07:00
Joshua Spence
b7b0458303 Convert ./bin/storage status to use PhutilConsoleTable.
Summary: Constructing tables manually just isn't fun.

Test Plan:
```
./bin/storage status
phabricator:db.audit                                      Applied db   audit
phabricator:db.calendar                                   Applied db   calendar
phabricator:db.chatlog                                    Applied db   chatlog
phabricator:db.conduit                                    Applied db   conduit
phabricator:db.countdown                                  Applied db   countdown
phabricator:db.daemon                                     Applied db   daemon
phabricator:db.differential                               Applied db   differential
phabricator:db.draft                                      Applied db   draft
phabricator:db.drydock                                    Applied db   drydock
phabricator:db.feed                                       Applied db   feed
phabricator:db.file                                       Applied db   file
phabricator:db.flag                                       Applied db   flag
phabricator:db.harbormaster                               Applied db   harbormaster
...
```

This probably isn't ready to land yet, we should fix `PhutilConsoleTable` to truncate columns which would otherwise cause overflow.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9604
2014-06-22 06:20:59 +10:00
Joshua Spence
ddd8c9c567 Add a --local flag for the ./bin/phd status workflow.
Summary: It is sometimes useful to use `./bin/phd status` as a means to determine if daemons //are// actually running on the current host. For example, a common practice in upstart scripts is something similar to `./bin/phd status || ./bin/phd status`.

Test Plan:
```
> ./bin/phd status
ID   Host            PID  Started                 Daemon                               Arguments
1162 ip-10-127-58-93 4046 Jun 20 2014, 3:17:43 AM PhabricatorFactDaemon
1161 ip-10-127-58-93 3984 Jun 20 2014, 3:17:43 AM PhabricatorTaskmasterDaemon
1160 ip-10-127-58-93 3973 Jun 20 2014, 3:17:42 AM PhabricatorTaskmasterDaemon
1159 ip-10-127-58-93 3968 Jun 20 2014, 3:17:42 AM PhabricatorTaskmasterDaemon
1158 ip-10-127-58-93 3943 Jun 20 2014, 3:17:42 AM PhabricatorTaskmasterDaemon
1157 ip-10-127-58-93 3914 Jun 20 2014, 3:17:41 AM PhabricatorGarbageCollectorDaemon
1156 ip-10-127-58-93 3909 Jun 20 2014, 3:17:41 AM PhabricatorRepositoryPullLocalDaemon

> ./bin/phd status --local
There are no running Phabricator daemons.
```

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9645
2014-06-22 06:09:53 +10:00
epriestley
9f2efd0fa0 Remove ajaxey comment magic in Pholio, and also some bugs
Summary:
Fixes T5424.

  - One concrete issue: drafts were not being cleared properly because `__draft__` was not set on submission. This (mostly) fixes phantom drafts.
  - This ajax comment magic feels weird and floaty and generally has problems. For example, if you add subscribers or inlines, all the stuff on the page which represents those won't update automatically. Instead, just reload. Maybe we'll ajax this stuff some day, but it feels like a net negative for now.
  - Also remove it from other applications where it's currently used.
  - Fix an issue with inline previews.

Test Plan: Made some comments on a mock, everything worked normally like I expected it to.

Reviewers: chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T5424

Differential Revision: https://secure.phabricator.com/D9649
2014-06-21 12:50:40 -07:00
Chad Little
c9a195369f Add email preferences to Pholio
Summary: Fixes T5386, adds a base set of email preferences to Pholio

Test Plan: Turned on, tested and got email, turned off, tested and saw notifications.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T5386

Differential Revision: https://secure.phabricator.com/D9644
2014-06-21 12:01:05 -07:00
epriestley
6844b61a05 Don't recommend putting Phabricator on the main Directory directive
Summary: Fixes T5428. The rules are different under `<Directory />` and this is very rare, so don't make this harder than it needs to be.

Test Plan: Read text.

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T5428

Differential Revision: https://secure.phabricator.com/D9646
2014-06-21 10:16:26 -07:00
epriestley
b20884a842 Substantially support character encodings and "Highlight As" in changesets
Summary: Ref T5179. Ref T4045. Ref T832. We can now write non-utf8 hunks into the database, so try to do more reasonable things with them in the UI.

Test Plan: (See screenshots...)

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T832, T4045, T5179

Differential Revision: https://secure.phabricator.com/D9294
2014-06-20 11:49:41 -07:00
epriestley
5660684d7f Never use "{branches}" in Mercurial
Summary:
Fixes T5304. Mercurial features a "{branches}" template keyword, documented as:

```
    branches      List of strings. The name of the branch on which the
                  changeset was committed. Will be empty if the branch name
                  was default.
```

At some time long in the past, I misinterpreted this to mean "list of branches where the branch head is a descendant of the commit". It is more like "list of zero or one elements, possibly containing the name of the branch the commit was originally made to, if that branch was not 'default'".

In fact, it seems like this is because a //very// long time in the past, Mercurial worked roughly like I expected:

> Ages ago (2005), we had a very different and ultimately unworkable
> approach to named branches that worked vaguely like .hgtags and allowed
> multiple branch names per revision.

http://marc.info/?l=mercurial-devel&m=129883069414855

This appears to be deprecated in modern Mercurial (it's not in the modern web documentation) although I can't find a commit about it so maybe that's just a documentation issue.

In any case, `{branches}` seems to never be useful: `{branch}` provides the same information without the awkward "default-if-empty" case.

Switch from `{branches}` to either `{branch}` (where that's good enough, notably in the hook engine) or `(descendants(%s) and head())`, which is equivalent to `--contains` in Git.

This fixes pushing to branches with spaces in their names, and makes the "Branches" / "Contains" queries moderately more consistent.

Test Plan:
  - Pushed to a Mercurial branch with a space in it.
  - Viewed list of branches in a Mercurial repository.
  - Viewed containing branches of a Mercurial commit in Diffusion.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T5304

Differential Revision: https://secure.phabricator.com/D9453
2014-06-20 11:48:31 -07:00
Joshua Spence
a4a8cfa6d6 Update callsites of phutil_json_decode.
Summary: Depends on D9634. `phutil_json_decode` now throws an exception on invalid JSON.

Test Plan: `arc unit`

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9640
2014-06-21 00:39:37 +10:00
James Rhodes
f7f8664456 Move build variables into HarbormasterBuildableInterface
Summary: Ref T1049.  This moves the declaration of build variables onto HarbormasterBuildableInterface, allowing new classes implementing HarbormasterBuildableInterface to declare their own variables.

Test Plan: Implemented it on another class, saw the build variables appear.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T1049

Differential Revision: https://secure.phabricator.com/D9618
2014-06-20 12:58:23 +10:00
James Rhodes
5013969a54 Tighten up Phragment routes to prevent page crashes
Summary: Fixes T5418.  These routes were a little more permissive than they should have been.

Test Plan: Hit those URLs without a path, got a 404 instead.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin, hach-que

Maniphest Tasks: T5418

Differential Revision: https://secure.phabricator.com/D9635
2014-06-20 12:01:48 +10:00
Toby Hughes
baf4d451aa Fix invalid submit_uri when creating dashboard panels
Summary: When creating dashboard panels, the `submit_uri` is invalid since the panel has not been saved to the database yet (and therefore doesn't have an ID). This resulted in a 404 when trying to submit the form to `/dashboard/panel/edit//`

Test Plan: Created a dashboard panel and the panel was created successfully

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9629
2014-06-19 14:20:26 -07:00
Chad Little
fa278fcb08 CSS polish, Pholio
Summary:
Minor things

- Fades out comment icon on hover
- Adds hover to inline comment images
- moves mask position to just the image, and not the transparent border

Test Plan: Tested all of these items on various mocks

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9631
2014-06-19 11:28:01 -07:00
Chad Little
c3843a9963 Add a masked image to Pholio Inline Comment Dialog
Summary: n/a

Test Plan:
Tested both ajax and regular pages, test various comments, images.

{F168592}

{F168593}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9630
2014-06-19 11:00:07 -07:00
Chad Little
ca801c7ad4 PHUIImageMask
Summary: Adds a PHUI class for display images on a center point, with or without a mask.

Test Plan:
I am bad a math, so like, check that for me please. I tested using Photoshop. Class may need tweaked depending how we store the inline-comment coords.

{F167829}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9614
2014-06-18 14:09:37 -07:00
Joshua Spence
47964077ef Convert more scripts to use PhutilConsoleTable.
Summary: Convert `./bin/mail` and a`./bin/sms` to use `PhutilConsoleTable` for formatting output.

Test Plan: I don't actually have mail and SMS setup on my dev box, but this is a pretty straightforward change.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9621
2014-06-19 02:36:58 +10:00
Joshua Spence
e0ca39f6a1 Show repository in Differential emails
Summary: Ref T5137. Listing the repository in Differential emails makes it easy to filter.

Test Plan: Eye-ball it.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: young_hwi, epriestley, Korvin

Maniphest Tasks: T5137

Differential Revision: https://secure.phabricator.com/D9609
2014-06-19 02:36:08 +10:00
Joshua Spence
f52fbf6117 Unify the local and global view for ./bin/phd status.
Summary:
Ref T4209. Unifies the local (`./bin/phd status`) and global (`./bin/phd status --all`) view into a single table. This generally makes it easy to administer daemons running across multiple hosts.

Depends on D9606.

Test Plan:
```
> sudo ./bin/phd status
ID Host      PID  Started                 Daemon                               Arguments
38 localhost 2282 Jun 18 2014, 7:52:56 AM PhabricatorRepositoryPullLocalDaemon
39 localhost 2289 Jun 18 2014, 7:52:57 AM PhabricatorGarbageCollectorDaemon
40 localhost 2294 Jun 18 2014, 7:52:57 AM PhabricatorTaskmasterDaemon
41 localhost 2314 Jun 18 2014, 7:52:58 AM PhabricatorTaskmasterDaemon
42 localhost 2319 Jun 18 2014, 7:52:59 AM PhabricatorTaskmasterDaemon
43 localhost 2328 Jun 18 2014, 7:53:00 AM PhabricatorTaskmasterDaemon
44 localhost 2354 Jun 18 2014, 7:53:08 AM PhabricatorRepositoryPullLocalDaemon X --not Y
```

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T4209

Differential Revision: https://secure.phabricator.com/D9607
2014-06-18 11:44:52 +10:00
epriestley
b93fe30008 Update daemon status icons to FontAwesome
Summary: Fixes T5400. Couple of these were missed.

Test Plan: Forced daemons into all statuses, viewed icons.

Reviewers: chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T5400

Differential Revision: https://secure.phabricator.com/D9612
2014-06-17 15:44:42 -07:00
epriestley
df3736e81e Garbage collect daemon logs
Summary:
We already have GC for daemon log events, but not for daemon logs themselves.

Collect old daemon logs which aren't still running.

Test Plan: Ran `phd debug garbage`, observed old logs get cleaned up. Started some daemons, re-ran garbage, made sure they stuck around.

Reviewers: joshuaspence

Reviewed By: joshuaspence

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D9610
2014-06-17 15:33:08 -07:00
epriestley
df2c015e7c Make Dashboard tab panels editable by humans
Summary: Fixes T5335. This is not pretty, but should reasonably let normal humans create tab panels.

Test Plan: See screenshot.

Reviewers: chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T5335

Differential Revision: https://secure.phabricator.com/D9600
2014-06-17 15:32:55 -07:00
Joshua Spence
7892627ccc Add a withoutIDs method to PhabricatorDaemonLogQuery.
Summary: Add a method to `PhabricatorDaemonLogQuery` to exclude IDs from the results.

Test Plan: Thought long and hard.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9606
2014-06-18 08:07:20 +10:00
Joshua Spence
dde6d2491c Query daemons across all hosts with ./bin/phd status --all.
Summary: This was previously submitted as D9497, but I had accidentally `arc land`ed some not-reviewed not-yet-complete changes in addition to the accepted diff.

Test Plan: Same as D9497.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Maniphest Tasks: T5388, T4209

Differential Revision: https://secure.phabricator.com/D9589
2014-06-17 11:13:38 +10:00
epriestley
a10f969919 Revert "Query daemons across all hosts with ./bin/phd status --all."
This reverts commit 0ccebbe4b1.
2014-06-16 17:43:45 -07:00
Joshua Spence
0ccebbe4b1 Query daemons across all hosts with ./bin/phd status --all.
Summary: Ref T4209. Currently, `./bin/phd status` prints a table showing the daemons that are executing on the current host. It would be useful to be able to conventiently query the daemons running across all hosts. This would also (theoretically) make it possible to conditionally start daemons on a host depending upon the current state and on the daemons running on other hosts.

Test Plan:
```
> ./bin/phd status --all
ID      Host                    PID     Started                     Daemon                                            Arguments
   18          phabricator     6969   Jun 12 2014, 4:44:22 PM     PhabricatorTaskmasterDaemon
   17          phabricator     6961   Jun 12 2014, 4:44:19 PM     PhabricatorTaskmasterDaemon
   16          phabricator     6955   Jun 12 2014, 4:44:15 PM     PhabricatorTaskmasterDaemon
   15          phabricator     6950   Jun 12 2014, 4:44:14 PM     PhabricatorTaskmasterDaemon
   14          phabricator     6936   Jun 12 2014, 4:44:13 PM     PhabricatorGarbageCollectorDaemon
   13          phabricator     6931   Jun 12 2014, 4:44:12 PM     PhabricatorRepositoryPullLocalDaemon
```

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T4209

Differential Revision: https://secure.phabricator.com/D9497
2014-06-17 08:41:51 +10:00
Gareth Evans
78635a15c1 Only show profile status when calendar app installed
Summary:
If the calendar app is not installed we don't show the status.
Origianlly the idea was to only show the status if the viewer had access to
the app, but for display purposes this seems fine.

Fixes T5087

Test Plan: View with and without calendar installed

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Maniphest Tasks: T5087

Differential Revision: https://secure.phabricator.com/D9582
2014-06-16 14:18:51 -07:00
Gareth Evans
baa998faa4 Disable full screen mode for inline comments
Summary:
Full screen is a little foobar so disabling it for inline comments
Fixes T5272

Test Plan:
View inline comment after change, make sure full screen option
has gone.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Maniphest Tasks: T5272

Differential Revision: https://secure.phabricator.com/D9579
2014-06-16 13:05:08 -07:00
epriestley
5aae1ee034 Make query panels editable by normal humans
Summary:
Ref T4986. Instead of requiring you to know engine class names and copy/paste URLs, provide select dropdowns that use SCARY JAVASCRIPT to do magical things.

I think this is mostly reasonable, the only issue is that it's hard to create a panel out of a completely ad-hoc query (you'd have to save it, then create a panel out of the saved query, then remove the saved query). Once we develop T5307 we can do a better job of this.

Test Plan: See screenshots.

Reviewers: chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T4986

Differential Revision: https://secure.phabricator.com/D9572
2014-06-16 12:27:12 -07:00
Gareth Evans
f1fa8fccb6 Fix old icon css
Summary:
Updated some old css to point at the new icon set
Fixes T5357

Test Plan: View it

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Maniphest Tasks: T5357

Differential Revision: https://secure.phabricator.com/D9578
2014-06-16 12:26:52 -07:00
Gareth Evans
824b8108da Check for calendar before settings status
Summary:
We should not show the status line in the people hover card
if the calendar app has been uninstalled or is not available for the
current user.

Test Plan:
View hover card with calendar installed and uninstalled.
Make sure I see the status at the correct time.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, chad, Korvin

Maniphest Tasks: T5370

Differential Revision: https://secure.phabricator.com/D9577
2014-06-16 12:18:25 -07:00
epriestley
5f52f1f82c Fix some off-by-one issues when drag-and-dropping dashboard panels
Summary: Fixes T5321. There were a couple of off-by-one issues here which could result in inserts into the wrong position.

Test Plan:
  - Dragged panels to the top, bottom, and first position of columns.
  - Dragged panels from one column to another.
  - Reloaded the page after drags, things stayed where I put them.

Reviewers: chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T5321

Differential Revision: https://secure.phabricator.com/D9573
2014-06-16 09:15:35 -07:00
epriestley
0efa1ca643 Make the Pholio download button actually download
Summary:
  - When the button is clicked, actually download the file or image.
  - Add aural hints for the icon-only buttons.
  - Use a "photo" icon for "view raw image", so the "arrows pointing outward" icon can be used for "fullscreen" some day.

Test Plan: Clicked link, got a download.

Reviewers: chad

Reviewed By: chad

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D9574
2014-06-16 09:15:25 -07:00
Chad Little
b12e2a4cc7 I was wrong
Summary: You were right

Test Plan:
mmm, blue

{F167137}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9567
2014-06-16 07:08:10 -07:00
Chad Little
2f5dedc97e More Pholio CSS updates
Summary: Pholio CSS tweaks and fixes, many little nudges

Test Plan:
Reload Pholio Mock page

{F167109}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9566
2014-06-15 21:10:12 -07:00
Joshua Spence
a3c8b1e746 Fix a typo.
Summary: Self-explanatory.

Test Plan: Eyeball it.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9563
2014-06-16 08:24:35 +10:00
epriestley
4ea14ae376 Make Pholio work a little better on mobile
Summary:
Ref T2644. This adjusts thumb sizing so the "X" button is visible, and hides the uploader on devices for now.

The thumb stuff I'm sort of hacking (we'll cut off a little bit of wide thumbs on the iPhone), but it looks fine, is usable, and works a little better in landscape mode and at tablet sizes.

Test Plan: {F167022}

Reviewers: chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T2644

Differential Revision: https://secure.phabricator.com/D9562
2014-06-15 15:00:43 -07:00
epriestley
99e3549522 Support M123/456 mock references in Remarkup
Summary: Fixes T4729. This form is a little fluff, but we show it in the URI when you click an anchor on the page, and doing so seems desirable. I think it's reasonable to support this form, given that it appears in the URI.

Test Plan: Wrote some stuff like `M60`, `M60/71`, `M60/72/`, `M60/73/#13` and saw it all get picked up and rendered/linked properly.

Reviewers: chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T4729

Differential Revision: https://secure.phabricator.com/D9555
2014-06-15 12:56:11 -07:00
Joshua Spence
bff58fac93 Move infrastructure tests up one directory.
Summary: Sometimes, the `PhabricatorInfrastructureTestCase` //would// fail, but we don't run it with `arc unit` because of the directory structure. See D9556 for an example.

Test Plan: This is essentially the same as D9557.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9559
2014-06-16 05:52:11 +10:00
epriestley
397d67ff3d Support "Projects" field for pholio mocks in Herald
Summary: Mocks can have projects now; allow Herald rules to be written against them.

Test Plan: Wrote a Herald mock rule about projects.

Reviewers: chad

Reviewed By: chad

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D9552
2014-06-15 12:14:46 -07:00
epriestley
e711a0ed30 Allow Pholio mocks to be destroyed with bin/remove
Summary: Implements the destruction interface so mocks can be permanently destroyed with `bin/remove destroy Mxxx`.

Test Plan: Destroyed some mocks.

Reviewers: chad

Reviewed By: chad

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D9551
2014-06-15 11:55:48 -07:00
Joshua Spence
14e3c727cc Allow Arcanist Projects to be deleted using ./bin/remove destroy.
Summary: Self-explanatory.

Test Plan: Created (and destroyed) an arcanist project. Verified that the deletion actually happened.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Maniphest Tasks: T4749

Differential Revision: https://secure.phabricator.com/D9353
2014-06-16 04:49:51 +10:00
epriestley
868ff166b1 Give Pholio mocks a configurable edit policy
Summary:
Ref T4566. Currently, mocks have a conservative (author only), immutable default edit policy.

Instead:

  - Let the edit policy be changed.
  - Default the edit policy to "all users", similar to other applications.
  - Add an application-level setting for it.
  - Migrate existing edit policies to be consistent with the old policy (just the author).

This stops short of adding a separate "owner" and letting that be changed, since Pholio doesn't really have any review/approve type features (at least, so far). We can look at doing this if we get more feedback about it, or if we make owners more meaningful (e.g., add more "review-like" process to mocks).

Test Plan:
  - Ran migration scripts.
  - Confirmed existing mocks retained their effective policies (author only).
  - Created a new mock, saw edit policy.
  - Changed edit policy.
  - Changed global edit policy default.
  - Tried to edit a mock I couldn't edit.

Reviewers: chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T4566

Differential Revision: https://secure.phabricator.com/D9550
2014-06-15 10:28:16 -07:00
epriestley
77efdb6f35 Treat Pholio image descriptions as Remarkup, not plain text
Summary: Fixes T5283.

Test Plan: See screenshots.

Reviewers: chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T5283

Differential Revision: https://secure.phabricator.com/D9549
2014-06-15 10:27:40 -07:00
epriestley
dcf3b4d322 Reduce Pholio brokenness for non-image files
Summary:
Ref T5359. When users upload non-image file types (PDFs, text files, whatever), Pholio currently chokes in a few places. Make most of these behaviors more reasonable:

  - Provide thumbs in the required sizes.
  - Predict the thumb size of these files correctly.
  - Disable inline comments.
  - Make "View Fullsize" and "Download" into buttons. These mostly-work. Download should probaly really download, but CSRF on forms is a bit of a pain right now.

Test Plan: See screenshots.

Reviewers: chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T5359

Differential Revision: https://secure.phabricator.com/D9548
2014-06-15 08:03:04 -07:00
epriestley
19ed6a1ad6 Show inline counts on the thumb grid in Pholio
Summary: This is a little rough visually but the actual number works fine.

Test Plan: {F166844}

Reviewers: chad

Reviewed By: chad

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D9547
2014-06-15 07:56:07 -07:00
Chad Little
85870e79aa Switch Pholio over to lighter layout.
Summary: Gets rid of all the dark css.

Test Plan:
Do it live.

{F166665}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9545
2014-06-15 07:44:12 -07:00
epriestley
7ce8a1f437 Turn thumbs into a history grid thing
Summary:
This could probably use some refinement (and, like, explanatory text, and stronger cues about what rows and columns mean) but feels fairly good to me, at least on test data.

I didn't do any scrolling for now since we have to do full height on mobile anyway I think. I did swap it so the newer ones are on top.

Left/right navigate you among current images only, but you can click any thumb to review history.

Removed history view since it's no longer useful.

Some things that would probably help:

  - Some kind of header explaining what this is ("Mock History" or something).
  - Stronger visual cue that columns are related by being the same image.
  - Clearer cues about obsolete/deleted images (e.g., on the stage itself?)
  - Maybe general tweaks.
  - Maybe a placeholder (like a grey "X") for images which have been deleted.

(I'm planning to add comment counts too, which I think will be pretty useful, but that felt good to put in another diff.)

Test Plan: See screenshots.

Reviewers: chad

Reviewed By: chad

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D9543
2014-06-14 21:12:19 -07:00
epriestley
2dfb2cd432 Add an "Mxx" crumb on the Pholio edit page
Summary: This crumb, which is consistently available in other applications, is not currently available in Pholio.

Test Plan: Viewed an edit page, clicked the crumb.

Reviewers: chad

Reviewed By: chad

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D9542
2014-06-14 21:02:25 -07:00
epriestley
3a36f1e31c Fix a problem with recording image replacement, every other mock update
Summary:
This fixes a weird issue which currently doesn't have much impact on things, but starts to matter if we do the grid.

We're incorrectly initializing the form with `replacesPHID` as the //previously replaced Image PHID//. It is supposed to be the //current File PHID//.

Every other time, this is `null` and things work properly. On even updates (2, 4, 6, etc.), it's wrong and we don't record the replacement completely correctly.

Test Plan: Replaced images twice, saw three rows of thumb grid.

Reviewers: chad

Reviewed By: chad

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D9541
2014-06-14 21:02:00 -07:00
epriestley
0cc0782eaf Completely remove Pholio right gutter
Summary:
  - Moves the right-hand gutter under the image.
  - Moves size information to the upper right.
  - This is transitional, on the way toward something more like the mocks in D9534.

Test Plan: See screenshot.

Reviewers: chad

Reviewed By: chad

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D9538
2014-06-14 19:23:04 -07:00
epriestley
942f504893 Remove inline gutter in Pholio
Summary: This greatly simplifies inline comments while retaining their functionality. This is probably not where we want to end up, but will let us figure out what we're doing with the stage without worrying about inlines.

Test Plan: See screenshots.

Reviewers: chad

Reviewed By: chad

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D9537
2014-06-14 18:41:45 -07:00
Ricky Elrod
6eb1e4ed29 Fix typo and remove repetition.
Summary:
- Fix typo of `"(NOTE")`
- Remove repetition of "You can also"

Test Plan: zoidbergmaybe

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9532
2014-06-14 13:26:03 -07:00
Chad Little
f801c8fed9 Use PHUIPinboard UI for embedding Pholio Mocks
Summary: Changes the old dark embed to match the PinboardView. Retains ability to target individual files. Removes "carousel" of files (not super useful?)

Test Plan:
Tested embedding Mocks, with and without targeting specific files. Tested Pholio Pinboard, Macro Pinboard.

{F166451}

{F166452}

{F166453}

{F166454}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9531
2014-06-14 12:11:19 -07:00
Chad Little
4d30841100 Add app icons to search typeahead
Summary: Seems likely reasonable.

Test Plan:
Search for apps and other stuff, seems good.

{F166279}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9524
2014-06-14 11:03:31 -07:00
Chad Little
0c33bc1268 Update Remarkup Diviner
Summary: Adds Project and Pholio

Test Plan: Read? Anything else?

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9526
2014-06-14 11:02:55 -07:00
Chad Little
14afd2f6a4 Default Pholio mocks to "Open" on create
Summary: When you currently create a Pholio Mock, it's closed if you didn't notice the select. This hides the input.

Test Plan: Created a Pholio Mock, verified it was open

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9522
2014-06-13 18:13:25 -07:00
Chad Little
fefe5ae27c Fix board links in TaskDetail
Summary: Not sure if this is the correct fix, but I think it's where you intend to go?

Test Plan: Click on link in Task, get the the correct board. Click lots of links of boards and make sure everything still works.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T5361

Differential Revision: https://secure.phabricator.com/D9520
2014-06-13 14:09:21 -07:00
Chad Little
cc5ba7e801 Fix Project Hovercards
Summary: Clear the float, remove the abs. position.

Test Plan:
Test a project hovercard, see expected layout.

{F166175}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9519
2014-06-13 13:06:04 -07:00
Chad Little
27c2299407 Remove double border on tables in object boxes
Summary: The CSS rule tends to miss many tables, make the rule more universal and add borders as needed.

Test Plan: Test a Revision and Diffusion

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9516
2014-06-13 11:36:01 -07:00
James Rhodes
ed76c2be1d Implement showing buildable status in Diffusion
Summary: This implements showing the buildable status in Diffusion and unifies some of the logic used to calculate and render build and buildable statuses.

Test Plan: Looked at diffs and commits with statuses, they rendered fine.  Looked at Diffusion and saw buildable status appear (with a manual buildable and manual buildables included in the query).

Reviewers: #blessed_reviewers, epriestley, chad

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9496
2014-06-14 02:28:00 +10:00
Chad Little
8426d1d2ab Add setDisabled to pinboard view
Summary: Adds setDisabled state to PHUIPinboardItemView, implements in Pholio, Macro

Test Plan:
Pholio, Macro, disabled and closed items.

{F166109}

{F166110}

Reviewers: lpriestley, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T5074

Differential Revision: https://secure.phabricator.com/D9514
2014-06-13 09:14:12 -07:00
epriestley
d401036bd8 Prevent the use of file:// URIs in Diffusion
Summary:
Via HackerOne. There are two attacks here:

  - Configuring mirroring to a `file://` URI to place files on disk or overwrite another repository. This is not particularly severe.
  - Configuring cloning from a `file://` URI to read repositories you should not have access to. This is more severe.

Historically, repository creation and editing explicitly supported `file://` URIs to deal with use cases where you had something else managing repositories on the same machine. Since there were no permissions, repository management was admin-only, and you couldn't mirror, this was fine.

As we've evolved, this use case is a tiny minority use case and the security implications of `file://` URIs overwhelm the utility it provides. Prevent the use of `file://` URIs. Existing configured repositories won't stop working, you just can't add any new ones.

Also prevent `localPath` from being set via Conduit (see T4039).

Test Plan:
  - Tried to create a `file://` repository.
  - Tried to create a `file://` mirror.
  - Tried to create a `file://` repository via Conduit.
  - Created a non-`file://` repository.
  - Created a non-`file://` mirror.
  - Created a non-`file://` repository via Conduit.

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D9513
2014-06-13 07:07:00 -07:00
epriestley
993b73596a Fix wording of 'bin/remove' prompt for repositories
Summary: This UI recommends `bin/remove destroy X`, but should recommend `bin/remove destroy rX` (with `r`), because the remove script now takes any object monogram. The older script was repository-specific, so it only took the callsign.

Test Plan: {F166042}

Reviewers: putnam, chad

Reviewed By: chad

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D9512
2014-06-13 07:06:53 -07:00
James Rhodes
3dc7876117 Ensure Aphlict is served on the primary domain
Summary: This ensure that Aphlict is always served on the primary / production domain, because the alternate file domain is intended to prevent Flash execution.

Test Plan: Confirmed this fixes the issue by visiting https://code.redpointsoftware.com.au/ and seeing notification messages.

Reviewers: joshuaspence, #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9511
2014-06-13 05:47:06 -07:00
epriestley
18757e43de Allow entire dashboards to be copied
Summary:
Further improve UX for dealing with policy rules on dashboards:

  - When in the "Manage" view of a dashboard you can not edit:
    - Don't show the panel management controls.
    - Show a notice that the board isn't editable, recommending you make a copy instead.
  - Add a "Copy Dashboard" action to create a copy which you //can// edit.

Test Plan: Copied some dashboards. See screenshots.

Reviewers: chad

Reviewed By: chad

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D9508
2014-06-12 21:49:19 -07:00
epriestley
d0c09ef867 Add a way to get to the home dashboard on mobile
Summary: Fixes T5320. Adds a "Home" application at the top, for mobile-only.

Test Plan: See screenshots.

Reviewers: chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T5320

Differential Revision: https://secure.phabricator.com/D9509
2014-06-12 19:16:53 -07:00
Chad Little
0e1042db85 Fix Column Edit URI, simple dropdown UI
Summary: Fix the URL to editing columns, fix the color of a PHUIX dropdown(simple)

Test Plan: Click on Dropdown, don't feel offended. Edit a Column from various search URLs. Fixes T5341

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T5341

Differential Revision: https://secure.phabricator.com/D9507
2014-06-12 18:15:11 -07:00
Chad Little
933c6317c2 Add Quicklinks to Project List elements
Summary: Adds some basic links to Project ObjectItems, Workboards and Members. Assume these will be configurable by CustomFields off in the future, but this makes Projects on Dashboards much more useful.

Test Plan:
Tested /projects/ and /dashboards/, click on links to make sure they go where expected.

{F164972}

{F164973}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9483
2014-06-12 15:25:04 -07:00
epriestley
408d71cdd3 Allow users to "Edit a Copy" when trying to edit a panel they don't own
Summary:
Fixes T5167. When clicking "Edit" on a dashboard panel you don't own, the UI now allows you to make a copy instead.

As a bonus, fixes T5259.

Test Plan: See screenshots.

Reviewers: chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T5259, T5167

Differential Revision: https://secure.phabricator.com/D9505
2014-06-12 15:14:47 -07:00
epriestley
6f4ebcb8d9 Create dashboard panels inline on dashboards
Summary:
Fixes T5308.

  - Allows you to create a panel directly on a dashboard.
  - Also, include existing panels with a select instead of a text field. This won't scale as well but should be fine for now, and is way easier to use.

Test Plan: See comment.

Reviewers: chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T5308

Differential Revision: https://secure.phabricator.com/D9501
2014-06-12 13:22:27 -07:00
epriestley
b8bc0aa2b0 Allow users to select QueryPanel search engines from a list
Summary: Ref T4986. Instead of requiring users to know the name of an application search engine class, let them select from a list.

Test Plan:
Created a new panel.

{F165468}

Reviewers: chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T4986

Differential Revision: https://secure.phabricator.com/D9500
2014-06-12 13:22:20 -07:00
epriestley
c72e2f35f3 Edit dashboard panels in a dialog instead of on a separate page
Summary: When you "Edit Panel" on a dashboard, pop a dialog instead of redirecting to a different page.

Test Plan: Edited a panel from a dashboard; edited a panel from the panel workflow.

Reviewers: chad

Reviewed By: chad

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D9499
2014-06-12 13:22:12 -07:00
Chad Little
5dca350e0e Move icon inside link in ActionLink
Summary: Moves the icon into the link

Test Plan: Tested a form (Phrequent), disabled, and regular action link

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T5331

Differential Revision: https://secure.phabricator.com/D9503
2014-06-12 11:27:30 -07:00
Chad Little
71d9a6be07 Clean up error state on Dashboards
Summary: A more basic error view

Test Plan:
Made stuff up

{F165315}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T5319

Differential Revision: https://secure.phabricator.com/D9495
2014-06-12 07:11:00 -07:00
James Rhodes
14198d62fb Return the build from applyPlan instead of the plan
Summary: Nothing inside Phabricator uses the return value of this method, but returning the actual build instance is far more useful (for kicking off builds in an application and storing the build PHID against another object).

Test Plan: N/A

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9494
2014-06-11 20:02:11 -07:00
epriestley
4bc561f17b Make Conpherence threads update in real time, very roughly
Summary:
Ref T4083. This needs some work (mostly in the Conpherence JS itself), but is sort of functional. In particular:

  - On thread pages, add the thread as a `pageObject`.
  - After updating a thread, send a new "message" event to the server.
  - Share a little more event posting code.
  - In the browser, use event dispatch to respond to events.
  - Add a listener for the new event type.
  - Update conpherence threads (this part is really yucky).

Test Plan: With multiple browser windows / browsers open, posted a message to a thread, and saw it update everywhere.

Reviewers: joshuaspence

Reviewed By: joshuaspence

Subscribers: chad, epriestley

Maniphest Tasks: T4083

Differential Revision: https://secure.phabricator.com/D9486
2014-06-11 13:52:15 -07:00
Joshua Spence
84d259cea2 Modify the Aphlict server to transmit messages instead of broadcasting them.
Summary: Ref T4324. Ref T5284. This adds server-side support for keeping track of a set of PHIDs that the Aphlict clients have subscribed to. Instead of broadcasting a notification to all clients (after which the clients can poll `/notification/individual` in order to determine whether or not they are interested in the notification), transmit notifications only to clients that have subscribed to a PHID that is relevant to the notification.

Test Plan:
I opened up two clients on the same host (incognito tabs in Chrome). Here is the output from the server:

```
> sudo ./bin/aphlict debug
Starting Aphlict server in foreground...
Launching server:

    $ 'nodejs' '/usr/src/phabricator/src/applications/aphlict/management/../../../../support/aphlict/server/aphlict_server.js' --port='22280' --admin='22281' --host='localhost' --user='aphlict'

[Wed Jun 11 2014 19:10:27 GMT+0000 (UTC)] Started Server (PID 4546)
[Wed Jun 11 2014 19:10:36 GMT+0000 (UTC)] <FlashPolicy> Policy Request From ::ffff:192.168.1.1
[Wed Jun 11 2014 19:10:37 GMT+0000 (UTC)] <Listener/1> Connected from ::ffff:192.168.1.1
[Wed Jun 11 2014 19:10:37 GMT+0000 (UTC)] <Listener/1> Received data: {"command":"subscribe","data":["PHID-USER-cb5af6p4oepy5tlgqypi"]}
[Wed Jun 11 2014 19:10:37 GMT+0000 (UTC)] <Listener/1> Subscribed to: ["PHID-USER-cb5af6p4oepy5tlgqypi"]
[Wed Jun 11 2014 19:10:39 GMT+0000 (UTC)] <Listener/1> Received data: {"command":"subscribe","data":["PHID-USER-kfohe3ca5oe6ygykmioq"]}
[Wed Jun 11 2014 19:10:39 GMT+0000 (UTC)] <Listener/1> Subscribed to: ["PHID-USER-kfohe3ca5oe6ygykmioq"]
[Wed Jun 11 2014 19:10:42 GMT+0000 (UTC)] notification: {"key":"6023751084283587681","type":"notification","subscribers":["PHID-USER-cb5af6p4oepy5tlgqypi"]}
[Wed Jun 11 2014 19:10:42 GMT+0000 (UTC)] <Listener/1> Wrote Message
```

I verified (using the "Network" tab in Chrome) that an AJAX request to `/notification/individual/` was only made in the tab belonging to the user that triggered the test notification.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Maniphest Tasks: T5284, T4324

Differential Revision: https://secure.phabricator.com/D9458
2014-06-11 12:17:29 -07:00
Guy Warner
82f889c421 Update chatbot documentation
Summary:
Remove's PhabricatorBotDifferentialNotificationHandler documentation and adds in:
PhabricatorBotFeedNotificationHandler
PhabricatorBotSymbolHandler
PhabricatorBotMacroHandler

Should have been included in D9477

Test Plan: Read it..?

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9479
2014-06-11 10:41:12 -07:00
epriestley
ce887d55c2 Use JS to manage dashboard tab panels
Summary: Fixes T5271. This is mostly similar to normal tab panel JS, but I think we'll eventually do async rendering and/or saved tabs so it's reasonable to split it out.

Test Plan: Toggled tabs on a tab panel, saw tab selected state change.

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T5271

Differential Revision: https://secure.phabricator.com/D9478
2014-06-11 10:39:23 -07:00
Joshua Spence
ab4324148a Make the Aphlict server more resilient.
Summary:
Currently, the Aphlict server will crash if invalid JSON data is `POST`ed to it. I have fixed this to, instead, return a 400. Also made some minor formatting changes.

Ref T4324. Ref T5284. Also, modify the data structure that is passed around (i.e. `POST`ed to the Aphlict server and broadcast to the Aphlict clients) to include the subscribers. Initially, I figured that we shouldn't expose this information to the clients... however, it is necessary for T4324 that the `AphlictMaster` is able to route a notification to the appropriate clients.

Test Plan:
Making the following `curl` request: `curl --data "{" http://localhost:22281/`.

**Before**
```
sudo ./bin/aphlict debug
Starting Aphlict server in foreground...
Launching server:

    $ 'nodejs' '/usr/src/phabricator/src/applications/aphlict/management/../../../../support/aphlict/server/aphlict_server.js' --port='22280' --admin='22281' --host='localhost' --user='aphlict'

[Wed Jun 11 2014 17:07:51 GMT+0000 (UTC)] Started Server (PID 2033)
[Wed Jun 11 2014 17:07:55 GMT+0000 (UTC)]
<<< UNCAUGHT EXCEPTION! >>>

SyntaxError: Unexpected end of input
>>> Server exited!
```

**After**
(No output... the bad JSON is caught and a 400 is returned)

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T4324, T5284

Differential Revision: https://secure.phabricator.com/D9480
2014-06-11 10:17:12 -07:00
epriestley
0bf19df7c6 Fix changeset loading issue for "Download Raw Diff" in Differential
Summary: Fixes T5309. Modernize this callsite to use ChangesetQuery and pick up attached objects.

Test Plan: Clicked "Download Raw Diff" in Differential.

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T5309

Differential Revision: https://secure.phabricator.com/D9461
2014-06-11 09:05:09 -07:00
Joshua Spence
747946eb5f Remove the deprecated PhabricatorIRCProtocolHandler class.
Summary: This class has been deprecated for a while now (see rP0a8b0d1392bd79b4e88fbf910b176c960d57b4b4). It should be safe to remove.

Test Plan: N/A

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9467
2014-06-11 05:50:35 -07:00
Joshua Spence
34cca383eb Remove the PhabricatorBotDifferentialNotificationHandler class.
Summary: This class has been deprecated for a while now (see rPdad7c65bf56384480be7c18e02fdc01ea67cf1ff). It should be safe to remove.

Test Plan: N/A

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9468
2014-06-11 05:50:13 -07:00
Joshua Spence
857c11a36e Remove deprecated PhabricatorIRCBot class.
Summary: This class has been deprecated for a while (see rP574bc3ba31cca2767bafe7844d7f854d90d6be1c). It should be safe to remove now.

Test Plan: N/A

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9469
2014-06-11 05:49:53 -07:00
epriestley
8dafabbb1d Restore test-sensitive whitespace to some test cases
Summary: This trailing whitespace is meaningful for these files. Also, exclude test data from linting.

Test Plan: Ran unit tests.

Reviewers: hach-que, joshuaspence

Reviewed By: joshuaspence

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D9462
2014-06-10 16:39:16 -07:00
epriestley
2834130792 Make named lookup of users case insensitive
Summary: Fixes T5302. Allow the name `@aLiNCoLN` to identify user `@alincoln`.

Test Plan: Queried users with mixed case names.

Reviewers: btrahan, spicyj, chad

Reviewed By: spicyj

Subscribers: epriestley

Maniphest Tasks: T5302

Differential Revision: https://secure.phabricator.com/D9451
2014-06-10 12:17:23 -07:00
lkassianik
0bdf18fdd2 Add project tags to PonderQuestion
Summary: T2628, adding project tags to ponder questions

Test Plan: Create ponder question, add project tag, save, project tag should show in question properties on question view.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D9447
2014-06-10 11:18:04 -07:00
Joshua Spence
6df8c4a426 Allow Conduit to query project slugs.
Summary: Ref T4418. Allow Conduit to query projects by their slugs.

Test Plan: This functionality mostly already existed, it just wasn't exposed to the Conduit endpoint.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Maniphest Tasks: T4418

Differential Revision: https://secure.phabricator.com/D9456
2014-06-10 10:57:57 -07:00
Chad Little
12f2ffd46a Add white as ActionHeader color, use on Dashboards
Summary: Trying to lessen the visual footprint of a heavy-widget dashboard. Adds a plain style.

Test Plan:
Tested my homepage and dashboards

{F164709}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9454
2014-06-10 09:16:29 -07:00
epriestley
c483877f57 Allow logged-out access to individual diffs (vs revisions)
Summary: Fixes T5303. Individual diffs can have public access policies.

Test Plan: Viewed a public diff while logged out.

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T5303

Differential Revision: https://secure.phabricator.com/D9452
2014-06-10 07:49:42 -07:00
Joshua Spence
d0128afa29 Applied various linter fixes.
Summary: Applied some more linter fixes that I previously missed because my global `arc` install was out-of-date.

Test Plan: Will run `arc unit` on another host.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9443
2014-06-09 16:04:12 -07:00
Ben Alpert
4c82293385 Fix labels for subject prefix config options
Test Plan: Crossed fingers.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9427
2014-06-09 11:43:00 -07:00
Joshua Spence
0a62f13464 Change double quotes to single quotes.
Summary: Ran `arc lint --apply-patches --everything` over rP, mainly to change double quotes to single quotes where appropriate. These changes also validate that the `ArcanistXHPASTLinter::LINT_DOUBLE_QUOTE` rule is working as expected.

Test Plan: Eyeballed it.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin, hach-que

Differential Revision: https://secure.phabricator.com/D9431
2014-06-09 11:36:50 -07:00
Chad Little
7b97d006a5 Touch up Subscriber List Dialog
Summary: Reduces images in ObjectLists to 40px over 50px, adds ability to show stackable lists in dialogs. Fixes T4891

Test Plan:
Tested People, Projects, Subscriber lists.

{F164265}

{F164264}

{F164266}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T4891

Differential Revision: https://secure.phabricator.com/D9426
2014-06-07 21:43:04 -07:00
epriestley
c5ee3a4522 Serve aphlict.swf through Celerity
Summary:
This currently uses a hard-coded relative path, but should not, especially after D9401.

The major effect of this is that updated .swf files might not be served properly, and we were at the whims of the server configuration for caching/versioning behavior.

Test Plan: Enabled debug notifications, saw .swf load through Celerity.

Reviewers: joshuaspence

Reviewed By: joshuaspence

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D9421
2014-06-07 14:04:52 -07:00
epriestley
39ca090d15 Try nodejs before node when starting notification server
Summary: Fixes T5278. This isn't completely perfect (if you have the other `node` binary, it will fail to detect that it's wrong) but we can maybe wait for that to happen and devise some kind of "is this binary really node?" test if users actually hit it.

Test Plan: Faked things, hit the error; unfaked them and hit the normal flow.

Reviewers: joshuaspence

Reviewed By: joshuaspence

Subscribers: epriestley

Maniphest Tasks: T5278

Differential Revision: https://secure.phabricator.com/D9419
2014-06-07 13:56:23 -07:00
lkassianik
bfc594b3eb Add project tags to Pholio
Summary: T2628, adding project tags to pholio mocks

Test Plan: Create pholio mock, add project tag, save, project tag should show in mock properties on mock view.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9420
2014-06-07 13:54:40 -07:00
epriestley
96d5a9b4c2 Don't run "aphlict-listen" behavior if real-time notifications are disabled
Summary: Fixes T5277. We incorrectly ran this unconditionally.

Test Plan: Toggled setting on/off, verified behavior ran or did not run.

Reviewers: joshuaspence

Reviewed By: joshuaspence

Subscribers: epriestley

Maniphest Tasks: T5277

Differential Revision: https://secure.phabricator.com/D9418
2014-06-07 13:05:01 -07:00
epriestley
61af2e313b Slightly improve friendliness of "no mxmlc" error
Summary: Ref T4324. Add some hints and context.

Test Plan: Read error.

Reviewers: joshuaspence

Reviewed By: joshuaspence

Subscribers: epriestley

Maniphest Tasks: T4324

Differential Revision: https://secure.phabricator.com/D9417
2014-06-07 12:29:19 -07:00
Chad Little
41ef6824be Make ObjectItem default as "Card"
Summary: This went smoother than expeced. Makes the rounded Card the default, also tweaked selected state a little.

Test Plan:
Test UIExamples, Maniphest, Home, Differential, Harbormaster, Audit. Everything seems normal

{F163971}

{F163973}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9408
2014-06-07 12:12:11 -07:00
Joshua Spence
3219039575 Update nginx configuration documentation.
Summary: The configuration guide for nginx recommends using a conditional statement to check if a file exists, which is listed on the [[http://wiki.nginx.org/Pitfalls#Check_IF_File_Exists | nginx wiki]] as a common pitfall. It is not necessary to use a conditional and probably should not be recommended to do so.

Test Plan: We use this nginx configuration in our installation.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9401
2014-06-07 12:08:08 -07:00
Aviv Eyal
b6bc8b8c0f "fix" github scope-upgrade flow
Summary:
Can't say I know what I'm doing here, but this fixes an the upgrade-scope flow for landing-to-github.

Without this change, it looks like the submit button makes the browser (Chrome and msie) make the call in the background, instead of hijacking the window.
With it, it works like it should.

Test Plan: try to land with weak token, click "Refresh..", see GitHub button.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9407
2014-06-07 12:05:31 -07:00
Joshua Spence
6c48f11a07 Move the "Advanced Configuration" documentation.
Summary: This documentation doesn't really fall under the "Application User Guides" section, it should be moved to "Configuration".

Test Plan: N/A

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9403
2014-06-07 12:03:08 -07:00
Joshua Spence
435db540fe Move the notifications documentation to the "Configuration" section.
Summary: Notifications isn't really an application, this documentation should probably be moved to the "Configuration" seciton.

Test Plan: N/A

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9402
2014-06-07 12:02:40 -07:00
Joshua Spence
ddf5412cbb Add a ./bin/aphlict build workflow.
Summary:
Currently, it is a bit tricky to build the Aphlict client SWF from the ActionScript source. Provide a `./bin/aphlict build` workflow that simplifies this process.

Depends on D9226.

Test Plan:
Executed the workflow:

```
> ./bin/aphlict build
Done.
```

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9338
2014-06-07 11:34:07 -07:00
Chad Little
b1362e4e46 Make App Pinning use Stackable list
Summary: This makes setStackble play well in ObjectBox, also tweaks dragging in a stackable box (pinning)

Test Plan: Drag in App Settings, Drag in Maniphest, Workboards

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9413
2014-06-07 11:28:37 -07:00
Joshua Spence
0a534d1d1f Allow herald rules to be deleted with ./bin/remove destroy.
Summary: Fixes T5286. Allow herald rules to be deleted using the `./bin/remove destroy` workflow.

Test Plan: Created a herald rule. Deleted it with `./bin/remove destroy`.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Maniphest Tasks: T5286

Differential Revision: https://secure.phabricator.com/D9416
2014-06-07 11:19:04 -07:00
epriestley
fcc2a24d63 Update Aphlict documentation for new server management commands
Summary:
The docs are now a little out of date.

Also //possibly// we should call this `bin/notifications` or something, maybe?

Test Plan: read

Reviewers: joshuaspence

Reviewed By: joshuaspence

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D9398
2014-06-05 12:40:53 -07:00
Joshua Spence
8a7a7dcbf1 Make ./bin/aphlict behave more like a service.
Summary: Fixes T5126. Provide `start`, `stop`, `restart`, `debug` and `status` workflows for `./bin/aphlict`. This makes it easier to manage Aphlict as if it were a service.

Test Plan:
```
> sudo ./bin/aphlict status
Aphlict is not running.

> sudo ./bin/aphlict stop
Aphlict is not running.

> sudo ./bin/aphlict start
Aphlict Server started.

> sudo ./bin/aphlict status
Aphlict (12880) is running.

> sudo ./bin/aphlict restart
Stopping Aphlict Server (12880)...
Aphlict Server (12880) exited normally.
Aphlict Server started.

> sudo ./bin/aphlict stop
Stopping Aphlict Server (12895)...
Aphlict Server (12895) exited normally.

> sudo ./bin/aphlict debug
Starting Aphlict server in foreground...
Launching server:

    $ node '/usr/src/phabricator/src/applications/aphlict/management/../../../../support/aphlict/server/aphlict_server.js' --port='22280' --admin='22281' --host='localhost' --user='aphlict'

[Fri May 30 2014 09:56:14 GMT+0000 (UTC)] Started Server (PID 12911)
```

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: hach-que, epriestley, Korvin

Maniphest Tasks: T5126

Differential Revision: https://secure.phabricator.com/D9226
2014-06-05 12:13:45 -07:00
Joshua Spence
fe98aa6839 Publish additional context to the Aphlict server.
Summary:
Ref T4324. As well as sending the key for the notification, also publish the notification type and a list of subscribers to the Aphlict server.

The idea here is that the Aphlict server passes anything within the `data` key to the clients, whereas other keys (such as `subscribers`) will be used by the server to determine where the notifications should be routed.

Note that these changes don't do anything useful, but are a prerequisite for further work on T4324.

Test Plan:
Sent myself test notifications at `/notification/status/`. Also inspected the Aphlict server debug output:

```
> sudo ./bin/aphlict --foreground
Starting server in foreground, ignoring pidfile...
Launching server:

    $ node '/usr/src/phabricator/support/aphlict/server/aphlict_server.js' --port='22280' --admin='22281' --host='localhost' --user='aphlict' --log='/var/log/aphlict.log'

[Thu Jun 05 2014 18:38:14 GMT+0000 (UTC)] Started Server (PID 15437)
[Thu Jun 05 2014 18:38:16 GMT+0000 (UTC)] <FlashPolicy> Policy Request From ::ffff:10.0.0.1
[Thu Jun 05 2014 18:38:16 GMT+0000 (UTC)] <Listener/1> Connected from ::ffff:10.0.0.1
[Thu Jun 05 2014 18:38:19 GMT+0000 (UTC)] notification: {"data":{"key":"6021516228036848559","type":"notification"},"subscribers":["PHID-USER-cb5af6p4oepy5tlgqypi"]}
[Thu Jun 05 2014 18:38:19 GMT+0000 (UTC)] <Listener/1> Wrote Message
```

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Maniphest Tasks: T4324

Differential Revision: https://secure.phabricator.com/D9396
2014-06-05 12:09:26 -07:00
Chad Little
ac2b91711f Update Maniphest "Reports" to base UI
Summary: Replace PanelView with ObjBox. Make burnup chart look less hated.

Test Plan:
Test a project, non project, various layouts on Maniphest Reports

{F163644}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9397
2014-06-05 11:56:28 -07:00
Chad Little
dbebfea9cc FontAwesome RemarkupBar
Summary:
Replaces the icons with fonts from FontAwesome. Up in the air about the meme icon. Thoughts?

Also removed the second fullscreen/normal state. Seems obvious what it does, but assume someone complained previously?

Test Plan:
Tested all the icon states and made sure they still worked. Test fullscreen and help.

{F163485}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9385
2014-06-05 10:37:21 -07:00
Joshua Spence
3202f0f23d Post data to the Aphlict server in JSON encoded form.
Summary:
Ref T4324. Currently, notifications data is `POST`ed to the Aphlict server in the `application/x-www-form-urlencoded` format. This works fine for simple data but is problematic for nested data. For example:

```lang=php
array(
  'data' => array(
    'key'  => '6021329908492455737',
    'type' => 'PhabricatorNotificationAdHocFeedStory',
  ),
  'subscribers' => array(
    'PHID-USER-y7ofqm276ejs62yqghge',
  ),
);
```

Is encoded as `data%5Bkey%5D=6021329908492455737&data%5Btype%5D=PhabricatorNotificationAdHocFeedStory&subscribers%5B0%5D=PHID-USER-y7ofqm276ejs62yqghge`. This string is then (incorrectly) decoded by `querystring.parse` as:

```lang=javascript
> querystring.parse('data%5Bkey%5D=6021329908492455737&data%5Btype%5D=PhabricatorNotificationAdHocFeedStory&subscribers%5B0%5D=PHID-USER-y7ofqm276ejs62yqghge');
{ 'data[key]': '6021329908492455737',
  'data[type]': 'PhabricatorNotificationAdHocFeedStory',
  'subscribers[0]': 'PHID-USER-y7ofqm276ejs62yqghge' }
```

Test Plan: Sent test notifications from `/notification/status/` and verified that the notifications still worked.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T4324

Differential Revision: https://secure.phabricator.com/D9386
2014-06-05 09:47:33 -07:00
epriestley
ba2ce8a5ca Fix undefinded $changesets when submitting inline comments in Differential
Summary: Fixes T5262. This branch is overzealous, and causes us to fail to load changeses if `metamta.differential.unified-comment-context` is off. It was on for me locally for testing, which is why I missed this.

Test Plan: No more exception.

Reviewers: chad

Reviewed By: chad

Subscribers: richardvanvelzen, epriestley

Maniphest Tasks: T5262

Differential Revision: https://secure.phabricator.com/D9376
2014-06-04 16:14:54 -07:00
Angelos Evripiotis
52fb3eb5f4 Fix command typo in managing_daemons.diviner
Summary:
Fix the 'managing daemons' doc's example for launching daemons in a
way suitable for multiple web servers.  Separate the '--no-discovery'
argument with '--', otherwise it doesn't appear to be understood.

Test Plan:
Attempt to launch daemon in various ways, make sure to include
ways that are expected to fail, otherwise it may not be doing what
we expect.

    phd launch PhabricatorRepositoryPullLocalDaemon --no-discovery
    .. errors in daemon log 'unrecognised argument' ..
    phd launch PhabricatorRepositoryPullLocalDaemon -- --not-an-arg
    .. errors in daemon log 'unrecognised argument' ..
    phd launch PhabricatorRepositoryPullLocalDaemon -- --no-discovery
    .. no errors in daemon log ..

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D9374
2014-06-04 15:40:14 -07:00
epriestley
2c626f72a9 Fix unsubscribing from projects in a gross, hacky way
Summary:
Fixes T5261.

This fix isn't very good. Two better fixes would be:

  # Add some sort of `setRole(SUBSCRIPTIONS)` method to `ObjectQuery`, which gets passed down until it reaches `ProjectQuery`, and `ProjectQuery` knows that it needs to load more data. This feels OK, but is a very general approach and I don't think we have many/any other use cases right now. I //think// this is the right way in the long run, but I'd like to have more use cases in mind before implementing it.
  # Add some sort of `loadAllTheSubscriptionStuffYouNeed()` method to `PhabricatorSubscribableInterface`. This feels OK-ish too, but kind of yuck, and doesn't lend itself to proper batching, and is silly if we do the above instead, which I think we probably will.

For now, just fix the issue without committing to an infrastructure direction. I think (1) is the right way to go eventually, but I want a better second use case before writing it, since I might be crazy.

Test Plan: Unsubscribed from a project.

Reviewers: joshuaspence

Reviewed By: joshuaspence

Subscribers: epriestley

Maniphest Tasks: T5261

Differential Revision: https://secure.phabricator.com/D9377
2014-06-04 15:17:19 -07:00
epriestley
1bfa8b2063 Really pin "applications" to the bottom of the menu, for serious
Summary: Pin it.

Test Plan: Saw it pinned.

Reviewers: chad

Reviewed By: chad

Subscribers: richardvanvelzen, epriestley

Differential Revision: https://secure.phabricator.com/D9373
2014-06-04 13:07:00 -07:00
Chad Little
14dab3f55c Convert ButtonBar to FontAwesome
Summary: Removes the sprites and images, uses fontawesome in examples and calendar

Test Plan:
UIExamples, Calendar

{F163375}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9371
2014-06-04 12:53:32 -07:00
Chad Little
d7ffe97857 Update diff changeset icons
Summary: Fix size and spacing of file icons in diffs, update with new types, consistency.

Test Plan: Tested a diff in differential

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9372
2014-06-04 12:53:07 -07:00
epriestley
40e2a1c800 Write new hunks to the modern hunk store
Summary: Ref T4045. Ref T5179. Send all new writes into the modern store.

Test Plan:
  - Created a diff.
  - Verified it went to the modern store.
  - Destroyed a revision, verified hunks were destroyed.
  - Also unit tests.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T4045, T5179

Differential Revision: https://secure.phabricator.com/D9293
2014-06-03 18:01:25 -07:00
epriestley
4b39fbe115 Allow modern hunks to be stored deflated
Summary: Ref T4045. Ref T5179. When saving a modern hunk, deflate it if we have the function and deflating it will save a nontrivial number of bytes.

Test Plan:
  - Used `bin/hunks migrate` to move some hunks over, saw ~70-80% compression on most standard hunks.
  - Viewed changesets using compressed hunks.
  - Profiled `gzinflate()` and verified the cost is trivial (<< 1ms) at least for normal diffs.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T4045, T5179

Differential Revision: https://secure.phabricator.com/D9292
2014-06-03 18:01:24 -07:00
epriestley
5b1262c98b Add a bin/hunks script to manage migrations of hunk data
Summary:
Ref T4045. Ref T5179. While we'll eventually need to force a migration, we can let installs (particularly large installs) do an online migration for now. This moves hunks to the new storage format one at a time.

(Note that nothing writes to the new store yet, so this is the only way to populate it.)

WARNING: Installs, don't run this yet! It won't compress the data. Wait until it can also do compression.

Test Plan: Added a `break;` after migrating one row and moved a few rows over. Spot checked them in the database and viewed the affected diffs.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T4045, T5179

Differential Revision: https://secure.phabricator.com/D9291
2014-06-03 18:01:23 -07:00
epriestley
0aa913805d Add an alternate "modern" hunk datastore
Summary:
Ref T4045. Ref T5179. Hunk storage has two major issues:

  - It's utf8, but actual diffs are binary.
  - It's huge and can't be compressed or archived.

This introduces a second datastore which solves these problems: by recording hunk encoding, supporting compression, and supporting alternate storage. There's no actual compression or storage support yet, but there's space in the table for them.

Since nothing actually uses hunk IDs, it's fine to have these tables exist at the same time and use the same IDs. We can migrate data between the tables gradually without requiring downtime or disrupting installs.

Test Plan:
  - There are no writes to the new table yet.
  - The only effect this has is making us issue one extra query when looking for hunks.
  - Observed the query issue, but everything else continue working fine.
  - Created a new diff.
  - Ran unit tests.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T4045, T5179

Differential Revision: https://secure.phabricator.com/D9290
2014-06-03 18:01:22 -07:00
epriestley
bb306b58d5 Introduce DifferentialChangesetQuery and remove loadHunks()
Summary: Ref T4045. Ref T5179. This removes all non-Query hunk loads.

Test Plan:
  - Viewed revisions.
  - Viewed standalone changesets.
  - Viewed raw old/new files.
  - Viewed vs diffs.
  - Enabled inline comments in mail and sent some transactions with inlines.
  - Called `differential.getrawdiff`.
  - Grepped for `loadHunks()`.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T4045, T5179

Differential Revision: https://secure.phabricator.com/D9289
2014-06-03 18:01:21 -07:00
epriestley
cb58acbe5b Use DiffQuery instead of direct hunk loads in MessageParser daemon
Summary: Ref T5179. Ref T4045. Continue reducing the number of direct hunk loads we perform.

Test Plan: Pushed a closing commit, used `scripts/repository/reparse.php --message ...` to trigger this logic, got a sensible/accurate result.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T4045, T5179

Differential Revision: https://secure.phabricator.com/D9288
2014-06-03 18:01:20 -07:00
epriestley
71e9fb96b5 Move more hunk loads into DifferentialHunkQuery
Summary: Ref T5179. Ref T4045. I want to move all hunk loads into DifferentialHunkQuery so I can make it do magical things where hunks come from multiple places, handle non-utf8 encodings properly, handle compression, archive into Files, and so on.

Test Plan: Viewed some revisions. Called `differential.getrawdiff`.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T4045, T5179

Differential Revision: https://secure.phabricator.com/D9287
2014-06-03 18:01:19 -07:00
epriestley
7d0d6fbcf2 Consolidate changeset rendering logic
Summary:
Ref T5179. Currently, all the changeset rendering logic is in the "populate" behavior, and a lot of it comes in via configuration and is hard to get at.

Instead, surface an object which can control it, and which other behaviors can access more easily.

In particular, this allows us to add a "Load/Reload" item to the view options menu, which would previously have been very challenging.

Load/Reload isn't useful on its own, but is a step away from "Show whitespace as...", "Highlight as...", "Show tabtops as...", "View Unified", "View Side-By-Side", etc.

Test Plan:
  - Viewed Differential.
  - Viewed Diffusion.
  - Viewed large changesets, clicked "Load".
  - Used "Load" and "Reload" from view options menu.
  - Loaded all changes in a large diff, verified "Load" and TOC clicks take precedence over other content loads.
  - Played with content stability stuff.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T5179

Differential Revision: https://secure.phabricator.com/D9286
2014-06-03 18:01:18 -07:00
epriestley
4b9765b896 Implement PhabricatorProjectInterface in Paste
Summary: Ref T2628. Implements PhabricatorProjectInterface (D9340) in Paste.

Test Plan: See screenshots.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T2628

Differential Revision: https://secure.phabricator.com/D9341
2014-06-03 17:22:09 -07:00
epriestley
4cda3e5811 Implement PhabricatorProjectInterface for marking that objects can be tagged with projects
Summary: Ref T2628. This makes Transactions understand objects that can have project relationships, extract project mentions, and handle watching.

Test Plan: See next diff.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T2628

Differential Revision: https://secure.phabricator.com/D9340
2014-06-03 17:19:40 -07:00
epriestley
0d87fef573 Fix an issue where Mercurial pushes would consider only the first and last commits
Summary:
Fixes T5197. `hg log --rev x --rev y` means "rev x, and also rev y".

Use `--rev x:y`, which means "all commits between x and y, inclusive".

Test Plan: Pushed 4 commits at once, got 4 commits in push log.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T5197

Differential Revision: https://secure.phabricator.com/D9309
2014-06-03 17:08:13 -07:00
epriestley
66af361f10 Fix a Mercurial issue where split heads would be detected incorrectly
Summary: Ref T5197. When searching for split branch heads, we incorrectly consider descendant heads of other branches. This can cause us to detect a split tip when one does not exist (the old tip is the branch tip, but other descendant heads exist). Instead, consider only heads on the same branch.

Test Plan:
Repro is something like this:

  - `hg update default`
  - `hg branch branch1; hg commit ...`
  - `hg push`
  - `hg update default; hg commit ...`
  - `hg push` - Previously, we would find the head of `branch1` and incorrectly account for it as a head of `default`.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T5197

Differential Revision: https://secure.phabricator.com/D9308
2014-06-03 17:07:49 -07:00
epriestley
bad7f3d49b Make panels decide async rendering nonrandomly
Summary: Ref T4986. The random rule was useful for making sure stuff works, but it works now.

Test Plan: Loaded some dashboards, got consistent async vs non-async.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T4986

Differential Revision: https://secure.phabricator.com/D9281
2014-06-03 16:51:02 -07:00
epriestley
99c72a32d0 Allow installs to require multi-factor authentication for all users
Summary: Ref T5089. Adds a `security.require-multi-factor-auth` which forces all users to enroll in MFA before they can use their accounts.

Test Plan:
Config:

{F159750}

Roadblock:

{F159748}

After configuration:

{F159749}

  - Required MFA, got roadblocked, added MFA, got unblocked.
  - Removed MFA, got blocked again.
  - Used `bin/auth strip` to strip MFA, got blocked.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T5089

Differential Revision: https://secure.phabricator.com/D9285
2014-06-03 16:50:27 -07:00
epriestley
83112cc2e8 Move email verification into PhabricatorUserEditor
Summary: Both email verify and welcome links now verify email, centralize them and record them in the user activity log.

Test Plan:
  - Followed a "verify email" link and got verified.
  - Followed a "welcome" (verifying) link.
  - Followed a "reset" (non-verifying) link.
  - Looked in the activity log for the verifications.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D9284
2014-06-03 16:45:18 -07:00
Ben Alpert
09d306b5b1 Add CCs -> Add Subscribers
Summary: I think this is the direction the language has been moving? Maybe this will train me that "CCs" are called "Subscribers". (I actually don't love this wording change, but consistency is good?)

Test Plan: {F163255}

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9367
2014-06-03 15:53:53 -07:00
epriestley
2264c2b4b5 Merge the new navigation design
For discussion, see T5241.
2014-06-03 15:50:08 -07:00
epriestley
6df1a02413 (Redesign) Clean up older "Tile" code
Summary:
This does some backend cleanup of the tile stuff, and some general cleanup of other application things:

  - Users who haven't customized preferences get a small, specific set of pinned applications: Differential, Maniphest, Diffusion, Audit, Phriction, Projects (and, for administrators, Auth, Config and People).
  - Old tile size methods are replaced with `isPinnnedByDefault()`.
  - Shortened some short descriptions.
  - `shouldAppearInLaunchView()` replaced by less ambiguous `isLaunchable()`.
  - Added a marker for third-party / extension applications.

Test Plan: Faked away my preferences and viewed the home page, saw a smaller set of default pins.

Reviewers: chad

Reviewed By: chad

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D9358
2014-06-03 15:47:27 -07:00
Chad Little
8827854ff8 Lightblue Hovercards
Summary: The blue cards were still pretty strong for me, tested out some light blue ones and they of course look fantastic.

Test Plan: UIExamples, Feed

Reviewers: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9366
2014-06-03 14:37:38 -07:00
epriestley
75cbc3ef6c Fix an issues with moved Phriction documents if the old location does not exist or can't be loaded
Summary: Fixes T5250. This needs some general cleanup, but fix the fatal.

Test Plan:
  - Viewed moved document.
  - Viewed moved-from-nonexistent-source document.

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T5250

Differential Revision: https://secure.phabricator.com/D9357
2014-06-03 12:42:54 -07:00
Joshua Spence
c86604bad8 Reduce the verbosity of the ./bin/search index script.
Summary: Currently, the `./bin/search index` script produces a lot of output (one line for every indexed object). Instead, use a `PhutilConsoleProgressBar` to indicate progress. This is much less verbose and gives a real indication of how long the script should take to complete.

Test Plan: Ran `./bin/search index` and verified that a progress bar was output.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9364
2014-06-03 11:46:43 -07:00
Joshua Spence
1503840cd9 Batch up SQL operations in the ./bin/repository parents script.
Summary: Fixes T5255. Currently the `./bin/repository parents` workflow is quite slow. Batching up the SQL operations should make the workflow //seem// much faster.

Test Plan: Not yet tested.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T5255

Differential Revision: https://secure.phabricator.com/D9361
2014-06-03 11:27:57 -07:00
epriestley
e3d7c16d8c Use "https://" instead of "git://" for anoymous GitHub requests in documentation
Summary: These both work, but "git://" uses a nonstandard and possibly firewalled port, is less familiar to users, and is not promoted in the GitHub UI.

Test Plan: `grep`, reviewed diff.

Reviewers: chad, avive, avivey

Reviewed By: avivey

Subscribers: epriestley, avivey

Differential Revision: https://secure.phabricator.com/D9360
2014-06-03 09:40:16 -07:00
Joshua Spence
0d03bbe43c Allow repositories to be deleted using ./bin/remove.
Summary: Currently, repositories can be deleted using `./bin/repository delete`. It makes sense to expose this operate to the `./bin/remove` script as well, for consistency.

Test Plan: Deleted a repository with `./bin/remove rTEST`.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9350
2014-06-02 17:11:58 -07:00
Joshua Spence
c2eff7c216 Allow projects to be deleted with ./bin/remove destroy.
Summary: Fixes T5235. Implement `PhabricatorDestructableInterface` on `PhabricatorProject` so that projects can be deleted with `./bin/remove destroy`.

Test Plan: Created (and then destroyed) a test project. Verified that the corresponding objects (project, slugs and workboard columns) were removed from the database.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Maniphest Tasks: T5235

Differential Revision: https://secure.phabricator.com/D9352
2014-06-02 17:10:29 -07:00
Joshua Spence
1e2a592ceb Expose "Abandon Revision" to non-authors with a config flag.
Summary: Fixes T4720. Allows non-authors to permanently reject a differential by exposing the "Abandon Revision" action via a configuration flag.

Test Plan: {F161434}

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T4720

Differential Revision: https://secure.phabricator.com/D9306
2014-06-02 16:58:48 -07:00
epriestley
8ea9935ea5 Deduplicate parents from PhabricatorGitGraphStream
Summary: Fixes T5226. It's rare (but possible) for a commit to have the same parent more than once in Git.

Test Plan: Ran `bin/repository parents` on a normal repository.

Reviewers: joshuaspence

Reviewed By: joshuaspence

Subscribers: epriestley

Maniphest Tasks: T5226

Differential Revision: https://secure.phabricator.com/D9344
2014-06-02 15:25:28 -07:00
Chad Little
b5bbe39ec6 [redesign] Remove most gradients, tweak hovercards
Summary: The removes our least used gradients and uses base colors. Tweaked Hovercards to use.

Test Plan: Test Hovercards and UIExamples Actions Headers

Reviewers: epriestley, btrahan

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9347
2014-06-02 15:12:38 -07:00
Chad Little
c9e2df6799 [redesign] Hoverselect colors
Summary: Builds a consistent 'selected, hover' state slightly darker than selected states.

Test Plan: Tested Conpherence, Sidenavs

Reviewers: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9345
2014-06-02 15:11:30 -07:00
epriestley
c8ee8d8ae9 Fix routes for MetaMTA
Summary: This no longer has a base URI since it's not accessible.
2014-05-30 11:33:11 -07:00
Chad Little
ec4dc50f4e [redesign] Add back power icon
Summary: Adds back the power icon

Test Plan: Logged out of local instance, saw icon appear. Click login icon. Logged in. Ate a toast sandwich.

Reviewers: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9336
2014-05-29 20:50:31 -07:00