Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Remove console_start.js, and just call the required initialization ro…
…utine in admin_site.cc.
  • Loading branch information
jlporter authored and jeffkaufman committed Mar 11, 2016
1 parent c561d12 commit 2bd239d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 25 deletions.
1 change: 1 addition & 0 deletions pagespeed/system/admin_site.cc
Expand Up @@ -230,6 +230,7 @@ void AdminSite::ConsoleHandler(const SystemRewriteOptions& global_options,
//
// TODO(jmarantz): Change the JS to remove pagespeedStatisticsUrl.
fetch->Write(console_js, handler);
fetch->Write("google.setOnLoadCallback(pagespeed.startConsole);", handler);
fetch->Write("</script>\n", handler);
} else {
fetch->Write("<p>\n"
Expand Down
9 changes: 7 additions & 2 deletions pagespeed/system/console.js
Expand Up @@ -20,6 +20,11 @@
* Fetches JSON statistics data from server to draw graphs over time of
* various "notable issues".
*
* Note that for unit testing purposes, the initialization code here is not
* actually run. admin_site.cc injects the call to
* google.setOnLoadCallback(pagespeed.startConsole); to actually run the code
* here.
*
* PRECONDITIONS: pagespeedStatisticsUrl must be set in JavaScript and
* <script src='https://www.google.com/jsapi'></script> must be loaded in HTML.
*
Expand All @@ -30,12 +35,12 @@

'use strict';

goog.require('goog.structs.Set');

goog.provide('pagespeed');
goog.provide('pagespeed.Console');
goog.provide('pagespeed.statistics');

goog.require('goog.structs.Set');

// Google Charts API.
// Requires <script src='https://www.google.com/jsapi'></script> loaded in HTML.
google.load('visualization', '1.0', {'packages': ['corechart']});
Expand Down
23 changes: 0 additions & 23 deletions pagespeed/system/console_start.js

This file was deleted.

0 comments on commit 2bd239d

Please sign in to comment.