Commit Graph

5717 Commits

Author SHA1 Message Date
Sajith Sasidharan
0db56f99cf Add some tests for DownloadStatusElement 2020-07-07 20:49:58 -04:00
Sajith Sasidharan
7757756a41 Use correct tag type 2020-07-07 20:45:30 -04:00
Sajith Sasidharan
0c4d24a2ac Avoid use of deferred within an Element
This causes the final HTML to be rendered funny, with a bunch of
"<Deferred current result=...>", which is clearly not what we want.
2020-07-07 20:24:56 -04:00
Sajith Sasidharan
7877d8a5cc Use an accessor 2020-07-07 19:55:14 -04:00
Itamar Turner-Trauring
3d0e4df5ce Lint fixes. 2020-07-07 11:30:01 -04:00
Itamar Turner-Trauring
e06d41442a Merge remote-tracking branch 'origin/master' into 3324-humanreadable-python-3 2020-07-07 11:03:33 -04:00
Sajith Sasidharan
a3bf4e0269 Remove an unused import 2020-07-06 20:18:22 -04:00
Sajith Sasidharan
e6eb387707 Remove status.RateAndTimeMixin
Both UploadResultsRenderer and DownloadResultsRenderer do not use
RateAndTimeMixin anymore: safe to remove it now.

Tests for methods formerly in RateAndTimeMixin have been moved to
test.web.test_util: specifically test_abbreviate_rate() and
test_abbreviate_time().
2020-07-06 17:11:30 -04:00
Sajith Sasidharan
4a47e8311f Merge 'origin/master' into 3288.status-download-nevow-to-twisted-web 2020-07-06 16:38:23 -04:00
Sajith Sasidharan
25f5e659fc
Merge pull request #721 from sajith/3287.status-upload-nevow-to-twisted-web
Replace nevow with twisted.web.template in status.UploadStatusPage

Fixes: ticket:3287
2020-07-06 16:20:40 -04:00
Sajith Sasidharan
61aef4caef
Merge pull request #690 from sajith/3247.storage-py-neovw-to-twt
Use twisted.web.template in web/storage.py

Fixes: ticket:3247
2020-07-06 16:18:34 -04:00
Itamar Turner-Trauring
f548593f37 Fix test_python3, and mark these two modules as being ported as well. 2020-07-06 14:18:18 -04:00
Itamar Turner-Trauring
b990334104 Add the builtins import to make Python 2 builtins match Python 3's. 2020-07-06 14:00:02 -04:00
Itamar Turner-Trauring
83b9bbf743 Switch definitely to _python3.py for listing modules, but also note if a module
has been ported in its docstring.
2020-07-03 13:28:36 -04:00
Itamar Turner-Trauring
140cb80ff7 Clarify comment. 2020-07-03 13:15:57 -04:00
Itamar Turner-Trauring
12691eb597 Only install module mappings once. 2020-07-02 14:31:33 -04:00
Itamar Turner-Trauring
ad7f44db99 Listed ported modules. 2020-07-02 14:27:43 -04:00
Itamar Turner-Trauring
70a029fb81 Tests pass on both Python 2 and Python 3. 2020-07-02 14:26:35 -04:00
Itamar Turner-Trauring
c207a0c932 Port test_humanreadable.py to Python 3. 2020-07-02 14:10:38 -04:00
Itamar Turner-Trauring
99b62775e9 Initial list of ported modules. 2020-07-02 13:42:30 -04:00
Itamar Turner-Trauring
b7f88b278f Split out tests for humanreadable into their own module, so we can port just
humanreadable.py in isolation.
2020-07-02 13:40:40 -04:00
meejah
ffd24b9c7f
Merge pull request #728 from meejah/ticket3317-verified-fakes
Ticket 3317: start of verified fakes
2020-06-30 19:40:39 +00:00
meejah
80359e02e6 assert -> Exception 2020-06-30 08:17:34 -06:00
meejah
a9f4210014 streap -> stream 2020-06-30 08:15:58 -06:00
Sajith Sasidharan
f9e864c51c Use simpler syntax to update map 2020-06-24 08:15:18 -04:00
Sajith Sasidharan
88d3fa7415 Remove now-unnecessary UploadResultsPage.render_UPLOAD 2020-06-23 21:54:23 -04:00
Sajith Sasidharan
dfbb8e7743 Make UploadResultsPage a Resource 2020-06-23 21:53:39 -04:00
Sajith Sasidharan
6ab7f26faf Make UploadStatusPage a Resource 2020-06-23 21:28:31 -04:00
Sajith Sasidharan
00e852c465 Make DownloadStatus an object
PythonTwoRegressions.test_new_style_classes would be unhappy without
this.
2020-06-23 20:54:49 -04:00
Sajith Sasidharan
36ecd8f384 Use render_GET()
Implementing `render_METHOD()` is preferred over overriding render()
2020-06-23 20:54:49 -04:00
Sajith Sasidharan
b14c0a0495 Make DownloadStatusPage a Resource
No need of this being a MultiFormatResource, because it renders just
HTML.
2020-06-23 20:54:49 -04:00
meejah
aedc58ef51 unused imports 2020-06-19 17:22:42 -06:00
meejah
f0ac5a2cef more-testtools-y asserts 2020-06-19 17:19:30 -06:00
meejah
57eb875354 testtool's asserts 2020-06-19 17:16:39 -06:00
meejah
ef71fc2bfc Get rid of ?replace= handling entirely and more-correctly support /uri variants 2020-06-19 17:15:01 -06:00
Sajith Sasidharan
982ad8942e Comment about nevow.url usage in web.operations.OphandleTable 2020-06-18 18:30:18 -04:00
Sajith Sasidharan
2d2e8a5872 Add comments to web.operations.OphandleTable 2020-06-18 18:29:39 -04:00
Sajith Sasidharan
bbee23b493 Rename a parameter for clarity
"context" is nevow terminology, whereas these are really requests.
2020-06-18 18:29:39 -04:00
Sajith Sasidharan
5ec78641db Make web.operations.OphandleTable a twisted web Resource 2020-06-18 18:29:27 -04:00
Sajith Sasidharan
6f8af688dd Rearrange imports 2020-06-18 18:01:18 -04:00
Sajith Sasidharan
7a23c8ed6c
Merge pull request #724 from sajith/3312.webui-directory-fix
Fix for "the webapi does not allow empty pathname components"

Fixes: ticket:3312
2020-06-17 10:55:21 -04:00
meejah
6a37f32eef use attr.s 2020-06-13 17:28:28 -06:00
meejah
939f60f620 embetter docstring 2020-06-13 17:22:17 -06:00
meejah
d221787541 better docstring 2020-06-13 02:03:19 -06:00
meejah
02a543515f replciate Tahoe's behavior for replace=true/false 2020-06-13 01:55:14 -06:00
meejah
0cbdbd9ebe symbols, not magic-numbers 2020-06-13 01:14:45 -06:00
meejah
b952ef066c match query args 2020-06-13 00:46:55 -06:00
meejah
24899dae8e assert -> ValueError 2020-06-13 00:41:22 -06:00
meejah
76040b53f5 assert -> raise 2020-06-13 00:39:57 -06:00
meejah
9f6fcde2f1 more docstring 2020-06-13 00:39:12 -06:00
meejah
a38188164f comment 2020-06-12 23:08:04 -06:00
meejah
c64e78634d docstring 2020-06-12 23:06:33 -06:00
meejah
23b17ca02e cleanup, docstrings 2020-06-12 23:05:32 -06:00
meejah
e79534abe8 housekeeping 2020-06-12 23:01:02 -06:00
meejah
fa597e1735 use real parser 2020-06-12 22:57:38 -06:00
meejah
949b09ce27 actually returns CREATED for new data 2020-06-12 22:08:36 -06:00
meejah
776ee5f91c use hypothesis -- which doesn't know about Deferred, so need testtools too 2020-06-12 22:04:12 -06:00
meejah
05ea0a2fe9 copyright, header 2020-06-12 22:04:03 -06:00
meejah
318dc5092d key -> kind 2020-06-11 19:57:21 -06:00
meejah
0e5422c24b handle more inputs in test body-producer 2020-06-11 19:57:11 -06:00
meejah
36d9bf5d09 new-style classes only 2020-06-11 15:34:47 -06:00
meejah
00e7d01a1a unused imports 2020-06-11 15:34:40 -06:00
meejah
86a90084bb simple test of testing/web 2020-06-11 14:14:42 -06:00
meejah
fc2203e421 simplify tahoe web fakes 2020-06-11 13:26:09 -06:00
meejah
3e973197ac synchronous-only up/download tahoe code to keep treq.testing happy 2020-06-03 11:32:22 -06:00
Sajith Sasidharan
4fa2e6ad97 Use twisted web directives in web.operations.ReloadMixin 2020-06-02 11:56:59 -04:00
meejah
1faa81c7c4 actual usable agent 2020-06-01 09:06:46 -06:00
Sajith Sasidharan
dd14da4a55 Decode name before null check
Make the diff against master a tad bit smaller.
2020-05-29 21:48:04 -04:00
Sajith Sasidharan
dce73f7c2f 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-05-29 21:44:10 -04:00
Sajith Sasidharan
31eba00d0f Reject trailing empty path piece in URIs 2020-05-29 21:38:43 -04:00
Sajith Sasidharan
0633623ecc Reject URIs that contain empty segments 2020-05-29 21:38:43 -04:00
Sajith Sasidharan
b6e00d09f9 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-05-29 09:22:15 -04:00
Sajith Sasidharan
cf4b3ba008 Correct arguments to super()
This was incidentally found when looking at some test failures:
super(type, object) is the right invocation, and not the other way
around.
2020-05-29 09:20:18 -04:00
meejah
d50ca9af55 proof-of-concept verified-fake for testing 2020-05-26 18:33:04 -06: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
03d529c22a Remove unused import 2020-05-22 21:33:30 -04:00
Sajith Sasidharan
9520ad71eb Rearrange imports 2020-05-22 21:24:21 -04:00
Sajith Sasidharan
f8562530be Make Element the superclass of UploadResultsRendererMixin 2020-05-22 21:11:42 -04:00
Sajith Sasidharan
b0e3325d03 Move time formatter tests
UploadResultsRendererMixin no longer has render_time(); moving tests
for render_time() as tests for abbreviate_time() to a more appropriate
place.
2020-05-22 20:49:34 -04:00
Sajith Sasidharan
91f8d939f8 Avoid use of RateAndTimeMixin in UploadResultsRendererMixin 2020-05-22 20:22:59 -04:00
Sajith Sasidharan
aecd90858a Render abbreviated rate and time values 2020-05-22 19:39:32 -04:00
Sajith Sasidharan
7be1883910 Document UploadResultsPage parameter 2020-05-22 19:39:32 -04:00
Sajith Sasidharan
5fdd61b146 Document UploadStatusPage 2020-05-22 19:39:32 -04:00
Sajith Sasidharan
54ac2d224a Remove unused imports 2020-05-22 19:39:32 -04:00
Sajith Sasidharan
7a82fd671f Handle "t=upload" in UploadResultsPage POST handling 2020-05-22 19:39:32 -04:00
Sajith Sasidharan
3bfa5a5c29 Use twisted web template in UploadResultsRendererMixin 2020-05-22 19:39:32 -04:00
Sajith Sasidharan
57b1203d17 Make UploadResultsPage a MultiFormatResource 2020-05-22 19:39:32 -04:00
Sajith Sasidharan
6470718691 Use twisted template tags in upload results page template 2020-05-22 19:39:32 -04:00
Sajith Sasidharan
41300097c8 Make UploadStatusPage a MultiFormatResource 2020-05-22 19:39:32 -04:00
Sajith Sasidharan
aac8dee8a0 Use twisted template tags in upload status page template 2020-05-22 19:39:32 -04:00
Sajith Sasidharan
aec6e5a9d4 Force a CircleCI build 2020-05-18 20:05:16 -04:00
Sajith Sasidharan
c23fedbcfe Add related ticket to comment about refactoring 2020-05-18 16:56:32 -04:00
Sajith Sasidharan
0b3db59742 Add related ticket to comment about unimplemented method 2020-05-18 16:56:32 -04:00
Sajith Sasidharan
993b1e225f Use transparent tags to render values 2020-05-18 11:01:14 -04:00
Sajith Sasidharan
c5342d8ae6 Add comments about events tables 2020-05-14 16:48:43 -04:00
Sajith Sasidharan
ab4811eaa0 Move tests for abbreviate time/rate methods to utils tests
RateAndTimeMixin.render_time() is really abbreviate_time(), and
RateAndTimeMixin.render_rate() is really abbreviate_rate().  This
change moves the tests to their rightful place, and exercises them
using the right names.

We're also trying to avoid use of mixins.  RateAndTimeMixin will
eventually go.
2020-05-14 16:09:54 -04:00
Sajith Sasidharan
88e8854ad4 Wrap renderer results in tags 2020-05-14 16:09:54 -04:00
Sajith Sasidharan
68df408229 Add a note about unimplemented DownloadStatus method 2020-05-14 16:09:54 -04:00
Sajith Sasidharan
1fa77d8983 Avoid use of DownloadResultsRendererMixin 2020-05-14 16:09:54 -04:00
Sajith Sasidharan
1f1f3b5f61 Remove unused render_timeline_link()
As it turns out, nothing is using this method.
2020-05-14 16:09:54 -04:00
Sajith Sasidharan
f3edc8a48c Add a note about rendering download events tables 2020-05-14 16:09:54 -04:00
Sajith Sasidharan
b02cfa5bbe Use more descriptive variable names 2020-05-14 16:09:54 -04:00
Sajith Sasidharan
7e02502268 Add comments to DownloadStatusPage 2020-05-14 16:09:54 -04:00
Sajith Sasidharan
e0241655e5 Update results renderer 2020-05-14 16:09:54 -04:00
Sajith Sasidharan
c5b2073bf0 Avoid use of RateAndTimeMixin methods in DownloadStatusElement 2020-05-14 16:09:54 -04:00
Sajith Sasidharan
c4b63ada55 Update events tables renderer 2020-05-14 16:09:29 -04:00
Sajith Sasidharan
c14c437152 Make DownloadStatusPage a MultiFormatResource 2020-05-14 10:21:19 -04:00
Sajith Sasidharan
8a632b6668 Use twisted tags in download status page template 2020-05-14 10:14:52 -04:00
Sajith Sasidharan
a203f9c8d8 Reformat download status page template 2020-05-14 10:14:52 -04:00
Sajith Sasidharan
538503c0f8
Merge pull request #717 from sajith/3289.status-publish-nevow-to-twisted-web
Replace nevow with twisted.web.template in status.PublishStatusPage

Fixes: ticket:3289
2020-05-14 10:09:57 -04:00
Sajith Sasidharan
78c214b7ff
Merge pull request #716 from sajith/3290.status-retrieve-nevow-to-twisted-web
Replace nevow with twisted.web.template in status.RetrieveStatusPage

Fixes: ticket:3290
2020-05-13 19:39:23 -04:00
Sajith Sasidharan
79a44eac33 Correct docstring to ":param <type> <name>" format 2020-05-13 19:29:41 -04:00
Sajith Sasidharan
9d5d338993 Correct docstring to ":param <type> <name>" format 2020-05-13 19:04:10 -04:00
Sajith Sasidharan
d87dfaf5a0
Merge pull request #714 from sajith/3291.status-mapupdate-nevow-to-twisted-web
Replace nevow with twisted.web.template in status.MapupdatePage

Fixes: ticket:3291
2020-05-13 18:22:16 -04:00
Sajith Sasidharan
ebe80221d5 Add missing "param:" to init method docstring 2020-05-13 17:45:08 -04:00
Sajith Sasidharan
2e0e210c14 Make PublishStatusPage comment a docstring 2020-05-13 17:43:55 -04:00
Sajith Sasidharan
5aa0dd4085 Rename a variable for readability
Noticed in code review: `l` can be confused with `1` for many
typefaces.
2020-05-13 17:12:08 -04:00
Sajith Sasidharan
812f03934a Add missing "param:" to docstring 2020-05-13 17:09:53 -04:00
Sajith Sasidharan
4af2e4b4df Drop an unbalanced quote 2020-05-13 17:08:26 -04:00
Sajith Sasidharan
62760c0997 Make RetrieveStatusPage comment a docstring 2020-05-13 17:07:09 -04:00
Sajith Sasidharan
8e17d203cf Add missing "param:" to docstring 2020-05-13 16:59:52 -04:00
Sajith Sasidharan
c18488872c Make comment on MapupdateStatusPage a docstring 2020-05-13 16:54:39 -04:00
meejah
466369dd69
Merge pull request #669 from meejah/make-pypy-work
Make pypy work
2020-05-13 12:44:23 -06:00
Sajith Sasidharan
3fad9a127c Remove web.common.RenderMixin
Fixes: ticket:3308
2020-05-12 07:40:22 -04:00
Sajith Sasidharan
0ae045ea16 Add comments to PublishStatusPage 2020-05-11 12:47:48 -04:00
Sajith Sasidharan
9e200fc014 Render publish problems only when there are problems 2020-05-11 11:43:04 -04:00
Sajith Sasidharan
0fba615afb Remove RateAndTimeMixin from PublishStatusPage 2020-05-11 11:43:04 -04:00
Sajith Sasidharan
fdf6449ba8 Use MultiFormatResource to implement PublishStatusPage 2020-05-11 11:43:04 -04:00
Sajith Sasidharan
89c4210090 Use twisted tags in publish status template page 2020-05-11 11:43:01 -04:00
Sajith Sasidharan
65cd0e8ecd Reformat publish status template page 2020-05-11 10:38:15 -04:00
Sajith Sasidharan
3aaa87d2ba Add notes to RetrieveStatusPage 2020-05-07 13:15:05 -04:00
Sajith Sasidharan
07f14a19f8 Drop RateAndTimeMixin from RetrieveStatusElement 2020-05-07 11:37:21 -04:00
Sajith Sasidharan
a544e8a55f Stringify tag parameters 2020-05-07 10:55:08 -04:00
Sajith Sasidharan
de41302743 Update RetrieveStatusPage to use twisted renderers 2020-05-07 09:34:42 -04:00
Sajith Sasidharan
5fa7c4c446 Update markup in retrieve status template page 2020-05-07 09:32:01 -04:00
Sajith Sasidharan
d2375e4fe2 Reformat retrieve status page template 2020-05-06 22:42:32 -04:00
meejah
2418e90bf0 CacheDirectoryManager is unused 2020-05-06 15:22:22 -06:00
meejah
1549e7eb18 simplify (for line in f.readlines() -> for line in f) 2020-05-06 15:16:34 -06:00
Sajith Sasidharan
13bbda1529 Render privkey only when there's a privkey 2020-05-06 13:21:26 -04:00
Sajith Sasidharan
008812d6c8 Render abbreviated time in map update results 2020-05-06 13:11:53 -04:00
Sajith Sasidharan
0c6889274d Render problems only when there's a problem list 2020-05-06 13:10:31 -04:00
Sajith Sasidharan
bbbca6c000 Drop a newline
Party for consistency, partly in order to trigger a CircleCI run.
2020-05-06 10:41:58 -04:00
Sajith Sasidharan
8a71567137 Avoid use of RateAndTimeMixin in MapupdateStatusPage 2020-05-06 09:29:57 -04:00
Sajith Sasidharan
86871363ea Add notes to MapupdateStatusPage 2020-05-06 09:06:56 -04:00
Sajith Sasidharan
1602c66250 Render map update status using twisted.web.template
Fixes: ticket:3291
2020-05-06 09:06:56 -04:00
meejah
6eade15b4e put WeakKeyDictionary use back 2020-05-05 14:49:16 -06:00
Sajith Sasidharan
3b0ace1710
Merge pull request #708 from sajith/3293.status-helper-nevow-to-twisted-web
Render helper status page using twisted.web.template

Fixes: ticket:3293
2020-05-05 16:00:24 -04:00
meejah
d4f29e7d6c restore old code, run the GC 2020-05-05 13:57:17 -06:00
meejah
b54dc1e5d5 whitespace (1 line per import) 2020-05-05 13:56:59 -06:00
Sajith Sasidharan
5e4f2d88f1
Merge pull request #710 from sajith/3305.root-from-nevow-to-twisted-web
Move root.Root from nevow to twisted.web.template

Fixes: ticket:3305
2020-05-05 15:56:21 -04:00
Sajith Sasidharan
ab298dab9c Make ErrorBoom a new style class
ErrorBoom won't pass PythonTwoRegressions.test_new_style_classes()
check otherwise.
2020-05-05 12:56:19 -04:00
Sajith Sasidharan
edd4cab42b Replace nevow with twisted.web in test.web.test_grid 2020-05-05 11:51:28 -04:00
Sajith Sasidharan
ccffd78ac4 Add a comma, for consistency's sake 2020-05-05 09:27:09 -04:00
Sajith Sasidharan
f5dacf9547 Drop a comma introduced by mistake 2020-05-05 09:27:09 -04:00
Sajith Sasidharan
96c8c5e953 Link to storage server the way it used to be 2020-05-05 07:43:39 -04:00
meejah
1e039d8364 certs big enough to make pypy happy 2020-05-04 21:59:15 -06:00
meejah
00373fc211 special-case pypy 2020-05-04 21:59:15 -06:00
meejah
13350d60c2 assertFailure instead of bespoke code 2020-05-04 21:59:15 -06:00
meejah
bddd2cc996 disable system tests on PyPy 2020-05-04 21:59:15 -06:00
meejah
29563b8f2d assert proper errors 2020-05-04 21:59:15 -06:00
meejah
f8117320cb tests which rely on memory-reclamation need gc.collect() on pypy 2020-05-04 21:59:15 -06:00
meejah
8965c77d63 look for correct error-string 2020-05-04 21:59:15 -06:00
meejah
4c3d0ea6cc use 'with open' for more file-opens 2020-05-04 21:59:15 -06:00
meejah
9bcc465f76 unused import 2020-05-04 21:59:15 -06:00
meejah
4928d62d66 use set instead of WeakKeyDictionary 2020-05-04 21:59:15 -06:00
meejah
5175a6c6a0 asserts for systemexit 2020-05-04 21:59:15 -06:00
meejah
5071ddf124 add more 'with' statements 2020-05-04 21:59:15 -06:00
meejah
a348d3d507 relying on memory/gc bad 2020-05-04 21:59:15 -06:00
meejah
ca5e1ebe52 look at correct mock-call object 2020-05-04 21:59:15 -06:00
meejah
4b0c730adf use 'with open' correctly 2020-05-04 21:59:15 -06:00
Sajith Sasidharan
7d063995f5 Update copyright years 2020-05-04 15:35:21 -04:00
Sajith Sasidharan
4ebd6250e3 Document root.Root 2020-05-04 14:20:05 -04:00
Sajith Sasidharan
96449bb99b Ensure lists before conversion to dict 2020-05-04 14:05:33 -04:00
Sajith Sasidharan
88b369a0c2 Remove unused variables 2020-05-04 11:48:52 -04:00
Sajith Sasidharan
bf0f8a736a Remove unused imports 2020-05-04 11:48:41 -04:00
Sajith Sasidharan
58a06cb57d Update test that exercises empty nick and version 2020-05-04 09:45:36 -04:00
Sajith Sasidharan
df9b160a3c Mark describe server method as static 2020-05-01 17:42:46 -04:00
Sajith Sasidharan
80a26e26b1 Refactor methods that describe server/connection 2020-05-01 17:41:51 -04:00
Sajith Sasidharan
7b4d81fe28 Rename root.Root variables 2020-05-01 17:38:24 -04:00
Sajith Sasidharan
ade7f613b8 Remove unused renderer 2020-05-01 17:07:08 -04:00
Sajith Sasidharan
df188c75df Wrap footer elements in tags 2020-05-01 16:50:30 -04:00
Sajith Sasidharan
029c99a241 Render introducers table using SlotsSequenceElement 2020-05-01 16:45:34 -04:00
Sajith Sasidharan
1ddf07d59d Render services table using SlotsSequenceElement 2020-05-01 16:45:04 -04:00
Sajith Sasidharan
0d8eda5e76 Rearrange imports 2020-05-01 16:07:30 -04:00
Sajith Sasidharan
053e614221 Import resource_filename from setuptools
Drop the nevow one
2020-05-01 16:07:21 -04:00
Sajith Sasidharan
e9796eb308 Match against root path first 2020-04-30 18:49:05 -04:00
Sajith Sasidharan
cfe4b2925e Remove an unused method and imports 2020-04-30 18:48:06 -04:00
Sajith Sasidharan
cce6f83054 Remove unused renderers 2020-04-30 18:47:13 -04:00
Sajith Sasidharan
88b7784f39 Use BeautifulSoup in test.test_system.SystemTest.test_filesystem 2020-04-30 15:09:10 -04:00
Sajith Sasidharan
6aebab28a9 Use BeautifulSoup to check rendered document 2020-04-30 10:17:48 -04:00
Sajith Sasidharan
80ba700247 Correct usage of fillSlots 2020-04-29 12:18:39 -04:00
Sajith Sasidharan
e5733b6c90 Remove unused test code 2020-04-28 19:09:00 -04:00
Sajith Sasidharan
98322effe6 Update test to exercise services renderer 2020-04-28 19:07:57 -04:00
Sajith Sasidharan
a885f14c43 Pass now_fn to RootElement 2020-04-28 11:47:18 -04:00
Sajith Sasidharan
8ce1512501 Render import path 2020-04-28 07:57:15 -04:00
Sajith Sasidharan
32e0c779b6 Add version renderer 2020-04-28 07:56:27 -04:00
Sajith Sasidharan
d064f6b2b7 Add "rendered at" renderer 2020-04-28 07:55:10 -04:00
Sajith Sasidharan
ed6970b168 Correct fill slots usage in connection status 2020-04-28 07:52:57 -04:00
Sajith Sasidharan
5d84a25f21 Add introducers row renderer 2020-04-28 07:50:03 -04:00
Sajith Sasidharan
5155befedc Rewrite total introducers 2020-04-28 07:48:28 -04:00
Sajith Sasidharan
44f16e77cf Add introducers renderer 2020-04-28 07:47:36 -04:00
Sajith Sasidharan
7ba4b945a4 Use introducers renderer method in root template 2020-04-28 07:43:41 -04:00
Sajith Sasidharan
8d4949f96b Render total introducers correctly 2020-04-28 07:42:57 -04:00
Sajith Sasidharan
a646c7decd Fix typo 2020-04-28 07:42:07 -04:00
Sajith Sasidharan
89980a039c Render total introducers 2020-04-28 07:41:29 -04:00
Sajith Sasidharan
2f53b2a67d Add connected introducers renderer 2020-04-28 07:17:22 -04:00
Sajith Sasidharan
164218cf57 Update service table renderer 2020-04-28 07:14:35 -04:00
Sajith Sasidharan
907e8ccf6b Use services renderer method in root template 2020-04-28 07:13:41 -04:00
Sajith Sasidharan
75d41843d7 Use transparent nodes 2020-04-28 04:59:46 -04:00
Sajith Sasidharan
3c4056a947 Replace nevow.static.File with twisted.web.static.File 2020-04-28 04:47:48 -04:00
Sajith Sasidharan
dcea7ea476 Render connected/known storage server status 2020-04-27 17:22:27 -04:00
Sajith Sasidharan
1713076a9d Render services 2020-04-27 17:19:19 -04:00
Sajith Sasidharan
39d616a971 Render helper furl prefix 2020-04-27 17:11:36 -04:00
Sajith Sasidharan
8b4c7296d7 Move helper state to a separate function 2020-04-27 17:07:09 -04:00
Sajith Sasidharan
332bd75fcc Render helper description 2020-04-27 17:03:52 -04:00
Sajith Sasidharan
622d156278 Render "connected to helpers" status 2020-04-27 17:01:37 -04:00
Sajith Sasidharan
a4f86181f9 Render introducer description 2020-04-27 16:55:10 -04:00
Sajith Sasidharan
c86d4341c8 Render "connected to introducers" status 2020-04-27 16:52:54 -04:00
Sajith Sasidharan
65b6daf990 Rewrite incident button using twisted tags 2020-04-27 16:44:06 -04:00
Sajith Sasidharan
110528f569 Handle path "/" when rendering root path 2020-04-27 16:44:06 -04:00
Sajith Sasidharan
f34cdb81ad Create RootElement 2020-04-27 16:44:06 -04:00
Sajith Sasidharan
1c17bb0674 Rewrite welcome page for twisted.web.template 2020-04-27 16:24:50 -04:00
Sajith Sasidharan
e2c6d288bf
Merge pull request #699 from sajith/3294.incident-reporter-to-nevow
Remove nevow from allmydata.web.root.IncidentReporter
2020-04-27 10:12:27 -04:00
Sajith Sasidharan
f02501eadf Update comment on HelperStatus 2020-04-24 10:08:45 -04:00
meejah
c385e958a8 Merge branch 'master' into ticket3252-port-web-directory.remaining.1 2020-04-23 12:24:00 -06:00
Sajith Sasidharan
18d5d3fc49 Wrap rendered nodes in tags 2020-04-22 18:23:43 -04:00
Sajith Sasidharan
65315c4ed0 Render a message when helper isn't running 2020-04-22 17:16:33 -04:00
Sajith Sasidharan
6661b52c33 Reformat helper.xhtml 2020-04-22 17:06:59 -04:00
Sajith Sasidharan
aafe89805d Document helper stats data format 2020-04-22 17:06:39 -04:00
Sajith Sasidharan
4bc7535d02 Derive HelperStatus from MultiFormatResource 2020-04-22 16:54:11 -04:00
Sajith Sasidharan
d844a8f89f Use twisted transparent tag to render data
This way the test suite will be happy, and we won't have extraneous
`<div>` tags in the rendered page.
2020-04-21 11:53:48 -04:00
Sajith Sasidharan
a0eb00b2cc Wrap renderer return values in tags 2020-04-21 11:53:48 -04:00
Sajith Sasidharan
1e3ba25cc3 Add some documentation to Statistics page 2020-04-21 11:53:48 -04:00
Sajith Sasidharan
652b3f5bc0 Use twisted.web.template to render Statistics page 2020-04-21 11:53:48 -04:00
Sajith Sasidharan
b3feaae644 Use an inner JSONRequest class with renderJSON
Once nevow is removed from web/common.py, we can simplify
renderJSON(), like so:

  def renderJSON():
      req = Request()
      req.args = {"t": ["json"]}
      req.fields = {}
      return resource.render(req)

But for now we have to live with an inner class that implements the
nevow.inevow.IRequest interface.
2020-04-21 10:29:28 -04:00
Sajith Sasidharan
201c08dbe5 Declare JSON request interface using @implementer
"zope.interface.implements(IRequest)" is deprectated in favor of
"@zope.interface.implementer(IRequest)" decorator.
2020-04-20 16:54:51 -04:00
meejah
8df1ed1ba6 link to tickets 2020-04-18 02:49:14 -06:00
meejah
f8a78c996a URL -> DecodedURL 2020-04-18 02:27:32 -06:00
meejah
73d0151e1b typo 2020-04-18 01:52:31 -06:00
meejah
349aefeacc fail() takes a message, not Exception 2020-04-18 01:52:18 -06:00
meejah
018e161f19 don't allow trailing slashes
This makes /uri/xxx URIs invalid if they have a trailing slash.
It seems that the former Nevow implementation would allow this, and
some tests (and, notable, "tahoe backup") did rely on using URIs
of this style.
2020-04-18 01:52:18 -06:00
meejah
882c63dab9 methods shouldn't be named like classes 2020-04-18 01:52:18 -06:00
meejah
0acf0d2a7e no addslash here 2020-04-18 01:52:18 -06:00
meejah
bc2f5f8e88 functions shouldn't be named like classes 2020-04-18 01:52:18 -06:00
meejah
8f35f78194 temporary fix for hypothesis test 2020-04-18 01:52:18 -06:00
meejah
c246b3e049 self.assertEqual not assert 2020-04-18 01:52:18 -06:00