Fri May 1 15:10:50 EDT 2009 Kevin Reid * Fix broken link from Provisioning to Reliability page. Sun May 3 16:25:33 EDT 2009 Kevin Reid * Link all Tahoe web pages to the /tahoe_css stylesheet which already exists. Sun May 3 16:31:42 EDT 2009 Kevin Reid * Add CSS styles to spiff up the Tahoe WUI's appearance, particularly the welcome page and directories. Sun May 3 16:34:42 EDT 2009 Kevin Reid * Comment on duplication of code/markup found during styling project. Tue May 26 19:24:14 EDT 2009 Kevin Reid * Tweak wording in directory page: not-read-only is "modifiable", mention creating a directory _in this directory_. Tue May 26 19:25:45 EDT 2009 Kevin Reid * Modify markup of Tahoe web pages to be more amenable to styling; some minor changes of wording. New patches: [Fix broken link from Provisioning to Reliability page. Kevin Reid **20090501191050 Ignore-this: 56dc1a5e659b70cc02dc4df7b5d518cd ] hunk ./src/allmydata/provisioning.py 714 from allmydata import reliability # we import this just to test to see if the page is available _hush_pyflakes = reliability - f = [T.div[T.a(href="reliability.html")["Reliability Math"]], f] + f = [T.div[T.a(href="../reliability")["Reliability Math"]], f] except ImportError: pass [Link all Tahoe web pages to the /tahoe_css stylesheet which already exists. Kevin Reid **20090503202533 Ignore-this: 2ea8d14d3168b9502cf39d5ea3f2f2a8 ] { hunk ./src/allmydata/web/check-and-repair-results.xhtml 4 AllMyData - Tahoe - Check Results - + hunk ./src/allmydata/web/check-results.xhtml 4 AllMyData - Tahoe - Check Results - + hunk ./src/allmydata/web/deep-check-and-repair-results.xhtml 4 AllMyData - Tahoe - Deep Check Results - + hunk ./src/allmydata/web/deep-check-results.xhtml 4 AllMyData - Tahoe - Deep Check Results - + hunk ./src/allmydata/web/directory.xhtml 1 - - - - - - - - - + + + + + +

hunk ./src/allmydata/web/download-status.xhtml 4 AllMyData - Tahoe - File Download Status - + hunk ./src/allmydata/web/helper.xhtml 4 Helper Status - AllMyData Tahoe - + hunk ./src/allmydata/web/info.xhtml 1 - - - - - - - - - + + + + + +

hunk ./src/allmydata/web/literal-check-results.xhtml 4 AllMyData - Tahoe - Check Results - + hunk ./src/allmydata/web/manifest.xhtml 4 - + hunk ./src/allmydata/web/map-update-status.xhtml 4 AllMyData - Tahoe - Mutable File Servermap Update Status - + hunk ./src/allmydata/web/provisioning.xhtml 4 AllMyData - Tahoe - Provisioning Tool - + hunk ./src/allmydata/web/publish-status.xhtml 4 AllMyData - Tahoe - Mutable File Publish Status - + hunk ./src/allmydata/web/reliability.xhtml 4 AllMyData - Tahoe - Reliability Tool - + hunk ./src/allmydata/web/rename-form.xhtml 4 - + hunk ./src/allmydata/web/retrieve-status.xhtml 4 AllMyData - Tahoe - Mutable File Retrieve Status - + hunk ./src/allmydata/web/statistics.xhtml 4 Stats - AllMyData Tahoe - + hunk ./src/allmydata/web/status.xhtml 4 AllMyData - Tahoe - Current Uploads/Downloads - hunk ./src/allmydata/web/status.xhtml 5 + hunk ./src/allmydata/web/upload-results.xhtml 4 AllMyData - Tahoe - File Uploaded - + hunk ./src/allmydata/web/upload-status.xhtml 4 AllMyData - Tahoe - File Upload Status - + hunk ./src/allmydata/web/welcome.xhtml 1 - - - AllMyData - Tahoe - - - - - + + AllMyData - Tahoe - Welcome + + + +

Welcome To AllMyData "Tahoe"!

} [Add CSS styles to spiff up the Tahoe WUI's appearance, particularly the welcome page and directories. Kevin Reid **20090503203142 Ignore-this: 5c50af241c1a958b5180ef2b6a49f626 ] hunk ./src/allmydata/web/tahoe.css 9 padding: .25em; overflow: auto; } + +/* ----------------------------------------------------------------------- */ + +/* colors borrowed from the Allmydata logo */ + +/* general style */ +h1 { + text-align: center; +} +table { + margin: 1em auto; + border: .2em solid #3289b4; + border-spacing: 1px; +} +th { + color: white; + background-color: #58a1c3; +} +td { padding: .3em .3em; } +th { padding: .3em .3em; } +.table-headings-top th { text-align: center; } +.table-headings-left th { text-align: right; vertical-align: top; } +legend { + font-weight: bold; +} + +.connected-yes, .connected-True { + border: 1px solid #75d24a; + background-color: #EFE; +} +.connected-no, .connected-False { + border: 1px solid #F00; + background-color: #FBB; +} + +.encoded, .nodeid { + font-family: monospace; + font-size: 80%; +} + +.empty-marker { + background-color: white; + color: gray; +} +table td.empty-marker { + padding: 6em 10em; + text-align: center; + vertical-align: center; +} + +/* styles for server listings in tables (nickname above nodeid) */ +th.nickname-and-peerid { + text-align: left; +} +.nickname { + font: inherit; + font-family: sans-serif; + font-weight: bold; +} + + +/* just in case, make sure floats don't stomp on big tables etc. */ +#section { clear: both; } + +/* section-specific styles - turn this client info into a sidebar */ +#this-client { + font-size: 60%; + border: .2em solid #3289b4; + float: right; + width: 40%; + margin: 0 0 .5em .5em; + padding: 3px; +} +#this-client .nodeid { font-size: inherit; } +#this-client h2 { + text-align: center; + background: #3289b4; + color: white; + margin: -2px -2px 0 -2px; /* matches padding */ + padding: .3em; +} +#this-client table { + font-size: inherit; + margin: 0 -3px -3px -3px; /* matches padding */ +} +#this-client td > ul { + list-style-type: outside; + margin: 0 0 0 2.3em; + padding-left: 0; +} + + +/* services table */ +.services { +} + +/* --- Directory page styles --- */ + +body.tahoe-directory-page { + color: black; + background: #c0d9e6; + margin: 1em 0; /* zero margin so the table can be flush */ +} +table.tahoe-directory { + color: black; + background: white; + width: 100%; + /*border-left-color: #D7E0E5; + border-right-color: #D7E0E5;*/ + border-left: 0; + border-right: 0; +} +.tahoe-directory-footer { + color: black; + background: #c0d9e6; + margin: 0 1em; /* compensate for page 0 margin */ +} + +/* directory-screen toolbar */ +.toolbar { + display: table; + margin: .2em auto; + /*width: 100%;*/ +} +.toolbar .toolbar-item { + display: table-cell; + text-align: center; + padding: 0 1em; +} [Comment on duplication of code/markup found during styling project. Kevin Reid **20090503203442 Ignore-this: a4b7f9f0ab57d2c03be9ba761be8d854 ] { hunk ./src/allmydata/web/check_results.py 112 sharemap = [] servers = {} + # FIXME: The two tables below contain nickname-and-nodeid table column markup which is duplicated with each other, introducer.xhtml, and deep-check-results.xhtml. All of these (and any other presentations of nickname-and-nodeid) should be combined. + for shareid in sorted(data["sharemap"].keys()): serverids = data["sharemap"][shareid] for i,serverid in enumerate(serverids): hunk ./src/allmydata/web/introweb.py 67 return simplejson.dumps(res, indent=1) + "\n" + # FIXME: This code is duplicated in root.py and introweb.py. def data_version(self, ctx, data): return get_package_versions_string() def data_import_path(self, ctx, data): hunk ./src/allmydata/web/root.py 180 child_report_incident = IncidentReporter() #child_server # let's reserve this for storage-server-over-HTTP + # FIXME: This code is duplicated in root.py and introweb.py. def data_version(self, ctx, data): return get_package_versions_string() def data_import_path(self, ctx, data): } [Tweak wording in directory page: not-read-only is "modifiable", mention creating a directory _in this directory_. Kevin Reid **20090526232414 Ignore-this: f006ec52ba2051802e025a60bcface56 ] { hunk ./src/allmydata/test/test_web.py 916 d.addCallback(lambda res: self.GET(self.public_url + "/reedownlee", followRedirect=True)) def _check2(res): - self.failUnless("(readonly)" in res, res) + self.failUnless("(read-only)" in res, res) self.failIf("Upload a file" in res, res) d.addCallback(_check2) hunk ./src/allmydata/test/test_web.py 932 d.addCallback(lambda res: self.GET(self.public_url + "/foo/empty/")) def _check4(res): self.failUnless("directory is empty" in res, res) - MKDIR_BUTTON_RE=re.compile('.*Create a new directory.*', re.I) + MKDIR_BUTTON_RE=re.compile('.*Create a new directory in this directory.*', re.I) self.failUnless(MKDIR_BUTTON_RE.search(res), res) d.addCallback(_check4) hunk ./src/allmydata/web/directory.py 527 def render_title(self, ctx, data): si_s = abbreviated_dirnode(self.node) - header = ["Directory SI=%s" % si_s] + header = ["AllMyData - Tahoe - Directory SI=%s" % si_s] + if self.node.is_readonly(): + header.append(" (read-only)") + else: + header.append(" (modifiable)") return ctx.tag[header] def render_header(self, ctx, data): hunk ./src/allmydata/web/directory.py 538 si_s = abbreviated_dirnode(self.node) header = ["Directory SI=%s" % si_s] if self.node.is_readonly(): - header.append(" (readonly)") + header.append(" (read-only)") return ctx.tag[header] def render_welcome(self, ctx, data): hunk ./src/allmydata/web/directory.py 681 T.fieldset[ T.input(type="hidden", name="t", value="mkdir"), T.input(type="hidden", name="when_done", value="."), - T.legend(class_="freeform-form-label")["Create a new directory"], + T.legend(class_="freeform-form-label")["Create a new directory in this directory"], "New directory name: ", T.input(type="text", name="name"), " ", T.input(type="submit", value="Create"), } [Modify markup of Tahoe web pages to be more amenable to styling; some minor changes of wording. Kevin Reid **20090526232545 Ignore-this: 8845937f0df6c7ddc07abe3211428a6f ] { hunk ./src/allmydata/test/test_checker.py 106 s = self.remove_tags(html) self.failUnlessIn("File Check Results for SI=2k6avp", s) # abbreviated self.failUnlessIn("Not Recoverable! : rather dead", s) - self.failUnlessIn("Corrupt shares: sh#2 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa (peer-0)", s) + self.failUnlessIn("Corrupt shares: Share ID Nickname Node ID sh#2 peer-0 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", s) html = self.render2(w) s = self.remove_tags(html) hunk ./src/allmydata/test/test_system.py 1104 public = "uri/" + self._root_directory_uri d = getPage(base) def _got_welcome(page): - expected = "Connected Storage Servers: %d" % (self.numclients) + # XXX This test is oversensitive to formatting + expected = "Connected to %d\n of %d known storage servers:" % (self.numclients, self.numclients) self.failUnless(expected in page, "I didn't see the right 'connected storage servers'" " message in: %s" % page hunk ./src/allmydata/test/test_system.py 1110 ) - expected = "My nodeid: %s" % (b32encode(self.clients[0].nodeid).lower(),) + expected = "My nodeid: %s" % (b32encode(self.clients[0].nodeid).lower(),) self.failUnless(expected in page, "I didn't see the right 'My nodeid' message " "in: %s" % page) hunk ./src/allmydata/test/test_web.py 882 # the FILE reference points to a URI, but it should end in bar.txt bar_url = ("%s/file/%s/@@named=/bar.txt" % (ROOT, urllib.quote(self._bar_txt_uri))) - get_bar = "".join([r'', + get_bar = "".join([r'FILE', + r'\s+', r'bar.txt' % bar_url, r'', hunk ./src/allmydata/test/test_web.py 886 - r'\s+FILE', r'\s+%d' % len(self.BAR_CONTENTS), ]) self.failUnless(re.search(get_bar, res), res) hunk ./src/allmydata/test/test_web.py 907 # the DIR reference just points to a URI sub_url = ("%s/uri/%s/" % (ROOT, urllib.quote(self._sub_uri))) - get_sub = ((r'sub' % sub_url) - + r'\s+DIR') + get_sub = ((r'DIR') + +r'\s+sub' % sub_url) self.failUnless(re.search(get_sub, res), res) d.addCallback(_check) hunk ./src/allmydata/test/test_web.py 924 d.addCallback(lambda res: self.GET(self.public_url, followRedirect=True)) def _check3(res): - self.failUnless(re.search(r'reedownlee' - '\s+DIR-RO', res)) + self.failUnless(re.search('DIR-RO' + r'\s+reedownlee', res), res) d.addCallback(_check3) # and an empty directory hunk ./src/allmydata/test/test_web.py 1898 # Fetch the welcome page. d = self.GET("/") def _after_get_welcome_page(res): - MKDIR_BUTTON_RE=re.compile('
', re.I) + MKDIR_BUTTON_RE=re.compile('', re.I) mo = MKDIR_BUTTON_RE.search(res) formaction = mo.group(1) formt = mo.group(2) hunk ./src/allmydata/web/check_results.py 100 for (serverid, si, shnum) in data["list-corrupt-shares"]: nickname = c.get_nickname_for_peerid(serverid) badsharemap.append(T.tr[T.td["sh#%d" % shnum], - T.td[T.tt[base32.b2a(serverid)], - " (", nickname, ")"], + T.td[T.div(class_="nickname")[nickname], + T.div(class_="nodeid")[T.tt[base32.b2a(serverid)]]], ]) hunk ./src/allmydata/web/check_results.py 103 - add("Corrupt shares", T.table(border="1")[badsharemap]) + add("Corrupt shares", T.table()[ + T.tr[T.th["Share ID"], + T.th(class_="nickname-and-peerid")[T.div["Nickname"], T.div(class_="nodeid")["Node ID"]]], + badsharemap]) else: add("Corrupt shares", "none") hunk ./src/allmydata/web/check_results.py 128 shareid_s = shareid nickname = c.get_nickname_for_peerid(serverid) sharemap.append(T.tr[T.td[shareid_s], - T.td[T.tt[base32.b2a(serverid)], - " (", nickname, ")"], + T.td[T.div(class_="nickname")[nickname], + T.div(class_="nodeid")[T.tt[base32.b2a(serverid)]]] ]) add("Good Shares (sorted in share order)", hunk ./src/allmydata/web/check_results.py 132 - T.table(border="1")[sharemap]) + T.table()[T.tr[T.th["Share ID"], T.th(class_="nickname-and-peerid")[T.div["Nickname"], T.div(class_="nodeid")["Node ID"]]], + sharemap]) add("Recoverable Versions", data["count-recoverable-versions"]) hunk ./src/allmydata/web/check_results.py 152 shareids = servers.get(serverid, []) shareids.reverse() shareids_s = [ T.tt[shareid, " "] for shareid in sorted(shareids) ] - servermap.append(T.tr[T.td[T.tt[base32.b2a(serverid)], - " (", nickname, ")"], - T.td[shareids_s] ]) + servermap.append(T.tr[T.td[T.div(class_="nickname")[nickname], + T.div(class_="nodeid")[T.tt[base32.b2a(serverid)]]], + T.td[shareids_s], + ]) num_shares_left -= len(shareids) if not num_shares_left: break hunk ./src/allmydata/web/check_results.py 160 add("Share Balancing (servers in permuted order)", - T.table(border="1")[servermap]) + T.table()[T.tr[T.th(class_="nickname-and-peerid")[T.div["Nickname"], T.div(class_="nodeid")["Node ID"]], T.th["Share IDs"]], + servermap]) return T.ul[r] hunk ./src/allmydata/web/deep-check-and-repair-results.xhtml 72
- +
hunk ./src/allmydata/web/deep-check-results.xhtml 46

Corrupt Shares

If repair fails, these shares need to be manually inspected and removed.

-
Relative Path Healthy Pre-Repair
+
hunk ./src/allmydata/web/deep-check-results.xhtml 66

All Results

-
Server Server Nickname
+
hunk ./src/allmydata/web/directory.py 536 def render_header(self, ctx, data): si_s = abbreviated_dirnode(self.node) - header = ["Directory SI=%s" % si_s] + header = ["Directory SI=", T.span(class_="data-chars")[si_s]] if self.node.is_readonly(): header.append(" (read-only)") return ctx.tag[header] hunk ./src/allmydata/web/directory.xhtml 8 -

+

hunk ./src/allmydata/web/directory.xhtml 10 - -
+
+
+ hunk ./src/allmydata/web/directory.xhtml 14 - -
+ +
+
hunk ./src/allmydata/web/directory.xhtml 19 -
Relative Path Healthy
- - - - - - - - - - - - - - - - - - +
FilenameTypeSizeTimes
+ + + + + + + + + + + + + + + + + + hunk ./src/allmydata/web/directory.xhtml 39 - + hunk ./src/allmydata/web/directory.xhtml 41 -
TypeFilenameSizeTimes
directory is empty
This directory is empty.
+
hunk ./src/allmydata/web/directory.xhtml 44 +