Skip to content

Commit

Permalink
Fix Rickshaw/D3 version mismatch.
Browse files Browse the repository at this point in the history
When Rickshaw was updated to 1.5.1 in
prometheus@fd43daf,
the Rickshaw upstream package now contained 3 different D3 files:

d3.min.js
d3.v2.js
d3.v3.js

For details on why that is, see
https://groups.google.com/forum/#!topic/d3-js/lXQgKA7mtEw

For the 1.5.1 Rickshaw to work properly (being able to format dates with
D3 without causing a JS error), it needs d3.v2.js or d3.v3.js, not the
d3.min.js one. I chose to update us to d3.v3.js now, since that is the
most recent and minified version, and I didn't see any problems with it
(also, the current Rickshaw examples are using that D3 version).

Currently, displaying graphs with a range >14d is broken. This fixes
that.
  • Loading branch information
juliusv committed Feb 2, 2015
1 parent 63a7982 commit b3978fe
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion console_libraries/prom.lib
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<link type="text/css" rel="stylesheet" href="/static/vendor/rickshaw/rickshaw.min.css">
<link type="text/css" rel="stylesheet" href="/static/vendor/bootstrap-3.3.1/css/bootstrap.min.css">
<link type="text/css" rel="stylesheet" href="/static/css/prom_console.css">
<script src="/static/vendor/rickshaw/vendor/d3.min.js"></script>
<script src="/static/vendor/rickshaw/vendor/d3.v3.js"></script>
<script src="/static/vendor/rickshaw/vendor/d3.layout.min.js"></script>
<script src="/static/vendor/rickshaw/rickshaw.min.js"></script>
<script src="/static/vendor/js/jquery.min.js"></script>
Expand Down
2 changes: 0 additions & 2 deletions web/static/vendor/rickshaw/vendor/d3.min.js

This file was deleted.

5 changes: 5 additions & 0 deletions web/static/vendor/rickshaw/vendor/d3.v3.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion web/templates/graph.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<link type="text/css" rel="stylesheet" href="/static/vendor/rickshaw/rickshaw.min.css">
<link type="text/css" rel="stylesheet" href="/static/vendor/bootstrap-datetimepicker/bootstrap-datetimepicker.min.css">

<script src="/static/vendor/rickshaw/vendor/d3.min.js"></script>
<script src="/static/vendor/rickshaw/vendor/d3.v3.js"></script>
<script src="/static/vendor/rickshaw/vendor/d3.layout.min.js"></script>
<script src="/static/vendor/rickshaw/rickshaw.min.js"></script>
<script src="/static/vendor/bootstrap-datetimepicker/bootstrap-datetimepicker.js"></script>
Expand Down

0 comments on commit b3978fe

Please sign in to comment.