diff --git a/Gruntfile.js b/Gruntfile.js index 56c89d3..2e356cb 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -32,7 +32,7 @@ module.exports = function (grunt) { 'bower_components/d3/d3.js', 'bower_components/c3/c3.js', 'bower_components/moment/moment.js', - 'javascript/c3js-directive.js', + 'bower_components/c3-angular/c3js-directive.js', 'javascript/app.js', 'javascript/controllers/*', 'javascript/directives.js', diff --git a/assets/js/elasticsearch-gui.js b/assets/js/elasticsearch-gui.js index ecfacf5..81bbd29 100644 --- a/assets/js/elasticsearch-gui.js +++ b/assets/js/elasticsearch-gui.js @@ -1,6 +1,6 @@ -/*! elasticsearch-gui - v1.2.0 - 2014-12-23 +/*! elasticsearch-gui - v1.2.1 - 2015-01-01 * https://github.com/jettro/elasticsearch-gui -* Copyright (c) 2014 ; Licensed */ +* Copyright (c) 2015 ; Licensed */ (function(window, document, undefined) {'use strict'; /** @@ -66,7 +66,7 @@ function minErr(module) { return match; }); - message = message + '\nhttp://errors.angularjs.org/1.2.27/' + + message = message + '\nhttp://errors.angularjs.org/1.2.28-build.571+sha.bb3b653/' + (module ? module + '/' : '') + code; for (i = 2; i < arguments.length; i++) { message = message + (i == 2 ? '?' : '&') + 'p' + (i-2) + '=' + @@ -232,8 +232,8 @@ if ('i' !== 'I'.toLowerCase()) { } -var /** holds major version number for IE or NaN for real browsers */ - msie, +var + msie, // holds major version number for IE, or NaN if UA is not IE. jqLite, // delay binding since jQuery could be loaded after us. jQuery, // delay binding slice = [].slice, @@ -1985,11 +1985,11 @@ function setupModuleLoader(window) { * - `codeName` – `{string}` – Code name of the release, such as "jiggling-armfat". */ var version = { - full: '1.2.27', // all of these placeholder strings will be replaced by grunt's + full: '1.2.28-build.571+sha.bb3b653', // all of these placeholder strings will be replaced by grunt's major: 1, // package task minor: 2, - dot: 27, - codeName: 'prime-factorization' + dot: 28, + codeName: 'snapshot' }; @@ -5809,6 +5809,21 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { }; Attributes.prototype = { + /** + * @ngdoc method + * @name $compile.directive.Attributes#$normalize + * @kind function + * + * @description + * Converts an attribute name (e.g. dash/colon/underscore-delimited string, optionally prefixed with `x-` or + * `data-`) to its normalized, camelCase form. + * + * Also there is special case for Moz prefix starting with upper case letter. + * + * For further information check out the guide on {@link guide/directive#matching-directives Matching Directives} + * + * @param {string} name Name to normalize + */ $normalize: directiveNormalize, @@ -7142,13 +7157,6 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { var PREFIX_REGEXP = /^(x[\:\-_]|data[\:\-_])/i; /** * Converts all accepted directives format into proper directive name. - * All of these will become 'myDirective': - * my:Directive - * my-directive - * x-my-directive - * data-my:directive - * - * Also there is special case for Moz prefix starting with upper case letter. * @param name Name to normalize */ function directiveNormalize(name) { @@ -7707,6 +7715,21 @@ function $HttpProvider() { * In addition, you can supply a `headers` property in the config object passed when * calling `$http(config)`, which overrides the defaults without changing them globally. * + * To explicitly remove a header automatically added via $httpProvider.defaults.headers on a per request basis, + * Use the `headers` property, setting the desired header to `undefined`. For example: + * + * ```js + * var req = { + * method: 'POST', + * url: 'http://example.com', + * headers: { + * 'Content-Type': undefined + * }, + * data: { test: 'test' }, + * } + * + * $http(req).success(function(){...}).error(function(){...}); + * ``` * * # Transforming Requests and Responses * @@ -10873,7 +10896,7 @@ Parser.prototype = { ensureSafeObject(context, parser.text); ensureSafeFunction(fnPtr, parser.text); - // IE stupidity! (IE doesn't have apply for some native functions) + // IE doesn't have apply for some native functions var v = fnPtr.apply ? fnPtr.apply(context, args) : fnPtr(args[0], args[1], args[2], args[3], args[4]); @@ -15807,9 +15830,8 @@ var htmlAnchorDirective = valueFn({ * make the link go to the wrong URL if the user clicks it before * Angular has a chance to replace the `{{hash}}` markup with its * value. Until Angular replaces the markup the link will be broken - * and will most likely return a 404 error. - * - * The `ngHref` directive solves this problem. + * and will most likely return a 404 error. The `ngHref` directive + * solves this problem. * * The wrong way to write it: * ```html @@ -21429,7 +21451,6 @@ var scriptDirective = ['$templateCache', function($templateCache) { compile: function(element, attr) { if (attr.type == 'text/ng-template') { var templateUrl = attr.id, - // IE is not consistent, in scripts we have to read .text but in other nodes we have to read .textContent text = element[0].text; $templateCache.put(templateUrl, text); @@ -22708,7 +22729,7 @@ function $RouteProvider(){ if (i === 0) { result.push(segment); } else { - var segmentMatch = segment.match(/(\w+)(.*)/); + var segmentMatch = segment.match(/(\w+)(?:[?*])?(.*)/); var key = segmentMatch[1]; result.push(params[key]); result.push(segmentMatch[2] || ''); @@ -71944,7 +71965,7 @@ module.exports = utils; /*global define, module, exports, require */ - var c3 = { version: "0.4.7" }; + var c3 = { version: "0.4.8" }; var c3_chart_fn, c3_chart_internal_fn; @@ -72055,7 +72076,7 @@ module.exports = utils; $$.xOrient = config.axis_rotated ? "left" : "bottom"; $$.yOrient = config.axis_rotated ? (config.axis_y_inner ? "top" : "bottom") : (config.axis_y_inner ? "right" : "left"); - $$.y2Orient = config.axis_rotated ? (config.axis_y_inner ? "bottom" : "top") : (config.axis_y_inner ? "left" : "right"); + $$.y2Orient = config.axis_rotated ? (config.axis_y2_inner ? "bottom" : "top") : (config.axis_y2_inner ? "left" : "right"); $$.subXOrient = config.axis_rotated ? "left" : "bottom"; $$.isLegendRight = config.legend_position === 'right'; @@ -72679,8 +72700,14 @@ module.exports = utils; return d ? this.x(d.x) : null; }; c3_chart_internal_fn.xv = function (d) { - var $$ = this; - return Math.ceil($$.x($$.isTimeSeries() ? $$.parseDate(d.value) : d.value)); + var $$ = this, value = d.value; + if ($$.isTimeSeries()) { + value = $$.parseDate(d.value); + } + else if ($$.isCategorized() && typeof d.value === 'string') { + value = $$.config.axis_x_categories.indexOf(d.value); + } + return Math.ceil($$.x(value)); }; c3_chart_internal_fn.yv = function (d) { var $$ = this, @@ -72853,8 +72880,8 @@ module.exports = utils; var $$ = this, parsedDate; if (date instanceof Date) { parsedDate = date; - } else if (typeof date === 'number') { - parsedDate = new Date(date); + } else if (typeof date === 'number' || !isNaN(date)) { + parsedDate = new Date(+date); } else { parsedDate = $$.dataTimeFormat($$.config.data_xFormat).parse(date); } @@ -73296,9 +73323,9 @@ module.exports = utils; domainLength = Math.abs(yDomainMax - yDomainMin); padding = padding_top = padding_bottom = domainLength * 0.1; - if (center) { + if (typeof center !== 'undefined') { yDomainAbs = Math.max(Math.abs(yDomainMin), Math.abs(yDomainMax)); - yDomainMax = yDomainAbs - center; + yDomainMax = center + yDomainAbs; yDomainMin = center - yDomainAbs; } // add padding for data label @@ -73310,16 +73337,16 @@ module.exports = utils; padding_bottom += domainLength * (ratio[0] / (1 - ratio[0] - ratio[1])); } else if (showVerticalDataLabel) { lengths = $$.getDataLabelLength(yDomainMin, yDomainMax, axisId, 'height'); - padding_top += lengths[1]; - padding_bottom += lengths[0]; + padding_top += this.convertPixelsToAxisPadding(lengths[1], domainLength); + padding_bottom += this.convertPixelsToAxisPadding(lengths[0], domainLength); } if (axisId === 'y' && notEmpty(config.axis_y_padding)) { - padding_top = $$.getAxisPadding(config.axis_y_padding, 'top', padding, domainLength); - padding_bottom = $$.getAxisPadding(config.axis_y_padding, 'bottom', padding, domainLength); + padding_top = $$.getAxisPadding(config.axis_y_padding, 'top', padding_top, domainLength); + padding_bottom = $$.getAxisPadding(config.axis_y_padding, 'bottom', padding_bottom, domainLength); } if (axisId === 'y2' && notEmpty(config.axis_y2_padding)) { - padding_top = $$.getAxisPadding(config.axis_y2_padding, 'top', padding, domainLength); - padding_bottom = $$.getAxisPadding(config.axis_y2_padding, 'bottom', padding, domainLength); + padding_top = $$.getAxisPadding(config.axis_y2_padding, 'top', padding_top, domainLength); + padding_bottom = $$.getAxisPadding(config.axis_y2_padding, 'bottom', padding_bottom, domainLength); } // Bar/Area chart should be 0-based if all positive|negative if (isZeroBased) { @@ -74460,7 +74487,7 @@ module.exports = utils; } else if (config.axis_rotated) { return defaultPadding + legendWidthOnRight; } else if (!config.axis_y2_show || config.axis_y2_inner) { // && !config.axis_rotated - return defaultPadding + legendWidthOnRight + ($$.getY2AxisLabelPosition().isOuter ? 20 : 0); + return 2 + legendWidthOnRight + ($$.getY2AxisLabelPosition().isOuter ? 20 : 0); } else { return ceil10($$.getAxisWidthByAxisId('y2')) + legendWidthOnRight; } @@ -74488,9 +74515,10 @@ module.exports = utils; c3_chart_internal_fn.getSvgLeft = function (withoutRecompute) { var $$ = this, config = $$.config, + hasLeftAxisRect = config.axis_rotated || (!config.axis_rotated && !config.axis_y_inner), leftAxisClass = config.axis_rotated ? CLASS.axisX : CLASS.axisY, leftAxis = $$.main.select('.' + leftAxisClass).node(), - svgRect = leftAxis ? leftAxis.getBoundingClientRect() : {right: 0}, + svgRect = leftAxis && hasLeftAxisRect ? leftAxis.getBoundingClientRect() : {right: 0}, chartRect = $$.selectChart.node().getBoundingClientRect(), hasArc = $$.hasArcType(), svgLeft = svgRect.right - chartRect.left - (hasArc ? 0 : $$.getCurrentPaddingLeft(withoutRecompute)); @@ -75173,7 +75201,15 @@ module.exports = utils; } else { xPos = $$.hasType('bar') ? (points[2][0] + points[0][0]) / 2 : points[0][0]; } - return d.value !== null ? xPos : xPos > $$.width ? $$.width - box.width : xPos; + // show labels regardless of the domain if value is null + if (d.value === null) { + if (xPos > $$.width) { + xPos = $$.width - box.width; + } else if (xPos < 0) { + xPos = 4; + } + } + return xPos; }; c3_chart_internal_fn.getYForText = function (points, d, textElement) { var $$ = this, @@ -75183,7 +75219,15 @@ module.exports = utils; } else { yPos = points[2][1] + (d.value < 0 ? box.height : $$.isBarType(d) ? -3 : -6); } - return d.value !== null ? yPos : yPos < box.height ? box.height : yPos; + // show labels regardless of the domain if value is null + if (d.value === null && !$$.config.axis_rotated) { + if (yPos < box.height) { + yPos = box.height; + } else if (yPos > this.height) { + yPos = this.height - 4; + } + } + return yPos; }; c3_chart_internal_fn.setTargetType = function (targetIds, type) { @@ -76255,9 +76299,19 @@ module.exports = utils; .text($$.textForY2AxisLabel.bind($$)); }; - c3_chart_internal_fn.getAxisPadding = function (padding, key, defaultValue, all) { - var ratio = padding.unit === 'ratio' ? all : 1; - return isValue(padding[key]) ? padding[key] * ratio : defaultValue; + c3_chart_internal_fn.getAxisPadding = function (padding, key, defaultValue, domainLength) { + if (!isValue(padding[key])) { + return defaultValue; + } + if (padding.unit === 'ratio') { + return padding[key] * domainLength; + } + // assume padding is pixels if unit is not specified + return this.convertPixelsToAxisPadding(padding[key], domainLength); + }; + c3_chart_internal_fn.convertPixelsToAxisPadding = function (pixels, domainLength) { + var length = this.config.axis_rotated ? this.width : this.height; + return domainLength * (pixels / length); }; c3_chart_internal_fn.generateTickValues = function (values, tickCount, forTimeSeries) { @@ -76618,15 +76672,18 @@ module.exports = utils; mainArc.enter().append('path') .attr("class", $$.classArc.bind($$)) .style("fill", function (d) { return $$.color(d.data); }) - .style("cursor", function (d) { return config.data_selection_isselectable(d) ? "pointer" : null; }) + .style("cursor", function (d) { return config.interaction_enabled && config.data_selection_isselectable(d) ? "pointer" : null; }) .style("opacity", 0) .each(function (d) { if ($$.isGaugeType(d.data)) { d.startAngle = d.endAngle = -1 * (Math.PI / 2); } this._current = d; - }) - .on('mouseover', function (d) { + }); + mainArc + .attr("transform", function (d) { return !$$.isGaugeType(d.data) && withTransform ? "scale(0)" : ""; }) + .style("opacity", function (d) { return d === this._current ? 0 : 1; }) + .on('mouseover', config.interaction_enabled ? function (d) { var updated, arcData; if ($$.transiting) { // skip while transiting return; @@ -76638,14 +76695,14 @@ module.exports = utils; $$.api.focus(updated.data.id); $$.toggleFocusLegend(updated.data.id, true); $$.config.data_onmouseover(arcData, this); - }) - .on('mousemove', function (d) { + } : null) + .on('mousemove', config.interaction_enabled ? function (d) { var updated = $$.updateAngle(d), arcData = $$.convertToArcData(updated), selectedData = [arcData]; $$.showTooltip(selectedData, d3.mouse(this)); - }) - .on('mouseout', function (d) { + } : null) + .on('mouseout', config.interaction_enabled ? function (d) { var updated, arcData; if ($$.transiting) { // skip while transiting return; @@ -76658,16 +76715,13 @@ module.exports = utils; $$.revertLegend(); $$.hideTooltip(); $$.config.data_onmouseout(arcData, this); - }) - .on('click', function (d, i) { + } : null) + .on('click', config.interaction_enabled ? function (d, i) { var updated = $$.updateAngle(d), arcData = $$.convertToArcData(updated); if ($$.toggleShape) { $$.toggleShape(this, arcData, i); } $$.config.data_onclick.call($$.api, arcData, this); - }); - mainArc - .attr("transform", function (d) { return !$$.isGaugeType(d.data) && withTransform ? "scale(0)" : ""; }) - .style("opacity", function (d) { return d === this._current ? 0 : 1; }) + } : null) .each(function () { $$.transiting = true; }) .transition().duration(duration) .attrTween("d", function (d) { @@ -77633,7 +77687,7 @@ module.exports = utils; $$.unexpandArc(targetIds); } if ($$.config.legend_show) { - $$.showLegend(targetIds); + $$.showLegend(targetIds.filter($$.isLegendToShow.bind($$))); } $$.focusedTargetIds = []; @@ -78558,7 +78612,7 @@ module.exports = utils; var dy = sizeFor1Char.h; if (i === 0) { if (orient === 'left' || orient === 'right') { - dy = -((counts[d.index] - 1) * (sizeFor1Char.h / 2) - (params.isCategory ? 2 : 3)); + dy = -((counts[d.index] - 1) * (sizeFor1Char.h / 2) - 3); } else { dy = ".71em"; } @@ -78567,7 +78621,7 @@ module.exports = utils; } function tickSize(d) { - var tickPosition = scale(d) + tickOffset; + var tickPosition = scale(d) + (tickCentered ? 0 : tickOffset); return range[0] < tickPosition && tickPosition < range[1] ? innerTickSize : 0; } @@ -81660,7 +81714,6 @@ angular.module('gridshore.c3js.chart', []) $scope.chartSize = null; $scope.colors = null; $scope.jsonKeys = null; - $scope.config = null; this.showGraph = function() { var config = {}; @@ -81710,16 +81763,16 @@ angular.module('gridshore.c3js.chart', []) config.color = {"pattern":$scope.colors}; } - $scope.config = config; + $scope.config = config; - if ($scope.chartData && $scope.chartColumns) { - $scope.$watchCollection('chartData', function () { - loadChartData(); - }); - } else { - $scope.chart = c3.generate($scope.config); - } - }; + if ($scope.chartData && $scope.chartColumns) { + $scope.$watchCollection('chartData', function() { + loadChartData(); + }); + } else { + $scope.chart = c3.generate($scope.config); + } + }; this.addColumn = function(column,columnType,columnName,columnColor) { $scope.columns.push(column); @@ -81764,17 +81817,17 @@ angular.module('gridshore.c3js.chart', []) $scope.grid = {}; } if (axis === "x") { - if ($scope.grid.x == undefined) { + if ($scope.grid.x === undefined) { $scope.grid.x = {}; } - if ($scope.grid.x.lines == undefined) { + if ($scope.grid.x.lines === undefined) { $scope.grid.x.lines = []; } } else { - if ($scope.grid.y == undefined) { + if ($scope.grid.y === undefined) { $scope.grid.y = {}; } - if ($scope.grid.y.lines == undefined) { + if ($scope.grid.y.lines === undefined) { $scope.grid.y.lines = []; } @@ -81782,7 +81835,7 @@ angular.module('gridshore.c3js.chart', []) if (axis === "y2") { $scope.grid.y.lines.push({"value":value,"text":text,"axis":"y2"}); } else { - $scope.grid[axis].lines.push({"value":value,"text":text}) + $scope.grid[axis].lines.push({"value":value,"text":text}); } }; @@ -81821,7 +81874,6 @@ angular.module('gridshore.c3js.chart', []) } function loadChartData() { - // TODO come up with a better solution for the a-sync part of these kind of fields $scope.jsonKeys = {}; $scope.jsonKeys.value=[]; angular.forEach($scope.chartColumns, function(column) { @@ -81842,13 +81894,15 @@ angular.module('gridshore.c3js.chart', []) $scope.config.data.json=$scope.chartData; $scope.chart = c3.generate($scope.config); + + // $scope.chart.load(data); } }]) -.directive('c3chart',['$timeout', function($timeout) { +.directive('c3chart', ['$timeout', function($timeout) { var chartLinker = function(scope,element,attrs,chartCtrl) { // Trick to wait for all rendering of the DOM to be finished. $timeout(function() { - chartCtrl.showGraph() + chartCtrl.showGraph(); }); }; @@ -81868,13 +81922,13 @@ angular.module('gridshore.c3js.chart', []) "replace":true, "transclude":true, "link": chartLinker - } + }; }]) .directive('chartColumn', function() { var columnLinker = function(scope,element,attrs,chartCtrl) { - var column = attrs['columnValues'].split(","); - column.unshift(attrs['columnId']); - chartCtrl.addColumn(column,attrs['columnType'],attrs['columnName'],attrs['columnColor']); + var column = attrs.columnValues.split(","); + column.unshift(attrs.columnId); + chartCtrl.addColumn(column,attrs.columnType,attrs.columnName,attrs.columnColor); }; return { @@ -81883,27 +81937,27 @@ angular.module('gridshore.c3js.chart', []) "scope": {}, "replace":true, "link": columnLinker - } + }; }) .directive('chartAxes', function() { var axesLinker = function(scope,element,attrs,chartCtrl) { - var x = attrs['valuesX']; + var x = attrs.valuesX; if (x) { chartCtrl.addXAxisValues(x); } - var y = attrs['y']; - var y2 = attrs['y2']; + var y = attrs.y; + var y2 = attrs.y2; var yAxis = {}; if (y2) { var items = y2.split(","); - for (item in items) { + for (var item in items) { yAxis[items[item]] = "y2"; } if (y) { - var items = y.split(","); - for (item in items) { - yAxis[items[item]] = "y"; + var yItems = y.split(","); + for (var yItem in yItems) { + yAxis[yItems[yItem]] = "y"; } } chartCtrl.addYAxis(yAxis); @@ -81916,11 +81970,11 @@ angular.module('gridshore.c3js.chart', []) "scope": {}, "replace":true, "link": axesLinker - } + }; }) .directive('chartAxis', function() { var axisLinker = function(scope,element,attrs,chartCtrl) { - var rotate = attrs['axisRotate']; + var rotate = attrs.axisRotate; if (rotate) { chartCtrl.rotateAxis(); } @@ -81934,22 +81988,21 @@ angular.module('gridshore.c3js.chart', []) "template": "
", "replace":true, "link": axisLinker - } - + }; }) .directive('chartAxisX', function() { var axisLinker = function(scope,element,attrs,chartCtrl) { - var position=attrs['axisPosition']; - var label=attrs['axisLabel']; + var position=attrs.axisPosition; + var label=attrs.axisLabel; var axis={"label":{"text":label,"position":position}}; - var type=attrs['axisType']; + var type=attrs.axisType; if (type) { axis.type=type; } // TODO has a strange effect on the graph, need to evaluate - var height = attrs['axisHeight']; + var height = attrs.axisHeight; if (height) { axis.height=height; } @@ -81964,27 +82017,27 @@ angular.module('gridshore.c3js.chart', []) "template": "", "replace":true, "link": axisLinker - } + }; }) .directive('chartAxisY', function() { var axisLinker = function(scope,element,attrs,chartCtrl) { - var id=attrs['axisId']; - var position=attrs['axisPosition']; - var label=attrs['axisLabel']; + var id=attrs.axisId; + var position=attrs.axisPosition; + var label=attrs.axisLabel; var axis={"label":{"text":label,"position":position}}; if (id === 'y2') { axis.show=true; } - var paddingTop = attrs['paddingTop']; - var paddingBottom = attrs['paddingBottom']; - if (paddingTop | paddingBottom) { + var paddingTop = attrs.paddingTop; + var paddingBottom = attrs.paddingBottom; + if (paddingTop || paddingBottom) { paddingTop = (paddingTop) ? paddingTop : 0; paddingBottom = (paddingBottom)? paddingBottom : 0; axis.padding = {"top":parseInt(paddingTop),"bottom":parseInt(paddingBottom)}; } - var rangeMax = attrs['rangeMax']; - var rangeMin = attrs['rangeMin']; + var rangeMax = attrs.rangeMax; + var rangeMin = attrs.rangeMin; if (rangeMax) { axis.max = parseInt(rangeMax); } @@ -82001,19 +82054,19 @@ angular.module('gridshore.c3js.chart', []) "scope": {}, "replace":true, "link": axisLinker - } + }; }) .directive('chartGrid', function() { var gridLinker = function(scope,element,attrs,chartCtrl) { - var showX = attrs["showX"]; + var showX = attrs.showX; if (showX && showX === "true") { chartCtrl.addGrid("x"); } - var showY = attrs["showY"]; + var showY = attrs.showY; if (showY && showY === "true") { chartCtrl.addGrid("y"); } - var showY2 = attrs["showY2"]; + var showY2 = attrs.showY2; if (showY2 && showY2 === "true") { chartCtrl.addGrid("y2"); } @@ -82027,13 +82080,13 @@ angular.module('gridshore.c3js.chart', []) "link": gridLinker, "transclude": true, "template": "" - } + }; }) .directive('chartGridOptional', function() { var gridLinker = function(scope,element,attrs,chartCtrl) { - var axisId = attrs["axisId"]; - var value = attrs["gridValue"]; - var text = attrs["gridText"]; + var axisId = attrs.axisId; + var value = attrs.gridValue; + var text = attrs.gridText; chartCtrl.addGridLine(axisId,value,text); }; @@ -82044,34 +82097,34 @@ angular.module('gridshore.c3js.chart', []) "scope": {}, "replace":true, "link": gridLinker - } + }; }) .directive('chartAxisXTick', function() { var tickLinker = function(scope,element,attrs,chartCtrl) { var tick = {}; - var count = attrs['tickCount']; + var count = attrs.tickCount; if (count) { tick.count = count; } // TODO, dit lijkt nog niet echt iets te doen - var format = attrs['tickFormat']; + var format = attrs.tickFormat; if (format) { tick.format = format; } - var culling = attrs['tickCulling']; + var culling = attrs.tickCulling; if (culling) { tick.culling = culling; } - var rotate = attrs['tickRotate']; + var rotate = attrs.tickRotate; if (rotate) { tick.rotate = rotate; } - var fit = attrs['tickFit']; + var fit = attrs.tickFit; if (fit) { tick.fit = fit; } @@ -82085,17 +82138,17 @@ angular.module('gridshore.c3js.chart', []) "scope": {}, "replace":true, "link": tickLinker - } + }; }) .directive('chartLegend', function() { var legendLinker = function(scope,element,attrs,chartCtrl) { var legend = null; - var show = attrs["showLegend"]; + var show = attrs.showLegend; if (show && show === "false") { legend = {"show":false}; } else { - var position = attrs["legendPosition"]; + var position = attrs.legendPosition; if (position) { legend = {"position":position}; } @@ -82112,17 +82165,17 @@ angular.module('gridshore.c3js.chart', []) "scope": {}, "replace":true, "link": legendLinker - } + }; }) .directive('chartTooltip', function() { var tooltipLinker = function(scope,element,attrs,chartCtrl) { var tooltip = null; - var show = attrs["showTooltip"]; + var show = attrs.showTooltip; if (show && show === "false") { tooltip = {"show":false}; } else { - var grouped = attrs["groupTooltip"]; + var grouped = attrs.groupTooltip; if (grouped && grouped === "false") { tooltip = {"grouped":false}; } @@ -82139,14 +82192,14 @@ angular.module('gridshore.c3js.chart', []) "scope": {}, "replace":true, "link": tooltipLinker - } + }; }) .directive('chartSize', function() { var sizeLinker = function(scope,element,attrs,chartCtrl) { var chartSize = null; - var width = attrs["chartWidth"]; - var height = attrs["chartHeight"] + var width = attrs.chartWidth; + var height = attrs.chartHeight; if (width || height) { chartSize = {}; if (width) { @@ -82165,12 +82218,12 @@ angular.module('gridshore.c3js.chart', []) "scope": {}, "replace":true, "link": sizeLinker - } + }; }) .directive('chartColors', function() { var colorsLinker = function(scope,element,attrs,chartCtrl) { - var pattern = attrs["colorPattern"]; + var pattern = attrs.colorPattern; if (pattern) { chartCtrl.addColors(pattern.split(",")); } @@ -82182,7 +82235,7 @@ angular.module('gridshore.c3js.chart', []) "scope": {}, "replace":true, "link": colorsLinker - } + }; }); //'use strict'; @@ -82206,7 +82259,7 @@ myApp.value('localStorage', window.localStorage); myApp.factory('$exceptionHandler',['$injector', function($injector) { return function(exception, cause) { - console.log(exception);Moved + console.log(exception); var errorHandling = $injector.get('errorHandling'); errorHandling.add(exception.message); throw exception; @@ -82214,7 +82267,7 @@ myApp.factory('$exceptionHandler',['$injector', function($injector) { }]); var serviceModule = angular.module('myApp.services', []); -serviceModule.value('version', 1.2); +serviceModule.value('version', '1.2.1'); function AggregateDialogCtrl ($scope, $modalInstance, fields) { $scope.fields = fields; $scope.aggsTypes = ["Term", "Range", "Histogram", "DateHistogram"]; diff --git a/assets/js/elasticsearch-gui.min.js b/assets/js/elasticsearch-gui.min.js index b3d2d2b..ccc709d 100644 --- a/assets/js/elasticsearch-gui.min.js +++ b/assets/js/elasticsearch-gui.min.js @@ -1,15 +1,15 @@ -/*! elasticsearch-gui - v1.2.0 - 2014-12-23 +/*! elasticsearch-gui - v1.2.1 - 2015-01-01 * https://github.com/jettro/elasticsearch-gui -* Copyright (c) 2014 ; Licensed */ +* Copyright (c) 2015 ; Licensed */ -function AggregateDialogCtrl(a,b,c){a.fields=c,a.aggsTypes=["Term","Range","Histogram","DateHistogram"],a.ranges=[],a.intervals=["year","month","week","day","hour","minute"],a.close=function(c){var d={};d.field=c.field,d.name=c.name,"Term"===c.aggstype?d.aggsType="term":"Range"===c.aggstype?(d.aggsType="range",d.ranges=a.ranges):"DateHistogram"===c.aggstype?(d.aggsType="datehistogram",d.interval=c.interval):"Histogram"===c.aggstype&&(d.aggsType="histogram",d.interval=c.interval),b.close(d)},a.addRangeField=function(b){a.ranges.push([b.range.from,b.range.to])}}function ConfigDialogCtrl(a,b,c){a.configuration=c,a.close=function(){b.close(a.configuration)}}function CreateSnapshotCtrl(a,b){a.dialog={includeGlobalState:!0,ignoreUnavailable:!1},a.close=function(a){b.close(a)}}function CreateSnapshotRepositoryCtrl(a,b){a.dialog={},a.close=function(a){b.close(a)}}function DashboardCtrl(a,b){function c(){b.indexesDetails(function(b){a.indices=b})}function d(){a.serverUrl=b.obtainServerAddress(),b.clusterHealth(function(b){a.health=b}),b.clusterNodes(function(b){a.nodes=b})}a.health={},a.nodes=[],a.plugins=[],a.serverUrl="",a.removeIndex=function(a){b.removeIndex(a,function(){c()})},a.openIndex=function(a){b.openIndex(a,function(){c()})},a.closeIndex=function(a){b.closeIndex(a,function(){c()})},a.$on("$viewContentLoaded",function(){c(),d()})}function GraphCtrl(a,b,c,d){function e(){var b={};b.index="",b.body={},b.size=0,b.body.query={matchAll:{}};var c=[];return c.push(a.aggregate),b.body.aggs=d.build(c),b}a.indices=[],a.types=[],a.fields=[],a.results=[],a.columns=[],a.loadIndices=function(){c.indexes(function(b){a.indices=b})},a.loadTypes=function(){c.types([],function(b){a.types=b})},a.loadFields=function(){c.fields([],[],function(b){a.fields=b})},a.openDialog=function(){var c={backdrop:!0,keyboard:!0,backdropClick:!0,templateUrl:"template/dialog/aggregate.html",controller:"AggregateDialogCtrl",resolve:{fields:function(){return angular.copy(a.fields)}}},d=b.open(c);d.result.then(function(b){b&&(a.aggregate=b,a.executeQuery())})},a.executeQuery=function(){var b=e();c.doSearch(b,function(b){if("term"===a.aggregate.aggsType){a.columns=[];var c={};angular.forEach(b.aggregations[a.aggregate.name].buckets,function(b){a.columns.push({id:b.key,type:"pie",name:b.key+"["+b.doc_count+"]"}),c[b.key]=b.doc_count}),a.results=[c]}else"datehistogram"===a.aggregate.aggsType?(a.columns=[{id:"doc_count",type:"line",name:"documents"}],a.xaxis={id:"key"},a.results=b.aggregations[a.aggregate.name].buckets):(a.columns=[{id:"doc_count",type:"bar",name:"documents"}],a.xaxis={id:"key"},a.results=b.aggregations[a.aggregate.name].buckets)},function(a){console.log(a)})},a.loadIndices(),a.loadTypes(),a.loadFields()}function NavbarCtrl(a,b,c,d,e){function f(){d.clusterStatus(function(b,c){a.statusCluster.message=b,a.statusCluster.state=c}),b(function(){f()},5e3)}a.statusCluster={},a.serverUrl=d.obtainServerAddress(),a.configureServerUrl=!1,a.configure=e;var g=[];this.addItem=function(a){g.push(a)},this.select=a.select=function(a){angular.forEach(g,function(a){a.selected=!1}),a.selected=!0},this.selectByUrl=function(b){angular.forEach(g,function(c){c.link==b.split("/")[1]&&a.select(c)})},a.changeServerUrl=function(){d.changeServerAddress(a.serverUrl),e.excludedIndexes=a.configure.excludedIndexes},a.openDialog=function(){var a={backdrop:!0,keyboard:!0,backdropClick:!0,templateUrl:"template/dialog/config.html",controller:"ConfigDialogCtrl",resolve:{fields:function(){return angular.copy(e)}}},b=c.open(a);b.result.then(function(a){a&&(d.changeServerAddress(a.serverUrl),e=angular.copy(a))},function(){})},a.initNavBar=function(){f()},f()}function NodeInfoCtrl(a,b,c){var d=c.nodeId;b.nodeInfo(d,function(b){a.nodes=b})}function NotificationCtrl(a,b){a.alerts={},a.$on("msg:notification",function(c,d,e){var f=Math.random().toString(36).substring(2,5);a.alerts[f]={type:d,message:e},b(function(){delete a.alerts[f]},1e4)})}function QueryCtrl(a,b,c,d,e){function f(){var b={};b.index="",b.body={},b.body.query={},b.size=a.pageSize,b.from=(a.currentPage-1)*a.pageSize;var c=[];angular.forEach(a.query.indices,function(a){a.state&&c.push(a.name)}),b.index=c.toString();var e=[];if(angular.forEach(a.query.types,function(a){a.state&&e.push(a.name)}),b.type=e.toString(),a.query.chosenFields.length>0&&(b.fields=a.query.chosenFields.toString()),a.query.multiSearch&&a.query.advanced.searchFields.length>0){for(var f={},j=0;jf;f++)c[f]=angular.extend(e.createDateObject(new Date(d,f,1),e.formatMonth),{uid:b.uniqueId+"-"+f});b.title=a(e.activeDate,e.formatMonthTitle),b.rows=e.split(c,3)},e.compare=function(a,b){return new Date(a.getFullYear(),a.getMonth())-new Date(b.getFullYear(),b.getMonth())},e.handleKeyDown=function(a){var b=e.activeDate.getMonth();if("left"===a)b-=1;else if("up"===a)b-=3;else if("right"===a)b+=1;else if("down"===a)b+=3;else if("pageup"===a||"pagedown"===a){var c=e.activeDate.getFullYear()+("pageup"===a?-1:1);e.activeDate.setFullYear(c)}else"home"===a?b=0:"end"===a&&(b=11);e.activeDate.setMonth(b)},e.refreshView()}}}]).directive("yearpicker",["dateFilter",function(){return{restrict:"EA",replace:!0,templateUrl:"template/datepicker/year.html",require:"^datepicker",link:function(a,b,c,d){function e(a){return parseInt((a-1)/f,10)*f+1}var f=d.yearRange;d.step={years:f},d.element=b,d._refreshView=function(){for(var b=new Array(f),c=0,g=e(d.activeDate.getFullYear());f>c;c++)b[c]=angular.extend(d.createDateObject(new Date(g+c,0,1),d.formatYear),{uid:a.uniqueId+"-"+c});a.title=[b[0].label,b[f-1].label].join(" - "),a.rows=d.split(b,5)},d.compare=function(a,b){return a.getFullYear()-b.getFullYear()},d.handleKeyDown=function(a){var b=d.activeDate.getFullYear();"left"===a?b-=1:"up"===a?b-=5:"right"===a?b+=1:"down"===a?b+=5:"pageup"===a||"pagedown"===a?b+=("pageup"===a?-1:1)*d.step.years:"home"===a?b=e(d.activeDate.getFullYear()):"end"===a&&(b=e(d.activeDate.getFullYear())+f-1),d.activeDate.setFullYear(b)},d.refreshView()}}}]).constant("datepickerPopupConfig",{datepickerPopup:"yyyy-MM-dd",currentText:"Today",clearText:"Clear",closeText:"Done",closeOnDateSelection:!0,appendToBody:!1,showButtonBar:!0}).directive("datepickerPopup",["$compile","$parse","$document","$position","dateFilter","dateParser","datepickerPopupConfig",function(a,b,c,d,e,f,g){return{restrict:"EA",require:"ngModel",scope:{isOpen:"=?",currentText:"@",clearText:"@",closeText:"@",dateDisabled:"&"},link:function(h,i,j,k){function l(a){return a.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()})}function m(a){if(a){if(angular.isDate(a)&&!isNaN(a))return k.$setValidity("date",!0),a;if(angular.isString(a)){var b=f.parse(a,n)||new Date(a);return isNaN(b)?void k.$setValidity("date",!1):(k.$setValidity("date",!0),b)}return void k.$setValidity("date",!1)}return k.$setValidity("date",!0),null}var n,o=angular.isDefined(j.closeOnDateSelection)?h.$parent.$eval(j.closeOnDateSelection):g.closeOnDateSelection,p=angular.isDefined(j.datepickerAppendToBody)?h.$parent.$eval(j.datepickerAppendToBody):g.appendToBody;h.showButtonBar=angular.isDefined(j.showButtonBar)?h.$parent.$eval(j.showButtonBar):g.showButtonBar,h.getText=function(a){return h[a+"Text"]||g[a+"Text"]},j.$observe("datepickerPopup",function(a){n=a||g.datepickerPopup,k.$render()});var q=angular.element("
f;f++)c[f]=angular.extend(e.createDateObject(new Date(d,f,1),e.formatMonth),{uid:b.uniqueId+"-"+f});b.title=a(e.activeDate,e.formatMonthTitle),b.rows=e.split(c,3)},e.compare=function(a,b){return new Date(a.getFullYear(),a.getMonth())-new Date(b.getFullYear(),b.getMonth())},e.handleKeyDown=function(a){var b=e.activeDate.getMonth();if("left"===a)b-=1;else if("up"===a)b-=3;else if("right"===a)b+=1;else if("down"===a)b+=3;else if("pageup"===a||"pagedown"===a){var c=e.activeDate.getFullYear()+("pageup"===a?-1:1);e.activeDate.setFullYear(c)}else"home"===a?b=0:"end"===a&&(b=11);e.activeDate.setMonth(b)},e.refreshView()}}}]).directive("yearpicker",["dateFilter",function(){return{restrict:"EA",replace:!0,templateUrl:"template/datepicker/year.html",require:"^datepicker",link:function(a,b,c,d){function e(a){return parseInt((a-1)/f,10)*f+1}var f=d.yearRange;d.step={years:f},d.element=b,d._refreshView=function(){for(var b=new Array(f),c=0,g=e(d.activeDate.getFullYear());f>c;c++)b[c]=angular.extend(d.createDateObject(new Date(g+c,0,1),d.formatYear),{uid:a.uniqueId+"-"+c});a.title=[b[0].label,b[f-1].label].join(" - "),a.rows=d.split(b,5)},d.compare=function(a,b){return a.getFullYear()-b.getFullYear()},d.handleKeyDown=function(a){var b=d.activeDate.getFullYear();"left"===a?b-=1:"up"===a?b-=5:"right"===a?b+=1:"down"===a?b+=5:"pageup"===a||"pagedown"===a?b+=("pageup"===a?-1:1)*d.step.years:"home"===a?b=e(d.activeDate.getFullYear()):"end"===a&&(b=e(d.activeDate.getFullYear())+f-1),d.activeDate.setFullYear(b)},d.refreshView()}}}]).constant("datepickerPopupConfig",{datepickerPopup:"yyyy-MM-dd",currentText:"Today",clearText:"Clear",closeText:"Done",closeOnDateSelection:!0,appendToBody:!1,showButtonBar:!0}).directive("datepickerPopup",["$compile","$parse","$document","$position","dateFilter","dateParser","datepickerPopupConfig",function(a,b,c,d,e,f,g){return{restrict:"EA",require:"ngModel",scope:{isOpen:"=?",currentText:"@",clearText:"@",closeText:"@",dateDisabled:"&"},link:function(h,i,j,k){function l(a){return a.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()})}function m(a){if(a){if(angular.isDate(a)&&!isNaN(a))return k.$setValidity("date",!0),a;if(angular.isString(a)){var b=f.parse(a,n)||new Date(a);return isNaN(b)?void k.$setValidity("date",!1):(k.$setValidity("date",!0),b)}return void k.$setValidity("date",!1)}return k.$setValidity("date",!0),null}var n,o=angular.isDefined(j.closeOnDateSelection)?h.$parent.$eval(j.closeOnDateSelection):g.closeOnDateSelection,p=angular.isDefined(j.datepickerAppendToBody)?h.$parent.$eval(j.datepickerAppendToBody):g.appendToBody;h.showButtonBar=angular.isDefined(j.showButtonBar)?h.$parent.$eval(j.showButtonBar):g.showButtonBar,h.getText=function(a){return h[a+"Text"]||g[a+"Text"]},j.$observe("datepickerPopup",function(a){n=a||g.datepickerPopup,k.$render()});var q=angular.element("
r&&(r=k.x),k.y>s&&(s=k.y),l.push(k.x),m.push(k.y);else for(n=0;o>n;++n){var v=+t(k=a[n],n),w=+u(k,n);p>v&&(p=v),q>w&&(q=w),v>r&&(r=v),w>s&&(s=w),l.push(v),m.push(w)}var x=r-p,y=s-q;x>y?s=q+x:r=p+y;var z=ke();if(z.add=function(a){f(z,a,+t(a,++n),+u(a,n),p,q,r,s)},z.visit=function(a){le(a,z,p,q,r,s)},n=-1,null==b){for(;++no?(e=d,d=o):e=o),p[0]!=d||p[1]!=e?(c?g=null:f=null,p[0]=d,p[1]=e,!0):void 0}function r(){p(),y.style("pointer-events","all").selectAll(".resize").style("display",a.empty()?"none":null),Wg.select("body").style("cursor",null),F.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),D(),x({type:"brushend"})}var s,t,u=this,w=Wg.select(Wg.event.target),x=h.of(u,arguments),y=Wg.select(u),z=w.datum(),A=!/^(n|s)$/.test(z)&&i,B=!/^(e|w)$/.test(z)&&j,C=w.classed("extent"),D=U(),E=Wg.mouse(u),F=Wg.select(_g).on("keydown.brush",e).on("keyup.brush",o);if(Wg.event.changedTouches?F.on("touchmove.brush",p).on("touchend.brush",r):F.on("mousemove.brush",p).on("mouseup.brush",r),y.interrupt().selectAll("*").interrupt(),C)E[0]=k[0]-E[0],E[1]=l[0]-E[1];else if(z){var G=+/w$/.test(z),H=+/^n/.test(z);t=[k[1-G]-E[0],l[1-H]-E[1]],E[0]=k[G],E[1]=l[H]}else Wg.event.altKey&&(s=E.slice());y.style("pointer-events","none").selectAll(".resize").style("display",null),Wg.select("body").style("cursor",w.style("cursor")),x({type:"brushstart"}),p()}var f,g,h=x(a,"brushstart","brush","brushend"),i=null,j=null,k=[0,0],l=[0,0],m=!0,n=!0,o=Lj[0];return a.event=function(a){a.each(function(){var a=h.of(this,arguments),b={x:k,y:l,i:f,j:g},c=this.__chart__||b;this.__chart__=b,Cj?Wg.select(this).transition().each("start.brush",function(){f=c.i,g=c.j,k=c.x,l=c.y,a({type:"brushstart"})}).tween("brush:brush",function(){var c=re(k,b.x),d=re(l,b.y);return f=g=null,function(e){k=b.x=c(e),l=b.y=d(e),a({type:"brush",mode:"resize"})}}).each("end.brush",function(){f=b.i,g=b.j,a({type:"brush",mode:"resize"}),a({type:"brushend"})}):(a({type:"brushstart"}),a({type:"brush",mode:"resize"}),a({type:"brushend"}))})},a.x=function(b){return arguments.length?(i=b,o=Lj[!i<<1|!j],a):i},a.y=function(b){return arguments.length?(j=b,o=Lj[!i<<1|!j],a):j},a.clamp=function(b){return arguments.length?(i&&j?(m=!!b[0],n=!!b[1]):i?m=!!b:j&&(n=!!b),a):i&&j?[m,n]:i?m:j?n:null},a.extent=function(b){var c,d,e,h,m;return arguments.length?(i&&(c=b[0],d=b[1],j&&(c=c[0],d=d[0]),f=[c,d],i.invert&&(c=i(c),d=i(d)),c>d&&(m=c,c=d,d=m),(c!=k[0]||d!=k[1])&&(k=[c,d])),j&&(e=b[0],h=b[1],i&&(e=e[1],h=h[1]),g=[e,h],j.invert&&(e=j(e),h=j(h)),e>h&&(m=e,e=h,h=m),(e!=l[0]||h!=l[1])&&(l=[e,h])),a):(i&&(f?(c=f[0],d=f[1]):(c=k[0],d=k[1],i.invert&&(c=i.invert(c),d=i.invert(d)),c>d&&(m=c,c=d,d=m))),j&&(g?(e=g[0],h=g[1]):(e=l[0],h=l[1],j.invert&&(e=j.invert(e),h=j.invert(h)),e>h&&(m=e,e=h,h=m))),i&&j?[[c,e],[d,h]]:i?[c,d]:j&&[e,h])},a.clear=function(){return a.empty()||(k=[0,0],l=[0,0],f=g=null),a},a.empty=function(){return!!i&&k[0]==k[1]||!!j&&l[0]==l[1]},Wg.rebind(a,h,"on")};var Kj={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Lj=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Mj=di.format=ji.timeFormat,Nj=Mj.utc,Oj=Nj("%Y-%m-%dT%H:%M:%S.%LZ");Mj.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?Rg:Oj,Rg.parse=function(a){var b=new Date(a);return isNaN(b)?null:b},Rg.toString=Oj.toString,di.second=Nb(function(a){return new ei(1e3*Math.floor(a/1e3))},function(a,b){a.setTime(a.getTime()+1e3*Math.floor(b))},function(a){return a.getSeconds()}),di.seconds=di.second.range,di.seconds.utc=di.second.utc.range,di.minute=Nb(function(a){return new ei(6e4*Math.floor(a/6e4))},function(a,b){a.setTime(a.getTime()+6e4*Math.floor(b))},function(a){return a.getMinutes()}),di.minutes=di.minute.range,di.minutes.utc=di.minute.utc.range,di.hour=Nb(function(a){var b=a.getTimezoneOffset()/60;return new ei(36e5*(Math.floor(a/36e5-b)+b))},function(a,b){a.setTime(a.getTime()+36e5*Math.floor(b))},function(a){return a.getHours()}),di.hours=di.hour.range,di.hours.utc=di.hour.utc.range,di.month=Nb(function(a){return a=di.day(a),a.setDate(1),a},function(a,b){a.setMonth(a.getMonth()+b)},function(a){return a.getMonth()}),di.months=di.month.range,di.months.utc=di.month.utc.range;var Pj=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Qj=[[di.second,1],[di.second,5],[di.second,15],[di.second,30],[di.minute,1],[di.minute,5],[di.minute,15],[di.minute,30],[di.hour,1],[di.hour,3],[di.hour,6],[di.hour,12],[di.day,1],[di.day,2],[di.week,1],[di.month,1],[di.month,3],[di.year,1]],Rj=Mj.multi([[".%L",function(a){return a.getMilliseconds()}],[":%S",function(a){return a.getSeconds()}],["%I:%M",function(a){return a.getMinutes()}],["%I %p",function(a){return a.getHours()}],["%a %d",function(a){return a.getDay()&&1!=a.getDate()}],["%b %d",function(a){return 1!=a.getDate()}],["%B",function(a){return a.getMonth()}],["%Y",Bc]]),Sj={range:function(a,b,c){return Wg.range(Math.ceil(a/c)*c,+b,c).map(Tg)},floor:Ab,ceil:Ab};Qj.year=di.year,di.scale=function(){return Sg(Wg.scale.linear(),Qj,Rj)};var Tj=Qj.map(function(a){return[a[0].utc,a[1]]}),Uj=Nj.multi([[".%L",function(a){return a.getUTCMilliseconds()}],[":%S",function(a){return a.getUTCSeconds()}],["%I:%M",function(a){return a.getUTCMinutes()}],["%I %p",function(a){return a.getUTCHours()}],["%a %d",function(a){return a.getUTCDay()&&1!=a.getUTCDate()}],["%b %d",function(a){return 1!=a.getUTCDate()}],["%B",function(a){return a.getUTCMonth()}],["%Y",Bc]]);Tj.year=di.year.utc,di.scale.utc=function(){return Sg(Wg.scale.linear(),Tj,Uj)},Wg.text=Bb(function(a){return a.responseText}),Wg.json=function(a,b){return Cb(a,"application/json",Ug,b)},Wg.html=function(a,b){return Cb(a,"text/html",Vg,b)},Wg.xml=Bb(function(a){return a.responseXML}),"function"==typeof define&&define.amd?define(Wg):"object"==typeof module&&module.exports&&(module.exports=Wg),this.d3=Wg}(),function(a){"use strict";function b(a){var b=this.internal=new c(this);b.loadConfig(a),b.init(),function d(a,b,c){Object.keys(a).forEach(function(e){b[e]=a[e].bind(c),Object.keys(a[e]).length>0&&d(a[e],b[e],c)})}(e,this,this)}function c(b){var c=this;c.d3=a.d3?a.d3:"undefined"!=typeof require?require("d3"):void 0,c.api=b,c.config=c.getDefaultConfig(),c.data={},c.cache={},c.axes={}}function d(a,b){function c(a,b){a.attr("transform",function(a){return"translate("+Math.ceil(b(a)+t)+", 0)"})}function d(a,b){a.attr("transform",function(a){return"translate(0,"+Math.ceil(b(a))+")"})}function e(a){var b=a[0],c=a[a.length-1];return c>b?[b,c]:[c,b]}function f(a){var b,c,d=[];if(a.ticks)return a.ticks.apply(a,m);for(c=a.domain(),b=Math.ceil(c[0]);b