diff --git a/static/js/directives/ui/logs-view.js b/static/js/directives/ui/logs-view.js index c2265039a..13b26e0d6 100644 --- a/static/js/directives/ui/logs-view.js +++ b/static/js/directives/ui/logs-view.js @@ -1,3 +1,6 @@ +import { LogUsageChart } from '../../graphing'; + + /** * Element which displays usage logs for the given entity. */ diff --git a/static/js/directives/ui/usage-chart.js b/static/js/directives/ui/usage-chart.js index 5eb0edfa3..3a65d4c53 100644 --- a/static/js/directives/ui/usage-chart.js +++ b/static/js/directives/ui/usage-chart.js @@ -1,3 +1,6 @@ +import { UsageChart } from '../../graphing'; + + /** * An element which displays a donut chart, along with warnings if the limit is close to being * reached. diff --git a/static/js/graphing.js b/static/js/graphing.js index ec62ac378..67fe87d7a 100644 --- a/static/js/graphing.js +++ b/static/js/graphing.js @@ -31,8 +31,8 @@ var DEPTH_WIDTH = 140; /** * Based off of http://mbostock.github.io/d3/talk/20111018/tree.html by Mike Bostock (@mbostock) */ -function ImageHistoryTree(namespace, name, images, getTagsForImage, formatComment, formatTime, - formatCommand, opt_tagFilter) { +export function ImageHistoryTree(namespace, name, images, getTagsForImage, formatComment, formatTime, + formatCommand, opt_tagFilter) { /** * The namespace of the repo. @@ -994,7 +994,7 @@ ImageHistoryTree.prototype.dispose = function() { /** * Based off of http://bl.ocks.org/mbostock/1346410 */ -function UsageChart() { +export function UsageChart() { this.total_ = null; this.count_ = null; this.drawn_ = false; @@ -1106,7 +1106,7 @@ UsageChart.prototype.draw = function(container) { /** * A chart which displays the last seven days of actions in the account. */ -function LogUsageChart(titleMap) { +export function LogUsageChart(titleMap) { this.titleMap_ = titleMap; this.colorScale_ = d3.scale.category20(); this.entryMap_ = {};