mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
support for loading function definitions from graphite
This commit is contained in:
@@ -8,7 +8,6 @@ charset = utf-8
|
|||||||
trim_trailing_whitespace = true
|
trim_trailing_whitespace = true
|
||||||
insert_final_newline = true
|
insert_final_newline = true
|
||||||
max_line_length = 120
|
max_line_length = 120
|
||||||
insert_final_newline = true
|
|
||||||
|
|
||||||
[*.go]
|
[*.go]
|
||||||
indent_style = tab
|
indent_style = tab
|
||||||
|
|||||||
@@ -135,7 +135,7 @@
|
|||||||
"clipboard": "^1.7.1",
|
"clipboard": "^1.7.1",
|
||||||
"d3": "^4.11.0",
|
"d3": "^4.11.0",
|
||||||
"d3-scale-chromatic": "^1.1.1",
|
"d3-scale-chromatic": "^1.1.1",
|
||||||
"eventemitter3": "^2.0.2",
|
"eventemitter3": "^2.0.3",
|
||||||
"file-saver": "^1.3.3",
|
"file-saver": "^1.3.3",
|
||||||
"jquery": "^3.2.1",
|
"jquery": "^3.2.1",
|
||||||
"lodash": "^4.17.4",
|
"lodash": "^4.17.4",
|
||||||
@@ -154,6 +154,7 @@
|
|||||||
"react-select": "^1.1.0",
|
"react-select": "^1.1.0",
|
||||||
"react-sizeme": "^2.3.6",
|
"react-sizeme": "^2.3.6",
|
||||||
"remarkable": "^1.7.1",
|
"remarkable": "^1.7.1",
|
||||||
|
"rst2html": "github:thoward/rst2html#d6e2f21",
|
||||||
"rxjs": "^5.4.3",
|
"rxjs": "^5.4.3",
|
||||||
"tether": "^1.4.0",
|
"tether": "^1.4.0",
|
||||||
"tether-drop": "https://github.com/torkelo/drop",
|
"tether-drop": "https://github.com/torkelo/drop",
|
||||||
|
|||||||
@@ -2,13 +2,10 @@ define([
|
|||||||
'angular',
|
'angular',
|
||||||
'lodash',
|
'lodash',
|
||||||
'jquery',
|
'jquery',
|
||||||
'./gfunc',
|
|
||||||
],
|
],
|
||||||
function (angular, _, $, gfunc) {
|
function (angular, _, $) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
gfunc = gfunc.default;
|
|
||||||
|
|
||||||
angular
|
angular
|
||||||
.module('grafana.directives')
|
.module('grafana.directives')
|
||||||
.directive('graphiteAddFunc', function($compile) {
|
.directive('graphiteAddFunc', function($compile) {
|
||||||
@@ -23,24 +20,25 @@ function (angular, _, $, gfunc) {
|
|||||||
return {
|
return {
|
||||||
link: function($scope, elem) {
|
link: function($scope, elem) {
|
||||||
var ctrl = $scope.ctrl;
|
var ctrl = $scope.ctrl;
|
||||||
var graphiteVersion = ctrl.datasource.graphiteVersion;
|
|
||||||
var categories = gfunc.getCategories(graphiteVersion);
|
|
||||||
var allFunctions = getAllFunctionNames(categories);
|
|
||||||
|
|
||||||
$scope.functionMenu = createFunctionDropDownMenu(categories);
|
|
||||||
|
|
||||||
var $input = $(inputTemplate);
|
var $input = $(inputTemplate);
|
||||||
var $button = $(buttonTemplate);
|
var $button = $(buttonTemplate);
|
||||||
|
|
||||||
$input.appendTo(elem);
|
$input.appendTo(elem);
|
||||||
$button.appendTo(elem);
|
$button.appendTo(elem);
|
||||||
|
|
||||||
|
ctrl.datasource.getFuncDefs().then(function(funcDefs) {
|
||||||
|
var allFunctions = _.map(funcDefs, 'name').sort();
|
||||||
|
|
||||||
|
$scope.functionMenu = createFunctionDropDownMenu(funcDefs);
|
||||||
|
|
||||||
$input.attr('data-provide', 'typeahead');
|
$input.attr('data-provide', 'typeahead');
|
||||||
$input.typeahead({
|
$input.typeahead({
|
||||||
source: allFunctions,
|
source: allFunctions,
|
||||||
minLength: 1,
|
minLength: 1,
|
||||||
items: 10,
|
items: 10,
|
||||||
updater: function (value) {
|
updater: function (value) {
|
||||||
var funcDef = gfunc.getFuncDef(value);
|
var funcDef = ctrl.datasource.getFuncDef(value);
|
||||||
if (!funcDef) {
|
if (!funcDef) {
|
||||||
// try find close match
|
// try find close match
|
||||||
value = value.toLowerCase();
|
value = value.toLowerCase();
|
||||||
@@ -82,32 +80,32 @@ function (angular, _, $, gfunc) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
$compile(elem.contents())($scope);
|
$compile(elem.contents())($scope);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
function getAllFunctionNames(categories) {
|
function createFunctionDropDownMenu(funcDefs) {
|
||||||
return _.reduce(categories, function(list, category) {
|
var categories = {};
|
||||||
_.each(category, function(func) {
|
|
||||||
list.push(func.name);
|
_.forEach(funcDefs, function(funcDef) {
|
||||||
});
|
if (!funcDef.category) {
|
||||||
return list;
|
return;
|
||||||
}, []);
|
|
||||||
}
|
}
|
||||||
|
if (!categories[funcDef.category]) {
|
||||||
function createFunctionDropDownMenu(categories) {
|
categories[funcDef.category] = [];
|
||||||
return _.map(categories, function(list, category) {
|
}
|
||||||
var submenu = _.map(list, function(value) {
|
categories[funcDef.category].push({
|
||||||
return {
|
text: funcDef.name,
|
||||||
text: value.name,
|
click: "ctrl.addFunction('" + funcDef.name + "')",
|
||||||
click: "ctrl.addFunction('" + value.name + "')",
|
});
|
||||||
};
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
return _.sortBy(_.map(categories, function(submenu, category) {
|
||||||
return {
|
return {
|
||||||
text: category,
|
text: category,
|
||||||
submenu: submenu
|
submenu: _.sortBy(submenu, 'text')
|
||||||
};
|
};
|
||||||
});
|
}), 'text');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import * as dateMath from 'app/core/utils/datemath';
|
import * as dateMath from 'app/core/utils/datemath';
|
||||||
import { isVersionGtOrEq, SemVersion } from 'app/core/utils/version';
|
import { isVersionGtOrEq, SemVersion } from 'app/core/utils/version';
|
||||||
|
import gfunc from './gfunc';
|
||||||
|
|
||||||
/** @ngInject */
|
/** @ngInject */
|
||||||
export function GraphiteDatasource(instanceSettings, $q, backendSrv, templateSrv) {
|
export function GraphiteDatasource(instanceSettings, $q, backendSrv, templateSrv) {
|
||||||
@@ -12,6 +13,7 @@ export function GraphiteDatasource(instanceSettings, $q, backendSrv, templateSrv
|
|||||||
this.cacheTimeout = instanceSettings.cacheTimeout;
|
this.cacheTimeout = instanceSettings.cacheTimeout;
|
||||||
this.withCredentials = instanceSettings.withCredentials;
|
this.withCredentials = instanceSettings.withCredentials;
|
||||||
this.render_method = instanceSettings.render_method || 'POST';
|
this.render_method = instanceSettings.render_method || 'POST';
|
||||||
|
this.funcDefs = null;
|
||||||
|
|
||||||
this.getQueryOptionsInfo = function() {
|
this.getQueryOptionsInfo = function() {
|
||||||
return {
|
return {
|
||||||
@@ -347,6 +349,125 @@ export function GraphiteDatasource(instanceSettings, $q, backendSrv, templateSrv
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.createFuncInstance = function(funcDef, options?) {
|
||||||
|
return gfunc.createFuncInstance(funcDef, options, this.funcDefs);
|
||||||
|
};
|
||||||
|
|
||||||
|
this.getFuncDef = function(name) {
|
||||||
|
return gfunc.getFuncDef(name, this.funcDefs);
|
||||||
|
};
|
||||||
|
|
||||||
|
this.getFuncDefs = function() {
|
||||||
|
let self = this;
|
||||||
|
|
||||||
|
if (self.funcDefs !== null) {
|
||||||
|
return Promise.resolve(self.funcDefs);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!supportsFunctionIndex(self.graphiteVersion)) {
|
||||||
|
self.funcDefs = gfunc.getFuncDefs(self.graphiteVersion);
|
||||||
|
return Promise.resolve(self.funcDefs);
|
||||||
|
}
|
||||||
|
|
||||||
|
let httpOptions = {
|
||||||
|
method: 'GET',
|
||||||
|
url: '/functions',
|
||||||
|
};
|
||||||
|
|
||||||
|
return self
|
||||||
|
.doGraphiteRequest(httpOptions)
|
||||||
|
.then(results => {
|
||||||
|
if (results.status !== 200 || typeof results.data !== 'object') {
|
||||||
|
self.funcDefs = gfunc.getFuncDefs(self.graphiteVersion);
|
||||||
|
return Promise.resolve(self.funcDefs);
|
||||||
|
}
|
||||||
|
|
||||||
|
self.funcDefs = {};
|
||||||
|
_.forEach(results.data || {}, (funcDef, funcName) => {
|
||||||
|
// skip graphite graph functions
|
||||||
|
if (funcDef.group === 'Graph') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var func = {
|
||||||
|
name: funcDef.name,
|
||||||
|
description: funcDef.description,
|
||||||
|
category: funcDef.group,
|
||||||
|
params: [],
|
||||||
|
defaultParams: [],
|
||||||
|
fake: false,
|
||||||
|
};
|
||||||
|
|
||||||
|
// get rid of the first "seriesList" param
|
||||||
|
if (/^seriesLists?$/.test(_.get(funcDef, 'params[0].type', ''))) {
|
||||||
|
// handle functions that accept multiple seriesLists
|
||||||
|
// we leave the param in place but mark it optional, so users can add more series if they wish
|
||||||
|
if (funcDef.params[0].multiple) {
|
||||||
|
funcDef.params[0].required = false;
|
||||||
|
// otherwise chop off the first param, it'll be handled separately
|
||||||
|
} else {
|
||||||
|
funcDef.params.shift();
|
||||||
|
}
|
||||||
|
// tag function as fake
|
||||||
|
} else {
|
||||||
|
func.fake = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
_.forEach(funcDef.params, rawParam => {
|
||||||
|
var param = {
|
||||||
|
name: rawParam.name,
|
||||||
|
type: 'string',
|
||||||
|
optional: !rawParam.required,
|
||||||
|
multiple: !!rawParam.multiple,
|
||||||
|
options: undefined,
|
||||||
|
};
|
||||||
|
|
||||||
|
if (rawParam.default !== undefined) {
|
||||||
|
func.defaultParams.push(_.toString(rawParam.default));
|
||||||
|
} else if (rawParam.suggestions) {
|
||||||
|
func.defaultParams.push(_.toString(rawParam.suggestions[0]));
|
||||||
|
} else {
|
||||||
|
func.defaultParams.push('');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (rawParam.type === 'boolean') {
|
||||||
|
param.type = 'boolean';
|
||||||
|
param.options = ['true', 'false'];
|
||||||
|
} else if (rawParam.type === 'integer') {
|
||||||
|
param.type = 'int';
|
||||||
|
} else if (rawParam.type === 'float') {
|
||||||
|
param.type = 'float';
|
||||||
|
} else if (rawParam.type === 'node') {
|
||||||
|
param.type = 'node';
|
||||||
|
param.options = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'];
|
||||||
|
} else if (rawParam.type === 'nodeOrTag') {
|
||||||
|
param.type = 'node_or_tag';
|
||||||
|
param.options = ['name', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'];
|
||||||
|
} else if (rawParam.type === 'intOrInterval') {
|
||||||
|
param.type = 'int_or_interval';
|
||||||
|
} else if (rawParam.type === 'seriesList') {
|
||||||
|
param.type = 'value_or_series';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (rawParam.options) {
|
||||||
|
param.options = _.map(rawParam.options, _.toString);
|
||||||
|
} else if (rawParam.suggestions) {
|
||||||
|
param.options = _.map(rawParam.suggestions, _.toString);
|
||||||
|
}
|
||||||
|
|
||||||
|
func.params.push(param);
|
||||||
|
});
|
||||||
|
|
||||||
|
self.funcDefs[funcName] = func;
|
||||||
|
});
|
||||||
|
return self.funcDefs;
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
self.funcDefs = gfunc.getFuncDefs(self.graphiteVersion);
|
||||||
|
return self.funcDefs;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
this.testDatasource = function() {
|
this.testDatasource = function() {
|
||||||
return this.metricFindQuery('*').then(function() {
|
return this.metricFindQuery('*').then(function() {
|
||||||
return { status: 'success', message: 'Data source is working' };
|
return { status: 'success', message: 'Data source is working' };
|
||||||
@@ -440,3 +561,7 @@ export function GraphiteDatasource(instanceSettings, $q, backendSrv, templateSrv
|
|||||||
function supportsTags(version: string): boolean {
|
function supportsTags(version: string): boolean {
|
||||||
return isVersionGtOrEq(version, '1.1');
|
return isVersionGtOrEq(version, '1.1');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function supportsFunctionIndex(version: string): boolean {
|
||||||
|
return isVersionGtOrEq(version, '1.1');
|
||||||
|
}
|
||||||
|
|||||||
@@ -2,8 +2,9 @@ define([
|
|||||||
'angular',
|
'angular',
|
||||||
'lodash',
|
'lodash',
|
||||||
'jquery',
|
'jquery',
|
||||||
|
'rst2html',
|
||||||
],
|
],
|
||||||
function (angular, _, $) {
|
function (angular, _, $, rst2html) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular
|
angular
|
||||||
@@ -12,7 +13,7 @@ function (angular, _, $) {
|
|||||||
|
|
||||||
var funcSpanTemplate = '<a ng-click="">{{func.def.name}}</a><span>(</span>';
|
var funcSpanTemplate = '<a ng-click="">{{func.def.name}}</a><span>(</span>';
|
||||||
var paramTemplate = '<input type="text" style="display:none"' +
|
var paramTemplate = '<input type="text" style="display:none"' +
|
||||||
' class="input-mini tight-form-func-param"></input>';
|
' class="input-small tight-form-func-param"></input>';
|
||||||
|
|
||||||
var funcControlsTemplate =
|
var funcControlsTemplate =
|
||||||
'<div class="tight-form-func-controls">' +
|
'<div class="tight-form-func-controls">' +
|
||||||
@@ -29,7 +30,6 @@ function (angular, _, $) {
|
|||||||
var $funcControls = $(funcControlsTemplate);
|
var $funcControls = $(funcControlsTemplate);
|
||||||
var ctrl = $scope.ctrl;
|
var ctrl = $scope.ctrl;
|
||||||
var func = $scope.func;
|
var func = $scope.func;
|
||||||
var funcDef = func.def;
|
|
||||||
var scheduledRelink = false;
|
var scheduledRelink = false;
|
||||||
var paramCountAtLink = 0;
|
var paramCountAtLink = 0;
|
||||||
|
|
||||||
@@ -37,11 +37,12 @@ function (angular, _, $) {
|
|||||||
/*jshint validthis:true */
|
/*jshint validthis:true */
|
||||||
|
|
||||||
var $link = $(this);
|
var $link = $(this);
|
||||||
|
var $comma = $link.prev('.comma');
|
||||||
var $input = $link.next();
|
var $input = $link.next();
|
||||||
|
|
||||||
$input.val(func.params[paramIndex]);
|
$input.val(func.params[paramIndex]);
|
||||||
$input.css('width', ($link.width() + 16) + 'px');
|
|
||||||
|
|
||||||
|
$comma.removeClass('last');
|
||||||
$link.hide();
|
$link.hide();
|
||||||
$input.show();
|
$input.show();
|
||||||
$input.focus();
|
$input.focus();
|
||||||
@@ -68,22 +69,42 @@ function (angular, _, $) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function paramDef(index) {
|
||||||
|
if (index < func.def.params.length) {
|
||||||
|
return func.def.params[index];
|
||||||
|
}
|
||||||
|
if (_.last(func.def.params).multiple) {
|
||||||
|
return _.assign({}, _.last(func.def.params), {optional: true});
|
||||||
|
}
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
|
||||||
function inputBlur(paramIndex) {
|
function inputBlur(paramIndex) {
|
||||||
/*jshint validthis:true */
|
/*jshint validthis:true */
|
||||||
var $input = $(this);
|
var $input = $(this);
|
||||||
|
if ($input.data('typeahead') && $input.data('typeahead').shown) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var $link = $input.prev();
|
var $link = $input.prev();
|
||||||
|
var $comma = $link.prev('.comma');
|
||||||
var newValue = $input.val();
|
var newValue = $input.val();
|
||||||
|
|
||||||
if (newValue !== '' || func.def.params[paramIndex].optional) {
|
if (newValue !== '' || paramDef(paramIndex).optional) {
|
||||||
$link.html(templateSrv.highlightVariablesAsHtml(newValue));
|
$link.html(templateSrv.highlightVariablesAsHtml(newValue));
|
||||||
|
|
||||||
func.updateParam($input.val(), paramIndex);
|
func.updateParam(newValue, paramIndex);
|
||||||
scheduledRelinkIfNeeded();
|
scheduledRelinkIfNeeded();
|
||||||
|
|
||||||
$scope.$apply(function() {
|
$scope.$apply(function() {
|
||||||
ctrl.targetChanged();
|
ctrl.targetChanged();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if ($link.hasClass('last') && newValue === '') {
|
||||||
|
$comma.addClass('last');
|
||||||
|
} else {
|
||||||
|
$link.removeClass('last');
|
||||||
|
}
|
||||||
$input.hide();
|
$input.hide();
|
||||||
$link.show();
|
$link.show();
|
||||||
}
|
}
|
||||||
@@ -104,8 +125,8 @@ function (angular, _, $) {
|
|||||||
function addTypeahead($input, paramIndex) {
|
function addTypeahead($input, paramIndex) {
|
||||||
$input.attr('data-provide', 'typeahead');
|
$input.attr('data-provide', 'typeahead');
|
||||||
|
|
||||||
var options = funcDef.params[paramIndex].options;
|
var options = paramDef(paramIndex).options;
|
||||||
if (funcDef.params[paramIndex].type === 'int') {
|
if (paramDef(paramIndex).type === 'int') {
|
||||||
options = _.map(options, function(val) { return val.toString(); });
|
options = _.map(options, function(val) { return val.toString(); });
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -148,18 +169,34 @@ function (angular, _, $) {
|
|||||||
$funcControls.appendTo(elem);
|
$funcControls.appendTo(elem);
|
||||||
$funcLink.appendTo(elem);
|
$funcLink.appendTo(elem);
|
||||||
|
|
||||||
_.each(funcDef.params, function(param, index) {
|
var defParams = _.clone(func.def.params);
|
||||||
if (param.optional && func.params.length <= index) {
|
var lastParam = _.last(func.def.params);
|
||||||
return;
|
|
||||||
|
while (func.params.length >= defParams.length && lastParam && lastParam.multiple) {
|
||||||
|
defParams.push(_.assign({}, lastParam, {optional: true}));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (index > 0) {
|
_.each(defParams, function(param, index) {
|
||||||
$('<span>, </span>').appendTo(elem);
|
if (param.optional && func.params.length < index) {
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
var paramValue = templateSrv.highlightVariablesAsHtml(func.params[index]);
|
var paramValue = templateSrv.highlightVariablesAsHtml(func.params[index]);
|
||||||
var $paramLink = $('<a ng-click="" class="graphite-func-param-link">' + paramValue + '</a>');
|
|
||||||
|
var last = (index >= func.params.length - 1) && param.optional && !paramValue;
|
||||||
|
if (last && param.multiple) {
|
||||||
|
paramValue = '+';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (index > 0) {
|
||||||
|
$('<span class="comma' + (last ? ' last' : '') + '">, </span>').appendTo(elem);
|
||||||
|
}
|
||||||
|
|
||||||
|
var $paramLink = $(
|
||||||
|
'<a ng-click="" class="graphite-func-param-link' + (last ? ' last' : '') + '">'
|
||||||
|
+ (paramValue || ' ') + '</a>');
|
||||||
var $input = $(paramTemplate);
|
var $input = $(paramTemplate);
|
||||||
|
$input.attr('placeholder', param.name);
|
||||||
|
|
||||||
paramCountAtLink++;
|
paramCountAtLink++;
|
||||||
|
|
||||||
@@ -171,10 +208,9 @@ function (angular, _, $) {
|
|||||||
$input.keypress(_.partial(inputKeyPress, index));
|
$input.keypress(_.partial(inputKeyPress, index));
|
||||||
$paramLink.click(_.partial(clickFuncParam, index));
|
$paramLink.click(_.partial(clickFuncParam, index));
|
||||||
|
|
||||||
if (funcDef.params[index].options) {
|
if (param.options) {
|
||||||
addTypeahead($input, index);
|
addTypeahead($input, index);
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$('<span>)</span>').appendTo(elem);
|
$('<span>)</span>').appendTo(elem);
|
||||||
@@ -182,7 +218,7 @@ function (angular, _, $) {
|
|||||||
$compile(elem.contents())($scope);
|
$compile(elem.contents())($scope);
|
||||||
}
|
}
|
||||||
|
|
||||||
function ifJustAddedFocusFistParam() {
|
function ifJustAddedFocusFirstParam() {
|
||||||
if ($scope.func.added) {
|
if ($scope.func.added) {
|
||||||
$scope.func.added = false;
|
$scope.func.added = false;
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
@@ -223,7 +259,12 @@ function (angular, _, $) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($target.hasClass('fa-question-circle')) {
|
if ($target.hasClass('fa-question-circle')) {
|
||||||
window.open("http://graphite.readthedocs.org/en/latest/functions.html#graphite.render.functions." + funcDef.name,'_blank');
|
if (func.def.description) {
|
||||||
|
alert(rst2html(func.def.description));
|
||||||
|
} else {
|
||||||
|
window.open(
|
||||||
|
"http://graphite.readthedocs.org/en/latest/functions.html#graphite.render.functions." + func.def.name,'_blank');
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -233,7 +274,7 @@ function (angular, _, $) {
|
|||||||
elem.children().remove();
|
elem.children().remove();
|
||||||
|
|
||||||
addElementsAndCompile();
|
addElementsAndCompile();
|
||||||
ifJustAddedFocusFistParam();
|
ifJustAddedFocusFirstParam();
|
||||||
registerFuncControlsToggle();
|
registerFuncControlsToggle();
|
||||||
registerFuncControlsActions();
|
registerFuncControlsActions();
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,8 +1,8 @@
|
|||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import gfunc from './gfunc';
|
|
||||||
import { Parser } from './parser';
|
import { Parser } from './parser';
|
||||||
|
|
||||||
export default class GraphiteQuery {
|
export default class GraphiteQuery {
|
||||||
|
datasource: any;
|
||||||
target: any;
|
target: any;
|
||||||
functions: any[];
|
functions: any[];
|
||||||
segments: any[];
|
segments: any[];
|
||||||
@@ -15,7 +15,8 @@ export default class GraphiteQuery {
|
|||||||
scopedVars: any;
|
scopedVars: any;
|
||||||
|
|
||||||
/** @ngInject */
|
/** @ngInject */
|
||||||
constructor(target, templateSrv?, scopedVars?) {
|
constructor(datasource, target, templateSrv?, scopedVars?) {
|
||||||
|
this.datasource = datasource;
|
||||||
this.target = target;
|
this.target = target;
|
||||||
this.parseTarget();
|
this.parseTarget();
|
||||||
|
|
||||||
@@ -86,7 +87,7 @@ export default class GraphiteQuery {
|
|||||||
|
|
||||||
switch (astNode.type) {
|
switch (astNode.type) {
|
||||||
case 'function':
|
case 'function':
|
||||||
var innerFunc = gfunc.createFuncInstance(astNode.name, {
|
var innerFunc = this.datasource.createFuncInstance(astNode.name, {
|
||||||
withDefaultParams: false,
|
withDefaultParams: false,
|
||||||
});
|
});
|
||||||
_.each(astNode.params, param => {
|
_.each(astNode.params, param => {
|
||||||
@@ -133,7 +134,7 @@ export default class GraphiteQuery {
|
|||||||
|
|
||||||
moveAliasFuncLast() {
|
moveAliasFuncLast() {
|
||||||
var aliasFunc = _.find(this.functions, function(func) {
|
var aliasFunc = _.find(this.functions, function(func) {
|
||||||
return func.def.name === 'alias' || func.def.name === 'aliasByNode' || func.def.name === 'aliasByMetric';
|
return func.def.name.startsWith('alias');
|
||||||
});
|
});
|
||||||
|
|
||||||
if (aliasFunc) {
|
if (aliasFunc) {
|
||||||
@@ -143,7 +144,7 @@ export default class GraphiteQuery {
|
|||||||
}
|
}
|
||||||
|
|
||||||
addFunctionParameter(func, value) {
|
addFunctionParameter(func, value) {
|
||||||
if (func.params.length >= func.def.params.length) {
|
if (func.params.length >= func.def.params.length && !_.get(_.last(func.def.params), 'multiple', false)) {
|
||||||
throw { message: 'too many parameters for function ' + func.def.name };
|
throw { message: 'too many parameters for function ' + func.def.name };
|
||||||
}
|
}
|
||||||
func.params.push(value);
|
func.params.push(value);
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import './add_graphite_func';
|
|||||||
import './func_editor';
|
import './func_editor';
|
||||||
|
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import gfunc from './gfunc';
|
|
||||||
import GraphiteQuery from './graphite_query';
|
import GraphiteQuery from './graphite_query';
|
||||||
import { QueryCtrl } from 'app/plugins/sdk';
|
import { QueryCtrl } from 'app/plugins/sdk';
|
||||||
import appEvents from 'app/core/app_events';
|
import appEvents from 'app/core/app_events';
|
||||||
@@ -26,7 +25,7 @@ export class GraphiteQueryCtrl extends QueryCtrl {
|
|||||||
|
|
||||||
if (this.target) {
|
if (this.target) {
|
||||||
this.target.target = this.target.target || '';
|
this.target.target = this.target.target || '';
|
||||||
this.queryModel = new GraphiteQuery(this.target, templateSrv);
|
this.queryModel = new GraphiteQuery(this.datasource, this.target, templateSrv);
|
||||||
this.buildSegments();
|
this.buildSegments();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -242,7 +241,7 @@ export class GraphiteQueryCtrl extends QueryCtrl {
|
|||||||
}
|
}
|
||||||
|
|
||||||
addFunction(funcDef) {
|
addFunction(funcDef) {
|
||||||
var newFunc = gfunc.createFuncInstance(funcDef, {
|
var newFunc = this.datasource.createFuncInstance(funcDef, {
|
||||||
withDefaultParams: true,
|
withDefaultParams: true,
|
||||||
});
|
});
|
||||||
newFunc.added = true;
|
newFunc.added = true;
|
||||||
@@ -268,8 +267,7 @@ export class GraphiteQueryCtrl extends QueryCtrl {
|
|||||||
}
|
}
|
||||||
|
|
||||||
addSeriesByTagFunc(tag) {
|
addSeriesByTagFunc(tag) {
|
||||||
let funcDef = gfunc.getFuncDef('seriesByTag');
|
let newFunc = this.datasource.createFuncInstance('seriesByTag', {
|
||||||
let newFunc = gfunc.createFuncInstance(funcDef, {
|
|
||||||
withDefaultParams: false,
|
withDefaultParams: false,
|
||||||
});
|
});
|
||||||
let tagParam = `${tag}=select tag value`;
|
let tagParam = `${tag}=select tag value`;
|
||||||
|
|||||||
@@ -5,7 +5,8 @@ describe('when creating func instance from func names', function() {
|
|||||||
var func = gfunc.createFuncInstance('sumSeries');
|
var func = gfunc.createFuncInstance('sumSeries');
|
||||||
expect(func).toBeTruthy();
|
expect(func).toBeTruthy();
|
||||||
expect(func.def.name).toEqual('sumSeries');
|
expect(func.def.name).toEqual('sumSeries');
|
||||||
expect(func.def.params.length).toEqual(5);
|
expect(func.def.params.length).toEqual(1);
|
||||||
|
expect(func.def.params[0].multiple).toEqual(true);
|
||||||
expect(func.def.defaultParams.length).toEqual(1);
|
expect(func.def.defaultParams.length).toEqual(1);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -74,10 +75,10 @@ describe('when rendering func instance', function() {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('when requesting function categories', function() {
|
describe('when requesting function definitions', function() {
|
||||||
it('should return function categories', function() {
|
it('should return function definitions', function() {
|
||||||
var catIndex = gfunc.getCategories('1.0');
|
var funcIndex = gfunc.getFuncDefs('1.0');
|
||||||
expect(catIndex.Special.length).toBeGreaterThan(8);
|
expect(Object.keys(funcIndex).length).toBeGreaterThan(8);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -24,6 +24,9 @@ describe('GraphiteQueryCtrl', function() {
|
|||||||
ctx.scope = $rootScope.$new();
|
ctx.scope = $rootScope.$new();
|
||||||
ctx.target = { target: 'aliasByNode(scaleToSeconds(test.prod.*,1),2)' };
|
ctx.target = { target: 'aliasByNode(scaleToSeconds(test.prod.*,1),2)' };
|
||||||
ctx.datasource.metricFindQuery = sinon.stub().returns(ctx.$q.when([]));
|
ctx.datasource.metricFindQuery = sinon.stub().returns(ctx.$q.when([]));
|
||||||
|
ctx.datasource.getFuncDefs = sinon.stub().returns(ctx.$q.when(gfunc.getFuncDefs('1.0')));
|
||||||
|
ctx.datasource.getFuncDef = gfunc.getFuncDef;
|
||||||
|
ctx.datasource.createFuncInstance = gfunc.createFuncInstance;
|
||||||
ctx.panelCtrl = { panel: {} };
|
ctx.panelCtrl = { panel: {} };
|
||||||
ctx.panelCtrl = {
|
ctx.panelCtrl = {
|
||||||
panel: {
|
panel: {
|
||||||
@@ -180,7 +183,21 @@ describe('GraphiteQueryCtrl', function() {
|
|||||||
ctx.ctrl.target.target = 'scaleToSeconds(#A, 60)';
|
ctx.ctrl.target.target = 'scaleToSeconds(#A, 60)';
|
||||||
ctx.ctrl.datasource.metricFindQuery = sinon.stub().returns(ctx.$q.when([{ expandable: false }]));
|
ctx.ctrl.datasource.metricFindQuery = sinon.stub().returns(ctx.$q.when([{ expandable: false }]));
|
||||||
ctx.ctrl.parseTarget();
|
ctx.ctrl.parseTarget();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should add function params', function() {
|
||||||
|
expect(ctx.ctrl.queryModel.segments.length).to.be(1);
|
||||||
|
expect(ctx.ctrl.queryModel.segments[0].value).to.be('#A');
|
||||||
|
|
||||||
|
expect(ctx.ctrl.queryModel.functions[0].params.length).to.be(1);
|
||||||
|
expect(ctx.ctrl.queryModel.functions[0].params[0]).to.be(60);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('target should remain the same', function() {
|
||||||
|
expect(ctx.ctrl.target.target).to.be('scaleToSeconds(#A, 60)');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('targetFull should include nested queries', function() {
|
||||||
ctx.ctrl.panelCtrl.panel.targets = [
|
ctx.ctrl.panelCtrl.panel.targets = [
|
||||||
{
|
{
|
||||||
target: 'nested.query.count',
|
target: 'nested.query.count',
|
||||||
@@ -189,13 +206,9 @@ describe('GraphiteQueryCtrl', function() {
|
|||||||
];
|
];
|
||||||
|
|
||||||
ctx.ctrl.updateModelTarget();
|
ctx.ctrl.updateModelTarget();
|
||||||
});
|
|
||||||
|
|
||||||
it('target should remain the same', function() {
|
|
||||||
expect(ctx.ctrl.target.target).to.be('scaleToSeconds(#A, 60)');
|
expect(ctx.ctrl.target.target).to.be('scaleToSeconds(#A, 60)');
|
||||||
});
|
|
||||||
|
|
||||||
it('targetFull should include nexted queries', function() {
|
|
||||||
expect(ctx.ctrl.target.targetFull).to.be('scaleToSeconds(nested.query.count, 60)');
|
expect(ctx.ctrl.target.targetFull).to.be('scaleToSeconds(nested.query.count, 60)');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -130,6 +130,7 @@ input[type="text"].tight-form-func-param {
|
|||||||
}
|
}
|
||||||
|
|
||||||
input[type="text"].tight-form-func-param {
|
input[type="text"].tight-form-func-param {
|
||||||
|
font-size: 0.875rem;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
border: none;
|
border: none;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|||||||
@@ -6,4 +6,12 @@
|
|||||||
min-width: 100px;
|
min-width: 100px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.last {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover .last {
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
183
yarn.lock
183
yarn.lock
@@ -263,6 +263,10 @@ acorn-dynamic-import@^2.0.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
acorn "^4.0.3"
|
acorn "^4.0.3"
|
||||||
|
|
||||||
|
acorn-es7-plugin@^1.0.12:
|
||||||
|
version "1.1.7"
|
||||||
|
resolved "https://registry.yarnpkg.com/acorn-es7-plugin/-/acorn-es7-plugin-1.1.7.tgz#f2ee1f3228a90eead1245f9ab1922eb2e71d336b"
|
||||||
|
|
||||||
acorn-globals@^4.0.0:
|
acorn-globals@^4.0.0:
|
||||||
version "4.1.0"
|
version "4.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-4.1.0.tgz#ab716025dbe17c54d3ef81d32ece2b2d99fe2538"
|
resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-4.1.0.tgz#ab716025dbe17c54d3ef81d32ece2b2d99fe2538"
|
||||||
@@ -279,7 +283,7 @@ acorn@^3.0.4:
|
|||||||
version "3.3.0"
|
version "3.3.0"
|
||||||
resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a"
|
resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a"
|
||||||
|
|
||||||
acorn@^4.0.3:
|
acorn@^4.0.0, acorn@^4.0.3:
|
||||||
version "4.0.13"
|
version "4.0.13"
|
||||||
resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787"
|
resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787"
|
||||||
|
|
||||||
@@ -525,6 +529,10 @@ array-equal@^1.0.0:
|
|||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93"
|
resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93"
|
||||||
|
|
||||||
|
array-filter@^1.0.0:
|
||||||
|
version "1.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/array-filter/-/array-filter-1.0.0.tgz#baf79e62e6ef4c2a4c0b831232daffec251f9d83"
|
||||||
|
|
||||||
array-filter@~0.0.0:
|
array-filter@~0.0.0:
|
||||||
version "0.0.1"
|
version "0.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/array-filter/-/array-filter-0.0.1.tgz#7da8cf2e26628ed732803581fd21f67cacd2eeec"
|
resolved "https://registry.yarnpkg.com/array-filter/-/array-filter-0.0.1.tgz#7da8cf2e26628ed732803581fd21f67cacd2eeec"
|
||||||
@@ -1512,6 +1520,10 @@ call-limit@~1.1.0:
|
|||||||
version "1.1.0"
|
version "1.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/call-limit/-/call-limit-1.1.0.tgz#6fd61b03f3da42a2cd0ec2b60f02bd0e71991fea"
|
resolved "https://registry.yarnpkg.com/call-limit/-/call-limit-1.1.0.tgz#6fd61b03f3da42a2cd0ec2b60f02bd0e71991fea"
|
||||||
|
|
||||||
|
call-signature@0.0.2:
|
||||||
|
version "0.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/call-signature/-/call-signature-0.0.2.tgz#a84abc825a55ef4cb2b028bd74e205a65b9a4996"
|
||||||
|
|
||||||
caller-path@^0.1.0:
|
caller-path@^0.1.0:
|
||||||
version "0.1.0"
|
version "0.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-0.1.0.tgz#94085ef63581ecd3daa92444a8fe94e82577751f"
|
resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-0.1.0.tgz#94085ef63581ecd3daa92444a8fe94e82577751f"
|
||||||
@@ -2072,6 +2084,10 @@ core-js@^1.0.0:
|
|||||||
version "1.2.7"
|
version "1.2.7"
|
||||||
resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636"
|
resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636"
|
||||||
|
|
||||||
|
core-js@^2.0.0:
|
||||||
|
version "2.5.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.3.tgz#8acc38345824f16d8365b7c9b4259168e8ed603e"
|
||||||
|
|
||||||
core-js@^2.2.0, core-js@^2.4.0, core-js@^2.5.0:
|
core-js@^2.2.0, core-js@^2.4.0, core-js@^2.5.0:
|
||||||
version "2.5.1"
|
version "2.5.1"
|
||||||
resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.1.tgz#ae6874dc66937789b80754ff5428df66819ca50b"
|
resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.1.tgz#ae6874dc66937789b80754ff5428df66819ca50b"
|
||||||
@@ -2744,6 +2760,10 @@ di@^0.0.1:
|
|||||||
version "0.0.1"
|
version "0.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/di/-/di-0.0.1.tgz#806649326ceaa7caa3306d75d985ea2748ba913c"
|
resolved "https://registry.yarnpkg.com/di/-/di-0.0.1.tgz#806649326ceaa7caa3306d75d985ea2748ba913c"
|
||||||
|
|
||||||
|
diff-match-patch@^1.0.0:
|
||||||
|
version "1.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/diff-match-patch/-/diff-match-patch-1.0.0.tgz#1cc3c83a490d67f95d91e39f6ad1f2e086b63048"
|
||||||
|
|
||||||
diff@3.3.1:
|
diff@3.3.1:
|
||||||
version "3.3.1"
|
version "3.3.1"
|
||||||
resolved "https://registry.yarnpkg.com/diff/-/diff-3.3.1.tgz#aa8567a6eed03c531fc89d3f711cd0e5259dec75"
|
resolved "https://registry.yarnpkg.com/diff/-/diff-3.3.1.tgz#aa8567a6eed03c531fc89d3f711cd0e5259dec75"
|
||||||
@@ -2891,6 +2911,10 @@ each-async@^1.0.0:
|
|||||||
onetime "^1.0.0"
|
onetime "^1.0.0"
|
||||||
set-immediate-shim "^1.0.0"
|
set-immediate-shim "^1.0.0"
|
||||||
|
|
||||||
|
eastasianwidth@^0.1.1:
|
||||||
|
version "0.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/eastasianwidth/-/eastasianwidth-0.1.1.tgz#44d656de9da415694467335365fb3147b8572b7c"
|
||||||
|
|
||||||
ecc-jsbn@~0.1.1:
|
ecc-jsbn@~0.1.1:
|
||||||
version "0.1.1"
|
version "0.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505"
|
resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505"
|
||||||
@@ -2939,6 +2963,20 @@ emojis-list@^2.0.0:
|
|||||||
version "2.1.0"
|
version "2.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389"
|
resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389"
|
||||||
|
|
||||||
|
empower-core@^0.6.2:
|
||||||
|
version "0.6.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/empower-core/-/empower-core-0.6.2.tgz#5adef566088e31fba80ba0a36df47d7094169144"
|
||||||
|
dependencies:
|
||||||
|
call-signature "0.0.2"
|
||||||
|
core-js "^2.0.0"
|
||||||
|
|
||||||
|
empower@^1.2.3:
|
||||||
|
version "1.2.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/empower/-/empower-1.2.3.tgz#6f0da73447f4edd838fec5c60313a88ba5cb852b"
|
||||||
|
dependencies:
|
||||||
|
core-js "^2.0.0"
|
||||||
|
empower-core "^0.6.2"
|
||||||
|
|
||||||
encodeurl@~1.0.1:
|
encodeurl@~1.0.1:
|
||||||
version "1.0.1"
|
version "1.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.1.tgz#79e3d58655346909fe6f0f45a5de68103b294d20"
|
resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.1.tgz#79e3d58655346909fe6f0f45a5de68103b294d20"
|
||||||
@@ -3266,6 +3304,12 @@ esprima@^4.0.0:
|
|||||||
version "4.0.0"
|
version "4.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804"
|
resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804"
|
||||||
|
|
||||||
|
espurify@^1.6.0:
|
||||||
|
version "1.7.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/espurify/-/espurify-1.7.0.tgz#1c5cf6cbccc32e6f639380bd4f991fab9ba9d226"
|
||||||
|
dependencies:
|
||||||
|
core-js "^2.0.0"
|
||||||
|
|
||||||
esrecurse@^4.1.0:
|
esrecurse@^4.1.0:
|
||||||
version "4.2.0"
|
version "4.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.0.tgz#fa9568d98d3823f9a41d91e902dcab9ea6e5b163"
|
resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.0.tgz#fa9568d98d3823f9a41d91e902dcab9ea6e5b163"
|
||||||
@@ -3300,7 +3344,7 @@ eventemitter3@1.x.x:
|
|||||||
version "1.2.0"
|
version "1.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-1.2.0.tgz#1c86991d816ad1e504750e73874224ecf3bec508"
|
resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-1.2.0.tgz#1c86991d816ad1e504750e73874224ecf3bec508"
|
||||||
|
|
||||||
eventemitter3@^2.0.2:
|
eventemitter3@^2.0.3:
|
||||||
version "2.0.3"
|
version "2.0.3"
|
||||||
resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-2.0.3.tgz#b5e1079b59fb5e1ba2771c0a993be060a58c99ba"
|
resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-2.0.3.tgz#b5e1079b59fb5e1ba2771c0a993be060a58c99ba"
|
||||||
|
|
||||||
@@ -7058,7 +7102,7 @@ object-is@^1.0.1:
|
|||||||
version "1.0.1"
|
version "1.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.0.1.tgz#0aa60ec9989a0b3ed795cf4d06f62cf1ad6539b6"
|
resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.0.1.tgz#0aa60ec9989a0b3ed795cf4d06f62cf1ad6539b6"
|
||||||
|
|
||||||
object-keys@^1.0.11, object-keys@^1.0.8:
|
object-keys@^1.0.0, object-keys@^1.0.11, object-keys@^1.0.8:
|
||||||
version "1.0.11"
|
version "1.0.11"
|
||||||
resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.11.tgz#c54601778ad560f1142ce0e01bcca8b56d13426d"
|
resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.11.tgz#c54601778ad560f1142ce0e01bcca8b56d13426d"
|
||||||
|
|
||||||
@@ -7809,6 +7853,94 @@ postcss@^6.0.0, postcss@^6.0.1, postcss@^6.0.8:
|
|||||||
source-map "^0.6.1"
|
source-map "^0.6.1"
|
||||||
supports-color "^4.4.0"
|
supports-color "^4.4.0"
|
||||||
|
|
||||||
|
power-assert-context-formatter@^1.0.7:
|
||||||
|
version "1.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/power-assert-context-formatter/-/power-assert-context-formatter-1.1.1.tgz#edba352d3ed8a603114d667265acce60d689ccdf"
|
||||||
|
dependencies:
|
||||||
|
core-js "^2.0.0"
|
||||||
|
power-assert-context-traversal "^1.1.1"
|
||||||
|
|
||||||
|
power-assert-context-reducer-ast@^1.0.7:
|
||||||
|
version "1.1.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/power-assert-context-reducer-ast/-/power-assert-context-reducer-ast-1.1.2.tgz#484a99e26f4973ff8832e5c5cc756702e6094174"
|
||||||
|
dependencies:
|
||||||
|
acorn "^4.0.0"
|
||||||
|
acorn-es7-plugin "^1.0.12"
|
||||||
|
core-js "^2.0.0"
|
||||||
|
espurify "^1.6.0"
|
||||||
|
estraverse "^4.2.0"
|
||||||
|
|
||||||
|
power-assert-context-traversal@^1.1.1:
|
||||||
|
version "1.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/power-assert-context-traversal/-/power-assert-context-traversal-1.1.1.tgz#88cabca0d13b6359f07d3d3e8afa699264577ed9"
|
||||||
|
dependencies:
|
||||||
|
core-js "^2.0.0"
|
||||||
|
estraverse "^4.1.0"
|
||||||
|
|
||||||
|
power-assert-formatter@^1.3.1:
|
||||||
|
version "1.4.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/power-assert-formatter/-/power-assert-formatter-1.4.1.tgz#5dc125ed50a3dfb1dda26c19347f3bf58ec2884a"
|
||||||
|
dependencies:
|
||||||
|
core-js "^2.0.0"
|
||||||
|
power-assert-context-formatter "^1.0.7"
|
||||||
|
power-assert-context-reducer-ast "^1.0.7"
|
||||||
|
power-assert-renderer-assertion "^1.0.7"
|
||||||
|
power-assert-renderer-comparison "^1.0.7"
|
||||||
|
power-assert-renderer-diagram "^1.0.7"
|
||||||
|
power-assert-renderer-file "^1.0.7"
|
||||||
|
|
||||||
|
power-assert-renderer-assertion@^1.0.7:
|
||||||
|
version "1.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/power-assert-renderer-assertion/-/power-assert-renderer-assertion-1.1.1.tgz#cbfc0e77e0086a8f96af3f1d8e67b9ee7e28ce98"
|
||||||
|
dependencies:
|
||||||
|
power-assert-renderer-base "^1.1.1"
|
||||||
|
power-assert-util-string-width "^1.1.1"
|
||||||
|
|
||||||
|
power-assert-renderer-base@^1.1.1:
|
||||||
|
version "1.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/power-assert-renderer-base/-/power-assert-renderer-base-1.1.1.tgz#96a650c6fd05ee1bc1f66b54ad61442c8b3f63eb"
|
||||||
|
|
||||||
|
power-assert-renderer-comparison@^1.0.7:
|
||||||
|
version "1.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/power-assert-renderer-comparison/-/power-assert-renderer-comparison-1.1.1.tgz#d7439d97d85156be4e30a00f2fb5a72514ce3c08"
|
||||||
|
dependencies:
|
||||||
|
core-js "^2.0.0"
|
||||||
|
diff-match-patch "^1.0.0"
|
||||||
|
power-assert-renderer-base "^1.1.1"
|
||||||
|
stringifier "^1.3.0"
|
||||||
|
type-name "^2.0.1"
|
||||||
|
|
||||||
|
power-assert-renderer-diagram@^1.0.7:
|
||||||
|
version "1.1.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/power-assert-renderer-diagram/-/power-assert-renderer-diagram-1.1.2.tgz#655f8f711935a9b6d541b86327654717c637a986"
|
||||||
|
dependencies:
|
||||||
|
core-js "^2.0.0"
|
||||||
|
power-assert-renderer-base "^1.1.1"
|
||||||
|
power-assert-util-string-width "^1.1.1"
|
||||||
|
stringifier "^1.3.0"
|
||||||
|
|
||||||
|
power-assert-renderer-file@^1.0.7:
|
||||||
|
version "1.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/power-assert-renderer-file/-/power-assert-renderer-file-1.1.1.tgz#a37e2bbd178ccacd04e78dbb79c92fe34933c5e7"
|
||||||
|
dependencies:
|
||||||
|
power-assert-renderer-base "^1.1.1"
|
||||||
|
|
||||||
|
power-assert-util-string-width@^1.1.1:
|
||||||
|
version "1.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/power-assert-util-string-width/-/power-assert-util-string-width-1.1.1.tgz#be659eb7937fdd2e6c9a77268daaf64bd5b7c592"
|
||||||
|
dependencies:
|
||||||
|
eastasianwidth "^0.1.1"
|
||||||
|
|
||||||
|
power-assert@^1.2.0:
|
||||||
|
version "1.4.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/power-assert/-/power-assert-1.4.4.tgz#9295ea7437196f5a601fde420f042631186d7517"
|
||||||
|
dependencies:
|
||||||
|
define-properties "^1.1.2"
|
||||||
|
empower "^1.2.3"
|
||||||
|
power-assert-formatter "^1.3.1"
|
||||||
|
universal-deep-strict-equal "^1.2.1"
|
||||||
|
xtend "^4.0.0"
|
||||||
|
|
||||||
prebuild-install@^2.3.0:
|
prebuild-install@^2.3.0:
|
||||||
version "2.3.0"
|
version "2.3.0"
|
||||||
resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-2.3.0.tgz#19481247df728b854ab57b187ce234211311b485"
|
resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-2.3.0.tgz#19481247df728b854ab57b187ce234211311b485"
|
||||||
@@ -8651,6 +8783,15 @@ restore-cursor@^1.0.1:
|
|||||||
exit-hook "^1.0.0"
|
exit-hook "^1.0.0"
|
||||||
onetime "^1.0.0"
|
onetime "^1.0.0"
|
||||||
|
|
||||||
|
restructured@0.0.11:
|
||||||
|
version "0.0.11"
|
||||||
|
resolved "https://registry.yarnpkg.com/restructured/-/restructured-0.0.11.tgz#f914f6b6f358b8e45d6d8ee268926cf1a783f710"
|
||||||
|
dependencies:
|
||||||
|
commander "^2.9.0"
|
||||||
|
lodash "^4.0.0"
|
||||||
|
power-assert "^1.2.0"
|
||||||
|
unist-util-map "^1.0.2"
|
||||||
|
|
||||||
ret@~0.1.10:
|
ret@~0.1.10:
|
||||||
version "0.1.15"
|
version "0.1.15"
|
||||||
resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc"
|
resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc"
|
||||||
@@ -8693,6 +8834,12 @@ rst-selector-parser@^2.2.3:
|
|||||||
lodash.flattendeep "^4.4.0"
|
lodash.flattendeep "^4.4.0"
|
||||||
nearley "^2.7.10"
|
nearley "^2.7.10"
|
||||||
|
|
||||||
|
"rst2html@github:thoward/rst2html#d6e2f21":
|
||||||
|
version "1.0.4"
|
||||||
|
resolved "https://codeload.github.com/thoward/rst2html/tar.gz/d6e2f219ea94ec7b1fe3cc918d152b67015ab04e"
|
||||||
|
dependencies:
|
||||||
|
restructured "0.0.11"
|
||||||
|
|
||||||
run-async@^0.1.0:
|
run-async@^0.1.0:
|
||||||
version "0.1.0"
|
version "0.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/run-async/-/run-async-0.1.0.tgz#c8ad4a5e110661e402a7d21b530e009f25f8e389"
|
resolved "https://registry.yarnpkg.com/run-async/-/run-async-0.1.0.tgz#c8ad4a5e110661e402a7d21b530e009f25f8e389"
|
||||||
@@ -9359,6 +9506,14 @@ string_decoder@~0.10.x:
|
|||||||
version "0.10.31"
|
version "0.10.31"
|
||||||
resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94"
|
resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94"
|
||||||
|
|
||||||
|
stringifier@^1.3.0:
|
||||||
|
version "1.3.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/stringifier/-/stringifier-1.3.0.tgz#def18342f6933db0f2dbfc9aa02175b448c17959"
|
||||||
|
dependencies:
|
||||||
|
core-js "^2.0.0"
|
||||||
|
traverse "^0.6.6"
|
||||||
|
type-name "^2.0.1"
|
||||||
|
|
||||||
stringify-object@^3.2.0:
|
stringify-object@^3.2.0:
|
||||||
version "3.2.1"
|
version "3.2.1"
|
||||||
resolved "https://registry.yarnpkg.com/stringify-object/-/stringify-object-3.2.1.tgz#2720c2eff940854c819f6ee252aaeb581f30624d"
|
resolved "https://registry.yarnpkg.com/stringify-object/-/stringify-object-3.2.1.tgz#2720c2eff940854c819f6ee252aaeb581f30624d"
|
||||||
@@ -9713,6 +9868,10 @@ tr46@^1.0.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
punycode "^2.1.0"
|
punycode "^2.1.0"
|
||||||
|
|
||||||
|
traverse@^0.6.6:
|
||||||
|
version "0.6.6"
|
||||||
|
resolved "https://registry.yarnpkg.com/traverse/-/traverse-0.6.6.tgz#cbdf560fd7b9af632502fed40f918c157ea97137"
|
||||||
|
|
||||||
trim-newlines@^1.0.0:
|
trim-newlines@^1.0.0:
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613"
|
resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613"
|
||||||
@@ -9826,6 +9985,10 @@ type-is@~1.6.15:
|
|||||||
media-typer "0.3.0"
|
media-typer "0.3.0"
|
||||||
mime-types "~2.1.15"
|
mime-types "~2.1.15"
|
||||||
|
|
||||||
|
type-name@^2.0.1:
|
||||||
|
version "2.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/type-name/-/type-name-2.0.2.tgz#efe7d4123d8ac52afff7f40c7e4dec5266008fb4"
|
||||||
|
|
||||||
typedarray@^0.0.6:
|
typedarray@^0.0.6:
|
||||||
version "0.0.6"
|
version "0.0.6"
|
||||||
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
|
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
|
||||||
@@ -9952,6 +10115,20 @@ unique-string@^1.0.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
crypto-random-string "^1.0.0"
|
crypto-random-string "^1.0.0"
|
||||||
|
|
||||||
|
unist-util-map@^1.0.2:
|
||||||
|
version "1.0.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/unist-util-map/-/unist-util-map-1.0.3.tgz#26a913d7cddb3cd3e9a886d135d37a3d1f54e514"
|
||||||
|
dependencies:
|
||||||
|
object-assign "^4.0.1"
|
||||||
|
|
||||||
|
universal-deep-strict-equal@^1.2.1:
|
||||||
|
version "1.2.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/universal-deep-strict-equal/-/universal-deep-strict-equal-1.2.2.tgz#0da4ac2f73cff7924c81fa4de018ca562ca2b0a7"
|
||||||
|
dependencies:
|
||||||
|
array-filter "^1.0.0"
|
||||||
|
indexof "0.0.1"
|
||||||
|
object-keys "^1.0.0"
|
||||||
|
|
||||||
universalify@^0.1.0:
|
universalify@^0.1.0:
|
||||||
version "0.1.1"
|
version "0.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.1.tgz#fa71badd4437af4c148841e3b3b165f9e9e590b7"
|
resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.1.tgz#fa71badd4437af4c148841e3b3b165f9e9e590b7"
|
||||||
|
|||||||
Reference in New Issue
Block a user