Commit Graph

1037 Commits

Author SHA1 Message Date
Jean-Paul Calderone
0339ba97b9 Turn getChild None and Deferred results into something Twisted Web can manage 2020-10-16 09:52:41 -04:00
Jean-Paul Calderone
fa02e46033 maybeDeferred always returns a Deferred 2020-10-16 09:52:33 -04:00
Jean-Paul Calderone
d38ae4d6dd Stop reading server module attributes all the time
It jumps through a ton of deprecation machinery that is at least tedious in
the debugger, if not wasteful at runtime.
2020-10-16 09:52:18 -04:00
Jean-Paul Calderone
df949868b6 Stop explicitly finishing and then returning a string 2020-10-16 09:51:50 -04:00
Jean-Paul Calderone
69c7c40510 handle Deferred from render 2020-10-16 09:51:42 -04:00
Itamar Turner-Trauring
c0f486a9f6 Work on Python 3. 2020-10-13 09:51:25 -04:00
Itamar Turner-Trauring
50925fcec1 Get rid of more no-longer-needed moves. 2020-10-13 09:49:39 -04:00
Itamar Turner-Trauring
3ea18ca3fc As better alternative to common_py3, make common.py import on Python 3. 2020-10-13 09:45:03 -04:00
Itamar Turner-Trauring
c680b1d971 Lint fixes. 2020-10-05 11:38:53 -04:00
Itamar Turner-Trauring
96231fab5f Support bytes in JSON output. 2020-10-05 11:01:11 -04:00
Itamar Turner-Trauring
963f9ba94b Closer to passing tests. 2020-10-02 11:01:24 -04:00
Itamar Turner-Trauring
f8f8329d70 More passing tests on Python 3. 2020-10-02 10:48:54 -04:00
Itamar Turner-Trauring
18e1c290a7 Reorganize code so allmydata.web.check_results can import without Nevow being installed. 2020-10-02 10:28:55 -04:00
Sajith Sasidharan
769f87c24d Remove unused import 2020-09-28 20:39:13 -04:00
Jean-Paul Calderone
76ecae2e44 Merge remote-tracking branch 'origin/master' into 3382.remove-multi-format-page 2020-09-28 15:09:29 -04:00
Sajith Sasidharan
65f206e39b
Merge pull request #816 from sajith/3427.return-error-page-from-unlinked
Return ErrorPage from unlinked

Fixes ticket:3427
2020-09-25 13:30:02 -04:00
Sajith Sasidharan
569ac924ec
Merge pull request #825 from sajith/3436.remove-web-common-getxmlfile
Remove unused web.common.getxmlfile()

Fixes ticket:3436
2020-09-25 12:54:51 -04:00
Jean-Paul Calderone
dc15f19ee0 Merge remote-tracking branch 'origin/master' into 3382.remove-multi-format-page 2020-09-25 09:37:02 -04:00
Sajith Sasidharan
c2e9d6057f
Merge pull request #819 from sajith/3425.return-errorpage-from-root
Return ErrorPage from web.root

Fixes ticket:3425
2020-09-23 10:18:44 -04:00
Sajith Sasidharan
e6a5dda7e1 Rearrange imports 2020-09-22 21:14:00 -04:00
Sajith Sasidharan
22a1721b62 Remove unused web.common.getxmlfile() 2020-09-22 21:05:17 -04:00
Sajith Sasidharan
9aee312d8c
Merge pull request #822 from sajith/3429.return-errorpage-from-check-results
Return ErrorPage from web.check_results

Fixes ticket:3429
2020-09-22 20:40:00 -04:00
Sajith Sasidharan
4e4c5f9b7f
Merge pull request #820 from sajith/3424.return-errorpage-from-operations
Return ErrorPage from web.operations

Fixes ticket:3424
2020-09-22 20:38:34 -04:00
Sajith Sasidharan
da78bc05d0
Merge pull request #818 from sajith/3423.return-errorpage-from-filenode
Return ErrorPage from filenode

Fixes ticket:3423
2020-09-22 20:37:55 -04:00
Sajith Sasidharan
0f118bdd67 Return error page from unlinked 2020-09-22 12:23:40 -04:00
Sajith Sasidharan
18e56e41fc Return error page when an exception is raised from web.check_results 2020-09-21 18:18:29 -04:00
Sajith Sasidharan
20101f8146 Return ErrorPage when an exception is raised in web.status 2020-09-21 16:51:27 -04:00
Sajith Sasidharan
c16cf00c6b Return an error page when an exception is raised from web.root 2020-09-21 16:37:36 -04:00
Sajith Sasidharan
e8f7643a8f Return ErrorPage when web.operations raises an exception 2020-09-21 16:26:51 -04:00
Sajith Sasidharan
199fbfcc1c Return error pages when an exception is raised in filenode 2020-09-21 13:24:01 -04:00
Sajith Sasidharan
c674198074 Rearrage imports 2020-09-21 13:03:51 -04:00
Jean-Paul Calderone
b200d20430 minor cleanups/rearranging 2020-09-18 15:01:53 -04:00
Jean-Paul Calderone
97872118a5 derived function below 2020-09-18 14:50:45 -04:00
Jean-Paul Calderone
e648965fb6 Add helpers to implement the desired exception behavior and use them 2020-09-18 14:49:19 -04:00
Jean-Paul Calderone
059bb2250b Add a BadRequest resource to help with BAD REQUEST 2020-09-18 14:10:09 -04:00
Sajith Sasidharan
ebd20b7f22 Merge 'origin/master' into 3382.remove-multi-format-page 2020-09-10 10:09:38 -04:00
Jean-Paul Calderone
d104303c4f Return ErrorPage instead of raising WebError 2020-09-10 08:56:44 -04:00
Sajith Sasidharan
e17e9fa7a9
Merge pull request #791 from sajith/3393.remove-nevow-106-workaround
Remove allmydata.web._nevow_106

Fixes: ticket:3393
2020-09-07 21:49:00 -04:00
Sajith Sasidharan
5e3eb1fbe5 Remove web.common.MultiFormatPage, again
Merged master, which had MultiFormatPage.  Accepted upstream changes,
and removed MultiFormatPage again, rather than manually fixing all the
merge conflicts.
2020-08-26 21:20:54 -04:00
Itamar Turner-Trauring
23671b02a4 Merge remote-tracking branch 'origin/master' into 3387.expirer-python-3 2020-08-25 13:57:32 -04:00
Sajith Sasidharan
f51c127d6d
Merge pull request #780 from sajith/3381.directory-deep-size-results-to-twisted-web
Port web.directory.DeepSizeResults to twisted web

Fixes: ticket:3381
2020-08-25 13:52:15 -04:00
Itamar Turner-Trauring
625e2611c1 Address some review comments. 2020-08-24 11:59:52 -04:00
Sajith Sasidharan
57fdead1c3 Remove allmydata.web._nevow_106 2020-08-22 17:21:24 -04:00
Itamar Turner-Trauring
71cac5dd44 Merge remote-tracking branch 'origin/master' into 3387.expirer-python-3 2020-08-20 14:56:35 -04:00
Itamar Turner-Trauring
9d34ab587a test_storage_web now runnable on Python 3 (even if it doesn't pass). 2020-08-20 14:17:06 -04:00
Sajith Sasidharan
c66d38e191 Make web.directory.DeepSizeResults a MultiFormatResource 2020-08-18 08:37:59 -04:00
Itamar Turner-Trauring
2cc2cb6a7f Rename to_str() to the more accurate to_bytes(). 2020-08-14 13:49:48 -04:00
Sajith Sasidharan
f4cfc0c613 Assign a ticket to unimplemented functionality 2020-08-07 07:19:28 -04:00
Sajith Sasidharan
c52bc6a781 Document "deep check and repair" renderer element 2020-08-07 07:19:28 -04:00
Sajith Sasidharan
36352ee182 Reuse "servers with corrupt shares" from base class 2020-08-07 07:19:28 -04:00
Sajith Sasidharan
c0109b70b6 Remove methods common to base class 2020-08-06 22:43:09 -04:00
Sajith Sasidharan
76777cd4e1 Inherit "deep check and repair" page from "deep check" page 2020-08-06 22:43:09 -04:00
Sajith Sasidharan
3e11779976 Do some error checking 2020-08-06 22:43:04 -04:00
Sajith Sasidharan
fb5f9f0c89 Merge 'origin/master' into 3316.check-results-nevow-to-twisted-web 2020-07-28 07:54:21 -04:00
Sajith Sasidharan
e145c7b00d
Merge pull request #722 from sajith/3254.status-status-nevow-to-twisted-web
Replace nevow with twisted.web.template in status.Status

Fixes: ticket:3254
2020-07-20 11:28:18 -04:00
Sajith Sasidharan
26ca9ae724
Merge pull request #726 from sajith/3313.operations-ophandle-table-nevow-to-twisted
Replace nevow with twisted.web in operations.OphandleTable

Fixes: ticket:3313
2020-07-19 08:14:32 -04:00
Sajith Sasidharan
c58cf56e83 Remove unused imports 2020-07-18 08:34:25 -04:00
Sajith Sasidharan
0f835e94f5 Merge 'origin/master' into 3254.status-status-nevow-to-twisted-web 2020-07-18 07:53:36 -04:00
Sajith Sasidharan
5c886b1b2d Format link to status page child node correctly
Some Nevow-ism accidentally escaped earlier: link to `/status/up-0`
and so on were actually rendered as `/up-0` and so on.
2020-07-17 13:21:53 -04:00
Sajith Sasidharan
2d19c383ca Rename a variable for clarity 2020-07-17 13:21:53 -04:00
Sajith Sasidharan
372cc00a25 Reject non-existent child nodes of /status
Requests on both `/status` and `/status/` will be served with the same
status page, but `/status//`, `/status///` and so on will be processed
further down, resulting in a 40x response.
2020-07-17 09:46:21 -04:00
Sajith Sasidharan
a13ec344b9 Correct usage of SlotsSequenceElement 2020-07-15 17:10:41 -04:00
Sajith Sasidharan
6969366370 Document, use, and test "join pathstring" method 2020-07-15 16:40:05 -04:00
Sajith Sasidharan
589e143a4a Add an empty renderer 2020-07-15 16:24:11 -04:00
Sajith Sasidharan
e6eb866cef Add missing "header" renderer
It does not do much here, but it is good to be consistent
2020-07-15 16:21:46 -04:00
Sajith Sasidharan
b5a465cc8d Format "all objects" table correctly 2020-07-15 16:20:36 -04:00
Sajith Sasidharan
07c24dbe59 Add a missing super() call 2020-07-15 16:14:10 -04:00
Sajith Sasidharan
69afd292c2 Use a different format for path
Seems that _join_pathstring() is the wrong thing to use here.
2020-07-15 13:43:50 -04:00
Sajith Sasidharan
f547509332 Use table headers correctly 2020-07-15 13:24:32 -04:00
Sajith Sasidharan
ddfe20c8ab Use SlotsSequenceElement correctly 2020-07-15 13:24:20 -04:00
Sajith Sasidharan
99ce9ff198 Correct argument to SlotsSequenceElement 2020-07-14 21:42:28 -04:00
Sajith Sasidharan
ef26d66e79 Use correct twisted web template directives 2020-07-14 20:50:12 -04:00
Sajith Sasidharan
b4b820ed7b Use a helper method to get monitor counter 2020-07-14 20:47:23 -04:00
Sajith Sasidharan
b49a3eaf3a Check for a non-standard property on request 2020-07-10 21:46:23 -04:00
Sajith Sasidharan
69ae9e6d32 Merge 'origin/master' into 3316.check-results-nevow-to-twisted-web 2020-07-10 16:33:06 -04:00
Sajith Sasidharan
427f99621f Do more null checks 2020-07-10 06:56:29 -04:00
Sajith Sasidharan
8331e7d8ec Remove now-unnecessary UploadResultsPage.render_UPLOAD 2020-07-09 16:05:31 -04:00
Sajith Sasidharan
44ecfdad09 Make UploadResultsPage a Resource 2020-07-09 16:05:31 -04:00
Sajith Sasidharan
62e803db25 Make UploadStatusPage a Resource 2020-07-09 16:05:31 -04:00
Sajith Sasidharan
38fe7dd3f5 Remove unused import 2020-07-09 16:05:31 -04:00
Sajith Sasidharan
f30dcc7ec6 Make Element the superclass of UploadResultsRendererMixin 2020-07-09 16:05:31 -04:00
Sajith Sasidharan
9c14eec1e0 Avoid use of RateAndTimeMixin in UploadResultsRendererMixin 2020-07-09 16:05:31 -04:00
Sajith Sasidharan
118ea4267c Render abbreviated rate and time values 2020-07-09 16:05:31 -04:00
Sajith Sasidharan
c0d83def22 Document UploadResultsPage parameter 2020-07-09 16:05:31 -04:00
Sajith Sasidharan
0af8df7203 Document UploadStatusPage 2020-07-09 16:05:31 -04:00
Sajith Sasidharan
855668b188 Remove unused imports 2020-07-09 16:05:31 -04:00
Sajith Sasidharan
a0655c18d6 Handle "t=upload" in UploadResultsPage POST handling 2020-07-09 16:05:31 -04:00
Sajith Sasidharan
6b4d27bec1 Use twisted web template in UploadResultsRendererMixin 2020-07-09 16:05:31 -04:00
Sajith Sasidharan
2ab7b15f8b Make UploadResultsPage a MultiFormatResource 2020-07-09 16:05:31 -04:00
Sajith Sasidharan
71fd4f5d10 Use twisted template tags in upload results page template 2020-07-09 16:05:31 -04:00
Sajith Sasidharan
e6f0f9d038 Make UploadStatusPage a MultiFormatResource 2020-07-09 16:05:31 -04:00
Sajith Sasidharan
d24babe873 Use twisted template tags in upload status page template 2020-07-09 16:05:30 -04:00
Sajith Sasidharan
6379601722 Wrap renderer results in tags 2020-07-09 16:05:30 -04:00
Sajith Sasidharan
de5d04ab79 Remove an extraneous directive
`t:data` is not really a Twisted template directive.  Added my
mistake, removing now.
2020-07-09 16:05:30 -04:00
Sajith Sasidharan
a056f18ca9 Remove StorageStatus.renderHTTP
This was added to please the test suite. Pleased to remove it!
2020-07-09 16:05:30 -04:00
Sajith Sasidharan
7126d3247c Prefix member variable with "_" 2020-07-09 16:05:30 -04:00
Sajith Sasidharan
0d9ec2b206 Use slots to render storage stats table 2020-07-09 16:05:30 -04:00
Sajith Sasidharan
9dd9d98b8c Give the suite the precise string it wants 2020-07-09 16:05:30 -04:00
Sajith Sasidharan
56e2fa3f24 Use <t:transparent> to render node nickname and id
CI did not like the old way, but it passed in my system.  Odd.
2020-07-09 16:05:30 -04:00
Sajith Sasidharan
0bd386384e Mark format_recovered as static method 2020-07-09 16:05:30 -04:00