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
meejah
f8a78c996a
URL -> DecodedURL
2020-04-18 02:27:32 -06:00
meejah
73d0151e1b
typo
2020-04-18 01:52:31 -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
6ea6abdb1f
no .format yet
2020-04-18 01:52:18 -06:00
meejah
fc4aec7b77
remove comment
2020-04-18 01:52:18 -06:00
meejah
2e9463bd08
compute 'is this a terminal request' differently
2020-04-18 01:52:18 -06:00
meejah
b0c138f7c0
remove empty segments instead of making multiple URI's valid
2020-04-18 01:52:18 -06:00
meejah
8c47b8e2a1
don't need object
2020-04-18 01:52:18 -06:00
meejah
088fcff442
better formatting
2020-04-18 01:52:18 -06:00
meejah
c6f4f0b7d5
betterize comment
2020-04-18 01:52:18 -06:00
meejah
8db16ff8e3
old-style class
2020-04-18 01:52:18 -06:00
meejah
b64f90bcd4
simplify
2020-04-18 01:52:18 -06:00
meejah
95e5029c34
more comment
2020-04-18 01:52:18 -06:00
meejah
d425baed89
remove irrelevant comment
2020-04-18 01:52:18 -06:00
meejah
3c332fec2a
empty-string, not None
2020-04-18 01:52:18 -06:00
meejah
733b7932ce
clarify further; remove unused user of RenderMixin
2020-04-18 01:52:18 -06:00
meejah
ace99a1724
add clarifying comment
2020-04-18 01:52:18 -06:00
meejah
f9e3fdfaee
use % instead of format
2020-04-18 01:52:18 -06:00
meejah
355c78f0d4
irrelevant comment
2020-04-18 01:52:18 -06:00
meejah
98d8c52916
comment
2020-04-18 01:52:18 -06:00
meejah
db7939f766
irrelevant comment
2020-04-18 01:52:18 -06:00
meejah
b81589ca22
irrelevant comment
2020-04-18 01:52:18 -06:00
meejah
965fadb0df
irrelevant comment
2020-04-18 01:52:18 -06:00
meejah
956d67b9b8
irrelevant comment
2020-04-18 01:52:17 -06:00
meejah
65ec212779
unused imports
2020-04-18 01:52:17 -06:00
meejah
757bcc5309
cleanup
2020-04-18 01:52:17 -06:00
meejah
203066e8fd
better error-code
2020-04-18 01:52:17 -06:00
meejah
9732955eba
spelling
2020-04-18 01:52:17 -06:00
meejah
74ce166463
use twisted-web APIs, not nevow
2020-04-18 01:52:17 -06:00
meejah
6415873f0b
undo change
2020-04-18 01:52:17 -06:00
meejah
bc04c9b3db
detech empty pathname components, hopefully the same way as Nevow
2020-04-18 01:52:17 -06:00
meejah
83a70bb6f3
some fixes
2020-04-18 01:52:17 -06:00
meejah
8268f764aa
quote output, render GET
2020-04-18 01:52:17 -06:00
meejah
45bfe743d4
improve comment wording
2020-04-18 01:52:17 -06:00
meejah
c4f49bb377
children must be None on error
2020-04-18 01:52:17 -06:00
meejah
98005bab1f
addSlash isn't a thing in twisted.web
2020-04-18 01:52:17 -06:00
meejah
a29f1bec9d
doubly-quoted
2020-04-18 01:52:17 -06:00
meejah
effaa6500c
filename goes in the dict
2020-04-18 01:52:17 -06:00
meejah
19baba226a
Resource needs to be new-style
2020-04-18 01:52:17 -06:00
meejah
dc4669b5e7
fix name decoding
2020-04-18 01:52:17 -06:00
meejah
66f392f7d0
remove debug
2020-04-18 01:52:17 -06:00
meejah
410f0133ab
correctly register top-level directory node page
2020-04-18 01:52:17 -06:00
meejah
921926239a
Revert "fix getchild for directory"
...
This reverts commit 8f00f4d4ab2e7edd0ad60a6144e858ece4a4be1f.
2020-04-18 01:52:17 -06:00
meejah
b4d9bfea15
fix deep-stats results
2020-04-18 01:52:17 -06:00
meejah
7a36bdc523
delete 'move to different dir' because it also doesn't work on trunk
2020-04-18 01:52:17 -06:00
meejah
e2304326fd
fix rename-form
2020-04-18 01:52:17 -06:00
meejah
d12078abe2
fix form
2020-04-18 01:52:17 -06:00
meejah
8b7e1c30ab
remove debug
2020-04-18 01:52:17 -06:00
meejah
d381d3e92b
better style
2020-04-18 01:52:17 -06:00
meejah
f4c8eb5e2f
not required
2020-04-18 01:52:17 -06:00
meejah
71c97369f0
fix getchild for directory
2020-04-18 01:52:17 -06:00
meejah
8f32936c7a
/file works
2020-04-18 01:52:17 -06:00
meejah
c2ff7e260b
more ctx -> req
2020-04-18 01:52:17 -06:00
meejah
79c3f919ba
cleanup
2020-04-18 01:52:17 -06:00
meejah
b51f144f87
another thing works
2020-04-18 01:52:17 -06:00
meejah
66c0c71a0d
a thing works
2020-04-18 01:52:17 -06:00
meejah
ace73a9215
whitespace
2020-04-18 01:52:17 -06:00
meejah
9e0e25cbed
WIP FIXME porting directory, need child_ refactor thing
2020-04-18 01:52:17 -06:00
meejah
fd4d2709a5
search-replace "n:" -> "t:"
2020-04-18 01:52:17 -06:00
Sajith Sasidharan
15131a9f71
Handle just POST requests in IncidentReporter
2020-04-17 15:44:39 -04:00
Sajith Sasidharan
a14cee5cce
Remove nevow from allmydata.web.root.IncidentReporter
...
This change calls for an explanation:
- `RenderMixin` doesn't seem to be adding anything here, so it is
gone.
- The web browser was unhappy without a charset in the response
(Firefox 74 was anyway), so `content-type` header also gets a
`charset=UTF-8`.
- Returning a Unicode string made nevow appserver unhappy, so it is
just a `str`. The precise error message was:
exceptions.TypeError: ('Could not adapt', u'An incident report has been saved to logs/incidents/ in the node directory.', <InterfaceClass nevow.inevow.IResource>)
Fixes: ticket:3294
2020-04-17 15:44:39 -04:00
Jean-Paul Calderone
ef73e18f3d
Remove the greater part of the implementation
2020-02-13 10:43:50 -05:00
meejah
67bd9c0b2f
refactor capability-checks
2019-12-21 16:01:23 -07:00
meejah
a21e31aed8
irrelevant comment/assignment
2019-12-21 03:57:00 -07:00
meejah
bffc2f9f2c
already new-style, better docstring
2019-12-21 03:57:00 -07:00
meejah
14a39821be
use hyperlink, better unicode
2019-12-21 03:57:00 -07:00
meejah
8f5e9089ca
timedelta, not int
2019-12-21 03:57:00 -07:00
meejah
7ccfe44be6
port manifest to twisted.web.template
2019-12-21 03:56:13 -07:00
meejah
4a73f8055c
imports whitespace
2019-12-21 03:56:13 -07:00
Jean-Paul Calderone
1fef619819
Add a test for persistent state and make it pass
2019-11-19 12:56:38 -05:00
Jean-Paul Calderone
c80c753e5d
Late bind storage so init_storage can run after init_web
2019-11-08 14:12:38 -05:00
Jean-Paul Calderone
c2257685c2
Merge remote-tracking branch 'origin/master' into integration/storage-economics
2019-11-08 10:42:26 -05:00
Jean-Paul Calderone
8c1f536ba4
Merge remote-tracking branch 'origin/master' into integration/storage-economics
2019-10-04 12:02:00 -04:00
meejah
2b4b8e11ce
urls are bytes in Twisted
2019-09-27 12:41:14 -06:00
meejah
4a226c7633
use Twisted API, and some hypothesis tests
2019-09-27 11:51:03 -06:00
meejah
dc19e7379e
validate capability before doing anything
2019-09-27 11:51:03 -06:00
meejah
488e40ce86
unused import
2019-09-27 11:51:03 -06:00
meejah
da882df23b
comment
2019-09-27 11:51:03 -06:00
meejah
a7c8407127
use hyperlink.URL instead of custom code
2019-09-27 11:51:03 -06:00
meejah
24faca46a9
more-correct URI
2019-09-27 11:51:03 -06:00
meejah
c507971e62
unused import
2019-09-27 11:51:03 -06:00
meejah
6195b2680b
fix up ctx/req and add docstrings
2019-09-27 11:51:03 -06:00
meejah
2897b5767e
do the weird redirect thing properly
2019-09-27 11:51:03 -06:00
meejah
0f6fc706ed
port URIHandler to twisted.web
2019-09-27 11:51:03 -06:00
hab
029695399a
Merge pull request #652 from habnabit/move-to-twt--info
...
Port allmydata.web.info to twisted.web.template
2019-09-17 12:22:22 +01:00
meejah
9050fdcea6
explicitly save refs to webish and operations (instead of using Service methods)
2019-08-24 12:31:08 -06:00
meejah
168bf33e1c
remove comment
2019-08-20 00:18:14 -06:00
meejah
0a5aa61a70
must be new-style class (and I guess Resource isn't?)
2019-08-20 00:18:14 -06:00
meejah
ec70fa7090
fail gracefully on invalid URLs
2019-08-20 00:17:28 -06:00
meejah
a307adb7f5
there's no download timeline anymore
2019-08-20 00:17:28 -06:00
meejah
ba9a4e590b
remove debug
2019-08-20 00:17:28 -06:00
meejah
baa773588e
comment
2019-08-20 00:17:28 -06:00
meejah
3f8954be08
refactor download status to get rid of a 'def child_'
2019-08-20 00:17:28 -06:00
meejah
569454b1a3
get rid of child_operations from root
2019-08-20 00:17:28 -06:00
meejah
385df39981
get rid of .remember() / IOpHandleTable
2019-08-20 00:17:28 -06:00
meejah
217e32e385
make '/operations' work again
2019-08-20 00:17:28 -06:00
meejah
9e999d0c68
work around lack of getChild in nevow.rend.Page
2019-08-20 00:17:28 -06:00
meejah
d873a041bf
remove some child_ usage
2019-08-20 00:17:28 -06:00
meejah
48cb51097f
keep using Page
2019-08-20 00:17:28 -06:00
meejah
5cdf5a667a
more hacky test
2019-08-20 00:17:28 -06:00
meejah
3a2182309d
whitespace
2019-08-20 00:17:28 -06:00
hab
77e6803f3c
Add some docstrings.
2019-08-19 19:57:45 +01:00
hab
a01c375327
Port info.xhtml to twt.
2019-08-19 19:57:45 +01:00
Jean-Paul Calderone
4053b6c56f
make it new-style
2019-08-19 11:26:32 -04:00
Jean-Paul Calderone
21bf7fc25c
Merge remote-tracking branch 'origin/master' into integration/storage-economics
2019-08-16 15:39:31 -04:00
hab
a5dfcd0d8c
Add another docstring.
2019-08-16 17:49:39 +01:00
hab
e670bb5d3b
Add more docstrings; add a test hook.
...
In place of nevow's renderSynchronously, I think it'll be good enough
to return the Element directly so it can be flattened. It still gets
flattened with a None request, which might need to change.
2019-08-16 17:43:31 +01:00
hab
e2c2c30574
Add more docstrings.
2019-08-16 17:36:48 +01:00
hab
4e6ff4c7c7
Style fixups; be explicit about literals.
2019-08-16 16:59:15 +01:00
hab
46cc5ab8ed
Remove unused imports.
2019-08-14 20:35:15 +01:00
hab
258dde98ed
Correct the documentation for these new classes.
...
The old documentation was copy-pasted or didn't exist.
Also, I forgot that tag() doesn't copy a tag, even if as written this
_did_ work for my purposes.
2019-08-14 20:25:06 +01:00
hab
8ce18541c6
Tidy up introweb.
...
Fix imports; make all parameter names the same; use " for string
literals.
2019-08-14 20:24:35 +01:00
hab
b6d9d58449
Remove all nevow from introweb.
...
These were the last references to it, and I think it's still working
fine without. I'm not _entirely_ positive but I think t.w.Static's
File has caught up to the features that were added to nevow's File.
2019-08-14 19:05:37 +01:00
hab
be735208a3
Kludge JSON/multi-format support back in.
...
I need to fix these docstrings but this is the right idea at
least. Maybe MultiFormatResource could use a name less easily confused
with its predecessor MultiFormatPage.
2019-08-14 19:05:37 +01:00
hab
4e8e35a7d6
Sequence headers are always shown.
...
I wasn't sure if that was the case, but I've checked nevow now.
2019-08-14 19:05:37 +01:00
hab
c96de2c4ed
Remove unused methods.
2019-08-14 19:05:36 +01:00
hab
ae1f41af98
Preliminary port of introweb to t.w.template.
...
It doesn't do JSON yet, so this is more of a proof of a concept than
anything usable yet.
2019-08-14 19:05:36 +01:00
Jean-Paul Calderone
3d2d61f853
Merge remote-tracking branch 'origin/master' into 3239.python2-new-style-regression-test
2019-08-13 18:27:23 -04:00
Jean-Paul Calderone
b7e3633056
Fix a lot of classic classes in Tahoe-LAFS
2019-08-13 16:55:40 -04:00
Jean-Paul Calderone
13409a2449
Move the remaining package checking machinery to its own module.
2019-08-13 15:11:01 -04:00
Jean-Paul Calderone
d69de15664
implement the feature
...
improve the test slightly, too, to verify the configuration supplied to the
plugin is as expected.
2019-08-03 06:39:31 -04:00
meejah
f9d1c4b06d
delete ancient jquery, d3 and the thing that depends on them
2019-07-15 19:40:31 -06:00
heartsucker
9e31bfe2f4
update code/test to use new ed25512 module
2019-06-13 22:19:28 -06:00
tpltnt
c8f11dc2d3
ported old-style classes to new-style
2019-05-26 08:28:18 +02:00
heartsucker
be910fe269
updated syntax in directory.py to make whole allmydata.web python3 compatible
2019-03-28 12:32:13 +01:00
Jean-Paul Calderone
a26b9ca8af
workaround https://github.com/crossbario/autobahn-python/issues/1151
2019-03-25 12:01:36 -04:00
Jean-Paul Calderone
336e69c270
Hotfix for nevow#106
2019-03-24 11:26:58 -04:00
Jean-Paul Calderone
febfa50a83
make sure we get bytes here
2019-03-22 16:42:50 -04:00
Jean-Paul Calderone
794314668a
this is not unicode, it came from a file, I guess
2019-03-22 15:50:58 -04:00
Jean-Paul Calderone
9de97dbdd5
Use guard and add some tests (integration failing)
2019-03-22 13:47:32 -04:00
Jean-Paul Calderone
58deb54cfc
import cleanups
2019-03-21 15:01:25 -04:00
Jean-Paul Calderone
d00c4212a8
futurize
2019-03-21 15:01:14 -04:00
Jean-Paul Calderone
5f4f8d9dbb
Create the /private hierarchy
2019-03-21 15:00:57 -04:00
Jean-Paul Calderone
2877c9b3c1
unused import
2019-03-21 15:00:19 -04:00
Jean-Paul Calderone
e02962c3a3
Remove one more webport thingy
2019-03-21 14:39:52 -04:00
Jean-Paul Calderone
edf01d7817
don't compute the url, it doesn't seem to be necessary
2019-03-21 13:58:46 -04:00
meejah
956a39a6c1
clarify
2019-03-21 02:01:33 -06:00