Permalink
Browse files

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 7, 2016
1 parent c561d12 commit 2bd239dc1816a84815ec1ef4a2de30dacf9e9bbd
Showing with 8 additions and 25 deletions.
  1. +1 −0 pagespeed/system/admin_site.cc
  2. +7 −2 pagespeed/system/console.js
  3. +0 −23 pagespeed/system/console_start.js
@@ -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"
@@ -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.
*
@@ -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']});

This file was deleted.

Oops, something went wrong.

0 comments on commit 2bd239d

Please sign in to comment.