id
int32
0
58k
repo
stringlengths
5
67
path
stringlengths
4
116
func_name
stringlengths
0
58
original_string
stringlengths
52
373k
language
stringclasses
1 value
code
stringlengths
52
373k
code_tokens
list
docstring
stringlengths
4
11.8k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
86
226
13,700
splunk/splunk-sdk-javascript
client/splunk.ui.charting.js
getPosition
function getPosition(el) { var p = { left: el.offsetLeft, top: el.offsetTop }; el = el.offsetParent; while (el) { p.left += el.offsetLeft; p.top += el.offsetTop; if (el !== doc.body && el !== doc.documentElement) { p.left -= el.scrollLeft; p.top -= el.scrollTop; } el = el.offsetParent; } ...
javascript
function getPosition(el) { var p = { left: el.offsetLeft, top: el.offsetTop }; el = el.offsetParent; while (el) { p.left += el.offsetLeft; p.top += el.offsetTop; if (el !== doc.body && el !== doc.documentElement) { p.left -= el.scrollLeft; p.top -= el.scrollTop; } el = el.offsetParent; } ...
[ "function", "getPosition", "(", "el", ")", "{", "var", "p", "=", "{", "left", ":", "el", ".", "offsetLeft", ",", "top", ":", "el", ".", "offsetTop", "}", ";", "el", "=", "el", ".", "offsetParent", ";", "while", "(", "el", ")", "{", "p", ".", "l...
Loop up the node tree and add offsetWidth and offsetHeight to get the total page offset for a given element. Used by Opera and iOS on hover and all browsers on point click. @param {Object} el
[ "Loop", "up", "the", "node", "tree", "and", "add", "offsetWidth", "and", "offsetHeight", "to", "get", "the", "total", "page", "offset", "for", "a", "given", "element", ".", "Used", "by", "Opera", "and", "iOS", "on", "hover", "and", "all", "browsers", "on...
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.ui.charting.js#L12423-L12436
13,701
splunk/splunk-sdk-javascript
client/splunk.ui.charting.js
placeBox
function placeBox(boxWidth, boxHeight, outerLeft, outerTop, outerWidth, outerHeight, point) { // keep the box within the chart area var pointX = point.x, pointY = point.y, x = pointX - boxWidth + outerLeft - 25, y = pointY - boxHeight + outerTop + 10, alignedRight; // it is too far to the left, adju...
javascript
function placeBox(boxWidth, boxHeight, outerLeft, outerTop, outerWidth, outerHeight, point) { // keep the box within the chart area var pointX = point.x, pointY = point.y, x = pointX - boxWidth + outerLeft - 25, y = pointY - boxHeight + outerTop + 10, alignedRight; // it is too far to the left, adju...
[ "function", "placeBox", "(", "boxWidth", ",", "boxHeight", ",", "outerLeft", ",", "outerTop", ",", "outerWidth", ",", "outerHeight", ",", "point", ")", "{", "// keep the box within the chart area\r", "var", "pointX", "=", "point", ".", "x", ",", "pointY", "=", ...
Utility method extracted from Tooltip code that places a tooltip in a chart without spilling over and not covering the point it self.
[ "Utility", "method", "extracted", "from", "Tooltip", "code", "that", "places", "a", "tooltip", "in", "a", "chart", "without", "spilling", "over", "and", "not", "covering", "the", "point", "it", "self", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.ui.charting.js#L12470-L12521
13,702
splunk/splunk-sdk-javascript
client/splunk.ui.charting.js
stableSort
function stableSort(arr, sortFunction) { var length = arr.length, i; // Add index to each item for (i = 0; i < length; i++) { arr[i].ss_i = i; // stable sort index } arr.sort(function (a, b) { var sortValue = sortFunction(a, b); return sortValue === 0 ? a.ss_i - b.ss_i : sortValue; }); /...
javascript
function stableSort(arr, sortFunction) { var length = arr.length, i; // Add index to each item for (i = 0; i < length; i++) { arr[i].ss_i = i; // stable sort index } arr.sort(function (a, b) { var sortValue = sortFunction(a, b); return sortValue === 0 ? a.ss_i - b.ss_i : sortValue; }); /...
[ "function", "stableSort", "(", "arr", ",", "sortFunction", ")", "{", "var", "length", "=", "arr", ".", "length", ",", "i", ";", "// Add index to each item\r", "for", "(", "i", "=", "0", ";", "i", "<", "length", ";", "i", "++", ")", "{", "arr", "[", ...
Utility method that sorts an object array and keeping the order of equal items. ECMA script standard does not specify the behaviour when items are equal.
[ "Utility", "method", "that", "sorts", "an", "object", "array", "and", "keeping", "the", "order", "of", "equal", "items", ".", "ECMA", "script", "standard", "does", "not", "specify", "the", "behaviour", "when", "items", "are", "equal", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.ui.charting.js#L12527-L12545
13,703
splunk/splunk-sdk-javascript
client/splunk.ui.charting.js
function (start, end, pos, complete) { var ret = [], i = start.length, startVal; if (pos === 1) { // land on the final path without adjustment points appended in the ends ret = complete; } else if (i === end.length && pos < 1) { while (i--) { startVal = parseFloat(start[i]); ret[i...
javascript
function (start, end, pos, complete) { var ret = [], i = start.length, startVal; if (pos === 1) { // land on the final path without adjustment points appended in the ends ret = complete; } else if (i === end.length && pos < 1) { while (i--) { startVal = parseFloat(start[i]); ret[i...
[ "function", "(", "start", ",", "end", ",", "pos", ",", "complete", ")", "{", "var", "ret", "=", "[", "]", ",", "i", "=", "start", ".", "length", ",", "startVal", ";", "if", "(", "pos", "===", "1", ")", "{", "// land on the final path without adjustment...
Interpolate each value of the path and return the array
[ "Interpolate", "each", "value", "of", "the", "path", "and", "return", "the", "array" ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.ui.charting.js#L12637-L12658
13,704
splunk/splunk-sdk-javascript
client/splunk.ui.charting.js
function () { var element = this.element, childNodes = element.childNodes, i = childNodes.length; while (i--) { element.removeChild(childNodes[i]); } }
javascript
function () { var element = this.element, childNodes = element.childNodes, i = childNodes.length; while (i--) { element.removeChild(childNodes[i]); } }
[ "function", "(", ")", "{", "var", "element", "=", "this", ".", "element", ",", "childNodes", "=", "element", ".", "childNodes", ",", "i", "=", "childNodes", ".", "length", ";", "while", "(", "i", "--", ")", "{", "element", ".", "removeChild", "(", "c...
Empty a group element
[ "Empty", "a", "group", "element" ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.ui.charting.js#L14257-L14265
13,705
splunk/splunk-sdk-javascript
client/splunk.ui.charting.js
function (points, width) { // points format: [M, 0, 0, L, 100, 0] // normalize to a crisp line if (points[1] === points[4]) { points[1] = points[4] = mathRound(points[1]) + (width % 2 / 2); } if (points[2] === points[5]) { points[2] = points[5] = mathRound(points[2]) + (width % 2 / 2); } re...
javascript
function (points, width) { // points format: [M, 0, 0, L, 100, 0] // normalize to a crisp line if (points[1] === points[4]) { points[1] = points[4] = mathRound(points[1]) + (width % 2 / 2); } if (points[2] === points[5]) { points[2] = points[5] = mathRound(points[2]) + (width % 2 / 2); } re...
[ "function", "(", "points", ",", "width", ")", "{", "// points format: [M, 0, 0, L, 100, 0]\r", "// normalize to a crisp line\r", "if", "(", "points", "[", "1", "]", "===", "points", "[", "4", "]", ")", "{", "points", "[", "1", "]", "=", "points", "[", "4", ...
Make a straight line crisper by not spilling out to neighbour pixels @param {Array} points @param {Number} width
[ "Make", "a", "straight", "line", "crisper", "by", "not", "spilling", "out", "to", "neighbour", "pixels" ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.ui.charting.js#L14572-L14582
13,706
splunk/splunk-sdk-javascript
client/splunk.ui.charting.js
function (x, y, r, innerR, start, end) { // arcs are defined as symbols for the ability to set // attributes in attr and animate if (isObject(x)) { y = x.y; r = x.r; innerR = x.innerR; start = x.start; end = x.end; x = x.x; } return this.symbol('arc', x || 0, y || 0, r || 0, {...
javascript
function (x, y, r, innerR, start, end) { // arcs are defined as symbols for the ability to set // attributes in attr and animate if (isObject(x)) { y = x.y; r = x.r; innerR = x.innerR; start = x.start; end = x.end; x = x.x; } return this.symbol('arc', x || 0, y || 0, r || 0, {...
[ "function", "(", "x", ",", "y", ",", "r", ",", "innerR", ",", "start", ",", "end", ")", "{", "// arcs are defined as symbols for the ability to set\r", "// attributes in attr and animate\r", "if", "(", "isObject", "(", "x", ")", ")", "{", "y", "=", "x", ".", ...
Draw and return an arc @param {Number} x X position @param {Number} y Y position @param {Number} r Radius @param {Number} innerR Inner radius like used in donut charts @param {Number} start Starting angle @param {Number} end Ending angle
[ "Draw", "and", "return", "an", "arc" ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.ui.charting.js#L14623-L14641
13,707
splunk/splunk-sdk-javascript
client/splunk.ui.charting.js
function (name) { var elem = this.createElement('g'); return defined(name) ? elem.attr({ 'class': PREFIX + name }) : elem; }
javascript
function (name) { var elem = this.createElement('g'); return defined(name) ? elem.attr({ 'class': PREFIX + name }) : elem; }
[ "function", "(", "name", ")", "{", "var", "elem", "=", "this", ".", "createElement", "(", "'g'", ")", ";", "return", "defined", "(", "name", ")", "?", "elem", ".", "attr", "(", "{", "'class'", ":", "PREFIX", "+", "name", "}", ")", ":", "elem", ";...
Create a group @param {String} name The group will be given a class name of 'highcharts-{name}'. This can be used for styling and scripting.
[ "Create", "a", "group" ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.ui.charting.js#L14700-L14703
13,708
splunk/splunk-sdk-javascript
client/splunk.ui.charting.js
function (x, y, width, height) { var wrapper, id = PREFIX + idCounter++, clipPath = this.createElement('clipPath').attr({ id: id }).add(this.defs); wrapper = this.rect(x, y, width, height, 0).add(clipPath); wrapper.id = id; wrapper.clipPath = clipPath; return wrapper; }
javascript
function (x, y, width, height) { var wrapper, id = PREFIX + idCounter++, clipPath = this.createElement('clipPath').attr({ id: id }).add(this.defs); wrapper = this.rect(x, y, width, height, 0).add(clipPath); wrapper.id = id; wrapper.clipPath = clipPath; return wrapper; }
[ "function", "(", "x", ",", "y", ",", "width", ",", "height", ")", "{", "var", "wrapper", ",", "id", "=", "PREFIX", "+", "idCounter", "++", ",", "clipPath", "=", "this", ".", "createElement", "(", "'clipPath'", ")", ".", "attr", "(", "{", "id", ":",...
Define a clipping rectangle @param {String} id @param {Number} x @param {Number} y @param {Number} width @param {Number} height
[ "Define", "a", "clipping", "rectangle" ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.ui.charting.js#L14922-L14935
13,709
splunk/splunk-sdk-javascript
client/splunk.ui.charting.js
function (color, elem, prop) { var colorObject, regexRgba = /^rgba/; if (color && color.linearGradient) { var renderer = this, strLinearGradient = 'linearGradient', linearGradient = color[strLinearGradient], id = PREFIX + idCounter++, gradientObject, stopColor, stopOpacity; ...
javascript
function (color, elem, prop) { var colorObject, regexRgba = /^rgba/; if (color && color.linearGradient) { var renderer = this, strLinearGradient = 'linearGradient', linearGradient = color[strLinearGradient], id = PREFIX + idCounter++, gradientObject, stopColor, stopOpacity; ...
[ "function", "(", "color", ",", "elem", ",", "prop", ")", "{", "var", "colorObject", ",", "regexRgba", "=", "/", "^rgba", "/", ";", "if", "(", "color", "&&", "color", ".", "linearGradient", ")", "{", "var", "renderer", "=", "this", ",", "strLinearGradie...
Take a color and return it if it's a string, make it a gradient if it's a gradient configuration object @param {Object} color The color or config object
[ "Take", "a", "color", "and", "return", "it", "if", "it", "s", "a", "string", "make", "it", "a", "gradient", "if", "it", "s", "a", "gradient", "configuration", "object" ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.ui.charting.js#L14944-L15006
13,710
splunk/splunk-sdk-javascript
client/splunk.ui.charting.js
function (renderer, nodeName) { var markup = ['<', nodeName, ' filled="f" stroked="f"'], style = ['position: ', ABSOLUTE, ';']; // divs and shapes need size if (nodeName === 'shape' || nodeName === DIV) { style.push('left:0;top:0;width:10px;height:10px;'); } if (docMode8) { style.push('vis...
javascript
function (renderer, nodeName) { var markup = ['<', nodeName, ' filled="f" stroked="f"'], style = ['position: ', ABSOLUTE, ';']; // divs and shapes need size if (nodeName === 'shape' || nodeName === DIV) { style.push('left:0;top:0;width:10px;height:10px;'); } if (docMode8) { style.push('vis...
[ "function", "(", "renderer", ",", "nodeName", ")", "{", "var", "markup", "=", "[", "'<'", ",", "nodeName", ",", "' filled=\"f\" stroked=\"f\"'", "]", ",", "style", "=", "[", "'position: '", ",", "ABSOLUTE", ",", "';'", "]", ";", "// divs and shapes need size\r...
Initialize a new VML element wrapper. It builds the markup as a string to minimize DOM traffic. @param {Object} renderer @param {Object} nodeName
[ "Initialize", "a", "new", "VML", "element", "wrapper", ".", "It", "builds", "the", "markup", "as", "a", "string", "to", "minimize", "DOM", "traffic", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.ui.charting.js#L15070-L15093
13,711
splunk/splunk-sdk-javascript
client/splunk.ui.charting.js
function () { var wrapper = this; if (wrapper.destroyClip) { wrapper.destroyClip(); } return SVGElement.prototype.destroy.apply(wrapper); }
javascript
function () { var wrapper = this; if (wrapper.destroyClip) { wrapper.destroyClip(); } return SVGElement.prototype.destroy.apply(wrapper); }
[ "function", "(", ")", "{", "var", "wrapper", "=", "this", ";", "if", "(", "wrapper", ".", "destroyClip", ")", "{", "wrapper", ".", "destroyClip", "(", ")", ";", "}", "return", "SVGElement", ".", "prototype", ".", "destroy", ".", "apply", "(", "wrapper"...
Extend element.destroy by removing it from the clip members array
[ "Extend", "element", ".", "destroy", "by", "removing", "it", "from", "the", "clip", "members", "array" ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.ui.charting.js#L15401-L15409
13,712
splunk/splunk-sdk-javascript
client/splunk.ui.charting.js
function (eventType, handler) { // simplest possible event model for internal use this.element['on' + eventType] = function () { var evt = win.event; evt.target = evt.srcElement; handler(evt); }; return this; }
javascript
function (eventType, handler) { // simplest possible event model for internal use this.element['on' + eventType] = function () { var evt = win.event; evt.target = evt.srcElement; handler(evt); }; return this; }
[ "function", "(", "eventType", ",", "handler", ")", "{", "// simplest possible event model for internal use\r", "this", ".", "element", "[", "'on'", "+", "eventType", "]", "=", "function", "(", ")", "{", "var", "evt", "=", "win", ".", "event", ";", "evt", "."...
Add an event listener. VML override for normalizing event parameters. @param {String} eventType @param {Function} handler
[ "Add", "an", "event", "listener", ".", "VML", "override", "for", "normalizing", "event", "parameters", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.ui.charting.js#L15459-L15467
13,713
splunk/splunk-sdk-javascript
client/splunk.ui.charting.js
function (str, x, y) { var defaultChartStyle = defaultOptions.chart.style; return this.createElement('span') .attr({ text: str, x: mathRound(x), y: mathRound(y) }) .css({ whiteSpace: 'nowrap', fontFamily: defaultChartStyle.fontFamily, fontSize: defaultChartStyle.fontS...
javascript
function (str, x, y) { var defaultChartStyle = defaultOptions.chart.style; return this.createElement('span') .attr({ text: str, x: mathRound(x), y: mathRound(y) }) .css({ whiteSpace: 'nowrap', fontFamily: defaultChartStyle.fontFamily, fontSize: defaultChartStyle.fontS...
[ "function", "(", "str", ",", "x", ",", "y", ")", "{", "var", "defaultChartStyle", "=", "defaultOptions", ".", "chart", ".", "style", ";", "return", "this", ".", "createElement", "(", "'span'", ")", ".", "attr", "(", "{", "text", ":", "str", ",", "x",...
Create rotated and aligned text @param {String} str @param {Number} x @param {Number} y
[ "Create", "rotated", "and", "aligned", "text" ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.ui.charting.js#L15858-L15873
13,714
splunk/splunk-sdk-javascript
client/splunk.ui.charting.js
function () { var value = this.value, ret; if (dateTimeLabelFormat) { // datetime axis ret = dateFormat(dateTimeLabelFormat, value); } else if (tickInterval % 1000000 === 0) { // use M abbreviation ret = (value / 1000000) + 'M'; } else if (tickInterval % 1000 === 0) { ...
javascript
function () { var value = this.value, ret; if (dateTimeLabelFormat) { // datetime axis ret = dateFormat(dateTimeLabelFormat, value); } else if (tickInterval % 1000000 === 0) { // use M abbreviation ret = (value / 1000000) + 'M'; } else if (tickInterval % 1000 === 0) { ...
[ "function", "(", ")", "{", "var", "value", "=", "this", ".", "value", ",", "ret", ";", "if", "(", "dateTimeLabelFormat", ")", "{", "// datetime axis\r", "ret", "=", "dateFormat", "(", "dateTimeLabelFormat", ",", "value", ")", ";", "}", "else", "if", "(",...
can be overwritten by dynamic format
[ "can", "be", "overwritten", "by", "dynamic", "format" ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.ui.charting.js#L16283-L16303
13,715
splunk/splunk-sdk-javascript
client/splunk.ui.charting.js
Tick
function Tick(pos, minor) { var tick = this; tick.pos = pos; tick.minor = minor; tick.isNew = true; if (!minor) { tick.addLabel(); } }
javascript
function Tick(pos, minor) { var tick = this; tick.pos = pos; tick.minor = minor; tick.isNew = true; if (!minor) { tick.addLabel(); } }
[ "function", "Tick", "(", "pos", ",", "minor", ")", "{", "var", "tick", "=", "this", ";", "tick", ".", "pos", "=", "pos", ";", "tick", ".", "minor", "=", "minor", ";", "tick", ".", "isNew", "=", "true", ";", "if", "(", "!", "minor", ")", "{", ...
The Tick class
[ "The", "Tick", "class" ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.ui.charting.js#L16320-L16329
13,716
splunk/splunk-sdk-javascript
client/splunk.ui.charting.js
StackItem
function StackItem(options, isNegative, x, stackOption) { var stackItem = this; // Tells if the stack is negative stackItem.isNegative = isNegative; // Save the options to be able to style the label stackItem.options = options; // Save the x value to be able to position the label later ...
javascript
function StackItem(options, isNegative, x, stackOption) { var stackItem = this; // Tells if the stack is negative stackItem.isNegative = isNegative; // Save the options to be able to style the label stackItem.options = options; // Save the x value to be able to position the label later ...
[ "function", "StackItem", "(", "options", ",", "isNegative", ",", "x", ",", "stackOption", ")", "{", "var", "stackItem", "=", "this", ";", "// Tells if the stack is negative\r", "stackItem", ".", "isNegative", "=", "isNegative", ";", "// Save the options to be able to ...
The class for stack items
[ "The", "class", "for", "stack", "items" ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.ui.charting.js#L16725-L16751
13,717
splunk/splunk-sdk-javascript
client/splunk.ui.charting.js
correctFloat
function correctFloat(num) { var invMag, ret = num; magnitude = pick(magnitude, math.pow(10, mathFloor(math.log(tickInterval) / math.LN10))); if (magnitude < 1) { invMag = mathRound(1 / magnitude) * 10; ret = mathRound(num * invMag) / invMag; } return ret; }
javascript
function correctFloat(num) { var invMag, ret = num; magnitude = pick(magnitude, math.pow(10, mathFloor(math.log(tickInterval) / math.LN10))); if (magnitude < 1) { invMag = mathRound(1 / magnitude) * 10; ret = mathRound(num * invMag) / invMag; } return ret; }
[ "function", "correctFloat", "(", "num", ")", "{", "var", "invMag", ",", "ret", "=", "num", ";", "magnitude", "=", "pick", "(", "magnitude", ",", "math", ".", "pow", "(", "10", ",", "mathFloor", "(", "math", ".", "log", "(", "tickInterval", ")", "/", ...
Fix JS round off float errors @param {Number} num
[ "Fix", "JS", "round", "off", "float", "errors" ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.ui.charting.js#L17252-L17261
13,718
splunk/splunk-sdk-javascript
client/splunk.ui.charting.js
setCategories
function setCategories(newCategories, doRedraw) { // set the categories axis.categories = userOptions.categories = categories = newCategories; // force reindexing tooltips each(associatedSeries, function (series) { series.translate(); series.setTooltipPoints(true); }); //...
javascript
function setCategories(newCategories, doRedraw) { // set the categories axis.categories = userOptions.categories = categories = newCategories; // force reindexing tooltips each(associatedSeries, function (series) { series.translate(); series.setTooltipPoints(true); }); //...
[ "function", "setCategories", "(", "newCategories", ",", "doRedraw", ")", "{", "// set the categories\r", "axis", ".", "categories", "=", "userOptions", ".", "categories", "=", "categories", "=", "newCategories", ";", "// force reindexing tooltips\r", "each", "(", "ass...
Set new axis categories and optionally redraw @param {Array} newCategories @param {Boolean} doRedraw
[ "Set", "new", "axis", "categories", "and", "optionally", "redraw" ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.ui.charting.js#L17942-L17959
13,719
splunk/splunk-sdk-javascript
client/splunk.ui.charting.js
Toolbar
function Toolbar() { var buttons = {}; /*jslint unparam: true*//* allow the unused param title until Toolbar rewrite*/ function add(id, text, title, fn) { if (!buttons[id]) { var button = renderer.text( text, 0, 0 ) .css(options.toolbar.itemStyle) .align({ alig...
javascript
function Toolbar() { var buttons = {}; /*jslint unparam: true*//* allow the unused param title until Toolbar rewrite*/ function add(id, text, title, fn) { if (!buttons[id]) { var button = renderer.text( text, 0, 0 ) .css(options.toolbar.itemStyle) .align({ alig...
[ "function", "Toolbar", "(", ")", "{", "var", "buttons", "=", "{", "}", ";", "/*jslint unparam: true*/", "/* allow the unused param title until Toolbar rewrite*/", "function", "add", "(", "id", ",", "text", ",", "title", ",", "fn", ")", "{", "if", "(", "!", "bu...
end Axis The toolbar object
[ "end", "Axis", "The", "toolbar", "object" ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.ui.charting.js#L18055-L18097
13,720
splunk/splunk-sdk-javascript
client/splunk.ui.charting.js
defaultFormatter
function defaultFormatter() { var pThis = this, items = pThis.points || splat(pThis), xAxis = items[0].series.xAxis, x = pThis.x, isDateTime = xAxis && xAxis.options.type === 'datetime', useHeader = isString(x) || isDateTime, s; // build the header s = useHeader ? ['<spa...
javascript
function defaultFormatter() { var pThis = this, items = pThis.points || splat(pThis), xAxis = items[0].series.xAxis, x = pThis.x, isDateTime = xAxis && xAxis.options.type === 'datetime', useHeader = isString(x) || isDateTime, s; // build the header s = useHeader ? ['<spa...
[ "function", "defaultFormatter", "(", ")", "{", "var", "pThis", "=", "this", ",", "items", "=", "pThis", ".", "points", "||", "splat", "(", "pThis", ")", ",", "xAxis", "=", "items", "[", "0", "]", ".", "series", ".", "xAxis", ",", "x", "=", "pThis",...
In case no user defined formatter is given, this will be used
[ "In", "case", "no", "user", "defined", "formatter", "is", "given", "this", "will", "be", "used" ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.ui.charting.js#L18163-L18183
13,721
splunk/splunk-sdk-javascript
client/splunk.ui.charting.js
onmousemove
function onmousemove(e) { var point, points, hoverPoint = chart.hoverPoint, hoverSeries = chart.hoverSeries, i, j, distance = chartWidth, index = inverted ? e.chartY : e.chartX - plotLeft; // wtf? // shared tooltip if (tooltip && options.shared) { points = []; ...
javascript
function onmousemove(e) { var point, points, hoverPoint = chart.hoverPoint, hoverSeries = chart.hoverSeries, i, j, distance = chartWidth, index = inverted ? e.chartY : e.chartX - plotLeft; // wtf? // shared tooltip if (tooltip && options.shared) { points = []; ...
[ "function", "onmousemove", "(", "e", ")", "{", "var", "point", ",", "points", ",", "hoverPoint", "=", "chart", ".", "hoverPoint", ",", "hoverSeries", "=", "chart", ".", "hoverSeries", ",", "i", ",", "j", ",", "distance", "=", "chartWidth", ",", "index", ...
With line type charts with a single tracker, get the point closest to the mouse
[ "With", "line", "type", "charts", "with", "a", "single", "tracker", "get", "the", "point", "closest", "to", "the", "mouse" ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.ui.charting.js#L18530-L18582
13,722
splunk/splunk-sdk-javascript
client/splunk.ui.charting.js
drop
function drop() { if (selectionMarker) { var selectionData = { xAxis: [], yAxis: [] }, selectionBox = selectionMarker.getBBox(), selectionLeft = selectionBox.x - plotLeft, selectionTop = selectionBox.y - plotTop; // a selection has been made if (hasDragged) {...
javascript
function drop() { if (selectionMarker) { var selectionData = { xAxis: [], yAxis: [] }, selectionBox = selectionMarker.getBBox(), selectionLeft = selectionBox.x - plotLeft, selectionTop = selectionBox.y - plotTop; // a selection has been made if (hasDragged) {...
[ "function", "drop", "(", ")", "{", "if", "(", "selectionMarker", ")", "{", "var", "selectionData", "=", "{", "xAxis", ":", "[", "]", ",", "yAxis", ":", "[", "]", "}", ",", "selectionBox", "=", "selectionMarker", ".", "getBBox", "(", ")", ",", "select...
Mouse up or outside the plot area
[ "Mouse", "up", "or", "outside", "the", "plot", "area" ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.ui.charting.js#L18611-L18665
13,723
splunk/splunk-sdk-javascript
client/splunk.ui.charting.js
hideTooltipOnMouseMove
function hideTooltipOnMouseMove(e) { var pageX = defined(e.pageX) ? e.pageX : e.page.x, // In mootools the event is wrapped and the page x/y position is named e.page.x pageY = defined(e.pageX) ? e.pageY : e.page.y; // Ref: http://mootools.net/docs/core/Types/DOMEvent if (chartPosition && !isInsideP...
javascript
function hideTooltipOnMouseMove(e) { var pageX = defined(e.pageX) ? e.pageX : e.page.x, // In mootools the event is wrapped and the page x/y position is named e.page.x pageY = defined(e.pageX) ? e.pageY : e.page.y; // Ref: http://mootools.net/docs/core/Types/DOMEvent if (chartPosition && !isInsideP...
[ "function", "hideTooltipOnMouseMove", "(", "e", ")", "{", "var", "pageX", "=", "defined", "(", "e", ".", "pageX", ")", "?", "e", ".", "pageX", ":", "e", ".", "page", ".", "x", ",", "// In mootools the event is wrapped and the page x/y position is named e.page.x\r"...
Special handler for mouse move that will hide the tooltip when the mouse leaves the plotarea.
[ "Special", "handler", "for", "mouse", "move", "that", "will", "hide", "the", "tooltip", "when", "the", "mouse", "leaves", "the", "plotarea", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.ui.charting.js#L18670-L18679
13,724
splunk/splunk-sdk-javascript
client/splunk.ui.charting.js
destroy
function destroy() { // Destroy the tracker group element if (chart.trackerGroup) { chart.trackerGroup = trackerGroup = chart.trackerGroup.destroy(); } removeEvent(doc, 'mousemove', hideTooltipOnMouseMove); container.onclick = container.onmousedown = container.onmousemove = container.ontouchs...
javascript
function destroy() { // Destroy the tracker group element if (chart.trackerGroup) { chart.trackerGroup = trackerGroup = chart.trackerGroup.destroy(); } removeEvent(doc, 'mousemove', hideTooltipOnMouseMove); container.onclick = container.onmousedown = container.onmousemove = container.ontouchs...
[ "function", "destroy", "(", ")", "{", "// Destroy the tracker group element\r", "if", "(", "chart", ".", "trackerGroup", ")", "{", "chart", ".", "trackerGroup", "=", "trackerGroup", "=", "chart", ".", "trackerGroup", ".", "destroy", "(", ")", ";", "}", "remove...
Destroys the MouseTracker object and disconnects DOM events.
[ "Destroys", "the", "MouseTracker", "object", "and", "disconnects", "DOM", "events", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.ui.charting.js#L18911-L18919
13,725
splunk/splunk-sdk-javascript
client/splunk.ui.charting.js
destroyItem
function destroyItem(item) { var checkbox = item.checkbox; // pull out from the array //erase(allItems, item); // destroy SVG elements each(['legendItem', 'legendLine', 'legendSymbol'], function (key) { if (item[key]) { item[key].destroy(); } }); if (checkbox) { di...
javascript
function destroyItem(item) { var checkbox = item.checkbox; // pull out from the array //erase(allItems, item); // destroy SVG elements each(['legendItem', 'legendLine', 'legendSymbol'], function (key) { if (item[key]) { item[key].destroy(); } }); if (checkbox) { di...
[ "function", "destroyItem", "(", "item", ")", "{", "var", "checkbox", "=", "item", ".", "checkbox", ";", "// pull out from the array\r", "//erase(allItems, item);\r", "// destroy SVG elements\r", "each", "(", "[", "'legendItem'", ",", "'legendLine'", ",", "'legendSymbol'...
Destroy a single legend item @param {Object} item The series or point
[ "Destroy", "a", "single", "legend", "item" ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.ui.charting.js#L19079-L19097
13,726
splunk/splunk-sdk-javascript
client/splunk.ui.charting.js
function () { if (!this.hasImportedEvents) { var point = this, options = merge(point.series.options.point, point.options), events = options.events, eventType; point.events = events; for (eventType in events) { addEvent(point, eventType, events[eventType]); } this.hasImport...
javascript
function () { if (!this.hasImportedEvents) { var point = this, options = merge(point.series.options.point, point.options), events = options.events, eventType; point.events = events; for (eventType in events) { addEvent(point, eventType, events[eventType]); } this.hasImport...
[ "function", "(", ")", "{", "if", "(", "!", "this", ".", "hasImportedEvents", ")", "{", "var", "point", "=", "this", ",", "options", "=", "merge", "(", "point", ".", "series", ".", "options", ".", "point", ",", "point", ".", "options", ")", ",", "ev...
Import events from the series' and point's options. Only do it on demand, to save processing time on hovering.
[ "Import", "events", "from", "the", "series", "and", "point", "s", "options", ".", "Only", "do", "it", "on", "demand", "to", "save", "processing", "time", "on", "hovering", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.ui.charting.js#L20996-L21011
13,727
splunk/splunk-sdk-javascript
client/splunk.ui.charting.js
function () { var series = this, options = series.options, xIncrement = series.xIncrement; xIncrement = pick(xIncrement, options.pointStart, 0); series.pointInterval = pick(series.pointInterval, options.pointInterval, 1); series.xIncrement = xIncrement + series.pointInterval; return xIncrem...
javascript
function () { var series = this, options = series.options, xIncrement = series.xIncrement; xIncrement = pick(xIncrement, options.pointStart, 0); series.pointInterval = pick(series.pointInterval, options.pointInterval, 1); series.xIncrement = xIncrement + series.pointInterval; return xIncrem...
[ "function", "(", ")", "{", "var", "series", "=", "this", ",", "options", "=", "series", ".", "options", ",", "xIncrement", "=", "series", ".", "xIncrement", ";", "xIncrement", "=", "pick", "(", "xIncrement", ",", "options", ".", "pointStart", ",", "0", ...
Return an auto incremented x value based on the pointStart and pointInterval options. This is only used if an x value is not given for the point that calls autoIncrement.
[ "Return", "an", "auto", "incremented", "x", "value", "based", "on", "the", "pointStart", "and", "pointInterval", "options", ".", "This", "is", "only", "used", "if", "an", "x", "value", "is", "not", "given", "for", "the", "point", "that", "calls", "autoIncr...
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.ui.charting.js#L21143-L21154
13,728
splunk/splunk-sdk-javascript
client/splunk.ui.charting.js
function () { var series = this, chart = series.chart, data = series.data, closestPoints, smallestInterval, chartSmallestInterval = chart.smallestInterval, interval, i; // sort the data points stableSort(data, function (a, b) { return (a.x - b.x); }); // remove points ...
javascript
function () { var series = this, chart = series.chart, data = series.data, closestPoints, smallestInterval, chartSmallestInterval = chart.smallestInterval, interval, i; // sort the data points stableSort(data, function (a, b) { return (a.x - b.x); }); // remove points ...
[ "function", "(", ")", "{", "var", "series", "=", "this", ",", "chart", "=", "series", ".", "chart", ",", "data", "=", "series", ".", "data", ",", "closestPoints", ",", "smallestInterval", ",", "chartSmallestInterval", "=", "chart", ".", "smallestInterval", ...
Sort the data and remove duplicates
[ "Sort", "the", "data", "and", "remove", "duplicates" ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.ui.charting.js#L21159-L21209
13,729
splunk/splunk-sdk-javascript
client/splunk.ui.charting.js
function () { // trigger the event only if listeners exist var series = this, options = series.options, chart = series.chart, tooltip = chart.tooltip, hoverPoint = chart.hoverPoint; // trigger mouse out on the point, which must be in this series if (hoverPoint) { hoverPoint.onMouseOut(...
javascript
function () { // trigger the event only if listeners exist var series = this, options = series.options, chart = series.chart, tooltip = chart.tooltip, hoverPoint = chart.hoverPoint; // trigger mouse out on the point, which must be in this series if (hoverPoint) { hoverPoint.onMouseOut(...
[ "function", "(", ")", "{", "// trigger the event only if listeners exist\r", "var", "series", "=", "this", ",", "options", "=", "series", ".", "options", ",", "chart", "=", "series", ".", "chart", ",", "tooltip", "=", "chart", ".", "tooltip", ",", "hoverPoint"...
Series mouse out handler
[ "Series", "mouse", "out", "handler" ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.ui.charting.js#L21537-L21564
13,730
splunk/splunk-sdk-javascript
client/splunk.ui.charting.js
function (options, base1, base2, base3) { var conversion = this.pointAttrToOptions, attr, option, obj = {}; options = options || {}; base1 = base1 || {}; base2 = base2 || {}; base3 = base3 || {}; for (attr in conversion) { option = conversion[attr]; obj[attr] = pick(options[opt...
javascript
function (options, base1, base2, base3) { var conversion = this.pointAttrToOptions, attr, option, obj = {}; options = options || {}; base1 = base1 || {}; base2 = base2 || {}; base3 = base3 || {}; for (attr in conversion) { option = conversion[attr]; obj[attr] = pick(options[opt...
[ "function", "(", "options", ",", "base1", ",", "base2", ",", "base3", ")", "{", "var", "conversion", "=", "this", ".", "pointAttrToOptions", ",", "attr", ",", "option", ",", "obj", "=", "{", "}", ";", "options", "=", "options", "||", "{", "}", ";", ...
Convert state properties from API naming conventions to SVG attributes @param {Object} options API options object @param {Object} base1 SVG attribute object to inherit from @param {Object} base2 Second level SVG attribute object to inherit from
[ "Convert", "state", "properties", "from", "API", "naming", "conventions", "to", "SVG", "attributes" ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.ui.charting.js#L21659-L21675
13,731
splunk/splunk-sdk-javascript
client/splunk.ui.charting.js
function (state) { var series = this, options = series.options, graph = series.graph, stateOptions = options.states, lineWidth = options.lineWidth; state = state || NORMAL_STATE; if (series.state !== state) { series.state = state; if (stateOptions[state] && stateOptions[state].ena...
javascript
function (state) { var series = this, options = series.options, graph = series.graph, stateOptions = options.states, lineWidth = options.lineWidth; state = state || NORMAL_STATE; if (series.state !== state) { series.state = state; if (stateOptions[state] && stateOptions[state].ena...
[ "function", "(", "state", ")", "{", "var", "series", "=", "this", ",", "options", "=", "series", ".", "options", ",", "graph", "=", "series", ".", "graph", ",", "stateOptions", "=", "options", ".", "states", ",", "lineWidth", "=", "options", ".", "line...
Set the state of the graph
[ "Set", "the", "state", "of", "the", "graph" ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.ui.charting.js#L22281-L22307
13,732
splunk/splunk-sdk-javascript
client/splunk.ui.charting.js
function (selected) { var series = this; // if called without an argument, toggle series.selected = selected = (selected === UNDEFINED) ? !series.selected : selected; if (series.checkbox) { series.checkbox.checked = selected; } fireEvent(series, selected ? 'select' : 'unselect'); }
javascript
function (selected) { var series = this; // if called without an argument, toggle series.selected = selected = (selected === UNDEFINED) ? !series.selected : selected; if (series.checkbox) { series.checkbox.checked = selected; } fireEvent(series, selected ? 'select' : 'unselect'); }
[ "function", "(", "selected", ")", "{", "var", "series", "=", "this", ";", "// if called without an argument, toggle\r", "series", ".", "selected", "=", "selected", "=", "(", "selected", "===", "UNDEFINED", ")", "?", "!", "series", ".", "selected", ":", "select...
Set the selected state of the graph @param selected {Boolean} True to select the series, false to unselect. If UNDEFINED, the selection state is toggled.
[ "Set", "the", "selected", "state", "of", "the", "graph" ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.ui.charting.js#L22403-L22413
13,733
splunk/splunk-sdk-javascript
client/splunk.ui.charting.js
function () { var series = this, chart = series.chart, renderer = chart.renderer, shapeArgs, tracker, trackerLabel = +new Date(), options = series.options, cursor = options.cursor, css = cursor && { cursor: cursor }, rel; each(series.data, function (point) { tracker = poi...
javascript
function () { var series = this, chart = series.chart, renderer = chart.renderer, shapeArgs, tracker, trackerLabel = +new Date(), options = series.options, cursor = options.cursor, css = cursor && { cursor: cursor }, rel; each(series.data, function (point) { tracker = poi...
[ "function", "(", ")", "{", "var", "series", "=", "this", ",", "chart", "=", "series", ".", "chart", ",", "renderer", "=", "chart", ".", "renderer", ",", "shapeArgs", ",", "tracker", ",", "trackerLabel", "=", "+", "new", "Date", "(", ")", ",", "option...
Draw the individual tracker elements. This method is inherited by scatter and pie charts too.
[ "Draw", "the", "individual", "tracker", "elements", ".", "This", "method", "is", "inherited", "by", "scatter", "and", "pie", "charts", "too", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.ui.charting.js#L22800-L22850
13,734
splunk/splunk-sdk-javascript
client/splunk.ui.charting.js
function () { var series = this; Series.prototype.translate.apply(series); each(series.data, function (point) { point.shapeType = 'circle'; point.shapeArgs = { x: point.plotX, y: point.plotY, r: series.chart.options.tooltip.snap }; }); }
javascript
function () { var series = this; Series.prototype.translate.apply(series); each(series.data, function (point) { point.shapeType = 'circle'; point.shapeArgs = { x: point.plotX, y: point.plotY, r: series.chart.options.tooltip.snap }; }); }
[ "function", "(", ")", "{", "var", "series", "=", "this", ";", "Series", ".", "prototype", ".", "translate", ".", "apply", "(", "series", ")", ";", "each", "(", "series", ".", "data", ",", "function", "(", "point", ")", "{", "point", ".", "shapeType",...
Extend the base Series' translate method by adding shape type and arguments for the point trackers
[ "Extend", "the", "base", "Series", "translate", "method", "by", "adding", "shape", "type", "and", "arguments", "for", "the", "point", "trackers" ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.ui.charting.js#L22936-L22949
13,735
splunk/splunk-sdk-javascript
client/splunk.ui.charting.js
function () { var series = this; // cache attributes for shapes //series.getAttribs(); this.drawPoints(); // draw the mouse tracking area if (series.options.enableMouseTracking !== false) { series.drawTracker(); } // PATCH by Simon Fishel // // execute...
javascript
function () { var series = this; // cache attributes for shapes //series.getAttribs(); this.drawPoints(); // draw the mouse tracking area if (series.options.enableMouseTracking !== false) { series.drawTracker(); } // PATCH by Simon Fishel // // execute...
[ "function", "(", ")", "{", "var", "series", "=", "this", ";", "// cache attributes for shapes\r", "//series.getAttribs();\r", "this", ".", "drawPoints", "(", ")", ";", "// draw the mouse tracking area\r", "if", "(", "series", ".", "options", ".", "enableMouseTracking"...
Render the slices
[ "Render", "the", "slices" ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.ui.charting.js#L23274-L23306
13,736
splunk/splunk-sdk-javascript
lib/modularinputs/argument.js
Argument
function Argument(argumentConfig) { if (!argumentConfig) { argumentConfig = {}; } this.name = utils.isUndefined(argumentConfig.name) ? "" : argumentConfig.name; this.description = utils.isUndefined(argumentConfig.description) ? null : argumentConfig.description; this...
javascript
function Argument(argumentConfig) { if (!argumentConfig) { argumentConfig = {}; } this.name = utils.isUndefined(argumentConfig.name) ? "" : argumentConfig.name; this.description = utils.isUndefined(argumentConfig.description) ? null : argumentConfig.description; this...
[ "function", "Argument", "(", "argumentConfig", ")", "{", "if", "(", "!", "argumentConfig", ")", "{", "argumentConfig", "=", "{", "}", ";", "}", "this", ".", "name", "=", "utils", ".", "isUndefined", "(", "argumentConfig", ".", "name", ")", "?", "\"\"", ...
Class representing an argument to a modular input kind. `Argument` is meant to be used with `Scheme` to generate an XML definition of the modular input kind that Splunk understands. `name` is the only required parameter for the constructor. @example // Example with minimal parameters var myArg1 = new Argument({name...
[ "Class", "representing", "an", "argument", "to", "a", "modular", "input", "kind", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/lib/modularinputs/argument.js#L46-L57
13,737
splunk/splunk-sdk-javascript
lib/modularinputs/event.js
Event
function Event(eventConfig) { eventConfig = utils.isUndefined(eventConfig) ? {} : eventConfig; this.data = utils.isUndefined(eventConfig.data) ? null : eventConfig.data; this.done = utils.isUndefined(eventConfig.done) ? true : eventConfig.done; this.host = utils.isUndefined(eventConfig....
javascript
function Event(eventConfig) { eventConfig = utils.isUndefined(eventConfig) ? {} : eventConfig; this.data = utils.isUndefined(eventConfig.data) ? null : eventConfig.data; this.done = utils.isUndefined(eventConfig.done) ? true : eventConfig.done; this.host = utils.isUndefined(eventConfig....
[ "function", "Event", "(", "eventConfig", ")", "{", "eventConfig", "=", "utils", ".", "isUndefined", "(", "eventConfig", ")", "?", "{", "}", ":", "eventConfig", ";", "this", ".", "data", "=", "utils", ".", "isUndefined", "(", "eventConfig", ".", "data", "...
`Event` represents an event or fragment of an event to be written by this modular input to Splunk. @example // Minimal configuration var myEvent = new Event({ data: "This is a test of my new event.", stanza: "myStanzaName", time: parseFloat("1372187084.000") }); // Full configuration var myBetterEvent = new Event(...
[ "Event", "represents", "an", "event", "or", "fragment", "of", "an", "event", "to", "be", "written", "by", "this", "modular", "input", "to", "Splunk", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/lib/modularinputs/event.js#L49-L63
13,738
splunk/splunk-sdk-javascript
examples/node/helloworld/search_normal.js
function(results, job, done) { // Print out the statics console.log("Job Statistics: "); console.log(" Event Count: " + job.properties().eventCount); console.log(" Disk Usage: " + job.properties().diskUsage + " bytes"); console.log(" Pri...
javascript
function(results, job, done) { // Print out the statics console.log("Job Statistics: "); console.log(" Event Count: " + job.properties().eventCount); console.log(" Disk Usage: " + job.properties().diskUsage + " bytes"); console.log(" Pri...
[ "function", "(", "results", ",", "job", ",", "done", ")", "{", "// Print out the statics", "console", ".", "log", "(", "\"Job Statistics: \"", ")", ";", "console", ".", "log", "(", "\" Event Count: \"", "+", "job", ".", "properties", "(", ")", ".", "eventCo...
Print out the statistics and get the results
[ "Print", "out", "the", "statistics", "and", "get", "the", "results" ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/examples/node/helloworld/search_normal.js#L63-L86
13,739
splunk/splunk-sdk-javascript
contrib/nodeunit/junit_reporter.js
function (path, callback) { var mkdir = child_process.spawn('mkdir', ['-p', path]); mkdir.on('error', function (err) { callback(err); callback = function(){}; }); mkdir.on('exit', function (code) { if (code === 0) callback(); else callback(new Error('mkdir exited with cod...
javascript
function (path, callback) { var mkdir = child_process.spawn('mkdir', ['-p', path]); mkdir.on('error', function (err) { callback(err); callback = function(){}; }); mkdir.on('exit', function (code) { if (code === 0) callback(); else callback(new Error('mkdir exited with cod...
[ "function", "(", "path", ",", "callback", ")", "{", "var", "mkdir", "=", "child_process", ".", "spawn", "(", "'mkdir'", ",", "[", "'-p'", ",", "path", "]", ")", ";", "mkdir", ".", "on", "(", "'error'", ",", "function", "(", "err", ")", "{", "callba...
Ensures a directory exists using mkdir -p. @param {String} path @param {Function} callback @api private
[ "Ensures", "a", "directory", "exists", "using", "mkdir", "-", "p", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/contrib/nodeunit/junit_reporter.js#L41-L51
13,740
splunk/splunk-sdk-javascript
client/splunk.js
function(http, params) { if (!(http instanceof Http) && !params) { // Move over the params params = http; http = null; } params = params || {}; this.scheme = params.scheme || "https"; this.host ...
javascript
function(http, params) { if (!(http instanceof Http) && !params) { // Move over the params params = http; http = null; } params = params || {}; this.scheme = params.scheme || "https"; this.host ...
[ "function", "(", "http", ",", "params", ")", "{", "if", "(", "!", "(", "http", "instanceof", "Http", ")", "&&", "!", "params", ")", "{", "// Move over the params", "params", "=", "http", ";", "http", "=", "null", ";", "}", "params", "=", "params", "|...
Constructor for `splunkjs.Context`. @constructor @param {splunkjs.Http} http An instance of a `splunkjs.Http` class. @param {Object} params A dictionary of optional parameters: - `scheme` (_string_): The scheme ("http" or "https") for accessing Splunk. - `host` (_string_): The host name (the default is "localhost"). -...
[ "Constructor", "for", "splunkjs", ".", "Context", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.js#L1134-L1199
13,741
splunk/splunk-sdk-javascript
client/splunk.js
function(path, namespace) { namespace = namespace || {}; if (utils.startsWith(path, "/")) { return path; } // If we don't have an app name (explicitly or implicitly), we default to /services/ if (!namespace.app && !this.app && namespace.shari...
javascript
function(path, namespace) { namespace = namespace || {}; if (utils.startsWith(path, "/")) { return path; } // If we don't have an app name (explicitly or implicitly), we default to /services/ if (!namespace.app && !this.app && namespace.shari...
[ "function", "(", "path", ",", "namespace", ")", "{", "namespace", "=", "namespace", "||", "{", "}", ";", "if", "(", "utils", ".", "startsWith", "(", "path", ",", "\"/\"", ")", ")", "{", "return", "path", ";", "}", "// If we don't have an app name (explicit...
Converts a partial path to a fully-qualified path to a REST endpoint, and if necessary includes the namespace owner and app. @param {String} path The partial path. @param {String} namespace The namespace, in the format "_owner_/_app_". @return {String} The fully-qualified path. @method splunkjs.Context
[ "Converts", "a", "partial", "path", "to", "a", "fully", "-", "qualified", "path", "to", "a", "REST", "endpoint", "and", "if", "necessary", "includes", "the", "namespace", "owner", "and", "app", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.js#L1317-L1346
13,742
splunk/splunk-sdk-javascript
client/splunk.js
function(callback) { var that = this; var url = this.paths.login; var params = { username: this.username, password: this.password, cookie : '1' }; callback = callback || function() {}; var wrappedCa...
javascript
function(callback) { var that = this; var url = this.paths.login; var params = { username: this.username, password: this.password, cookie : '1' }; callback = callback || function() {}; var wrappedCa...
[ "function", "(", "callback", ")", "{", "var", "that", "=", "this", ";", "var", "url", "=", "this", ".", "paths", ".", "login", ";", "var", "params", "=", "{", "username", ":", "this", ".", "username", ",", "password", ":", "this", ".", "password", ...
Authenticates and logs in to a Splunk instance, then stores the resulting session key. @param {Function} callback The function to call when login has finished: `(err, wasSuccessful)`. @method splunkjs.Context @private
[ "Authenticates", "and", "logs", "in", "to", "a", "Splunk", "instance", "then", "stores", "the", "resulting", "session", "key", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.js#L1370-L1401
13,743
splunk/splunk-sdk-javascript
client/splunk.js
function(path, params, callback) { var that = this; var request = function(callback) { return that.http.del( that.urlify(path), that._headers(), params, that.timeout, callback ...
javascript
function(path, params, callback) { var that = this; var request = function(callback) { return that.http.del( that.urlify(path), that._headers(), params, that.timeout, callback ...
[ "function", "(", "path", ",", "params", ",", "callback", ")", "{", "var", "that", "=", "this", ";", "var", "request", "=", "function", "(", "callback", ")", "{", "return", "that", ".", "http", ".", "del", "(", "that", ".", "urlify", "(", "path", ")...
Performs a DELETE request. @param {String} path The REST endpoint path of the DELETE request. @param {Object} params The entity-specific parameters for this request. @param {Function} callback The function to call when the request is complete: `(err, response)`. @method splunkjs.Context
[ "Performs", "a", "DELETE", "request", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.js#L1454-L1467
13,744
splunk/splunk-sdk-javascript
client/splunk.js
function(path, method, query, post, body, headers, callback) { var that = this; var request = function(callback) { return that.http.request( that.urlify(path), { method: method, headers: that....
javascript
function(path, method, query, post, body, headers, callback) { var that = this; var request = function(callback) { return that.http.request( that.urlify(path), { method: method, headers: that....
[ "function", "(", "path", ",", "method", ",", "query", ",", "post", ",", "body", ",", "headers", ",", "callback", ")", "{", "var", "that", "=", "this", ";", "var", "request", "=", "function", "(", "callback", ")", "{", "return", "that", ".", "http", ...
Issues an arbitrary HTTP request to the REST endpoint path segment. @param {String} path The REST endpoint path segment (with any query parameters already appended and encoded). @param {String} method The HTTP method (can be `GET`, `POST`, or `DELETE`). @param {Object} query The entity-specific parameters for this req...
[ "Issues", "an", "arbitrary", "HTTP", "request", "to", "the", "REST", "endpoint", "path", "segment", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.js#L1506-L1524
13,745
splunk/splunk-sdk-javascript
client/splunk.js
function() { this._super.apply(this, arguments); // We perform the bindings so that every function works // properly when it is passed as a callback. this.specialize = utils.bind(this, this.specialize); this.apps = utils.bind(this, this...
javascript
function() { this._super.apply(this, arguments); // We perform the bindings so that every function works // properly when it is passed as a callback. this.specialize = utils.bind(this, this.specialize); this.apps = utils.bind(this, this...
[ "function", "(", ")", "{", "this", ".", "_super", ".", "apply", "(", "this", ",", "arguments", ")", ";", "// We perform the bindings so that every function works ", "// properly when it is passed as a callback.", "this", ".", "specialize", "=", "utils", ".", "bind", "...
Constructor for `splunkjs.Service`. @constructor @param {splunkjs.Http} http An instance of a `splunkjs.Http` class. @param {Object} params A dictionary of optional parameters: - `scheme` (_string_): The scheme ("http" or "https") for accessing Splunk. - `host` (_string_): The host name (the default is "localhost"). -...
[ "Constructor", "for", "splunkjs", ".", "Service", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.js#L2303-L2319
13,746
splunk/splunk-sdk-javascript
client/splunk.js
function(owner, app) { return new Service(this.http, { scheme: this.scheme, host: this.host, port: this.port, username: this.username, password: this.password, owner: owner, app: app, ...
javascript
function(owner, app) { return new Service(this.http, { scheme: this.scheme, host: this.host, port: this.port, username: this.username, password: this.password, owner: owner, app: app, ...
[ "function", "(", "owner", ",", "app", ")", "{", "return", "new", "Service", "(", "this", ".", "http", ",", "{", "scheme", ":", "this", ".", "scheme", ",", "host", ":", "this", ".", "host", ",", "port", ":", "this", ".", "port", ",", "username", "...
Creates a specialized version of the current `Service` instance for a specific namespace context. @example var svc = ...; var newService = svc.specialize("myuser", "unix"); @param {String} owner The Splunk username, such as "admin". A value of "nobody" means no specific user. The "-" wildcard means all users. @param...
[ "Creates", "a", "specialized", "version", "of", "the", "current", "Service", "instance", "for", "a", "specific", "namespace", "context", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.js#L2336-L2348
13,747
splunk/splunk-sdk-javascript
client/splunk.js
function(sid, namespace, callback) { if (!callback && utils.isFunction(namespace)) { callback = namespace; namespace = null; } var job = new root.Job(this, sid, namespace); return job.fetch({}, callback); }
javascript
function(sid, namespace, callback) { if (!callback && utils.isFunction(namespace)) { callback = namespace; namespace = null; } var job = new root.Job(this, sid, namespace); return job.fetch({}, callback); }
[ "function", "(", "sid", ",", "namespace", ",", "callback", ")", "{", "if", "(", "!", "callback", "&&", "utils", ".", "isFunction", "(", "namespace", ")", ")", "{", "callback", "=", "namespace", ";", "namespace", "=", "null", ";", "}", "var", "job", "...
A convenience method to get a `Job` by its sid. @param {String} sid The search ID for a search job. @param {Object} namespace Namespace information: - `owner` (_string_): The Splunk username, such as "admin". A value of "nobody" means no specific user. The "-" wildcard means all users. - `app` (_string_): The app cont...
[ "A", "convenience", "method", "to", "get", "a", "Job", "by", "its", "sid", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.js#L2650-L2657
13,748
splunk/splunk-sdk-javascript
client/splunk.js
function(callback) { callback = callback || function() {}; var that = this; var req = this.get(Paths.currentUser, {}, function(err, response) { if (err) { callback(err); } else { var...
javascript
function(callback) { callback = callback || function() {}; var that = this; var req = this.get(Paths.currentUser, {}, function(err, response) { if (err) { callback(err); } else { var...
[ "function", "(", "callback", ")", "{", "callback", "=", "callback", "||", "function", "(", ")", "{", "}", ";", "var", "that", "=", "this", ";", "var", "req", "=", "this", ".", "get", "(", "Paths", ".", "currentUser", ",", "{", "}", ",", "function",...
Gets the user that is currently logged in. @example service.currentUser(function(err, user) { console.log("Real name: ", user.properties().realname); }); @param {Function} callback A function to call with the user instance: `(err, user)`. @return {splunkjs.Service.currentUser} The `User`. @endpoint authorization/cu...
[ "Gets", "the", "user", "that", "is", "currently", "logged", "in", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.js#L2708-L2731
13,749
splunk/splunk-sdk-javascript
client/splunk.js
function(query, params, callback) { if (!callback && utils.isFunction(params)) { callback = params; params = {}; } callback = callback || function() {}; params = params || {}; params.q = query; ...
javascript
function(query, params, callback) { if (!callback && utils.isFunction(params)) { callback = params; params = {}; } callback = callback || function() {}; params = params || {}; params.q = query; ...
[ "function", "(", "query", ",", "params", ",", "callback", ")", "{", "if", "(", "!", "callback", "&&", "utils", ".", "isFunction", "(", "params", ")", ")", "{", "callback", "=", "params", ";", "params", "=", "{", "}", ";", "}", "callback", "=", "cal...
Parses a search query. @example service.parse("search index=_internal | head 1", function(err, parse) { console.log("Commands: ", parse.commands); }); @param {String} query The search query to parse. @param {Object} params An object of options for the parser: - `enable_lookups` (_boolean_): If `true`, performs rever...
[ "Parses", "a", "search", "query", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.js#L2774-L2793
13,750
splunk/splunk-sdk-javascript
client/splunk.js
function(prefix, count, callback) { if (!callback && utils.isFunction(count)) { callback = count; count = 10; } callback = callback || function() {}; var params = { count: count || 10, prefix: pr...
javascript
function(prefix, count, callback) { if (!callback && utils.isFunction(count)) { callback = count; count = 10; } callback = callback || function() {}; var params = { count: count || 10, prefix: pr...
[ "function", "(", "prefix", ",", "count", ",", "callback", ")", "{", "if", "(", "!", "callback", "&&", "utils", ".", "isFunction", "(", "count", ")", ")", "{", "callback", "=", "count", ";", "count", "=", "10", ";", "}", "callback", "=", "callback", ...
Provides auto-complete suggestions for search queries. @example service.typeahead("index=", 10, function(err, options) { console.log("Autocompletion options: ", options); }); @param {String} prefix The query fragment to autocomplete. @param {Number} count The number of options to return (optional). @param {Function}...
[ "Provides", "auto", "-", "complete", "suggestions", "for", "search", "queries", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.js#L2811-L2832
13,751
splunk/splunk-sdk-javascript
client/splunk.js
function(event, params, callback) { if (!callback && utils.isFunction(params)) { callback = params; params = {}; } callback = callback || function() {}; params = params || {}; // If the event is a JSON ...
javascript
function(event, params, callback) { if (!callback && utils.isFunction(params)) { callback = params; params = {}; } callback = callback || function() {}; params = params || {}; // If the event is a JSON ...
[ "function", "(", "event", ",", "params", ",", "callback", ")", "{", "if", "(", "!", "callback", "&&", "utils", ".", "isFunction", "(", "params", ")", ")", "{", "callback", "=", "params", ";", "params", "=", "{", "}", ";", "}", "callback", "=", "cal...
Logs an event to Splunk. @example service.log("A new event", {index: "_internal", sourcetype: "mysourcetype"}, function(err, result) { console.log("Submitted event: ", result); }); @param {String|Object} event The text for this event, or a JSON object. @param {Object} params A dictionary of parameters for indexing: ...
[ "Logs", "an", "event", "to", "Splunk", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.js#L2855-L2894
13,752
splunk/splunk-sdk-javascript
client/splunk.js
function(service, qualifiedPath) { if (!service) { throw new Error("Passed in a null Service."); } if (!qualifiedPath) { throw new Error("Passed in an empty path."); } this.service = service; this.qualifiedPath = q...
javascript
function(service, qualifiedPath) { if (!service) { throw new Error("Passed in a null Service."); } if (!qualifiedPath) { throw new Error("Passed in an empty path."); } this.service = service; this.qualifiedPath = q...
[ "function", "(", "service", ",", "qualifiedPath", ")", "{", "if", "(", "!", "service", ")", "{", "throw", "new", "Error", "(", "\"Passed in a null Service.\"", ")", ";", "}", "if", "(", "!", "qualifiedPath", ")", "{", "throw", "new", "Error", "(", "\"Pas...
Constructor for `splunkjs.Service.Endpoint`. @constructor @param {splunkjs.Service} service A `Service` instance. @param {String} qualifiedPath A fully-qualified relative endpoint path (for example, "/services/search/jobs"). @return {splunkjs.Service.Endpoint} A new `splunkjs.Service.Endpoint` instance. @method splun...
[ "Constructor", "for", "splunkjs", ".", "Service", ".", "Endpoint", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.js#L2916-L2933
13,753
splunk/splunk-sdk-javascript
client/splunk.js
function(relpath, params, callback) { var url = this.qualifiedPath; // If we have a relative path, we will append it with a preceding // slash. if (relpath) { url = url + "/" + relpath; } return this.service.get( ...
javascript
function(relpath, params, callback) { var url = this.qualifiedPath; // If we have a relative path, we will append it with a preceding // slash. if (relpath) { url = url + "/" + relpath; } return this.service.get( ...
[ "function", "(", "relpath", ",", "params", ",", "callback", ")", "{", "var", "url", "=", "this", ".", "qualifiedPath", ";", "// If we have a relative path, we will append it with a preceding", "// slash.", "if", "(", "relpath", ")", "{", "url", "=", "url", "+", ...
Performs a relative GET request on an endpoint's path, combined with the parameters and a relative path if specified. @example // Will make a request to {service.prefix}/search/jobs/123456/results?offset=1 var endpoint = new splunkjs.Service.Endpoint(service, "search/jobs/12345"); endpoint.get("results", {offset: 1},...
[ "Performs", "a", "relative", "GET", "request", "on", "an", "endpoint", "s", "path", "combined", "with", "the", "parameters", "and", "a", "relative", "path", "if", "specified", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.js#L2951-L2965
13,754
splunk/splunk-sdk-javascript
client/splunk.js
function(relpath, params, callback) { var url = this.qualifiedPath; // If we have a relative path, we will append it with a preceding // slash. if (relpath) { url = url + "/" + relpath; } return this.service.post( ...
javascript
function(relpath, params, callback) { var url = this.qualifiedPath; // If we have a relative path, we will append it with a preceding // slash. if (relpath) { url = url + "/" + relpath; } return this.service.post( ...
[ "function", "(", "relpath", ",", "params", ",", "callback", ")", "{", "var", "url", "=", "this", ".", "qualifiedPath", ";", "// If we have a relative path, we will append it with a preceding", "// slash.", "if", "(", "relpath", ")", "{", "url", "=", "url", "+", ...
Performs a relative POST request on an endpoint's path, combined with the parameters and a relative path if specified. @example // Will make a request to {service.prefix}/search/jobs/123456/control var endpoint = new splunkjs.Service.Endpoint(service, "search/jobs/12345"); endpoint.post("control", {action: "cancel"},...
[ "Performs", "a", "relative", "POST", "request", "on", "an", "endpoint", "s", "path", "combined", "with", "the", "parameters", "and", "a", "relative", "path", "if", "specified", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.js#L2983-L2997
13,755
splunk/splunk-sdk-javascript
client/splunk.js
function(relpath, params, callback) { var url = this.qualifiedPath; // If we have a relative path, we will append it with a preceding // slash. if (relpath) { url = url + "/" + relpath; } return this.service.del( ...
javascript
function(relpath, params, callback) { var url = this.qualifiedPath; // If we have a relative path, we will append it with a preceding // slash. if (relpath) { url = url + "/" + relpath; } return this.service.del( ...
[ "function", "(", "relpath", ",", "params", ",", "callback", ")", "{", "var", "url", "=", "this", ".", "qualifiedPath", ";", "// If we have a relative path, we will append it with a preceding", "// slash.", "if", "(", "relpath", ")", "{", "url", "=", "url", "+", ...
Performs a relative DELETE request on an endpoint's path, combined with the parameters and a relative path if specified. @example // Will make a request to {service.prefix}/search/jobs/123456 var endpoint = new splunkjs.Service.Endpoint(service, "search/jobs/12345"); endpoint.delete("", {}, function() { console.log("...
[ "Performs", "a", "relative", "DELETE", "request", "on", "an", "endpoint", "s", "path", "combined", "with", "the", "parameters", "and", "a", "relative", "path", "if", "specified", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.js#L3015-L3029
13,756
splunk/splunk-sdk-javascript
client/splunk.js
function(service, path, namespace) { var fullpath = service.fullpath(path, namespace); this._super(service, fullpath); this.namespace = namespace; this._properties = {}; this._state = {}; // We perform the bindings so that...
javascript
function(service, path, namespace) { var fullpath = service.fullpath(path, namespace); this._super(service, fullpath); this.namespace = namespace; this._properties = {}; this._state = {}; // We perform the bindings so that...
[ "function", "(", "service", ",", "path", ",", "namespace", ")", "{", "var", "fullpath", "=", "service", ".", "fullpath", "(", "path", ",", "namespace", ")", ";", "this", ".", "_super", "(", "service", ",", "fullpath", ")", ";", "this", ".", "namespace"...
Constructor for `splunkjs.Service.Resource`. @constructor @param {splunkjs.Service} service A `Service` instance. @param {String} path A relative endpoint path (for example, "search/jobs"). @param {Object} namespace Namespace information: - `owner` (_string_): The Splunk username, such as "admin". A value of "nobody" ...
[ "Constructor", "for", "splunkjs", ".", "Service", ".", "Resource", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.js#L3058-L3073
13,757
splunk/splunk-sdk-javascript
client/splunk.js
function(service, path, namespace) { this._super(service, path, namespace); // We perform the bindings so that every function works // properly when it is passed as a callback. this._load = utils.bind(this, this._load); this.fetch = utils...
javascript
function(service, path, namespace) { this._super(service, path, namespace); // We perform the bindings so that every function works // properly when it is passed as a callback. this._load = utils.bind(this, this._load); this.fetch = utils...
[ "function", "(", "service", ",", "path", ",", "namespace", ")", "{", "this", ".", "_super", "(", "service", ",", "path", ",", "namespace", ")", ";", "// We perform the bindings so that every function works ", "// properly when it is passed as a callback.", "this", ".", ...
Constructor for `splunkjs.Service.Entity`. @constructor @param {splunkjs.Service} service A `Service` instance. @param {String} path A relative endpoint path (for example, "search/jobs"). @param {Object} namespace Namespace information: - `owner` (_string_): The Splunk username, such as "admin". A value of "nobody" me...
[ "Constructor", "for", "splunkjs", ".", "Service", ".", "Entity", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.js#L3168-L3192
13,758
splunk/splunk-sdk-javascript
client/splunk.js
function(properties) { properties = utils.isArray(properties) ? properties[0] : properties; // Initialize the properties to // empty values properties = properties || { content: {}, fields: {}, acl: {}, ...
javascript
function(properties) { properties = utils.isArray(properties) ? properties[0] : properties; // Initialize the properties to // empty values properties = properties || { content: {}, fields: {}, acl: {}, ...
[ "function", "(", "properties", ")", "{", "properties", "=", "utils", ".", "isArray", "(", "properties", ")", "?", "properties", "[", "0", "]", ":", "properties", ";", "// Initialize the properties to", "// empty values", "properties", "=", "properties", "||", "{...
Loads the entity and stores the properties. @param {Object} properties The properties for this entity. @method splunkjs.Service.Entity @protected
[ "Loads", "the", "entity", "and", "stores", "the", "properties", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.js#L3202-L3224
13,759
splunk/splunk-sdk-javascript
client/splunk.js
function(options, callback) { if (!callback && utils.isFunction(options)) { callback = options; options = {}; } callback = callback || function() {}; options = options || {}; var that = this; ...
javascript
function(options, callback) { if (!callback && utils.isFunction(options)) { callback = options; options = {}; } callback = callback || function() {}; options = options || {}; var that = this; ...
[ "function", "(", "options", ",", "callback", ")", "{", "if", "(", "!", "callback", "&&", "utils", ".", "isFunction", "(", "options", ")", ")", "{", "callback", "=", "options", ";", "options", "=", "{", "}", ";", "}", "callback", "=", "callback", "||"...
Refreshes the entity by fetching the object from the server and loading it. @param {Object} options An optional dictionary of collection filtering and pagination options: - `count` (_integer_): The maximum number of items to return. - `offset` (_integer_): The offset of the first item to return. - `search` (_string_):...
[ "Refreshes", "the", "entity", "by", "fetching", "the", "object", "from", "the", "server", "and", "loading", "it", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.js#L3310-L3329
13,760
splunk/splunk-sdk-javascript
client/splunk.js
function(props, callback) { callback = callback || function() {}; if (props.hasOwnProperty("name")) { throw new Error("Cannot set 'name' field in 'update'"); } var that = this; var req = this.post("", props, function(e...
javascript
function(props, callback) { callback = callback || function() {}; if (props.hasOwnProperty("name")) { throw new Error("Cannot set 'name' field in 'update'"); } var that = this; var req = this.post("", props, function(e...
[ "function", "(", "props", ",", "callback", ")", "{", "callback", "=", "callback", "||", "function", "(", ")", "{", "}", ";", "if", "(", "props", ".", "hasOwnProperty", "(", "\"name\"", ")", ")", "{", "throw", "new", "Error", "(", "\"Cannot set 'name' fie...
Updates the entity on the server. @param {Object} props The properties to update the object with. @param {Function} callback A function to call when the object is updated: `(err, entity)`. @method splunkjs.Service.Entity @protected
[ "Updates", "the", "entity", "on", "the", "server", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.js#L3357-L3386
13,761
splunk/splunk-sdk-javascript
client/splunk.js
function(callback) { callback = callback || function() {}; var that = this; this.post("disable", {}, function(err, response) { if (err) { callback(err); } else { callback(null, that);...
javascript
function(callback) { callback = callback || function() {}; var that = this; this.post("disable", {}, function(err, response) { if (err) { callback(err); } else { callback(null, that);...
[ "function", "(", "callback", ")", "{", "callback", "=", "callback", "||", "function", "(", ")", "{", "}", ";", "var", "that", "=", "this", ";", "this", ".", "post", "(", "\"disable\"", ",", "{", "}", ",", "function", "(", "err", ",", "response", ")...
Disables the entity on the server. @param {Function} callback A function to call when the object is disabled: `(err, entity)`. @method splunkjs.Service.Entity @protected
[ "Disables", "the", "entity", "on", "the", "server", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.js#L3396-L3408
13,762
splunk/splunk-sdk-javascript
client/splunk.js
function(service, path, namespace) { this._super(service, path, namespace); // We perform the bindings so that every function works // properly when it is passed as a callback. this._load = utils.bind(this, this._load); this.fetch ...
javascript
function(service, path, namespace) { this._super(service, path, namespace); // We perform the bindings so that every function works // properly when it is passed as a callback. this._load = utils.bind(this, this._load); this.fetch ...
[ "function", "(", "service", ",", "path", ",", "namespace", ")", "{", "this", ".", "_super", "(", "service", ",", "path", ",", "namespace", ")", ";", "// We perform the bindings so that every function works ", "// properly when it is passed as a callback.", "this", ".", ...
Constructor for `splunkjs.Service.Collection`. @constructor @param {splunkjs.Service} service A `Service` instance. @param {String} path A relative endpoint path (for example, "search/jobs"). @param {Object} namespace Namespace information: - `owner` (_string_): The Splunk username, such as "admin". A value of "nobody...
[ "Constructor", "for", "splunkjs", ".", "Service", ".", "Collection", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.js#L3487-L3505
13,763
splunk/splunk-sdk-javascript
client/splunk.js
function(options, callback) { if (!callback && utils.isFunction(options)) { callback = options; options = {}; } callback = callback || function() {}; options = options || {}; if (!options.count) { op...
javascript
function(options, callback) { if (!callback && utils.isFunction(options)) { callback = options; options = {}; } callback = callback || function() {}; options = options || {}; if (!options.count) { op...
[ "function", "(", "options", ",", "callback", ")", "{", "if", "(", "!", "callback", "&&", "utils", ".", "isFunction", "(", "options", ")", ")", "{", "callback", "=", "options", ";", "options", "=", "{", "}", ";", "}", "callback", "=", "callback", "||"...
Refreshes the resource by fetching the object from the server and loading it. @param {Object} options A dictionary of collection filtering and pagination options: - `count` (_integer_): The maximum number of items to return. - `offset` (_integer_): The offset of the first item to return. - `search` (_string_): The sea...
[ "Refreshes", "the", "resource", "by", "fetching", "the", "object", "from", "the", "server", "and", "loading", "it", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.js#L3603-L3627
13,764
splunk/splunk-sdk-javascript
client/splunk.js
function(id, namespace) { if (utils.isEmpty(namespace)) { namespace = null; } if (!id) { throw new Error("Must suply a non-empty name."); } if (namespace && (namespace.app === '-' || names...
javascript
function(id, namespace) { if (utils.isEmpty(namespace)) { namespace = null; } if (!id) { throw new Error("Must suply a non-empty name."); } if (namespace && (namespace.app === '-' || names...
[ "function", "(", "id", ",", "namespace", ")", "{", "if", "(", "utils", ".", "isEmpty", "(", "namespace", ")", ")", "{", "namespace", "=", "null", ";", "}", "if", "(", "!", "id", ")", "{", "throw", "new", "Error", "(", "\"Must suply a non-empty name.\""...
Returns a specific entity from the collection. @example var apps = service.apps(); apps.fetch(function(err, apps) { var app = apps.item("search"); console.log("Search App Found: " + !!app); // `app` is an Application object. }); @param {String} id The name of the entity to retrieve. @param {Object} namespace Namespa...
[ "Returns", "a", "specific", "entity", "from", "the", "collection", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.js#L3650-L3707
13,765
splunk/splunk-sdk-javascript
client/splunk.js
function(params, callback) { callback = callback || function() {}; var that = this; var req = this.post("", params, function(err, response) { if (err) { callback(err); } else { var props = respons...
javascript
function(params, callback) { callback = callback || function() {}; var that = this; var req = this.post("", params, function(err, response) { if (err) { callback(err); } else { var props = respons...
[ "function", "(", "params", ",", "callback", ")", "{", "callback", "=", "callback", "||", "function", "(", ")", "{", "}", ";", "var", "that", "=", "this", ";", "var", "req", "=", "this", ".", "post", "(", "\"\"", ",", "params", ",", "function", "(",...
Creates an entity on the server for this collection with the specified parameters. @example var apps = service.apps(); apps.create({name: "NewSearchApp"}, function(err, newApp) { console.log("CREATED"); }); @param {Object} params A dictionary of entity-specific properties. @param {Function} callback The function to ...
[ "Creates", "an", "entity", "on", "the", "server", "for", "this", "collection", "with", "the", "specified", "parameters", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.js#L3726-L3759
13,766
splunk/splunk-sdk-javascript
client/splunk.js
function(service, name, namespace) { this.name = name; this._super(service, this.path(), namespace); this.acknowledge = utils.bind(this, this.acknowledge); this.dispatch = utils.bind(this, this.dispatch); this.history = utils.bind(this, ...
javascript
function(service, name, namespace) { this.name = name; this._super(service, this.path(), namespace); this.acknowledge = utils.bind(this, this.acknowledge); this.dispatch = utils.bind(this, this.dispatch); this.history = utils.bind(this, ...
[ "function", "(", "service", ",", "name", ",", "namespace", ")", "{", "this", ".", "name", "=", "name", ";", "this", ".", "_super", "(", "service", ",", "this", ".", "path", "(", ")", ",", "namespace", ")", ";", "this", ".", "acknowledge", "=", "uti...
Constructor for `splunkjs.Service.SavedSearch`. @constructor @param {splunkjs.Service} service A `Service` instance. @param {String} name The name for the new saved search. @param {Object} namespace Namespace information: - `owner` (_string_): The Splunk username, such as "admin". A value of "nobody" means no specific...
[ "Constructor", "for", "splunkjs", ".", "Service", ".", "SavedSearch", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.js#L3815-L3823
13,767
splunk/splunk-sdk-javascript
client/splunk.js
function(options, callback) { if (!callback && utils.isFunction(options)) { callback = options; options = {}; } callback = callback || function() {}; options = options || {}; var that = this; ...
javascript
function(options, callback) { if (!callback && utils.isFunction(options)) { callback = options; options = {}; } callback = callback || function() {}; options = options || {}; var that = this; ...
[ "function", "(", "options", ",", "callback", ")", "{", "if", "(", "!", "callback", "&&", "utils", ".", "isFunction", "(", "options", ")", ")", "{", "callback", "=", "options", ";", "options", "=", "{", "}", ";", "}", "callback", "=", "callback", "||"...
Dispatches a saved search, which creates a search job and returns a `splunkjs.Service.Job` instance in the callback function. @example var savedSearch = service.savedSearches().item("MySavedSearch"); savedSearch.dispatch({force_dispatch: false}, function(err, job, savedSearch) { console.log("Job SID: ", job.sid); });...
[ "Dispatches", "a", "saved", "search", "which", "creates", "a", "search", "job", "and", "returns", "a", "splunkjs", ".", "Service", ".", "Job", "instance", "in", "the", "callback", "function", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.js#L3890-L3913
13,768
splunk/splunk-sdk-javascript
client/splunk.js
function(params, callback) { params = params || {}; if (!params.search) { var update = this._super; var req = this.fetch(function(err, search) { if (err) { callback(err); } ...
javascript
function(params, callback) { params = params || {}; if (!params.search) { var update = this._super; var req = this.fetch(function(err, search) { if (err) { callback(err); } ...
[ "function", "(", "params", ",", "callback", ")", "{", "params", "=", "params", "||", "{", "}", ";", "if", "(", "!", "params", ".", "search", ")", "{", "var", "update", "=", "this", ".", "_super", ";", "var", "req", "=", "this", ".", "fetch", "(",...
Updates the saved search on the server. **Note:** The search query is required, even when it isn't being modified. If you don't provide it, this method will fetch the search string from the server or from the local cache. @param {Object} props The properties to update the saved search with. For a list of available pa...
[ "Updates", "the", "saved", "search", "on", "the", "server", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.js#L4010-L4037
13,769
splunk/splunk-sdk-javascript
client/splunk.js
function(props) { var entityNamespace = utils.namespaceFromProperties(props); return new root.SavedSearch(this.service, props.name, entityNamespace); }
javascript
function(props) { var entityNamespace = utils.namespaceFromProperties(props); return new root.SavedSearch(this.service, props.name, entityNamespace); }
[ "function", "(", "props", ")", "{", "var", "entityNamespace", "=", "utils", ".", "namespaceFromProperties", "(", "props", ")", ";", "return", "new", "root", ".", "SavedSearch", "(", "this", ".", "service", ",", "props", ".", "name", ",", "entityNamespace", ...
Creates a local instance of a saved search. @param {Object} props The properties for the new saved search. For a list of available parameters, see <a href="http://dev.splunk.com/view/SP-CAAAEFA#savedsearchparams" target="_blank">Saved search parameters</a> on Splunk Developer Portal. @return {splunkjs.Service.SavedSea...
[ "Creates", "a", "local", "instance", "of", "a", "saved", "search", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.js#L4067-L4070
13,770
splunk/splunk-sdk-javascript
client/splunk.js
function(props) { var entityNamespace = utils.namespaceFromProperties(props); return new root.StoragePassword(this.service, props.name, entityNamespace); }
javascript
function(props) { var entityNamespace = utils.namespaceFromProperties(props); return new root.StoragePassword(this.service, props.name, entityNamespace); }
[ "function", "(", "props", ")", "{", "var", "entityNamespace", "=", "utils", ".", "namespaceFromProperties", "(", "props", ")", ";", "return", "new", "root", ".", "StoragePassword", "(", "this", ".", "service", ",", "props", ".", "name", ",", "entityNamespace...
Creates a local instance of a storage password. @param {Object} props The properties for the new storage password. For a list of available parameters, see <a href="http://docs.splunk.com/Documentation/Splunk/latest/RESTAPI/RESTaccess#POST_storage.2Fpasswords" target="_blank"> POST storage/passwords</a> on Splunk Devel...
[ "Creates", "a", "local", "instance", "of", "a", "storage", "password", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.js#L4156-L4159
13,771
splunk/splunk-sdk-javascript
client/splunk.js
function(service, name, namespace) { this.name = name; this._super(service, this.path(), namespace); this.list = utils.bind(this, this.list); }
javascript
function(service, name, namespace) { this.name = name; this._super(service, this.path(), namespace); this.list = utils.bind(this, this.list); }
[ "function", "(", "service", ",", "name", ",", "namespace", ")", "{", "this", ".", "name", "=", "name", ";", "this", ".", "_super", "(", "service", ",", "this", ".", "path", "(", ")", ",", "namespace", ")", ";", "this", ".", "list", "=", "utils", ...
Constructor for `splunkjs.Service.FiredAlertGroup`. @constructor @param {splunkjs.Service} service A `Service` instance. @param {String} name The name for the new alert group. @param {Object} namespace Namespace information: - `owner` (_string_): The Splunk username, such as "admin". A value of "nobody" means no speci...
[ "Constructor", "for", "splunkjs", ".", "Service", ".", "FiredAlertGroup", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.js#L4423-L4428
13,772
splunk/splunk-sdk-javascript
client/splunk.js
function(props) { var entityNamespace = utils.namespaceFromProperties(props); return new root.FiredAlertGroup(this.service, props.name, entityNamespace); }
javascript
function(props) { var entityNamespace = utils.namespaceFromProperties(props); return new root.FiredAlertGroup(this.service, props.name, entityNamespace); }
[ "function", "(", "props", ")", "{", "var", "entityNamespace", "=", "utils", ".", "namespaceFromProperties", "(", "props", ")", ";", "return", "new", "root", ".", "FiredAlertGroup", "(", "this", ".", "service", ",", "props", ".", "name", ",", "entityNamespace...
Creates a local instance of an alert group. @param {Object} props The properties for the alert group. @return {splunkjs.Service.FiredAlertGroup} A new `splunkjs.Service.FiredAlertGroup` instance. @method splunkjs.Service.FiredAlertGroupCollection
[ "Creates", "a", "local", "instance", "of", "an", "alert", "group", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.js#L4459-L4462
13,773
splunk/splunk-sdk-javascript
client/splunk.js
function(service, namespace) { this._super(service, this.path(), namespace); this.instantiateEntity = utils.bind(this, this.instantiateEntity); this.remove = utils.bind(this, this.remove); }
javascript
function(service, namespace) { this._super(service, this.path(), namespace); this.instantiateEntity = utils.bind(this, this.instantiateEntity); this.remove = utils.bind(this, this.remove); }
[ "function", "(", "service", ",", "namespace", ")", "{", "this", ".", "_super", "(", "service", ",", "this", ".", "path", "(", ")", ",", "namespace", ")", ";", "this", ".", "instantiateEntity", "=", "utils", ".", "bind", "(", "this", ",", "this", ".",...
Constructor for `splunkjs.Service.FiredAlertGroupCollection`. @constructor @param {splunkjs.Service} service A `Service` instance. @param {Object} namespace Namespace information: - `owner` (_string_): The Splunk username, such as "admin". A value of "nobody" means no specific user. The "-" wildcard means all users. -...
[ "Constructor", "for", "splunkjs", ".", "Service", ".", "FiredAlertGroupCollection", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.js#L4486-L4491
13,774
splunk/splunk-sdk-javascript
client/splunk.js
function(service, name) { this.name = name; this._super(service, this.path(), {}); this.setupInfo = utils.bind(this, this.setupInfo); this.updateInfo = utils.bind(this, this.updateInfo); }
javascript
function(service, name) { this.name = name; this._super(service, this.path(), {}); this.setupInfo = utils.bind(this, this.setupInfo); this.updateInfo = utils.bind(this, this.updateInfo); }
[ "function", "(", "service", ",", "name", ")", "{", "this", ".", "name", "=", "name", ";", "this", ".", "_super", "(", "service", ",", "this", ".", "path", "(", ")", ",", "{", "}", ")", ";", "this", ".", "setupInfo", "=", "utils", ".", "bind", "...
Constructor for `splunkjs.Service.Application`. @constructor @param {splunkjs.Service} service A `Service` instance. @param {String} name The name of the Splunk app. @return {splunkjs.Service.Application} A new `splunkjs.Service.Application` instance. @method splunkjs.Service.Application
[ "Constructor", "for", "splunkjs", ".", "Service", ".", "Application", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.js#L4530-L4536
13,775
splunk/splunk-sdk-javascript
client/splunk.js
function(callback) { callback = callback || function() {}; var that = this; return this.get("setup", {}, function(err, response) { if (err) { callback(err); } else { callback(null, r...
javascript
function(callback) { callback = callback || function() {}; var that = this; return this.get("setup", {}, function(err, response) { if (err) { callback(err); } else { callback(null, r...
[ "function", "(", "callback", ")", "{", "callback", "=", "callback", "||", "function", "(", ")", "{", "}", ";", "var", "that", "=", "this", ";", "return", "this", ".", "get", "(", "\"setup\"", ",", "{", "}", ",", "function", "(", "err", ",", "respon...
Retrieves the setup information for a Splunk app. @example var app = service.apps().item("app"); app.setup(function(err, info, search) { console.log("SETUP INFO: ", info); }); @param {Function} callback A function to call when setup information is retrieved: `(err, info, app)`. @endpoint apps/local/{name}/setup @me...
[ "Retrieves", "the", "setup", "information", "for", "a", "Splunk", "app", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.js#L4553-L4565
13,776
splunk/splunk-sdk-javascript
client/splunk.js
function(props) { var entityNamespace = utils.namespaceFromProperties(props); return new root.View(this.service, props.name, entityNamespace); }
javascript
function(props) { var entityNamespace = utils.namespaceFromProperties(props); return new root.View(this.service, props.name, entityNamespace); }
[ "function", "(", "props", ")", "{", "var", "entityNamespace", "=", "utils", ".", "namespaceFromProperties", "(", "props", ")", ";", "return", "new", "root", ".", "View", "(", "this", ".", "service", ",", "props", ".", "name", ",", "entityNamespace", ")", ...
Creates a local instance of a view. @param {Object} props The properties for the new view. For a list of available parameters, see the <a href="http://docs.splunk.com/Documentation/Splunk/latest/RESTAPI/RESTsearch#POST_scheduled.2Fviews.2F.7Bname.7D" target="_blank">POST scheduled/views/{name}</a> endpoint in the REST...
[ "Creates", "a", "local", "instance", "of", "a", "view", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.js#L4870-L4873
13,777
splunk/splunk-sdk-javascript
client/splunk.js
function(service, name, namespace) { this.name = name; this._super(service, this.path(), namespace); this.submitEvent = utils.bind(this, this.submitEvent); }
javascript
function(service, name, namespace) { this.name = name; this._super(service, this.path(), namespace); this.submitEvent = utils.bind(this, this.submitEvent); }
[ "function", "(", "service", ",", "name", ",", "namespace", ")", "{", "this", ".", "name", "=", "name", ";", "this", ".", "_super", "(", "service", ",", "this", ".", "path", "(", ")", ",", "namespace", ")", ";", "this", ".", "submitEvent", "=", "uti...
Constructor for `splunkjs.Service.Index`. @constructor @param {splunkjs.Service} service A `Service` instance. @param {String} name The name of the index. @param {Object} namespace Namespace information: - `owner` (_string_): The Splunk username, such as "admin". A value of "nobody" means no specific user. The "-" wil...
[ "Constructor", "for", "splunkjs", ".", "Service", ".", "Index", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.js#L4924-L4929
13,778
splunk/splunk-sdk-javascript
client/splunk.js
function(event, params, callback) { if (!callback && utils.isFunction(params)) { callback = params; params = {}; } callback = callback || function() {}; params = params || {}; // Add the index name ...
javascript
function(event, params, callback) { if (!callback && utils.isFunction(params)) { callback = params; params = {}; } callback = callback || function() {}; params = params || {}; // Add the index name ...
[ "function", "(", "event", ",", "params", ",", "callback", ")", "{", "if", "(", "!", "callback", "&&", "utils", ".", "isFunction", "(", "params", ")", ")", "{", "callback", "=", "params", ";", "params", "=", "{", "}", ";", "}", "callback", "=", "cal...
Submits an event to this index. @example var index = service.indexes().item("_internal"); index.submitEvent("A new event", {sourcetype: "mysourcetype"}, function(err, result, index) { console.log("Submitted event: ", result); }); @param {String} event The text for this event. @param {Object} params A dictionary of p...
[ "Submits", "an", "event", "to", "this", "index", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.js#L4952-L4968
13,779
splunk/splunk-sdk-javascript
client/splunk.js
function(props) { var entityNamespace = utils.namespaceFromProperties(props); return new root.Index(this.service, props.name, entityNamespace); }
javascript
function(props) { var entityNamespace = utils.namespaceFromProperties(props); return new root.Index(this.service, props.name, entityNamespace); }
[ "function", "(", "props", ")", "{", "var", "entityNamespace", "=", "utils", ".", "namespaceFromProperties", "(", "props", ")", ";", "return", "new", "root", ".", "Index", "(", "this", ".", "service", ",", "props", ".", "name", ",", "entityNamespace", ")", ...
Creates a local instance of an index. @param {Object} props The properties for the new index. For a list of available parameters, see <a href="http://dev.splunk.com/view/SP-CAAAEJ3#indexparams" target="_blank">Index parameters</a> on Splunk Developer Portal. @return {splunkjs.Service.Index} A new `splunkjs.Service.Ind...
[ "Creates", "a", "local", "instance", "of", "an", "index", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.js#L5006-L5009
13,780
splunk/splunk-sdk-javascript
client/splunk.js
function(name, params, callback) { // If someone called us with the default style of (params, callback), // lets make it work if (utils.isObject(name) && utils.isFunction(params) && !callback) { callback = params; params = name; name = ...
javascript
function(name, params, callback) { // If someone called us with the default style of (params, callback), // lets make it work if (utils.isObject(name) && utils.isFunction(params) && !callback) { callback = params; params = name; name = ...
[ "function", "(", "name", ",", "params", ",", "callback", ")", "{", "// If someone called us with the default style of (params, callback),", "// lets make it work", "if", "(", "utils", ".", "isObject", "(", "name", ")", "&&", "utils", ".", "isFunction", "(", "params", ...
Creates an index with the given name and parameters. @example var indexes = service.indexes(); indexes.create("NewIndex", {assureUTF8: true}, function(err, newIndex) { console.log("CREATED"); }); @param {String} name A name for this index. @param {Object} params A dictionary of properties. For a list of available pa...
[ "Creates", "an", "index", "with", "the", "given", "name", "and", "parameters", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.js#L5045-L5058
13,781
splunk/splunk-sdk-javascript
client/splunk.js
function(service, file, name, namespace) { this.name = name; this.file = file; this._super(service, this.path(), namespace); }
javascript
function(service, file, name, namespace) { this.name = name; this.file = file; this._super(service, this.path(), namespace); }
[ "function", "(", "service", ",", "file", ",", "name", ",", "namespace", ")", "{", "this", ".", "name", "=", "name", ";", "this", ".", "file", "=", "file", ";", "this", ".", "_super", "(", "service", ",", "this", ".", "path", "(", ")", ",", "names...
Constructor for `splunkjs.Service.ConfigurationStanza`. @constructor @param {splunkjs.Service} service A `Service` instance. @param {String} file The name of the configuration file. @param {String} name The name of the new stanza. @param {Object} namespace Namespace information: - `owner` (_string_): The Splunk userna...
[ "Constructor", "for", "splunkjs", ".", "Service", ".", "ConfigurationStanza", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.js#L5095-L5099
13,782
splunk/splunk-sdk-javascript
client/splunk.js
function(props) { var entityNamespace = utils.namespaceFromProperties(props); return new root.ConfigurationStanza(this.service, this.name, props.name, entityNamespace); }
javascript
function(props) { var entityNamespace = utils.namespaceFromProperties(props); return new root.ConfigurationStanza(this.service, this.name, props.name, entityNamespace); }
[ "function", "(", "props", ")", "{", "var", "entityNamespace", "=", "utils", ".", "namespaceFromProperties", "(", "props", ")", ";", "return", "new", "root", ".", "ConfigurationStanza", "(", "this", ".", "service", ",", "this", ".", "name", ",", "props", "....
Creates a local instance of a stanza in a configuration file. @param {Object} props The key-value properties for the new stanza. @return {splunkjs.Service.ConfigurationStanza} A new `splunkjs.Service.ConfigurationStanza` instance. @method splunkjs.Service.ConfigurationFile
[ "Creates", "a", "local", "instance", "of", "a", "stanza", "in", "a", "configuration", "file", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.js#L5143-L5146
13,783
splunk/splunk-sdk-javascript
client/splunk.js
function(stanzaName, values, callback) { // If someone called us with the default style of (params, callback), // lets make it work if (utils.isObject(stanzaName) && utils.isFunction(values) && !callback) { callback = values; values = stanzaName; ...
javascript
function(stanzaName, values, callback) { // If someone called us with the default style of (params, callback), // lets make it work if (utils.isObject(stanzaName) && utils.isFunction(values) && !callback) { callback = values; values = stanzaName; ...
[ "function", "(", "stanzaName", ",", "values", ",", "callback", ")", "{", "// If someone called us with the default style of (params, callback),", "// lets make it work", "if", "(", "utils", ".", "isObject", "(", "stanzaName", ")", "&&", "utils", ".", "isFunction", "(", ...
Creates a stanza in this configuration file. @example var file = service.configurations().item("props"); file.create("my_stanza", function(err, newStanza) { console.log("CREATED"); }); @param {String} stanzaName A name for this stanza. @param {Object} values A dictionary of key-value pairs to put in this stanza. @pa...
[ "Creates", "a", "stanza", "in", "this", "configuration", "file", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.js#L5184-L5202
13,784
splunk/splunk-sdk-javascript
client/splunk.js
function(service, namespace) { if (!namespace || namespace.owner === "-" || namespace.app === "-") { throw new Error("Configurations requires a non-wildcard owner/app"); } this._super(service, this.path(), namespace); }
javascript
function(service, namespace) { if (!namespace || namespace.owner === "-" || namespace.app === "-") { throw new Error("Configurations requires a non-wildcard owner/app"); } this._super(service, this.path(), namespace); }
[ "function", "(", "service", ",", "namespace", ")", "{", "if", "(", "!", "namespace", "||", "namespace", ".", "owner", "===", "\"-\"", "||", "namespace", ".", "app", "===", "\"-\"", ")", "{", "throw", "new", "Error", "(", "\"Configurations requires a non-wild...
Constructor for `splunkjs.Service.Configurations`. @constructor @param {splunkjs.Service} service A `Service` instance. @param {Object} namespace Namespace information: - `owner` (_string_): The Splunk username, such as "admin". A value of "nobody" means no specific user. The "-" wildcard means all users. - `app` (_st...
[ "Constructor", "for", "splunkjs", ".", "Service", ".", "Configurations", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.js#L5257-L5263
13,785
splunk/splunk-sdk-javascript
client/splunk.js
function(filename, callback) { // If someone called us with the default style of (params, callback), // lets make it work if (utils.isObject(filename)) { filename = filename["__conf"]; } callback = callback || function() {}; ...
javascript
function(filename, callback) { // If someone called us with the default style of (params, callback), // lets make it work if (utils.isObject(filename)) { filename = filename["__conf"]; } callback = callback || function() {}; ...
[ "function", "(", "filename", ",", "callback", ")", "{", "// If someone called us with the default style of (params, callback),", "// lets make it work", "if", "(", "utils", ".", "isObject", "(", "filename", ")", ")", "{", "filename", "=", "filename", "[", "\"__conf\"", ...
Creates a configuration file. @example var configurations = service.configurations(); configurations.create("myprops", function(err, newFile) { console.log("CREATED"); }); @param {String} filename A name for this configuration file. @param {Function} callback A function to call with the new configuration file: `(err...
[ "Creates", "a", "configuration", "file", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.js#L5281-L5309
13,786
splunk/splunk-sdk-javascript
client/splunk.js
function(service, sid, namespace) { this.name = sid; this._super(service, this.path(), namespace); this.sid = sid; // We perform the bindings so that every function works // properly when it is passed as a callback. this.cancel = utils.bi...
javascript
function(service, sid, namespace) { this.name = sid; this._super(service, this.path(), namespace); this.sid = sid; // We perform the bindings so that every function works // properly when it is passed as a callback. this.cancel = utils.bi...
[ "function", "(", "service", ",", "sid", ",", "namespace", ")", "{", "this", ".", "name", "=", "sid", ";", "this", ".", "_super", "(", "service", ",", "this", ".", "path", "(", ")", ",", "namespace", ")", ";", "this", ".", "sid", "=", "sid", ";", ...
Constructor for `splunkjs.Service.Job`. @constructor @param {splunkjs.Service} service A `Service` instance. @param {String} sid The search ID for this search job. @param {Object} namespace Namespace information: - `owner` (_string_): The Splunk username, such as "admin". A value of "nobody" means no specific user. Th...
[ "Constructor", "for", "splunkjs", ".", "Service", ".", "Job", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.js#L5344-L5366
13,787
splunk/splunk-sdk-javascript
client/splunk.js
function(callback) { callback = callback || function() {}; var that = this; var req = this.post("control", {action: "enablepreview"}, function(err) { callback(err, that); }); return req; }
javascript
function(callback) { callback = callback || function() {}; var that = this; var req = this.post("control", {action: "enablepreview"}, function(err) { callback(err, that); }); return req; }
[ "function", "(", "callback", ")", "{", "callback", "=", "callback", "||", "function", "(", ")", "{", "}", ";", "var", "that", "=", "this", ";", "var", "req", "=", "this", ".", "post", "(", "\"control\"", ",", "{", "action", ":", "\"enablepreview\"", ...
Enables preview generation for a search job. @example var job = service.jobs().item("mysid"); job.disablePreview(function(err, job) { console.log("PREVIEW ENABLED"); }); @param {Function} callback A function to call with this search job: `(err, job)`. @endpoint search/jobs/{search_id}/control @method splunkjs.Servi...
[ "Enables", "preview", "generation", "for", "a", "search", "job", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.js#L5430-L5439
13,788
splunk/splunk-sdk-javascript
client/splunk.js
function(params, callback) { callback = callback || function() {}; params = params || {}; params.output_mode = params.output_mode || "json_rows"; var that = this; return this.get("events", params, function(err, response) { if (err...
javascript
function(params, callback) { callback = callback || function() {}; params = params || {}; params.output_mode = params.output_mode || "json_rows"; var that = this; return this.get("events", params, function(err, response) { if (err...
[ "function", "(", "params", ",", "callback", ")", "{", "callback", "=", "callback", "||", "function", "(", ")", "{", "}", ";", "params", "=", "params", "||", "{", "}", ";", "params", ".", "output_mode", "=", "params", ".", "output_mode", "||", "\"json_r...
Returns the events of a search job with given parameters. @example var job = service.jobs().item("mysid"); job.events({count: 10}, function(err, events, job) { console.log("Fields: ", events.fields); }); @param {Object} params The parameters for retrieving events. For a list of available parameters, see the <a href=...
[ "Returns", "the", "events", "of", "a", "search", "job", "with", "given", "parameters", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.js#L5457-L5471
13,789
splunk/splunk-sdk-javascript
client/splunk.js
function(value, callback) { callback = callback || function() {}; var that = this; var req = this.post("control", {action: "setpriority", priority: value}, function(err) { callback(err, that); }); return req; }
javascript
function(value, callback) { callback = callback || function() {}; var that = this; var req = this.post("control", {action: "setpriority", priority: value}, function(err) { callback(err, that); }); return req; }
[ "function", "(", "value", ",", "callback", ")", "{", "callback", "=", "callback", "||", "function", "(", ")", "{", "}", ";", "var", "that", "=", "this", ";", "var", "req", "=", "this", ".", "post", "(", "\"control\"", ",", "{", "action", ":", "\"se...
Sets the priority for this search job. @example var job = service.jobs().item("mysid"); job.setPriority(6, function(err, job) { console.log("JOB PRIORITY SET"); }); @param {Number} value The priority (an integer between 1-10). A higher value means a higher priority. @param {Function} callback A function to call with...
[ "Sets", "the", "priority", "for", "this", "search", "job", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.js#L5654-L5663
13,790
splunk/splunk-sdk-javascript
client/splunk.js
function(options, callbacks) { var period = options.period || 500; // ms if (utils.isFunction(callbacks)) { callbacks = { done: callbacks }; } var noCallbacksAfterReady = ( !call...
javascript
function(options, callbacks) { var period = options.period || 500; // ms if (utils.isFunction(callbacks)) { callbacks = { done: callbacks }; } var noCallbacksAfterReady = ( !call...
[ "function", "(", "options", ",", "callbacks", ")", "{", "var", "period", "=", "options", ".", "period", "||", "500", ";", "// ms", "if", "(", "utils", ".", "isFunction", "(", "callbacks", ")", ")", "{", "callbacks", "=", "{", "done", ":", "callbacks", ...
Starts polling the status of this search job, and fires callbacks upon each status change. @param {Object} options A dictionary of optional parameters: - `period` (_integer_): The number of milliseconds to wait between each poll. Defaults to 500. @param {Object|Function} callbacks A dictionary of optional callbacks: -...
[ "Starts", "polling", "the", "status", "of", "this", "search", "job", "and", "fires", "callbacks", "upon", "each", "status", "change", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.js#L5796-L5884
13,791
splunk/splunk-sdk-javascript
client/splunk.js
function(props) { var sid = props.content.sid; var entityNamespace = utils.namespaceFromProperties(props); return new root.Job(this.service, sid, entityNamespace); }
javascript
function(props) { var sid = props.content.sid; var entityNamespace = utils.namespaceFromProperties(props); return new root.Job(this.service, sid, entityNamespace); }
[ "function", "(", "props", ")", "{", "var", "sid", "=", "props", ".", "content", ".", "sid", ";", "var", "entityNamespace", "=", "utils", ".", "namespaceFromProperties", "(", "props", ")", ";", "return", "new", "root", ".", "Job", "(", "this", ".", "ser...
Creates a local instance of a job. @param {Object} props The properties for this new job. For a list of available parameters, see <a href="http://dev.splunk.com/view/SP-CAAAEFA#searchjobparams" target="_blank">Search job parameters</a> on Splunk Developer Portal. @return {splunkjs.Service.Job} A new `splunkjs.Service....
[ "Creates", "a", "local", "instance", "of", "a", "job", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.js#L5939-L5943
13,792
splunk/splunk-sdk-javascript
client/splunk.js
function(query, params, callback) { // If someone called us with the default style of (params, callback), // lets make it work if (utils.isObject(query) && utils.isFunction(params) && !callback) { callback = params; params = query; quer...
javascript
function(query, params, callback) { // If someone called us with the default style of (params, callback), // lets make it work if (utils.isObject(query) && utils.isFunction(params) && !callback) { callback = params; params = query; quer...
[ "function", "(", "query", ",", "params", ",", "callback", ")", "{", "// If someone called us with the default style of (params, callback),", "// lets make it work", "if", "(", "utils", ".", "isObject", "(", "query", ")", "&&", "utils", ".", "isFunction", "(", "params"...
Creates a oneshot search from a given search query and parameters. @example var jobs = service.jobs(); jobs.oneshotSearch("search ERROR", {id: "myjob_123"}, function(err, results) { console.log("RESULT FIELDS": results.fields); }); @param {String} query The search query. @param {Object} params A dictionary of proper...
[ "Creates", "a", "oneshot", "search", "from", "a", "given", "search", "query", "and", "parameters", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.js#L6066-L6111
13,793
splunk/splunk-sdk-javascript
client/splunk.js
function(props) { props = props || {}; props.owner = props.owner || ""; this.name = props.fieldName; this.displayName = props.displayName; this.type = props.type; this.multivalued = props.multivalue; this.requ...
javascript
function(props) { props = props || {}; props.owner = props.owner || ""; this.name = props.fieldName; this.displayName = props.displayName; this.type = props.type; this.multivalued = props.multivalue; this.requ...
[ "function", "(", "props", ")", "{", "props", "=", "props", "||", "{", "}", ";", "props", ".", "owner", "=", "props", ".", "owner", "||", "\"\"", ";", "this", ".", "name", "=", "props", ".", "fieldName", ";", "this", ".", "displayName", "=", "props"...
Constructor for a data model field. SDK users are not expected to invoke this constructor directly. @constructor @param {Object} props A dictionary of properties to set: - `fieldName` (_string_): The name of this field. - `displayName` (_string_): A human readable name for this field. - `type` (_string_): The type of ...
[ "Constructor", "for", "a", "data", "model", "field", ".", "SDK", "users", "are", "not", "expected", "to", "invoke", "this", "constructor", "directly", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.js#L6168-L6183
13,794
splunk/splunk-sdk-javascript
client/splunk.js
function(props) { props = props || {}; props.owner = props.owner || ""; this.query = props.search; this.lineage = props.owner.split("."); this.owner = this.lineage[this.lineage.length - 1]; }
javascript
function(props) { props = props || {}; props.owner = props.owner || ""; this.query = props.search; this.lineage = props.owner.split("."); this.owner = this.lineage[this.lineage.length - 1]; }
[ "function", "(", "props", ")", "{", "props", "=", "props", "||", "{", "}", ";", "props", ".", "owner", "=", "props", ".", "owner", "||", "\"\"", ";", "this", ".", "query", "=", "props", ".", "search", ";", "this", ".", "lineage", "=", "props", "....
Constructor for a data model constraint. SDK users are not expected to invoke this constructor directly. @constructor @param {Object} props A dictionary of properties to set: - `search` (_string_): The Splunk search query this constraint specifies. - `owner` (_string_): The lineage of the data model object that owns t...
[ "Constructor", "for", "a", "data", "model", "constraint", ".", "SDK", "users", "are", "not", "expected", "to", "invoke", "this", "constructor", "directly", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.js#L6288-L6295
13,795
splunk/splunk-sdk-javascript
client/splunk.js
function(props) { props = props || {}; props.owner = props.owner || ""; this.id = props.calculationID; this.type = props.calculationType; this.comment = props.comment || null; this.editable = props.editable; ...
javascript
function(props) { props = props || {}; props.owner = props.owner || ""; this.id = props.calculationID; this.type = props.calculationType; this.comment = props.comment || null; this.editable = props.editable; ...
[ "function", "(", "props", ")", "{", "props", "=", "props", "||", "{", "}", ";", "props", ".", "owner", "=", "props", ".", "owner", "||", "\"\"", ";", "this", ".", "id", "=", "props", ".", "calculationID", ";", "this", ".", "type", "=", "props", "...
Constructor for a data model calculation. SDK users are not expected to invoke this constructor directly. @constructor @param {Object} props A dictionary of properties to set: - `calculationID` (_string_): The ID of this calculation. - `calculationType` (_string_): The type of this calculation, see class docs for vali...
[ "Constructor", "for", "a", "data", "model", "calculation", ".", "SDK", "users", "are", "not", "expected", "to", "invoke", "this", "constructor", "directly", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.js#L6354-L6380
13,796
splunk/splunk-sdk-javascript
client/splunk.js
function(service, props) { this.service = service; this.search = props.search; this.drilldownSearch = props.drilldown_search; this.prettyQuery = this.openInSearch = props.open_in_search; this.pivotSearch = props.pivot_search; this.tstatsSearch = pr...
javascript
function(service, props) { this.service = service; this.search = props.search; this.drilldownSearch = props.drilldown_search; this.prettyQuery = this.openInSearch = props.open_in_search; this.pivotSearch = props.pivot_search; this.tstatsSearch = pr...
[ "function", "(", "service", ",", "props", ")", "{", "this", ".", "service", "=", "service", ";", "this", ".", "search", "=", "props", ".", "search", ";", "this", ".", "drilldownSearch", "=", "props", ".", "drilldown_search", ";", "this", ".", "prettyQuer...
Constructor for a pivot. SDK users are not expected to invoke this constructor directly. @constructor @param {splunkjs.Service} service A `Service` instance. @param {Object} props A dictionary of properties to set: - `search` (_string_): The search string for running the pivot report. - `drilldown_search` (_string_): ...
[ "Constructor", "for", "a", "pivot", ".", "SDK", "users", "are", "not", "expected", "to", "invoke", "this", "constructor", "directly", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.js#L6479-L6488
13,797
splunk/splunk-sdk-javascript
client/splunk.js
function(args, callback) { if (utils.isUndefined(callback)) { callback = args; args = {}; } if (!args || Object.keys(args).length === 0) { args = {}; } // If tstats is undefined, use pivotSearch (try to run an a...
javascript
function(args, callback) { if (utils.isUndefined(callback)) { callback = args; args = {}; } if (!args || Object.keys(args).length === 0) { args = {}; } // If tstats is undefined, use pivotSearch (try to run an a...
[ "function", "(", "args", ",", "callback", ")", "{", "if", "(", "utils", ".", "isUndefined", "(", "callback", ")", ")", "{", "callback", "=", "args", ";", "args", "=", "{", "}", ";", "}", "if", "(", "!", "args", "||", "Object", ".", "keys", "(", ...
Starts a search job running this pivot, accelerated if possible. @param {Object} args A dictionary of properties for the search job (optional). For a list of available parameters, see <a href="http://dev.splunk.com/view/SP-CAAAEFA#searchjobparams" target="_blank">Search job parameters</a> on Splunk Developer Portal. *...
[ "Starts", "a", "search", "job", "running", "this", "pivot", "accelerated", "if", "possible", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.js#L6498-L6509
13,798
splunk/splunk-sdk-javascript
client/splunk.js
function(dataModelObject) { this.dataModelObject = dataModelObject; this.columns = []; this.rows = []; this.filters = []; this.cells = []; this.accelerationNamespace = dataModelObject.dataModel.isAccelerated() ? dataModelObject.da...
javascript
function(dataModelObject) { this.dataModelObject = dataModelObject; this.columns = []; this.rows = []; this.filters = []; this.cells = []; this.accelerationNamespace = dataModelObject.dataModel.isAccelerated() ? dataModelObject.da...
[ "function", "(", "dataModelObject", ")", "{", "this", ".", "dataModelObject", "=", "dataModelObject", ";", "this", ".", "columns", "=", "[", "]", ";", "this", ".", "rows", "=", "[", "]", ";", "this", ".", "filters", "=", "[", "]", ";", "this", ".", ...
Constructor for a pivot specification. @constructor @param {splunkjs.Service.DataModel} parentDataModel The `DataModel` that owns this data model object. @method splunkjs.Service.PivotSpecification
[ "Constructor", "for", "a", "pivot", "specification", "." ]
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.js#L6640-L6652
13,799
splunk/splunk-sdk-javascript
client/splunk.js
function(sid) { // If a search object is passed in, get its sid if (sid && sid instanceof Service.Job) { sid = sid.sid; } if (!sid) { throw new Error("Sid to use for acceleration must not be null."); } ...
javascript
function(sid) { // If a search object is passed in, get its sid if (sid && sid instanceof Service.Job) { sid = sid.sid; } if (!sid) { throw new Error("Sid to use for acceleration must not be null."); } ...
[ "function", "(", "sid", ")", "{", "// If a search object is passed in, get its sid", "if", "(", "sid", "&&", "sid", "instanceof", "Service", ".", "Job", ")", "{", "sid", "=", "sid", ".", "sid", ";", "}", "if", "(", "!", "sid", ")", "{", "throw", "new", ...
Set the acceleration cache for this pivot specification to a job, usually generated by createLocalAccelerationJob on a DataModelObject instance, as the acceleration cache for this pivot specification. @param {String|splunkjs.Service.Job} sid The sid of an acceleration job, or, a `splunkjs.Service.Job` instance. @retur...
[ "Set", "the", "acceleration", "cache", "for", "this", "pivot", "specification", "to", "a", "job", "usually", "generated", "by", "createLocalAccelerationJob", "on", "a", "DataModelObject", "instance", "as", "the", "acceleration", "cache", "for", "this", "pivot", "s...
9aec5443860926654c2ab8ee3bf198a407c53b07
https://github.com/splunk/splunk-sdk-javascript/blob/9aec5443860926654c2ab8ee3bf198a407c53b07/client/splunk.js#L6665-L6677