Коммит
14754d7b44
|
@ -0,0 +1,3 @@
|
|||
[submodule "http2push"]
|
||||
path = http2push
|
||||
url = https://github.com/GoogleChrome/http2push-gae
|
|
@ -3,6 +3,10 @@ Chrome Platform Status
|
|||
|
||||
[chromestatus.com](http://chromestatus.com/)
|
||||
|
||||
### Get the code
|
||||
|
||||
git clone --recursive https://github.com/GoogleChrome/chromium-dashboard
|
||||
|
||||
### How to run the local test server
|
||||
|
||||
1. Install the [Google App Engine SDK for Python](https://developers.google.com/appengine/downloads#Google_App_Engine_SDK_for_Python).
|
||||
|
|
6
app.yaml
6
app.yaml
|
@ -1,5 +1,5 @@
|
|||
application: cr-status
|
||||
version: polymer10-samples
|
||||
version: h2push
|
||||
runtime: python27
|
||||
threadsafe: true
|
||||
api_version: 1
|
||||
|
@ -90,7 +90,9 @@ skip_files:
|
|||
- ^(.*/)?.*\.sql[3]$
|
||||
- ^(.*/)?.*\.sh$
|
||||
- ^(.*/)?.*\.scss$
|
||||
- ^static/js/polymer-all
|
||||
- ^http2push/example
|
||||
- ^http2push/site
|
||||
- ^(.*/)?node_modules
|
||||
- ^(.*/)?tests
|
||||
- ^(.*/)?.[LICENSE|PATENTS|AUTHORS|CONTRIBUTING|COPYING](\.md)?
|
||||
- ^(.*/)?.*\.md$
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 9ab153d6833db5effb910ab0699a70ade4b84f78
|
|
@ -8,6 +8,7 @@
|
|||
"grunt-contrib-compass": "^1.0.3",
|
||||
"grunt-minified": "0.0.6",
|
||||
"grunt-vulcanize": "^1.0.0",
|
||||
"http2-push-manifest": "0.0.1",
|
||||
"load-grunt-tasks": "*"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"/static/css/main.css": 1,
|
||||
"/static/bower_components/webcomponentsjs/webcomponents-lite.min.js": 1,
|
||||
"/static/css/features/features.css": 1,
|
||||
"/static/elements/features-imports.vulcanize.html": 1,
|
||||
"/static/elements/features-imports.vulcanize.js": 1,
|
||||
"/features.json": 1,
|
||||
"/omaha_data": 1
|
||||
}
|
|
@ -28,6 +28,8 @@ import common
|
|||
import models
|
||||
import settings
|
||||
|
||||
import http2push.http2push as http2push
|
||||
|
||||
|
||||
def normalized_name(val):
|
||||
return val.lower().replace(' ', '').replace('/', '')
|
||||
|
@ -41,7 +43,7 @@ def first_of_milestone(feature_list, milestone, start=0):
|
|||
return -1
|
||||
|
||||
|
||||
class MainHandler(common.ContentHandler, common.JSONHandler):
|
||||
class MainHandler(http2push.PushHandler, common.ContentHandler, common.JSONHandler):
|
||||
|
||||
def __get_omaha_data(self):
|
||||
omaha_data = memcache.get('omaha_data')
|
||||
|
@ -88,6 +90,7 @@ class MainHandler(common.ContentHandler, common.JSONHandler):
|
|||
self.__annotate_first_of_milestones(feature_list)
|
||||
return feature_list
|
||||
|
||||
@http2push.push()
|
||||
def get(self, path, feature_id=None):
|
||||
# Default to features page.
|
||||
# TODO: remove later when we want an index.html
|
||||
|
@ -220,6 +223,8 @@ routes = [
|
|||
]
|
||||
|
||||
app = webapp2.WSGIApplication(routes, debug=settings.DEBUG)
|
||||
|
||||
app.error_handlers[404] = common.handle_404
|
||||
|
||||
if settings.PROD and not settings.DEBUG:
|
||||
app.error_handlers[500] = common.handle_500
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
want a jumpstart on download and the GFonts API is helllla cached. -->
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:400,300,300italic,400italic,500,500italic,700,700italic">
|
||||
|
||||
<link rel="stylesheet" href="/static/css/main.css?2015-07-29">
|
||||
<link rel="stylesheet" href="/static/css/main.css">
|
||||
{% block css %}{% endblock %}
|
||||
|
||||
<script src="/static/bower_components/webcomponentsjs/webcomponents-lite.min.js" defer></script>
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
{% endblock %}
|
||||
|
||||
{% block css %}
|
||||
<link rel="stylesheet" href="/static/css/features/features.css?2015-10-07">
|
||||
<link rel="stylesheet" href="/static/css/features/features.css">
|
||||
{% endblock %}
|
||||
|
||||
{% block subheader %}
|
||||
|
@ -134,7 +134,7 @@ $('.legend').addEventListener('click', function(e) {
|
|||
|
||||
// Fire of features.json XHR right away so data can populate faster.
|
||||
var featuresPromise = new Promise(function(resolve, reject) {
|
||||
var url = location.hostname == 'localhost' ? '/static/js/mockdata.json' :
|
||||
var url = location.hostname == 'localhost' ? 'https://www.chromestatus.com/features.json' :
|
||||
'/features.json';
|
||||
var xhr = new XMLHttpRequest(); // Fill features list via AJAX.
|
||||
xhr.open('GET', url);
|
||||
|
|
Загрузка…
Ссылка в новой задаче