Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(95)

Issue 10448057: Add refresh support to the console page. (Closed)

Created:
8 years, 6 months ago by cmp
Modified:
8 years, 6 months ago
Reviewers:
M-A Ruel
CC:
chromium-reviews, cmp+cc_chromium.org
Visibility:
Public.

Description

Add refresh support to the console page. Use a template for console data: - Embeds the refresh value based on a max of the selected refresh or 30 seconds. - Allows showing the user sign in/sign out links. - Move the console header div into the template. - Rename console.html to merger.html. - Remove grid and t-grid links. - Modify get_and_cache_page to return a dict that contains content and other data, not just the content itself. Modify that method's callers to support the new return data. - Update the rest of the page caching to support storing and retrieving a serialized dict. Sign in support: - Add utils module to allow us to enforce signed in/admin only pages. - Move request handler into base_page. - Add login/admin helper methods to BasePage. - oauth support is absent. Add tests for the fetch pipeline. - Add FakeResponse object to keep fetch_page() happy. Miscellanous fixes: - Fix path for gae-lib-root in docs. - Remove unused methods (like _clean_int()) and imports. - Remove a TODO I fixed in a previous CL. - Misc formatting fixes. - Add W0232 pylint error to suppression. - Ignore pylint errors in webapp2.RequestHandler. R=maruel@chromium.org BUG=113488 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=139357

Patch Set 1 #

Patch Set 2 : #

Total comments: 28

Patch Set 3 : fixes for comments on patch set 2 #

Patch Set 4 : use reload instead of refresh #

Total comments: 6

Patch Set 5 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5915 lines, -6357 lines) Patch
M PRESUBMIT.py View 1 2 3 4 2 chunks +10 lines, -3 lines 0 comments Download
M app.py View 1 2 3 4 13 chunks +158 lines, -63 lines 0 comments Download
M app_test.py View 1 2 3 4 12 chunks +114 lines, -58 lines 0 comments Download
A base_page.py View 1 2 3 4 1 chunk +86 lines, -0 lines 0 comments Download
M handler.py View 1 2 3 4 2 chunks +37 lines, -59 lines 0 comments Download
M pylintrc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M templates/base.html View 1 2 3 4 1 chunk +321 lines, -6 lines 0 comments Download
D templates/console.html View 1 2 3 4 1 chunk +0 lines, -92 lines 0 comments Download
A + templates/merger.html View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M tests/test_console_handler/console-expected.html View 1 2 3 4 2 chunks +0 lines, -308 lines 0 comments Download
M tests/test_console_handler_utf8/console-expected.html View 1 2 3 4 2 chunks +0 lines, -308 lines 0 comments Download
M tests/test_console_merger/chromium_merged_console.html View 1 2 3 4 33 chunks +33 lines, -33 lines 0 comments Download
M tests/test_console_merger_splitrevs/chromium_merged_console.html View 1 2 3 4 28 chunks +28 lines, -28 lines 0 comments Download
M tests/test_console_merger_utf8/chromium_merged_console.html View 1 2 3 4 26 chunks +26 lines, -26 lines 0 comments Download
A + tests/test_fetch_console/expected.html View 1 2 3 4 3 chunks +7 lines, -315 lines 0 comments Download
A + tests/test_fetch_console/input.html View 1 2 3 4 134 chunks +1685 lines, -1685 lines 0 comments Download
A + tests/test_fetch_direct/expected.html View 1 2 3 4 134 chunks +1685 lines, -1685 lines 0 comments Download
A + tests/test_fetch_direct/input.html View 1 2 3 4 134 chunks +1685 lines, -1685 lines 0 comments Download
A utils.py View 1 2 3 4 1 chunk +37 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
cmp
8 years, 6 months ago (2012-05-29 18:21:53 UTC) #1
cmp
It's not explicit here, so let me make it clear that my intention is for ...
8 years, 6 months ago (2012-05-29 18:35:13 UTC) #2
M-A Ruel
https://chromiumcodereview.appspot.com/10448057/diff/6003/PRESUBMIT.py File PRESUBMIT.py (right): https://chromiumcodereview.appspot.com/10448057/diff/6003/PRESUBMIT.py#newcode76 PRESUBMIT.py:76: 'E1101', # has no member If possible, you should ...
8 years, 6 months ago (2012-05-29 18:46:33 UTC) #3
cmp
patch updated, PTAL https://chromiumcodereview.appspot.com/10448057/diff/6003/PRESUBMIT.py File PRESUBMIT.py (right): https://chromiumcodereview.appspot.com/10448057/diff/6003/PRESUBMIT.py#newcode76 PRESUBMIT.py:76: 'E1101', # has no member On ...
8 years, 6 months ago (2012-05-29 19:38:03 UTC) #4
M-A Ruel
lgtm https://chromiumcodereview.appspot.com/10448057/diff/13014/PRESUBMIT.py File PRESUBMIT.py (right): https://chromiumcodereview.appspot.com/10448057/diff/13014/PRESUBMIT.py#newcode79 PRESUBMIT.py:79: 'E1101', # has no member, disabled due to ...
8 years, 6 months ago (2012-05-29 20:03:49 UTC) #5
cmp
8 years, 6 months ago (2012-05-29 20:20:28 UTC) #6
https://chromiumcodereview.appspot.com/10448057/diff/13014/PRESUBMIT.py
File PRESUBMIT.py (right):

https://chromiumcodereview.appspot.com/10448057/diff/13014/PRESUBMIT.py#newco...
PRESUBMIT.py:79: 'E1101',  # has no member, disabled due to webapp2 and
AppEngine SDK
On 2012/05/29 20:03:49, Marc-Antoine Ruel wrote:
> An option would be to add 'webapp2.RequestHandler' to ignored-classes= line in
> pylintrc. I haven't exposed a way to set this dynamically in the presubmit
> canned check though.

Done.

https://chromiumcodereview.appspot.com/10448057/diff/13014/app.py
File app.py (right):

https://chromiumcodereview.appspot.com/10448057/diff/13014/app.py#newcode61
app.py:61: """Return a page_data dict, optionally caching and looking up a blob.
On 2012/05/29 20:03:49, Marc-Antoine Ruel wrote:
> Returns

Done.

https://chromiumcodereview.appspot.com/10448057/diff/13014/app.py#newcode782
app.py:782: page_data = {
On 2012/05/29 20:03:49, Marc-Antoine Ruel wrote:
> I agree the function shouldn't be named as_dict() but something more specific.
I
> also agree it's not a perfect mapping but it's also overkill to define an
> embedded class, and it's not really easy to do in python for serialized data.
> 
> It's used 3 times so it's still maybe worth doing one;
> app.py:88
> app.py:782
> handler.py:39
> 
> I don't mind, it's up to you.

My preference given we're both on the fence is to leave it as-is for now and
revisit in a future CL as needed then.

Powered by Google App Engine
This is Rietveld 408576698