Permalink
Browse files

progress in porting view styles over, added static files

  • Loading branch information...
1 parent 065009b commit df9b57091bd2e653ef3e4887f552b0fe0d06a65d @samliu samliu committed Aug 6, 2012
Showing with 20,228 additions and 8 deletions.
  1. +0 −1 spade/model/admin.py
  2. +54 −0 spade/view/templates/base.html
  3. +1 −0 spade/view/templates/batch_report.html
  4. +98 −0 spade/view/templates/dashboard.html
  5. +1 −0 spade/view/templates/site_report.html
  6. +3 −2 spade/view/urls.py
  7. +16 −5 spade/view/views.py
  8. +288 −0 static/css/style.css
  9. BIN static/img/bg.gif
  10. BIN static/img/grid.jpg
  11. BIN static/img/logo.png
  12. +38 −0 static/js/backbone-min.js
  13. +15 −0 static/js/columns.js
  14. +1,201 −0 static/js/flot/API.txt
  15. +76 −0 static/js/flot/FAQ.txt
  16. +22 −0 static/js/flot/LICENSE.txt
  17. +9 −0 static/js/flot/Makefile
  18. +508 −0 static/js/flot/NEWS.txt
  19. +137 −0 static/js/flot/PLUGINS.txt
  20. +90 −0 static/js/flot/README.txt
  21. +143 −0 static/js/flot/examples/ajax.html
  22. +75 −0 static/js/flot/examples/annotating.html
  23. BIN static/js/flot/examples/arrow-down.gif
  24. BIN static/js/flot/examples/arrow-left.gif
  25. BIN static/js/flot/examples/arrow-right.gif
  26. BIN static/js/flot/examples/arrow-up.gif
  27. +38 −0 static/js/flot/examples/basic.html
  28. +4 −0 static/js/flot/examples/data-eu-gdp-growth-1.json
  29. +4 −0 static/js/flot/examples/data-eu-gdp-growth-2.json
  30. +4 −0 static/js/flot/examples/data-eu-gdp-growth-3.json
  31. +4 −0 static/js/flot/examples/data-eu-gdp-growth-4.json
  32. +4 −0 static/js/flot/examples/data-eu-gdp-growth-5.json
  33. +4 −0 static/js/flot/examples/data-eu-gdp-growth.json
  34. +4 −0 static/js/flot/examples/data-japan-gdp-growth.json
  35. +4 −0 static/js/flot/examples/data-usa-gdp-growth.json
  36. +75 −0 static/js/flot/examples/graph-types.html
  37. BIN static/js/flot/examples/hs-2004-27-a-large_web.jpg
  38. +45 −0 static/js/flot/examples/image.html
  39. +44 −0 static/js/flot/examples/index.html
  40. +97 −0 static/js/flot/examples/interacting-axes.html
  41. +93 −0 static/js/flot/examples/interacting.html
  42. +6 −0 static/js/flot/examples/layout.css
  43. +60 −0 static/js/flot/examples/multiple-axes.html
  44. +118 −0 static/js/flot/examples/navigate.html
  45. +57 −0 static/js/flot/examples/percentiles.html
  46. +756 −0 static/js/flot/examples/pie.html
  47. +83 −0 static/js/flot/examples/realtime.html
  48. +61 −0 static/js/flot/examples/resize.html
  49. +114 −0 static/js/flot/examples/selection.html
  50. +61 −0 static/js/flot/examples/setting-options.html
  51. +77 −0 static/js/flot/examples/stacking.html
  52. +49 −0 static/js/flot/examples/symbols.html
  53. +54 −0 static/js/flot/examples/thresholding.html
  54. +71 −0 static/js/flot/examples/time.html
  55. +95 −0 static/js/flot/examples/tracking.html
  56. +98 −0 static/js/flot/examples/turning-series.html
  57. +90 −0 static/js/flot/examples/visitors.html
  58. +98 −0 static/js/flot/examples/zooming.html
  59. +1,427 −0 static/js/flot/excanvas.js
  60. +1 −0 static/js/flot/excanvas.min.js
  61. +179 −0 static/js/flot/jquery.colorhelpers.js
  62. +1 −0 static/js/flot/jquery.colorhelpers.min.js
  63. +167 −0 static/js/flot/jquery.flot.crosshair.js
  64. +1 −0 static/js/flot/jquery.flot.crosshair.min.js
  65. +183 −0 static/js/flot/jquery.flot.fillbetween.js
  66. +1 −0 static/js/flot/jquery.flot.fillbetween.min.js
  67. +238 −0 static/js/flot/jquery.flot.image.js
  68. +1 −0 static/js/flot/jquery.flot.image.min.js
  69. +2,599 −0 static/js/flot/jquery.flot.js
  70. +6 −0 static/js/flot/jquery.flot.min.js
  71. +336 −0 static/js/flot/jquery.flot.navigate.js
  72. +1 −0 static/js/flot/jquery.flot.navigate.min.js
  73. +750 −0 static/js/flot/jquery.flot.pie.js
  74. +1 −0 static/js/flot/jquery.flot.pie.min.js
  75. +60 −0 static/js/flot/jquery.flot.resize.js
  76. +1 −0 static/js/flot/jquery.flot.resize.min.js
  77. +344 −0 static/js/flot/jquery.flot.selection.js
  78. +1 −0 static/js/flot/jquery.flot.selection.min.js
  79. +184 −0 static/js/flot/jquery.flot.stack.js
  80. +1 −0 static/js/flot/jquery.flot.stack.min.js
  81. +70 −0 static/js/flot/jquery.flot.symbol.js
  82. +1 −0 static/js/flot/jquery.flot.symbol.min.js
  83. +103 −0 static/js/flot/jquery.flot.threshold.js
  84. +1 −0 static/js/flot/jquery.flot.threshold.min.js
  85. +8,316 −0 static/js/flot/jquery.js
  86. +23 −0 static/js/flot/jquery.min.js
  87. +52 −0 static/js/index-charts.js
  88. +32 −0 static/js/underscore-min.js
@@ -26,4 +26,3 @@ class URLContentInline(admin.TabularInline):
admin.site.register(models.LinkedCSS)
admin.site.register(models.LinkedJS)
admin.site.register(models.UserAgent)
-admin.site.register(models.CrawlList)
@@ -0,0 +1,54 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+
+ <!-- Not too important headers -->
+ <title>{% block pagetitle %}Mozilla Spade - Sleuthing the mobile web {% endblock pagetitle %}</title>
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="Statistics on css usage and user agent sniffing across the web">
+
+ <!-- Font -->
+ <link href="http://fonts.googleapis.com/css?family=Inconsolata" rel="stylesheet" type="text/css">
+
+ <!-- JQuery-->
+ <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
+ <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
+
+ <!-- Primary Stylesheet -->
+ <link type="text/css" rel="stylesheet" media="screen" href="./static/css/style.css">
+
+ <!-- Javascript for our column layout-->
+ <script type="text/javascript" src="./static/js/columns.js"></script>
+
+ {% block htmlhead %}
+ {% endblock htmlhead %}
+
+ <!-- Flot library for charts -->
+ <script type="text/javascript" src="./static/js/flot/jquery.flot.js"></script>
+
+ <!-- Javascript for our page menus -->
+ <script src="./static/js/underscore-min.js"></script>
+ <script type="text/javascript" src="./static/js/backbone-min.js"></script>
+
+ <!--
+ <script src="/src/application.js"></script>
+ <script src="/src/modules/mymodule.js"></script>
+ -->
+
+</head>
+<body>
+ <div class="wrapper">
+ <div class="header"></div>
+ <div class="container">
+ {% block content %}
+ {% endblock content %}
+ </div>
+ <!-- Div to push footer -->
+ <div class="push"></div>
+ </div>
+ <div class="footer"></div>
+
+
+</body>
+</html>
@@ -0,0 +1 @@
+{% extends "base.html" %}
@@ -0,0 +1,98 @@
+{% extends "base.html" %}
+
+{% block pagetitle %}
+{% endblock pagetitle %}
+
+{% block htmlhead %}
+{% endblock htmlhead %}
+
+{% block content %}
+<a href="#" style="border:none;"><div class="logo"></div></a>
+<div class="primary-column">
+ <div class="primary-content" style="margin-top:0px">
+ <!-- Begin rightside content -->
+ <div class="content">
+ <!-- Begin content -->
+ <!-- Display regression stuff-->
+ <div class="content-box">
+ <h4>Regression Analysis</h4>
+ <div class="charts">
+ <div class="chart">
+ <strong>UA Sniffing Chart</strong>
+ <div class="chart-container" id="ua-sniff-chart">
+ </div>
+ </div>
+ <div class="chart" >
+ <strong>Prefixed CSS Usage</strong>
+ <div class="chart-container" id="prefixed-feature-chart">
+ </div>
+ </div>
+ </div>
+ <br style="clear:both"/>
+ </div>
+ <script src="./static/js/index-charts.js" type="text/javascript"></script>
+
+ <!-- Display table with scans -->
+ <div class="content-box">
+ <h4>Available Scans</h4>
+ <table class="data-display">
+ <tr class="table-header">
+ <th class="id">Batch</th>
+ <th>Date completed</th>
+ <th>UA issue %</th>
+ <th>CSS issue %</th>
+ <th>UA issues fixed</th>
+ <th>UA issues regressed</th>
+ <th>CSS use fixed</th>
+ <th>CSS use regressed</th>
+ </tr>
+ <tr>
+ <td class="id">1</td>
+ <td><a href="scanreport.html">07-23-2012 21:11:01</a></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td class="id">2</td>
+ <td><a href="#">07-23-2012 21:11:01</a></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td class="id">3</td>
+ <td><a href="#">07-23-2012 21:11:01</a></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td class="id">4</td>
+ <td><a href="#">07-23-2012 21:11:01</a></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ </tr>
+ </table>
+ <div class="pagination">« Prev | 1 | 2 | 3 | 4 | Next »</div>
+ </div>
+ <!-- End content -->
+ </div>
+ <!-- End primary-content-->
+ </div>
+<!-- End primary-column-->
+</div>
+{% endblock content %}
@@ -0,0 +1 @@
+{% extends "base.html" %}
View
@@ -6,8 +6,9 @@
admin.autodiscover()
urlpatterns = patterns('',
- # Examples:
- url(r'^$', 'spade.view.views.home', name='home'),
+ url(r'^$', 'spade.view.views.dashboard', name='dashboard'),
+ url(r'^batch/(?P<batch_id>\d+)/$', 'spade.view.views.batch_report', name='batch_report'),
+ url(r'^site/(?P<site_id>\d+)/$', 'spade.view.views.site_report', name='site_report'),
url(r'^admin/', include(admin.site.urls)),
View
@@ -1,14 +1,25 @@
"""
-
Spade home view
-
"""
from django.http import HttpResponse
from django.shortcuts import get_object_or_404, redirect, render
from django.shortcuts import redirect
from django.template.response import TemplateResponse
-def home(request):
- """ Home view """
- return TemplateResponse(request, "home.html",{})
+
+def dashboard(request):
+ """ Front page dashboard view """
+ return TemplateResponse(request, "dashboard.html",{})
+
+
+def batch_report(request, batch_id):
+ """ Batch report view """
+ context = { 'batch_id': batch_id }
+ return TemplateResponse(request, "batch_report.html", context)
+
+
+def site_report(request, site_id):
+ """ Site report view """
+ context = { 'site_id': site_id }
+ return TemplateResponse(request, "site_report.html", context)
Oops, something went wrong.

0 comments on commit df9b570

Please sign in to comment.