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
Sajith Sasidharan
bc8a86e106
Use Unicode strings to render space
2020-07-09 16:05:30 -04:00
Sajith Sasidharan
0b4c235fbd
Remove redundant None
-checks on self.storage
...
When no storage is up, `storage_running()` renderer will return a big
honking `no storage server running` message, and no further renderers
will be invoked. Therefore the extra defense is probably not
required.
(I tested this hypothesis. The extra defense is not required, unless
there's something I have not seen.)
2020-07-09 16:05:30 -04:00
Sajith Sasidharan
ee8e730727
Move renderSynchronously
to test suite
2020-07-09 16:05:30 -04:00
Sajith Sasidharan
92f6e4bfe5
Use explicit None
-check on self.storage
2020-07-09 16:05:30 -04:00
Sajith Sasidharan
affe10b3e9
Return result from renderHTTP
...
Bogus renderHTTP, but test failures are now down to three. We just
need to handle requests for JSON now.
2020-07-09 16:05:30 -04:00
Sajith Sasidharan
6b5e530cb3
Add a docstring
2020-07-09 16:05:30 -04:00
Sajith Sasidharan
abb8834be1
Rename function for clarity
2020-07-09 16:05:30 -04:00
Sajith Sasidharan
e67fa7cd95
Add docstrings to StorageStatusElement
2020-07-09 16:05:30 -04:00
Sajith Sasidharan
62a997ce20
Use parentheses in import statement
2020-07-09 16:05:30 -04:00
Sajith Sasidharan
1be736e4d1
Fix test_storage.WebStatus.test_no_server failure
2020-07-09 16:05:30 -04:00
Sajith Sasidharan
8dd4029428
Use <t:transparent /> within table cells
2020-07-09 16:05:30 -04:00
Sajith Sasidharan
6ccb9d29cb
Use render_space methods to render space
2020-07-09 16:05:30 -04:00
Sajith Sasidharan
dbc6b2afa0
Drop unused ctx
argument from render_space methods
2020-07-09 16:05:30 -04:00
Sajith Sasidharan
d5af7c0d2e
Refactor so that test_util pass
2020-07-09 16:05:30 -04:00
Sajith Sasidharan
923219e54a
Use right syntax for twisted.web.template tags
2020-07-09 16:05:29 -04:00
Sajith Sasidharan
42c3e276a3
Check storage server status before using it
2020-07-09 16:05:29 -04:00
Sajith Sasidharan
d1f17e1019
Second version of renderSynchronously
2020-07-09 16:05:29 -04:00
Sajith Sasidharan
805b880c2e
Add missing flattenString
import
2020-07-09 16:05:29 -04:00
Sajith Sasidharan
75488c4aff
Add StorageStatus::renderSynchronously
...
Related to ticket:3247
test_storage.py wants a `StorageStatus::renderSynchronously()` method
and a `StorageStatus::renderHTTP()` method. Let us begin with the
goofy first-cut.
Both these methods are not only wrong, but they will also not please
the test suite. However error messages produced in CI can be shared,
and that way I can hopefully get unstuck.
2020-07-09 16:05:29 -04:00
Sajith Sasidharan
aad3557d2b
Use twisted.web.template in web/storage.py
...
Related to ticket:3247. Nevow usage has been removed, and generated
page looks the same as its former self, but tests are failing because
test_storage.py assumes that we're using nevow.
2020-07-09 16:05:29 -04:00
Sajith Sasidharan
b956d9a58c
Decode name before null check
...
Make the diff against master a tad bit smaller.
2020-07-09 16:05:29 -04:00
Sajith Sasidharan
fccc331671
Make "Refresh" link work
...
This seems to be a subtle difference from nevow: with `href="."`,
rendered link target will be `/uri/`, so clicking "Refresh" will
result in an error message like so: "GET /uri requires uri=".
With `href=""`, the rendered link target will be `/uri/URI:...`, which
is what we need.
2020-07-09 16:05:29 -04:00
Sajith Sasidharan
378b20c51a
Reject trailing empty path piece in URIs
2020-07-09 16:05:29 -04:00
Sajith Sasidharan
d3d0d02855
Reject URIs that contain empty segments
2020-07-09 16:05:29 -04:00
Sajith Sasidharan
5892eae580
Render self in DirectoryNodeHandler.getChild()
...
We need self.render_POST() etc. to be invoked when we have a request
such as "POST /uri/URI:DIR:..."; throwing an error here is probably
not the right thing to do.
2020-07-09 16:05:29 -04:00
Sajith Sasidharan
4dd6c86950
Use twisted web directives in web.operations.ReloadMixin
2020-07-09 16:05:28 -04:00
Sajith Sasidharan
54248f334e
Use WebError, not RuntimeError, to indicate error
...
Several problems with using RuntimeError to signal error here:
- It dumps a rather unhelpful webpage at the user.
- The exception backtrace on Tahoe console is not quite necessary here.
- It really is not a runtime error: it is just an expected failure.
- But mainly, testing for RuntimeError is harder.
2020-07-09 14:35:14 -04:00
Sajith Sasidharan
f9e864c51c
Use simpler syntax to update map
2020-06-24 08:15:18 -04:00
Sajith Sasidharan
d3f43d31d9
Remove unused import
2020-05-23 06:17:06 -04:00
Sajith Sasidharan
93d015e468
Document status.Status
2020-05-22 22:24:09 -04:00
Sajith Sasidharan
a6e32135e8
Update status page child route handler and table renderers
...
Drop nevow-isms and use twisted.web's way of doing things.
2020-05-22 22:15:45 -04:00
Sajith Sasidharan
3357f4c5ce
Make Status a MultiFormatResource
2020-05-22 22:12:22 -04:00
Sajith Sasidharan
81dc63b511
Use twisted template tags in status page template
2020-05-22 22:12:22 -04:00
Sajith Sasidharan
9520ad71eb
Rearrange imports
2020-05-22 21:24:21 -04:00