diff --git a/src/Login.vue b/src/Login.vue
index 125b23e3..fea27950 100644
--- a/src/Login.vue
+++ b/src/Login.vue
@@ -92,7 +92,7 @@ export default {
username: '',
pin: '',
language: '',
- licenseStatus: -1,//-1 未获取后台数据状态;0 获取后台数据且验证成功;1 获取后台数据且验证失败;
+ licenseStatus: -1, // -1 未获取后台数据状态;0 获取后台数据且验证成功;1 获取后台数据且验证失败;
licenseStatusErrMsg: '',
downloadC2vUrl: api.downloadLicenseC2v,
supportID: ''
diff --git a/src/assets/css/font/iconfont.js b/src/assets/css/font/iconfont.js
index 28d99d04..64de6787 100644
--- a/src/assets/css/font/iconfont.js
+++ b/src/assets/css/font/iconfont.js
@@ -1 +1 @@
-window._iconfont_svg_string_2614877=' ',function(l){var a=(a=document.getElementsByTagName("script"))[a.length-1],c=a.getAttribute("data-injectcss"),a=a.getAttribute("data-disable-injectsvg");if(!a){var h,o,i,m,v,z=function(a,c){c.parentNode.insertBefore(a,c)};if(c&&!l.__iconfont__svg__cssinject__){l.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(a){console&&console.log(a)}}h=function(){var a,c=document.createElement("div");c.innerHTML=l._iconfont_svg_string_2614877,(c=c.getElementsByTagName("svg")[0])&&(c.setAttribute("aria-hidden","true"),c.style.position="absolute",c.style.width=0,c.style.height=0,c.style.overflow="hidden",c=c,(a=document.body).firstChild?z(c,a.firstChild):a.appendChild(c))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(h,0):(o=function(){document.removeEventListener("DOMContentLoaded",o,!1),h()},document.addEventListener("DOMContentLoaded",o,!1)):document.attachEvent&&(i=h,m=l.document,v=!1,s(),m.onreadystatechange=function(){"complete"==m.readyState&&(m.onreadystatechange=null,t())})}function t(){v||(v=!0,i())}function s(){try{m.documentElement.doScroll("left")}catch(a){return void setTimeout(s,50)}t()}}(window);
\ No newline at end of file
+window._iconfont_svg_string_2614877 = ' ', (function (l) { var a = (a = document.getElementsByTagName('script'))[a.length - 1]; const c = a.getAttribute('data-injectcss'); var a = a.getAttribute('data-disable-injectsvg'); if (!a) { let h; let o; var i; var m; var v; const z = function (a, c) { c.parentNode.insertBefore(a, c) }; if (c && !l.__iconfont__svg__cssinject__) { l.__iconfont__svg__cssinject__ = !0; try { document.write('') } catch (a) { console && console.log(a) } }h = function () { let a; let c = document.createElement('div'); c.innerHTML = l._iconfont_svg_string_2614877, (c = c.getElementsByTagName('svg')[0]) && (c.setAttribute('aria-hidden', 'true'), c.style.position = 'absolute', c.style.width = 0, c.style.height = 0, c.style.overflow = 'hidden', c = c, (a = document.body).firstChild ? z(c, a.firstChild) : a.appendChild(c)) }, document.addEventListener ? ~['complete', 'loaded', 'interactive'].indexOf(document.readyState) ? setTimeout(h, 0) : (o = function () { document.removeEventListener('DOMContentLoaded', o, !1), h() }, document.addEventListener('DOMContentLoaded', o, !1)) : document.attachEvent && (i = h, m = l.document, v = !1, s(), m.onreadystatechange = function () { m.readyState == 'complete' && (m.onreadystatechange = null, t()) }) } function t () { v || (v = !0, i()) } function s () { try { m.documentElement.doScroll('left') } catch (a) { return void setTimeout(s, 50) }t() } }(window))
diff --git a/src/components/advancedSearch/showhint/TextSearch/createHint.js b/src/components/advancedSearch/showhint/TextSearch/createHint.js
index 888ccc2b..3f8fcb7c 100644
--- a/src/components/advancedSearch/showhint/TextSearch/createHint.js
+++ b/src/components/advancedSearch/showhint/TextSearch/createHint.js
@@ -12,11 +12,13 @@ export default function createHint (hitType = 'default', CodeMirror, {
keyboardDown,
keyboardEnter
}) {
- hitType === 'default' ? showHint(CodeMirror) : manualShowHint(CodeMirror, {
- cb: callback,
- keyboardUp,
- keyboardDown,
- keyboardEnter
- })
+ hitType === 'default'
+ ? showHint(CodeMirror)
+ : manualShowHint(CodeMirror, {
+ cb: callback,
+ keyboardUp,
+ keyboardDown,
+ keyboardEnter
+ })
sqlHint(CodeMirror, { dataset, hinthook, keywordshook })
}
diff --git a/src/components/advancedSearch/showhint/TextSearch/manual-show-hint.js b/src/components/advancedSearch/showhint/TextSearch/manual-show-hint.js
index ea7d71c0..78952249 100644
--- a/src/components/advancedSearch/showhint/TextSearch/manual-show-hint.js
+++ b/src/components/advancedSearch/showhint/TextSearch/manual-show-hint.js
@@ -1,25 +1,25 @@
-export default function (CodeMirror,{
+export default function (CodeMirror, {
cb,
keyboardUp,
keyboardDown,
keyboardEnter
}) {
- var HINT_ELEMENT_CLASS = 'CodeMirror-hint'
- var ACTIVE_HINT_ELEMENT_CLASS = 'CodeMirror-hint-active'
+ const HINT_ELEMENT_CLASS = 'CodeMirror-hint'
+ const ACTIVE_HINT_ELEMENT_CLASS = 'CodeMirror-hint-active'
// This is the old interface, kept around for now to stay
// backwards-compatible.
CodeMirror.showHint = function (cm, getHints, options) {
if (!getHints) return cm.showHint(options)
if (options && options.async) getHints.async = true
- var newOpts = { hint: getHints }
- if (options) for (var prop in options) newOpts[prop] = options[prop]
+ const newOpts = { hint: getHints }
+ if (options) for (const prop in options) newOpts[prop] = options[prop]
return cm.showHint(newOpts)
}
CodeMirror.defineExtension('showHint', function (options) {
options = parseOptions(this, this.getCursor('start'), options)
- var selections = this.listSelections()
+ const selections = this.listSelections()
if (selections.length > 1) return
// By default, don't allow completion when something is selected.
// A hint function can have a `supportsSelection` property to
@@ -27,7 +27,7 @@ export default function (CodeMirror,{
if (this.somethingSelected()) {
if (!options.hint.supportsSelection) return
// Don't try with cross-line selections
- for (var i = 0; i < selections.length; i++) {
+ for (let i = 0; i < selections.length; i++) {
if (selections[i].head.line != selections[i].anchor.line) return
}
}
@@ -55,17 +55,17 @@ export default function (CodeMirror,{
this.startLen = this.cm.getLine(this.startPos.line).length - this.cm.getSelection().length
if (this.options.updateOnCursorActivity) {
- var self = this
+ const self = this
cm.on('cursorActivity', this.activityFunc = function () {
self.cursorActivity()
})
}
}
- var requestAnimationFrame = window.requestAnimationFrame || function (fn) {
+ const requestAnimationFrame = window.requestAnimationFrame || function (fn) {
return setTimeout(fn, 1000 / 60)
}
- var cancelAnimationFrame = window.cancelAnimationFrame || clearTimeout
+ const cancelAnimationFrame = window.cancelAnimationFrame || clearTimeout
Completion.prototype = {
close: function () {
@@ -116,7 +116,7 @@ export default function (CodeMirror,{
this.debounce = 0
}
- var identStart = this.startPos
+ let identStart = this.startPos
if (this.data) {
identStart = this.data.from
}
@@ -127,7 +127,7 @@ export default function (CodeMirror,{
(!pos.ch || this.options.closeCharacters.test(line.charAt(pos.ch - 1)))) {
this.close()
} else {
- var self = this
+ const self = this
this.debounce = requestAnimationFrame(function () {
self.update()
})
@@ -137,7 +137,7 @@ export default function (CodeMirror,{
update: function (first) {
if (this.tick == null) return
- var self = this, myTick = ++this.tick
+ const self = this; const myTick = ++this.tick
fetchHints(this.options.hint, this.cm, this.options, function (data) {
if (self.tick == myTick) self.finishUpdate(data, first)
})
@@ -189,7 +189,7 @@ export default function (CodeMirror,{
}
function buildKeyMap (completion, handle) {
- var baseMap = {
+ const baseMap = {
Up: function () {
handle.moveFocus(-1)
},
@@ -215,7 +215,7 @@ export default function (CodeMirror,{
Esc: handle.close
}
- var mac = /Mac/.test(navigator.platform)
+ const mac = /Mac/.test(navigator.platform)
if (mac) {
baseMap['Ctrl-P'] = function () {
@@ -226,11 +226,11 @@ export default function (CodeMirror,{
}
}
- var custom = completion.options.customKeys
- var ourMap = custom ? {} : baseMap
+ const custom = completion.options.customKeys
+ const ourMap = custom ? {} : baseMap
function addBinding (key, val) {
- var bound
+ let bound
if (typeof val != 'string') {
bound = function (cm) {
return val(cm, handle)
@@ -251,7 +251,7 @@ export default function (CodeMirror,{
}
}
}
- var extra = completion.options.extraKeys
+ const extra = completion.options.extraKeys
if (extra) {
for (var key in extra) {
if (extra.hasOwnProperty(key)) {
@@ -274,25 +274,25 @@ export default function (CodeMirror,{
this.completion = completion
this.data = data
this.picked = false
- var widget = this, cm = completion.cm
- var ownerDocument = cm.getInputField().ownerDocument
- var parentWindow = ownerDocument.defaultView || ownerDocument.parentWindow
+ const widget = this; const cm = completion.cm
+ const ownerDocument = cm.getInputField().ownerDocument
+ const parentWindow = ownerDocument.defaultView || ownerDocument.parentWindow
- var hints = this.hints = ownerDocument.createElement('ul')
+ const hints = this.hints = ownerDocument.createElement('ul')
// $(hints).append(`
//
lalallalla
// `)
hints.setAttribute('role', 'listbox')
hints.setAttribute('aria-expanded', 'true')
hints.id = this.id
- var theme = completion.cm.options.theme
+ const theme = completion.cm.options.theme
hints.className = 'CodeMirror-hints ' + theme
this.selectedHint = data.selectedHint || 0
- var completions = data.list
- for (var i = 0; i < completions.length; ++i) {
- var elt = hints.appendChild(ownerDocument.createElement('li')), cur = completions[i]
- var className = HINT_ELEMENT_CLASS + (i != this.selectedHint ? '' : ' ' + ACTIVE_HINT_ELEMENT_CLASS)
+ const completions = data.list
+ for (let i = 0; i < completions.length; ++i) {
+ const elt = hints.appendChild(ownerDocument.createElement('li')); const cur = completions[i]
+ let className = HINT_ELEMENT_CLASS + (i != this.selectedHint ? '' : ' ' + ACTIVE_HINT_ELEMENT_CLASS)
if (cur.className != null) className = cur.className + ' ' + className
elt.className = className
if (i == this.selectedHint) elt.setAttribute('aria-selected', 'true')
@@ -306,16 +306,16 @@ export default function (CodeMirror,{
elt.hintId = i
}
- var container = completion.options.container || ownerDocument.body
- var pos = cm.cursorCoords(completion.options.alignWithWord ? data.from : null)
- var left = pos.left, top = pos.bottom, below = true
- var offsetLeft = 0, offsetTop = 0
+ const container = completion.options.container || ownerDocument.body
+ let pos = cm.cursorCoords(completion.options.alignWithWord ? data.from : null)
+ let left = pos.left; let top = pos.bottom; let below = true
+ let offsetLeft = 0; let offsetTop = 0
if (container !== ownerDocument.body) {
// We offset the cursor position because left and top are relative to the offsetParent's top left corner.
- var isContainerPositioned = ['absolute', 'relative', 'fixed'].indexOf(parentWindow.getComputedStyle(container).position) !== -1
- var offsetParent = isContainerPositioned ? container : container.offsetParent
- var offsetParentPosition = offsetParent.getBoundingClientRect()
- var bodyPosition = ownerDocument.body.getBoundingClientRect()
+ const isContainerPositioned = ['absolute', 'relative', 'fixed'].indexOf(parentWindow.getComputedStyle(container).position) !== -1
+ const offsetParent = isContainerPositioned ? container : container.offsetParent
+ const offsetParentPosition = offsetParent.getBoundingClientRect()
+ const bodyPosition = ownerDocument.body.getBoundingClientRect()
offsetLeft = (offsetParentPosition.left - bodyPosition.left - offsetParent.scrollLeft)
offsetTop = (offsetParentPosition.top - bodyPosition.top - offsetParent.scrollTop)
}
@@ -325,10 +325,10 @@ export default function (CodeMirror,{
hints.style.display = 'none'
// If we're at the edge of the screen, then we want the menu to appear on the left of the cursor.
- var winW = parentWindow.innerWidth || Math.max(ownerDocument.body.offsetWidth, ownerDocument.documentElement.offsetWidth)
- var winH = parentWindow.innerHeight || Math.max(ownerDocument.body.offsetHeight, ownerDocument.documentElement.offsetHeight)
+ const winW = parentWindow.innerWidth || Math.max(ownerDocument.body.offsetWidth, ownerDocument.documentElement.offsetWidth)
+ const winH = parentWindow.innerHeight || Math.max(ownerDocument.body.offsetHeight, ownerDocument.documentElement.offsetHeight)
- //不用默认的DOM 下拉提示
+ // 不用默认的DOM 下拉提示
// container.appendChild(hints);
hints.remove()
@@ -336,25 +336,25 @@ export default function (CodeMirror,{
cm.getInputField().setAttribute('aria-owns', this.id)
cm.getInputField().setAttribute('aria-activedescendant', this.id + '-' + this.selectedHint)
- var box = completion.options.moveOnOverlap ? hints.getBoundingClientRect() : new DOMRect()
- var scrolls = completion.options.paddingForScrollbar ? hints.scrollHeight > hints.clientHeight + 1 : false
+ let box = completion.options.moveOnOverlap ? hints.getBoundingClientRect() : new DOMRect()
+ const scrolls = completion.options.paddingForScrollbar ? hints.scrollHeight > hints.clientHeight + 1 : false
// Compute in the timeout to avoid reflow on init
- var startScroll
+ let startScroll
setTimeout(function () {
startScroll = cm.getScrollInfo()
})
- var overlapY = box.bottom - winH
+ const overlapY = box.bottom - winH
if (overlapY > 0) {
- var height = box.bottom - box.top, curTop = pos.top - (pos.bottom - box.top)
+ const height = box.bottom - box.top; const curTop = pos.top - (pos.bottom - box.top)
if (curTop - height > 0) { // Fits above cursor
hints.style.top = (top = pos.top - height - offsetTop) + 'px'
below = false
} else if (height > winH) {
hints.style.height = (winH - 5) + 'px'
hints.style.top = (top = pos.bottom - box.top - offsetTop) + 'px'
- var cursor = cm.getCursor()
+ const cursor = cm.getCursor()
if (data.from.ch != cursor.ch) {
pos = cm.cursorCoords(cursor)
hints.style.left = (left = pos.left - offsetLeft) + 'px'
@@ -362,7 +362,7 @@ export default function (CodeMirror,{
}
}
}
- var overlapX = box.right - winW
+ let overlapX = box.right - winW
if (scrolls) overlapX += cm.display.nativeBarWidth
if (overlapX > 0) {
if (box.right - box.left > winW) {
@@ -372,7 +372,7 @@ export default function (CodeMirror,{
hints.style.left = (left = Math.max(pos.left - overlapX - offsetLeft, 0)) + 'px'
}
if (scrolls) {
- for (var node = hints.firstChild; node; node = node.nextSibling) {
+ for (let node = hints.firstChild; node; node = node.nextSibling) {
node.style.paddingRight = cm.display.nativeBarWidth + 'px'
}
}
@@ -400,7 +400,7 @@ export default function (CodeMirror,{
}))
if (completion.options.closeOnUnfocus) {
- var closingOnBlur
+ let closingOnBlur
cm.on('blur', this.onBlur = function () {
closingOnBlur = setTimeout(function () {
completion.close()
@@ -412,10 +412,10 @@ export default function (CodeMirror,{
}
cm.on('scroll', this.onScroll = function () {
- var curScroll = cm.getScrollInfo(), editor = cm.getWrapperElement().getBoundingClientRect()
+ const curScroll = cm.getScrollInfo(); const editor = cm.getWrapperElement().getBoundingClientRect()
if (!startScroll) startScroll = cm.getScrollInfo()
- var newTop = top + startScroll.top - curScroll.top
- var point = newTop - (parentWindow.pageYOffset || (ownerDocument.documentElement || ownerDocument.body).scrollTop)
+ const newTop = top + startScroll.top - curScroll.top
+ let point = newTop - (parentWindow.pageYOffset || (ownerDocument.documentElement || ownerDocument.body).scrollTop)
if (!below) point += hints.offsetHeight
if (point <= editor.top || point >= editor.bottom) return completion.close()
hints.style.top = newTop + 'px'
@@ -423,7 +423,7 @@ export default function (CodeMirror,{
})
CodeMirror.on(hints, 'dblclick', function (e) {
- var t = getHintElement(hints, e.target || e.srcElement)
+ const t = getHintElement(hints, e.target || e.srcElement)
if (t && t.hintId != null) {
widget.changeActive(t.hintId)
widget.pick()
@@ -431,7 +431,7 @@ export default function (CodeMirror,{
})
CodeMirror.on(hints, 'click', function (e) {
- var t = getHintElement(hints, e.target || e.srcElement)
+ const t = getHintElement(hints, e.target || e.srcElement)
if (t && t.hintId != null) {
widget.changeActive(t.hintId)
if (completion.options.completeOnSingleClick) widget.pick()
@@ -445,7 +445,7 @@ export default function (CodeMirror,{
})
// The first hint doesn't need to be scrolled to on init
- var selectedHintRange = this.getSelectedHintRange()
+ const selectedHintRange = this.getSelectedHintRange()
if (selectedHintRange.from !== 0 || selectedHintRange.to !== 0) {
this.scrollToActive()
}
@@ -460,11 +460,11 @@ export default function (CodeMirror,{
this.completion.widget = null
if (this.hints.parentNode) this.hints.parentNode.removeChild(this.hints)
this.completion.cm.removeKeyMap(this.keyMap)
- var input = this.completion.cm.getInputField()
+ const input = this.completion.cm.getInputField()
input.removeAttribute('aria-activedescendant')
input.removeAttribute('aria-owns')
- var cm = this.completion.cm
+ const cm = this.completion.cm
if (this.completion.options.closeOnUnfocus) {
cm.off('blur', this.onBlur)
cm.off('focus', this.onFocus)
@@ -474,7 +474,7 @@ export default function (CodeMirror,{
disable: function () {
this.completion.cm.removeKeyMap(this.keyMap)
- var widget = this
+ const widget = this
this.keyMap = {
Enter: function () {
widget.picked = true
@@ -494,7 +494,7 @@ export default function (CodeMirror,{
i = avoidWrap ? 0 : this.data.list.length - 1
}
if (this.selectedHint == i) return
- var node = this.hints.childNodes[this.selectedHint]
+ let node = this.hints.childNodes[this.selectedHint]
if (node) {
node.className = node.className.replace(' ' + ACTIVE_HINT_ELEMENT_CLASS, '')
node.removeAttribute('aria-selected')
@@ -508,10 +508,10 @@ export default function (CodeMirror,{
},
scrollToActive: function () {
- var selectedHintRange = this.getSelectedHintRange()
- var node1 = this.hints.childNodes[selectedHintRange.from]
- var node2 = this.hints.childNodes[selectedHintRange.to]
- var firstNode = this.hints.firstChild
+ const selectedHintRange = this.getSelectedHintRange()
+ const node1 = this.hints.childNodes[selectedHintRange.from]
+ const node2 = this.hints.childNodes[selectedHintRange.to]
+ const firstNode = this.hints.firstChild
if (node1.offsetTop < this.hints.scrollTop) {
this.hints.scrollTop = node1.offsetTop - firstNode.offsetTop
} else if (node2.offsetTop + node2.offsetHeight > this.hints.scrollTop + this.hints.clientHeight) {
@@ -524,18 +524,18 @@ export default function (CodeMirror,{
},
getSelectedHintRange: function () {
- var margin = this.completion.options.scrollMargin || 0
+ const margin = this.completion.options.scrollMargin || 0
return {
from: Math.max(0, this.selectedHint - margin),
- to: Math.min(this.data.list.length - 1, this.selectedHint + margin),
+ to: Math.min(this.data.list.length - 1, this.selectedHint + margin)
}
}
}
function applicableHelpers (cm, helpers) {
if (!cm.somethingSelected()) return helpers
- var result = []
- for (var i = 0; i < helpers.length; i++) {
+ const result = []
+ for (let i = 0; i < helpers.length; i++) {
if (helpers[i].supportsSelection) result.push(helpers[i])
}
return result
@@ -545,7 +545,7 @@ export default function (CodeMirror,{
if (hint.async) {
hint(cm, callback, options)
} else {
- var result = hint(cm, options)
+ const result = hint(cm, options)
if (result && result.then) {
result.then(callback)
} else {
@@ -555,10 +555,10 @@ export default function (CodeMirror,{
}
function resolveAutoHints (cm, pos) {
- var helpers = cm.getHelpers(pos, 'hint'), words
+ const helpers = cm.getHelpers(pos, 'hint'); let words
if (helpers.length) {
- var resolved = function (cm, callback, options) {
- var app = applicableHelpers(cm, helpers)
+ const resolved = function (cm, callback, options) {
+ const app = applicableHelpers(cm, helpers)
function run (i) {
if (i == app.length) return callback(null)
@@ -595,17 +595,17 @@ export default function (CodeMirror,{
})
CodeMirror.registerHelper('hint', 'fromList', function (cm, options) {
- var cur = cm.getCursor(), token = cm.getTokenAt(cur)
- var term, from = CodeMirror.Pos(cur.line, token.start), to = cur
+ const cur = cm.getCursor(); const token = cm.getTokenAt(cur)
+ let term; let from = CodeMirror.Pos(cur.line, token.start); const to = cur
if (token.start < cur.ch && /\w/.test(token.string.charAt(cur.ch - token.start - 1))) {
term = token.string.substr(0, cur.ch - token.start)
} else {
term = ''
from = cur
}
- var found = []
- for (var i = 0; i < options.words.length; i++) {
- var word = options.words[i]
+ const found = []
+ for (let i = 0; i < options.words.length; i++) {
+ const word = options.words[i]
if (word.slice(0, term.length) == term) {
found.push(word)
}
@@ -620,7 +620,7 @@ export default function (CodeMirror,{
}
})
- CodeMirror.commands.autocomplete = CodeMirror.showHint;
+ CodeMirror.commands.autocomplete = CodeMirror.showHint
var defaultOptions = {
hint: CodeMirror.hint.auto,
@@ -629,7 +629,7 @@ export default function (CodeMirror,{
closeCharacters: /[\s()\[\]{};:>,]/,
closeOnPick: false,
- closeOnUnfocus: false, //阻止提示信息 失焦关闭
+ closeOnUnfocus: false, // 阻止提示信息 失焦关闭
// closeOnUnfocus: false,
updateOnCursorActivity: true,
@@ -638,8 +638,7 @@ export default function (CodeMirror,{
customKeys: null,
extraKeys: null,
paddingForScrollbar: true,
- moveOnOverlap: true,
- };
- CodeMirror.defineOption("hintOptions", null);
-
+ moveOnOverlap: true
+ }
+ CodeMirror.defineOption('hintOptions', null)
}
diff --git a/src/components/advancedSearch/showhint/TextSearch/matchRelatedInfo.js b/src/components/advancedSearch/showhint/TextSearch/matchRelatedInfo.js
index ce581dbb..e28840d1 100644
--- a/src/components/advancedSearch/showhint/TextSearch/matchRelatedInfo.js
+++ b/src/components/advancedSearch/showhint/TextSearch/matchRelatedInfo.js
@@ -1,222 +1,216 @@
-//正则 向前去找关键字
+// 正则 向前去找关键字
/* 用于匹配关系数据 */
-function matchOperator(CodeMirror, hintParams = {}) {
- var editor = hintParams.editor;
- var Pos = CodeMirror.Pos
- var cur = hintParams.cur;
- var token = hintParams.token;
+function matchOperator (CodeMirror, hintParams = {}) {
+ const editor = hintParams.editor
+ const Pos = CodeMirror.Pos
+ const cur = hintParams.cur
+ let token = hintParams.token
if (!editor) {
return
}
-
- var start = token.start;
- var cont = true;
- var leftTokenGroup = [];
+ let start = token.start
+ let cont = true
+ const leftTokenGroup = []
while (cont) {
- start = token.start;
- leftTokenGroup.unshift(token);
- token = editor.getTokenAt(Pos(cur.line, token.start));
- cont = !(token.string.match(/^[ ]*$/) || start === 0); //只用空格做终止条件
+ start = token.start
+ leftTokenGroup.unshift(token)
+ token = editor.getTokenAt(Pos(cur.line, token.start))
+ cont = !(token.string.match(/^[ ]*$/) || start === 0) // 只用空格做终止条件
}
- var cursorLeftString = editor.getRange(Pos(cur.line, leftTokenGroup[0].start), Pos(cur.line, leftTokenGroup[leftTokenGroup.length - 1].end))
+ const cursorLeftString = editor.getRange(Pos(cur.line, leftTokenGroup[0].start), Pos(cur.line, leftTokenGroup[leftTokenGroup.length - 1].end))
- //判断是不是满足 运算符 表达式的正则
- //test 如果是ig 会改变正则指针: https://my.oschina.net/jamesview/blog/5460753
- var reg = /^(.*?)(=|!=|>|<|>=|<=)([^ ]*?)$/;
+ // 判断是不是满足 运算符 表达式的正则
+ // test 如果是ig 会改变正则指针: https://my.oschina.net/jamesview/blog/5460753
+ const reg = /^(.*?)(=|!=|>|<|>=|<=)([^ ]*?)$/
if (reg.test(cursorLeftString)) {
- var execArr = reg.exec(cursorLeftString) || []
+ const execArr = reg.exec(cursorLeftString) || []
return {
leftTokenGroup,
cursorLeftString,
label: execArr[1],
sign: execArr[2],
- value: execArr[3],
+ value: execArr[3]
}
}
return null
}
-function matchCommon(CodeMirror, hintParams = {}) {
- //通用情况 QUANTILE(expr,level) 左括号右侧第一个就是 关键字
- var editor = hintParams.editor;
- var Pos = CodeMirror.Pos
- var cur = hintParams.cur;
- var token = hintParams.token;
+function matchCommon (CodeMirror, hintParams = {}) {
+ // 通用情况 QUANTILE(expr,level) 左括号右侧第一个就是 关键字
+ const editor = hintParams.editor
+ const Pos = CodeMirror.Pos
+ const cur = hintParams.cur
+ let token = hintParams.token
if (!editor) {
return
}
-
- var start = token.start;
- var cont = true;
- var leftTokenGroup = [];
+ let start = token.start
+ let cont = true
+ const leftTokenGroup = []
while (cont) {
- start = token.start;
- leftTokenGroup.unshift(token);
- token = editor.getTokenAt(Pos(cur.line, token.start));
- cont = !(token.string.match(/^[ (]*$/) || start === 0); //括号或者空格为终止条件
+ start = token.start
+ leftTokenGroup.unshift(token)
+ token = editor.getTokenAt(Pos(cur.line, token.start))
+ cont = !(token.string.match(/^[ (]*$/) || start === 0) // 括号或者空格为终止条件
- //括号补上
+ // 括号补上
if (token.string === '(') {
- leftTokenGroup.unshift(token);
+ leftTokenGroup.unshift(token)
}
}
- var cursorLeftString = editor.getRange(Pos(cur.line, leftTokenGroup[0].start), Pos(cur.line, leftTokenGroup[leftTokenGroup.length - 1].end))
+ const cursorLeftString = editor.getRange(Pos(cur.line, leftTokenGroup[0].start), Pos(cur.line, leftTokenGroup[leftTokenGroup.length - 1].end))
- //判断是不是满足 运算符 表达式的正则
- var reg = /^\((.*?),([^ ]*)$/;
+ // 判断是不是满足 运算符 表达式的正则
+ const reg = /^\((.*?),([^ ]*)$/
if (reg.test(cursorLeftString)) {
- var execArr = reg.exec(cursorLeftString) || []
+ const execArr = reg.exec(cursorLeftString) || []
return {
leftTokenGroup,
cursorLeftString,
label: execArr[1],
- sign: 'unknown', //没必要判断
- value: execArr[2],
+ sign: 'unknown', // 没必要判断
+ value: execArr[2]
}
}
return null
}
-function matchIn(CodeMirror, hintParams = {}) {
- //in 的情况比较特殊
- //通用情况 expr not in (values) expr in (values)
- var editor = hintParams.editor;
- var Pos = CodeMirror.Pos
- var cur = hintParams.cur;
- var token = hintParams.token;
+function matchIn (CodeMirror, hintParams = {}) {
+ // in 的情况比较特殊
+ // 通用情况 expr not in (values) expr in (values)
+ const editor = hintParams.editor
+ const Pos = CodeMirror.Pos
+ const cur = hintParams.cur
+ let token = hintParams.token
if (!editor) {
return
}
+ let start = token.start
+ let cont = true
+ const leftTokenGroup = []
- var start = token.start;
- var cont = true;
- var leftTokenGroup = [];
-
- //找到左括号
+ // 找到左括号
while (cont) {
- start = token.start;
- leftTokenGroup.unshift(token);
- token = editor.getTokenAt(Pos(cur.line, token.start));
- cont = !(token.string.match(/^[ (]*$/) || start === 0); //括号或者空格为终止条件
- //左括号补上
+ start = token.start
+ leftTokenGroup.unshift(token)
+ token = editor.getTokenAt(Pos(cur.line, token.start))
+ cont = !(token.string.match(/^[ (]*$/) || start === 0) // 括号或者空格为终止条件
+ // 左括号补上
if (token.string === '(') {
- leftTokenGroup.unshift(token);
+ leftTokenGroup.unshift(token)
}
}
- //左括号继续向右找
+ // 左括号继续向右找
cont = true
while (cont) {
- start = token.start;
- leftTokenGroup.unshift(token);
- token = editor.getTokenAt(Pos(cur.line, token.start));
- cont = !(!token.string.match(/^(in|not| )/g) || start === 0); //括号或者空格为终止条件
+ start = token.start
+ leftTokenGroup.unshift(token)
+ token = editor.getTokenAt(Pos(cur.line, token.start))
+ cont = !(!token.string.match(/^(in|not| )/g) || start === 0) // 括号或者空格为终止条件
- //string-2
+ // string-2
if (token.type === 'string-2') {
- leftTokenGroup.unshift(token);
+ leftTokenGroup.unshift(token)
}
}
- var cursorLeftString = editor.getRange(Pos(cur.line, leftTokenGroup[0].start), Pos(cur.line, leftTokenGroup[leftTokenGroup.length - 1].end))
+ const cursorLeftString = editor.getRange(Pos(cur.line, leftTokenGroup[0].start), Pos(cur.line, leftTokenGroup[leftTokenGroup.length - 1].end))
- //判断是不是满足 运算符 表达式的正则
- var reg = /^(.*?)[ ]+((?:not[ ]+)?in)[ ]*\(([^ ]*?)$/i;
+ // 判断是不是满足 运算符 表达式的正则
+ const reg = /^(.*?)[ ]+((?:not[ ]+)?in)[ ]*\(([^ ]*?)$/i
if (reg.test(cursorLeftString)) {
- var execArr = reg.exec(cursorLeftString) || []
+ const execArr = reg.exec(cursorLeftString) || []
return {
leftTokenGroup,
cursorLeftString,
label: execArr[1],
sign: execArr[2],
- value: execArr[3],
+ value: execArr[3]
}
}
return null
}
-function matchLike(CodeMirror, hintParams = {}) {
- //like 的情况比较特殊 expr like value , expr not like value
- var editor = hintParams.editor;
- var Pos = CodeMirror.Pos
- var cur = hintParams.cur;
- var token = hintParams.token;
+function matchLike (CodeMirror, hintParams = {}) {
+ // like 的情况比较特殊 expr like value , expr not like value
+ const editor = hintParams.editor
+ const Pos = CodeMirror.Pos
+ const cur = hintParams.cur
+ let token = hintParams.token
if (!editor) {
return
}
+ let start = token.start
+ let cont = true
+ const leftTokenGroup = []
- var start = token.start;
- var cont = true;
- var leftTokenGroup = [];
-
- //找到左括号
+ // 找到左括号
while (cont) {
- start = token.start;
- leftTokenGroup.unshift(token);
- token = editor.getTokenAt(Pos(cur.line, token.start));
- cont = !(token.string.match(/^[ ]*$/) || start === 0); //括号或者空格为终止条件
+ start = token.start
+ leftTokenGroup.unshift(token)
+ token = editor.getTokenAt(Pos(cur.line, token.start))
+ cont = !(token.string.match(/^[ ]*$/) || start === 0) // 括号或者空格为终止条件
}
- //左括号继续向右找
+ // 左括号继续向右找
cont = true
while (cont) {
- start = token.start;
- leftTokenGroup.unshift(token);
- token = editor.getTokenAt(Pos(cur.line, token.start));
- cont = !(!token.string.match(/^(like|not| )/g) || start === 0); //括号或者空格为终止条件
+ start = token.start
+ leftTokenGroup.unshift(token)
+ token = editor.getTokenAt(Pos(cur.line, token.start))
+ cont = !(!token.string.match(/^(like|not| )/g) || start === 0) // 括号或者空格为终止条件
- //string-2
+ // string-2
if (token.type === 'string-2') {
- leftTokenGroup.unshift(token);
+ leftTokenGroup.unshift(token)
}
}
- var cursorLeftString = editor.getRange(Pos(cur.line, leftTokenGroup[0].start), Pos(cur.line, leftTokenGroup[leftTokenGroup.length - 1].end))
+ const cursorLeftString = editor.getRange(Pos(cur.line, leftTokenGroup[0].start), Pos(cur.line, leftTokenGroup[leftTokenGroup.length - 1].end))
- //判断是不是满足 运算符 表达式的正则
- var reg = /^(.*?)[ ]+((?:not[ ]+)?like)[ ]*([^ ]*?)$/i;
+ // 判断是不是满足 运算符 表达式的正则
+ const reg = /^(.*?)[ ]+((?:not[ ]+)?like)[ ]*([^ ]*?)$/i
if (reg.test(cursorLeftString)) {
- var execArr = reg.exec(cursorLeftString) || []
+ const execArr = reg.exec(cursorLeftString) || []
return {
leftTokenGroup,
cursorLeftString,
label: execArr[1],
sign: execArr[2],
- value: execArr[3],
+ value: execArr[3]
}
}
return null
-
}
export const matchMain = (CodeMirror, params, manualParams = {}) => {
- var matchRes = null
- //匹配 运算符表达式
+ let matchRes = null
+ // 匹配 运算符表达式
matchRes = matchOperator(CodeMirror, manualParams)
if (matchRes) {
return matchRes
}
- //匹配 in表达式
+ // 匹配 in表达式
matchRes = matchIn(CodeMirror, manualParams)
if (matchRes) {
return matchRes
}
- //匹配 like表达式
+ // 匹配 like表达式
matchRes = matchLike(CodeMirror, manualParams)
if (matchRes) {
return matchRes
}
- //这里缺少一个对 count(distinct expr) 模式的匹配, 感觉大数据涉及存在缺陷, 先暂时不写
+ // 这里缺少一个对 count(distinct expr) 模式的匹配, 感觉大数据涉及存在缺陷, 先暂时不写
-
- //匹配 其他表达式 (expr,value1,value2....) 模式的匹配
+ // 匹配 其他表达式 (expr,value1,value2....) 模式的匹配
matchRes = matchCommon(CodeMirror, manualParams)
if (matchRes) {
// 说明这是一个 运算符表达式
diff --git a/src/components/advancedSearch/showhint/TextSearch/show-hint.js b/src/components/advancedSearch/showhint/TextSearch/show-hint.js
index 9d268d3a..0ab6ce9a 100644
--- a/src/components/advancedSearch/showhint/TextSearch/show-hint.js
+++ b/src/components/advancedSearch/showhint/TextSearch/show-hint.js
@@ -1,525 +1,521 @@
-export default function showHint(CodeMirror) {
- "use strict";
+export default function showHint (CodeMirror) {
+ 'use strict'
- var HINT_ELEMENT_CLASS = "CodeMirror-hint";
- var ACTIVE_HINT_ELEMENT_CLASS = "CodeMirror-hint-active";
+ const HINT_ELEMENT_CLASS = 'CodeMirror-hint'
+ const ACTIVE_HINT_ELEMENT_CLASS = 'CodeMirror-hint-active'
// This is the old interface, kept around for now to stay
// backwards-compatible.
CodeMirror.showHint = function (cm, getHints, options) {
- if (!getHints) return cm.showHint(options);
- if (options && options.async) getHints.async = true;
- var newOpts = {hint: getHints};
- if (options) for (var prop in options) newOpts[prop] = options[prop];
- return cm.showHint(newOpts);
- };
+ if (!getHints) return cm.showHint(options)
+ if (options && options.async) getHints.async = true
+ const newOpts = { hint: getHints }
+ if (options) for (const prop in options) newOpts[prop] = options[prop]
+ return cm.showHint(newOpts)
+ }
- CodeMirror.defineExtension("showHint", function (options) {
- options = parseOptions(this, this.getCursor("start"), options);
- var selections = this.listSelections()
- if (selections.length > 1) return;
+ CodeMirror.defineExtension('showHint', function (options) {
+ options = parseOptions(this, this.getCursor('start'), options)
+ const selections = this.listSelections()
+ if (selections.length > 1) return
// By default, don't allow completion when something is selected.
// A hint function can have a `supportsSelection` property to
// indicate that it can handle selections.
if (this.somethingSelected()) {
- if (!options.hint.supportsSelection) return;
+ if (!options.hint.supportsSelection) return
// Don't try with cross-line selections
- for (var i = 0; i < selections.length; i++)
- if (selections[i].head.line != selections[i].anchor.line) return;
+ for (let i = 0; i < selections.length; i++) { if (selections[i].head.line != selections[i].anchor.line) return }
}
- if (this.state.completionActive) this.state.completionActive.close();
- var completion = this.state.completionActive = new Completion(this, options);
- if (!completion.options.hint) return;
+ if (this.state.completionActive) this.state.completionActive.close()
+ const completion = this.state.completionActive = new Completion(this, options)
+ if (!completion.options.hint) return
- CodeMirror.signal(this, "startCompletion", this);
- completion.update(true);
- });
+ CodeMirror.signal(this, 'startCompletion', this)
+ completion.update(true)
+ })
- CodeMirror.defineExtension("closeHint", function () {
+ CodeMirror.defineExtension('closeHint', function () {
if (this.state.completionActive) this.state.completionActive.close()
})
- function Completion(cm, options) {
- this.cm = cm;
- this.options = options;
- this.widget = null;
- this.debounce = 0;
- this.tick = 0;
- this.startPos = this.cm.getCursor("start");
- this.startLen = this.cm.getLine(this.startPos.line).length - this.cm.getSelection().length;
+ function Completion (cm, options) {
+ this.cm = cm
+ this.options = options
+ this.widget = null
+ this.debounce = 0
+ this.tick = 0
+ this.startPos = this.cm.getCursor('start')
+ this.startLen = this.cm.getLine(this.startPos.line).length - this.cm.getSelection().length
if (this.options.updateOnCursorActivity) {
- var self = this;
- cm.on("cursorActivity", this.activityFunc = function () {
- self.cursorActivity();
- });
+ const self = this
+ cm.on('cursorActivity', this.activityFunc = function () {
+ self.cursorActivity()
+ })
}
}
- var requestAnimationFrame = window.requestAnimationFrame || function (fn) {
- return setTimeout(fn, 1000 / 60);
- };
- var cancelAnimationFrame = window.cancelAnimationFrame || clearTimeout;
+ const requestAnimationFrame = window.requestAnimationFrame || function (fn) {
+ return setTimeout(fn, 1000 / 60)
+ }
+ const cancelAnimationFrame = window.cancelAnimationFrame || clearTimeout
Completion.prototype = {
close: function () {
- if (!this.active()) return;
- this.cm.state.completionActive = null;
- this.tick = null;
+ if (!this.active()) return
+ this.cm.state.completionActive = null
+ this.tick = null
if (this.options.updateOnCursorActivity) {
- this.cm.off("cursorActivity", this.activityFunc);
+ this.cm.off('cursorActivity', this.activityFunc)
}
- if (this.widget && this.data) CodeMirror.signal(this.data, "close");
- if (this.widget) this.widget.close();
- CodeMirror.signal(this.cm, "endCompletion", this.cm);
+ if (this.widget && this.data) CodeMirror.signal(this.data, 'close')
+ if (this.widget) this.widget.close()
+ CodeMirror.signal(this.cm, 'endCompletion', this.cm)
},
active: function () {
- return this.cm.state.completionActive == this;
+ return this.cm.state.completionActive == this
},
pick: function (data, i) {
- var completion = data.list[i], self = this;
+ const completion = data.list[i]; const self = this
this.cm.operation(function () {
- if (completion.hint)
- completion.hint(self.cm, data, completion);
- else
+ if (completion.hint) { completion.hint(self.cm, data, completion) } else {
self.cm.replaceRange(getText(completion), completion.from || data.from,
- completion.to || data.to, "complete");
- CodeMirror.signal(data, "pick", completion);
- self.cm.scrollIntoView();
- });
+ completion.to || data.to, 'complete')
+ }
+ CodeMirror.signal(data, 'pick', completion)
+ self.cm.scrollIntoView()
+ })
if (this.options.closeOnPick) {
- this.close();
+ this.close()
}
},
cursorActivity: function () {
if (this.debounce) {
- cancelAnimationFrame(this.debounce);
- this.debounce = 0;
+ cancelAnimationFrame(this.debounce)
+ this.debounce = 0
}
- var identStart = this.startPos;
+ let identStart = this.startPos
if (this.data) {
- identStart = this.data.from;
+ identStart = this.data.from
}
- var pos = this.cm.getCursor(), line = this.cm.getLine(pos.line);
+ const pos = this.cm.getCursor(); const line = this.cm.getLine(pos.line)
if (pos.line != this.startPos.line || line.length - pos.ch != this.startLen - this.startPos.ch ||
pos.ch < identStart.ch || this.cm.somethingSelected() ||
(!pos.ch || this.options.closeCharacters.test(line.charAt(pos.ch - 1)))) {
- this.close();
+ this.close()
} else {
- var self = this;
+ const self = this
this.debounce = requestAnimationFrame(function () {
- self.update();
- });
- if (this.widget) this.widget.disable();
+ self.update()
+ })
+ if (this.widget) this.widget.disable()
}
},
update: function (first) {
if (this.tick == null) return
- var self = this, myTick = ++this.tick
+ const self = this; const myTick = ++this.tick
fetchHints(this.options.hint, this.cm, this.options, function (data) {
if (self.tick == myTick) self.finishUpdate(data, first)
})
},
finishUpdate: function (data, first) {
- if (this.data) CodeMirror.signal(this.data, "update");
+ if (this.data) CodeMirror.signal(this.data, 'update')
- var picked = (this.widget && this.widget.picked) || (first && this.options.completeSingle);
- if (this.widget) this.widget.close();
+ const picked = (this.widget && this.widget.picked) || (first && this.options.completeSingle)
+ if (this.widget) this.widget.close()
- this.data = data;
+ this.data = data
if (data && data.list.length) {
if (picked && data.list.length == 1) {
- this.pick(data, 0);
+ this.pick(data, 0)
} else {
- this.widget = new Widget(this, data);
- CodeMirror.signal(data, "shown");
+ this.widget = new Widget(this, data)
+ CodeMirror.signal(data, 'shown')
}
}
}
- };
+ }
- function parseOptions(cm, pos, options) {
- var editor = cm.options.hintOptions;
- var out = {};
- for (var prop in defaultOptions) out[prop] = defaultOptions[prop];
- if (editor) for (var prop in editor)
- if (editor[prop] !== undefined) out[prop] = editor[prop];
- if (options) for (var prop in options)
- if (options[prop] !== undefined) out[prop] = options[prop];
+ function parseOptions (cm, pos, options) {
+ const editor = cm.options.hintOptions
+ const out = {}
+ for (var prop in defaultOptions) out[prop] = defaultOptions[prop]
+ if (editor) {
+ for (var prop in editor) { if (editor[prop] !== undefined) out[prop] = editor[prop] }
+ }
+ if (options) {
+ for (var prop in options) { if (options[prop] !== undefined) out[prop] = options[prop] }
+ }
if (out.hint.resolve) out.hint = out.hint.resolve(cm, pos)
- return out;
+ return out
}
- function getText(completion) {
- if (typeof completion == "string") return completion;
- else return completion.text;
+ function getText (completion) {
+ if (typeof completion == 'string') return completion
+ else return completion.text
}
- function buildKeyMap(completion, handle) {
- var baseMap = {
+ function buildKeyMap (completion, handle) {
+ const baseMap = {
Up: function () {
- handle.moveFocus(-1);
+ handle.moveFocus(-1)
},
Down: function () {
- handle.moveFocus(1);
+ handle.moveFocus(1)
},
PageUp: function () {
- handle.moveFocus(-handle.menuSize() + 1, true);
+ handle.moveFocus(-handle.menuSize() + 1, true)
},
PageDown: function () {
- handle.moveFocus(handle.menuSize() - 1, true);
+ handle.moveFocus(handle.menuSize() - 1, true)
},
Home: function () {
- handle.setFocus(0);
+ handle.setFocus(0)
},
End: function () {
- handle.setFocus(handle.length - 1);
+ handle.setFocus(handle.length - 1)
},
Enter: handle.pick,
Tab: handle.pick,
Esc: handle.close
- };
+ }
- var mac = /Mac/.test(navigator.platform);
+ const mac = /Mac/.test(navigator.platform)
if (mac) {
- baseMap["Ctrl-P"] = function () {
- handle.moveFocus(-1);
- };
- baseMap["Ctrl-N"] = function () {
- handle.moveFocus(1);
- };
+ baseMap['Ctrl-P'] = function () {
+ handle.moveFocus(-1)
+ }
+ baseMap['Ctrl-N'] = function () {
+ handle.moveFocus(1)
+ }
}
- var custom = completion.options.customKeys;
- var ourMap = custom ? {} : baseMap;
+ const custom = completion.options.customKeys
+ const ourMap = custom ? {} : baseMap
- function addBinding(key, val) {
- var bound;
- if (typeof val != "string")
+ function addBinding (key, val) {
+ let bound
+ if (typeof val != 'string') {
bound = function (cm) {
- return val(cm, handle);
- };
+ return val(cm, handle)
+ }
+ }
// This mechanism is deprecated
- else if (baseMap.hasOwnProperty(val))
- bound = baseMap[val];
- else
- bound = val;
- ourMap[key] = bound;
+ else if (baseMap.hasOwnProperty(val)) { bound = baseMap[val] } else { bound = val }
+ ourMap[key] = bound
}
- if (custom)
- for (var key in custom) if (custom.hasOwnProperty(key))
- addBinding(key, custom[key]);
- var extra = completion.options.extraKeys;
- if (extra)
- for (var key in extra) if (extra.hasOwnProperty(key))
- addBinding(key, extra[key]);
- return ourMap;
+ if (custom) {
+ for (var key in custom) {
+ if (custom.hasOwnProperty(key)) { addBinding(key, custom[key]) }
+ }
+ }
+ const extra = completion.options.extraKeys
+ if (extra) {
+ for (var key in extra) {
+ if (extra.hasOwnProperty(key)) { addBinding(key, extra[key]) }
+ }
+ }
+ return ourMap
}
- function getHintElement(hintsElement, el) {
+ function getHintElement (hintsElement, el) {
while (el && el != hintsElement) {
- if (el.nodeName.toUpperCase() === "LI" && el.parentNode == hintsElement) return el;
- el = el.parentNode;
+ if (el.nodeName.toUpperCase() === 'LI' && el.parentNode == hintsElement) return el
+ el = el.parentNode
}
}
- function Widget(completion, data) {
- this.id = "cm-complete-" + Math.floor(Math.random(1e6))
- this.completion = completion;
- this.data = data;
- this.picked = false;
- var widget = this, cm = completion.cm;
- var ownerDocument = cm.getInputField().ownerDocument;
- var parentWindow = ownerDocument.defaultView || ownerDocument.parentWindow;
+ function Widget (completion, data) {
+ this.id = 'cm-complete-' + Math.floor(Math.random(1e6))
+ this.completion = completion
+ this.data = data
+ this.picked = false
+ const widget = this; const cm = completion.cm
+ const ownerDocument = cm.getInputField().ownerDocument
+ const parentWindow = ownerDocument.defaultView || ownerDocument.parentWindow
- var hints = this.hints = ownerDocument.createElement("ul");
+ const hints = this.hints = ownerDocument.createElement('ul')
// $(hints).append(`
// lalallalla
// `)
- hints.setAttribute("role", "listbox")
- hints.setAttribute("aria-expanded", "true")
+ hints.setAttribute('role', 'listbox')
+ hints.setAttribute('aria-expanded', 'true')
hints.id = this.id
- var theme = completion.cm.options.theme;
- hints.className = "CodeMirror-hints " + theme;
- this.selectedHint = data.selectedHint || 0;
+ const theme = completion.cm.options.theme
+ hints.className = 'CodeMirror-hints ' + theme
+ this.selectedHint = data.selectedHint || 0
- var completions = data.list;
- for (var i = 0; i < completions.length; ++i) {
- var elt = hints.appendChild(ownerDocument.createElement("li")), cur = completions[i];
- var className = HINT_ELEMENT_CLASS + (i != this.selectedHint ? "" : " " + ACTIVE_HINT_ELEMENT_CLASS);
- if (cur.className != null) className = cur.className + " " + className;
- elt.className = className;
- if (i == this.selectedHint) elt.setAttribute("aria-selected", "true")
- elt.id = this.id + "-" + i
- elt.setAttribute("role", "option")
- if (cur.render) cur.render(elt, data, cur);
- else elt.appendChild(ownerDocument.createTextNode(cur.displayText || getText(cur)));
- elt.hintId = i;
+ const completions = data.list
+ for (let i = 0; i < completions.length; ++i) {
+ const elt = hints.appendChild(ownerDocument.createElement('li')); const cur = completions[i]
+ let className = HINT_ELEMENT_CLASS + (i != this.selectedHint ? '' : ' ' + ACTIVE_HINT_ELEMENT_CLASS)
+ if (cur.className != null) className = cur.className + ' ' + className
+ elt.className = className
+ if (i == this.selectedHint) elt.setAttribute('aria-selected', 'true')
+ elt.id = this.id + '-' + i
+ elt.setAttribute('role', 'option')
+ if (cur.render) cur.render(elt, data, cur)
+ else elt.appendChild(ownerDocument.createTextNode(cur.displayText || getText(cur)))
+ elt.hintId = i
}
- var container = completion.options.container || ownerDocument.body;
- var pos = cm.cursorCoords(completion.options.alignWithWord ? data.from : null);
- var left = pos.left, top = pos.bottom, below = true;
- var offsetLeft = 0, offsetTop = 0;
+ const container = completion.options.container || ownerDocument.body
+ let pos = cm.cursorCoords(completion.options.alignWithWord ? data.from : null)
+ let left = pos.left; let top = pos.bottom; let below = true
+ let offsetLeft = 0; let offsetTop = 0
if (container !== ownerDocument.body) {
// We offset the cursor position because left and top are relative to the offsetParent's top left corner.
- var isContainerPositioned = ['absolute', 'relative', 'fixed'].indexOf(parentWindow.getComputedStyle(container).position) !== -1;
- var offsetParent = isContainerPositioned ? container : container.offsetParent;
- var offsetParentPosition = offsetParent.getBoundingClientRect();
- var bodyPosition = ownerDocument.body.getBoundingClientRect();
- offsetLeft = (offsetParentPosition.left - bodyPosition.left - offsetParent.scrollLeft);
- offsetTop = (offsetParentPosition.top - bodyPosition.top - offsetParent.scrollTop);
+ const isContainerPositioned = ['absolute', 'relative', 'fixed'].indexOf(parentWindow.getComputedStyle(container).position) !== -1
+ const offsetParent = isContainerPositioned ? container : container.offsetParent
+ const offsetParentPosition = offsetParent.getBoundingClientRect()
+ const bodyPosition = ownerDocument.body.getBoundingClientRect()
+ offsetLeft = (offsetParentPosition.left - bodyPosition.left - offsetParent.scrollLeft)
+ offsetTop = (offsetParentPosition.top - bodyPosition.top - offsetParent.scrollTop)
}
- hints.style.left = (left - offsetLeft) + "px";
- hints.style.top = (top - offsetTop) + "px";
+ hints.style.left = (left - offsetLeft) + 'px'
+ hints.style.top = (top - offsetTop) + 'px'
// todo 隐藏codemirror自带的提示
hints.style.display = 'none'
// If we're at the edge of the screen, then we want the menu to appear on the left of the cursor.
- var winW = parentWindow.innerWidth || Math.max(ownerDocument.body.offsetWidth, ownerDocument.documentElement.offsetWidth);
- var winH = parentWindow.innerHeight || Math.max(ownerDocument.body.offsetHeight, ownerDocument.documentElement.offsetHeight);
- //在这里 添加的DOM 元素 -- 该方案 实现复杂算了吧
- container.appendChild(hints);
-// debugger
-// $(container).append(
-// `
-//
-//
hahah
-// ${ hints }
-//
-// `
-// )
- cm.getInputField().setAttribute("aria-autocomplete", "list")
- cm.getInputField().setAttribute("aria-owns", this.id)
- cm.getInputField().setAttribute("aria-activedescendant", this.id + "-" + this.selectedHint)
+ const winW = parentWindow.innerWidth || Math.max(ownerDocument.body.offsetWidth, ownerDocument.documentElement.offsetWidth)
+ const winH = parentWindow.innerHeight || Math.max(ownerDocument.body.offsetHeight, ownerDocument.documentElement.offsetHeight)
+ // 在这里 添加的DOM 元素 -- 该方案 实现复杂算了吧
+ container.appendChild(hints)
+ // debugger
+ // $(container).append(
+ // `
+ //
+ //
hahah
+ // ${ hints }
+ //
+ // `
+ // )
+ cm.getInputField().setAttribute('aria-autocomplete', 'list')
+ cm.getInputField().setAttribute('aria-owns', this.id)
+ cm.getInputField().setAttribute('aria-activedescendant', this.id + '-' + this.selectedHint)
- var box = completion.options.moveOnOverlap ? hints.getBoundingClientRect() : new DOMRect();
- var scrolls = completion.options.paddingForScrollbar ? hints.scrollHeight > hints.clientHeight + 1 : false;
+ let box = completion.options.moveOnOverlap ? hints.getBoundingClientRect() : new DOMRect()
+ const scrolls = completion.options.paddingForScrollbar ? hints.scrollHeight > hints.clientHeight + 1 : false
// Compute in the timeout to avoid reflow on init
- var startScroll;
+ let startScroll
setTimeout(function () {
- startScroll = cm.getScrollInfo();
- });
+ startScroll = cm.getScrollInfo()
+ })
- var overlapY = box.bottom - winH;
+ const overlapY = box.bottom - winH
if (overlapY > 0) {
- var height = box.bottom - box.top, curTop = pos.top - (pos.bottom - box.top);
+ const height = box.bottom - box.top; const curTop = pos.top - (pos.bottom - box.top)
if (curTop - height > 0) { // Fits above cursor
- hints.style.top = (top = pos.top - height - offsetTop) + "px";
- below = false;
+ hints.style.top = (top = pos.top - height - offsetTop) + 'px'
+ below = false
} else if (height > winH) {
- hints.style.height = (winH - 5) + "px";
- hints.style.top = (top = pos.bottom - box.top - offsetTop) + "px";
- var cursor = cm.getCursor();
+ hints.style.height = (winH - 5) + 'px'
+ hints.style.top = (top = pos.bottom - box.top - offsetTop) + 'px'
+ const cursor = cm.getCursor()
if (data.from.ch != cursor.ch) {
- pos = cm.cursorCoords(cursor);
- hints.style.left = (left = pos.left - offsetLeft) + "px";
- box = hints.getBoundingClientRect();
+ pos = cm.cursorCoords(cursor)
+ hints.style.left = (left = pos.left - offsetLeft) + 'px'
+ box = hints.getBoundingClientRect()
}
}
}
- var overlapX = box.right - winW;
- if (scrolls) overlapX += cm.display.nativeBarWidth;
+ let overlapX = box.right - winW
+ if (scrolls) overlapX += cm.display.nativeBarWidth
if (overlapX > 0) {
if (box.right - box.left > winW) {
- hints.style.width = (winW - 5) + "px";
- overlapX -= (box.right - box.left) - winW;
+ hints.style.width = (winW - 5) + 'px'
+ overlapX -= (box.right - box.left) - winW
}
- hints.style.left = (left = Math.max(pos.left - overlapX - offsetLeft, 0)) + "px";
+ hints.style.left = (left = Math.max(pos.left - overlapX - offsetLeft, 0)) + 'px'
+ }
+ if (scrolls) {
+ for (let node = hints.firstChild; node; node = node.nextSibling) { node.style.paddingRight = cm.display.nativeBarWidth + 'px' }
}
- if (scrolls) for (var node = hints.firstChild; node; node = node.nextSibling)
- node.style.paddingRight = cm.display.nativeBarWidth + "px"
// debugger
cm.addKeyMap(this.keyMap = buildKeyMap(completion, {
moveFocus: function (n, avoidWrap) {
- widget.changeActive(widget.selectedHint + n, avoidWrap);
+ widget.changeActive(widget.selectedHint + n, avoidWrap)
},
setFocus: function (n) {
- widget.changeActive(n);
+ widget.changeActive(n)
},
menuSize: function () {
- return widget.screenAmount();
+ return widget.screenAmount()
},
length: completions.length,
close: function () {
- completion.close();
+ completion.close()
},
pick: function () {
- widget.pick();
+ widget.pick()
},
data: data
- }));
+ }))
if (completion.options.closeOnUnfocus) {
- var closingOnBlur;
- cm.on("blur", this.onBlur = function () {
+ let closingOnBlur
+ cm.on('blur', this.onBlur = function () {
closingOnBlur = setTimeout(function () {
- completion.close();
- }, 100);
- });
- cm.on("focus", this.onFocus = function () {
- clearTimeout(closingOnBlur);
- });
+ completion.close()
+ }, 100)
+ })
+ cm.on('focus', this.onFocus = function () {
+ clearTimeout(closingOnBlur)
+ })
}
- cm.on("scroll", this.onScroll = function () {
- var curScroll = cm.getScrollInfo(), editor = cm.getWrapperElement().getBoundingClientRect();
- if (!startScroll) startScroll = cm.getScrollInfo();
- var newTop = top + startScroll.top - curScroll.top;
- var point = newTop - (parentWindow.pageYOffset || (ownerDocument.documentElement || ownerDocument.body).scrollTop);
- if (!below) point += hints.offsetHeight;
- if (point <= editor.top || point >= editor.bottom) return completion.close();
- hints.style.top = newTop + "px";
- hints.style.left = (left + startScroll.left - curScroll.left) + "px";
- });
+ cm.on('scroll', this.onScroll = function () {
+ const curScroll = cm.getScrollInfo(); const editor = cm.getWrapperElement().getBoundingClientRect()
+ if (!startScroll) startScroll = cm.getScrollInfo()
+ const newTop = top + startScroll.top - curScroll.top
+ let point = newTop - (parentWindow.pageYOffset || (ownerDocument.documentElement || ownerDocument.body).scrollTop)
+ if (!below) point += hints.offsetHeight
+ if (point <= editor.top || point >= editor.bottom) return completion.close()
+ hints.style.top = newTop + 'px'
+ hints.style.left = (left + startScroll.left - curScroll.left) + 'px'
+ })
- CodeMirror.on(hints, "dblclick", function (e) {
- var t = getHintElement(hints, e.target || e.srcElement);
+ CodeMirror.on(hints, 'dblclick', function (e) {
+ const t = getHintElement(hints, e.target || e.srcElement)
if (t && t.hintId != null) {
- widget.changeActive(t.hintId);
- widget.pick();
+ widget.changeActive(t.hintId)
+ widget.pick()
}
- });
+ })
- CodeMirror.on(hints, "click", function (e) {
- var t = getHintElement(hints, e.target || e.srcElement);
+ CodeMirror.on(hints, 'click', function (e) {
+ const t = getHintElement(hints, e.target || e.srcElement)
if (t && t.hintId != null) {
- widget.changeActive(t.hintId);
- if (completion.options.completeOnSingleClick) widget.pick();
+ widget.changeActive(t.hintId)
+ if (completion.options.completeOnSingleClick) widget.pick()
}
- });
+ })
- CodeMirror.on(hints, "mousedown", function () {
+ CodeMirror.on(hints, 'mousedown', function () {
setTimeout(function () {
- cm.focus();
- }, 20);
- });
+ cm.focus()
+ }, 20)
+ })
// The first hint doesn't need to be scrolled to on init
- var selectedHintRange = this.getSelectedHintRange();
+ const selectedHintRange = this.getSelectedHintRange()
if (selectedHintRange.from !== 0 || selectedHintRange.to !== 0) {
- this.scrollToActive();
+ this.scrollToActive()
}
- CodeMirror.signal(data, "select", completions[this.selectedHint], hints.childNodes[this.selectedHint]);
- return true;
+ CodeMirror.signal(data, 'select', completions[this.selectedHint], hints.childNodes[this.selectedHint])
+ return true
}
Widget.prototype = {
close: function () {
- if (this.completion.widget != this) return;
- this.completion.widget = null;
- if (this.hints.parentNode) this.hints.parentNode.removeChild(this.hints);
- this.completion.cm.removeKeyMap(this.keyMap);
- var input = this.completion.cm.getInputField()
- input.removeAttribute("aria-activedescendant")
- input.removeAttribute("aria-owns")
+ if (this.completion.widget != this) return
+ this.completion.widget = null
+ if (this.hints.parentNode) this.hints.parentNode.removeChild(this.hints)
+ this.completion.cm.removeKeyMap(this.keyMap)
+ const input = this.completion.cm.getInputField()
+ input.removeAttribute('aria-activedescendant')
+ input.removeAttribute('aria-owns')
- var cm = this.completion.cm;
+ const cm = this.completion.cm
if (this.completion.options.closeOnUnfocus) {
- cm.off("blur", this.onBlur);
- cm.off("focus", this.onFocus);
+ cm.off('blur', this.onBlur)
+ cm.off('focus', this.onFocus)
}
- cm.off("scroll", this.onScroll);
+ cm.off('scroll', this.onScroll)
},
disable: function () {
- this.completion.cm.removeKeyMap(this.keyMap);
- var widget = this;
+ this.completion.cm.removeKeyMap(this.keyMap)
+ const widget = this
this.keyMap = {
Enter: function () {
- widget.picked = true;
+ widget.picked = true
}
- };
- this.completion.cm.addKeyMap(this.keyMap);
+ }
+ this.completion.cm.addKeyMap(this.keyMap)
},
pick: function () {
- this.completion.pick(this.data, this.selectedHint);
+ this.completion.pick(this.data, this.selectedHint)
},
changeActive: function (i, avoidWrap) {
- if (i >= this.data.list.length)
- i = avoidWrap ? this.data.list.length - 1 : 0;
- else if (i < 0)
- i = avoidWrap ? 0 : this.data.list.length - 1;
- if (this.selectedHint == i) return;
- var node = this.hints.childNodes[this.selectedHint];
+ if (i >= this.data.list.length) { i = avoidWrap ? this.data.list.length - 1 : 0 } else if (i < 0) { i = avoidWrap ? 0 : this.data.list.length - 1 }
+ if (this.selectedHint == i) return
+ let node = this.hints.childNodes[this.selectedHint]
if (node) {
- node.className = node.className.replace(" " + ACTIVE_HINT_ELEMENT_CLASS, "");
- node.removeAttribute("aria-selected")
+ node.className = node.className.replace(' ' + ACTIVE_HINT_ELEMENT_CLASS, '')
+ node.removeAttribute('aria-selected')
}
- node = this.hints.childNodes[this.selectedHint = i];
- node.className += " " + ACTIVE_HINT_ELEMENT_CLASS;
- node.setAttribute("aria-selected", "true")
- this.completion.cm.getInputField().setAttribute("aria-activedescendant", node.id)
+ node = this.hints.childNodes[this.selectedHint = i]
+ node.className += ' ' + ACTIVE_HINT_ELEMENT_CLASS
+ node.setAttribute('aria-selected', 'true')
+ this.completion.cm.getInputField().setAttribute('aria-activedescendant', node.id)
this.scrollToActive()
- CodeMirror.signal(this.data, "select", this.data.list[this.selectedHint], node);
+ CodeMirror.signal(this.data, 'select', this.data.list[this.selectedHint], node)
},
scrollToActive: function () {
- var selectedHintRange = this.getSelectedHintRange();
- var node1 = this.hints.childNodes[selectedHintRange.from];
- var node2 = this.hints.childNodes[selectedHintRange.to];
- var firstNode = this.hints.firstChild;
- if (node1.offsetTop < this.hints.scrollTop)
- this.hints.scrollTop = node1.offsetTop - firstNode.offsetTop;
- else if (node2.offsetTop + node2.offsetHeight > this.hints.scrollTop + this.hints.clientHeight)
- this.hints.scrollTop = node2.offsetTop + node2.offsetHeight - this.hints.clientHeight + firstNode.offsetTop;
+ const selectedHintRange = this.getSelectedHintRange()
+ const node1 = this.hints.childNodes[selectedHintRange.from]
+ const node2 = this.hints.childNodes[selectedHintRange.to]
+ const firstNode = this.hints.firstChild
+ if (node1.offsetTop < this.hints.scrollTop) { this.hints.scrollTop = node1.offsetTop - firstNode.offsetTop } else if (node2.offsetTop + node2.offsetHeight > this.hints.scrollTop + this.hints.clientHeight) { this.hints.scrollTop = node2.offsetTop + node2.offsetHeight - this.hints.clientHeight + firstNode.offsetTop }
},
screenAmount: function () {
- return Math.floor(this.hints.clientHeight / this.hints.firstChild.offsetHeight) || 1;
+ return Math.floor(this.hints.clientHeight / this.hints.firstChild.offsetHeight) || 1
},
getSelectedHintRange: function () {
- var margin = this.completion.options.scrollMargin || 0;
+ const margin = this.completion.options.scrollMargin || 0
return {
from: Math.max(0, this.selectedHint - margin),
- to: Math.min(this.data.list.length - 1, this.selectedHint + margin),
- };
+ to: Math.min(this.data.list.length - 1, this.selectedHint + margin)
+ }
}
- };
+ }
- function applicableHelpers(cm, helpers) {
+ function applicableHelpers (cm, helpers) {
if (!cm.somethingSelected()) return helpers
- var result = []
- for (var i = 0; i < helpers.length; i++)
- if (helpers[i].supportsSelection) result.push(helpers[i])
+ const result = []
+ for (let i = 0; i < helpers.length; i++) { if (helpers[i].supportsSelection) result.push(helpers[i]) }
return result
}
- function fetchHints(hint, cm, options, callback) {
+ function fetchHints (hint, cm, options, callback) {
if (hint.async) {
hint(cm, callback, options)
} else {
- var result = hint(cm, options)
+ const result = hint(cm, options)
if (result && result.then) result.then(callback)
else callback(result)
}
}
- function resolveAutoHints(cm, pos) {
- var helpers = cm.getHelpers(pos, "hint"), words
+ function resolveAutoHints (cm, pos) {
+ const helpers = cm.getHelpers(pos, 'hint'); let words
if (helpers.length) {
- var resolved = function (cm, callback, options) {
- var app = applicableHelpers(cm, helpers);
+ const resolved = function (cm, callback, options) {
+ const app = applicableHelpers(cm, helpers)
- function run(i) {
+ function run (i) {
if (i == app.length) return callback(null)
fetchHints(app[i], cm, options, function (result) {
if (result && result.list.length > 0) callback(result)
@@ -532,9 +528,9 @@ export default function showHint(CodeMirror) {
resolved.async = true
resolved.supportsSelection = true
return resolved
- } else if (words = cm.getHelper(cm.getCursor(), "hintWords")) {
+ } else if (words = cm.getHelper(cm.getCursor(), 'hintWords')) {
return function (cm) {
- return CodeMirror.hint.fromList(cm, {words: words})
+ return CodeMirror.hint.fromList(cm, { words: words })
}
} else if (CodeMirror.hint.anyword) {
return function (cm, options) {
@@ -546,30 +542,29 @@ export default function showHint(CodeMirror) {
}
}
- CodeMirror.registerHelper("hint", "auto", {
+ CodeMirror.registerHelper('hint', 'auto', {
resolve: resolveAutoHints
- });
+ })
- CodeMirror.registerHelper("hint", "fromList", function (cm, options) {
- var cur = cm.getCursor(), token = cm.getTokenAt(cur)
- var term, from = CodeMirror.Pos(cur.line, token.start), to = cur
+ CodeMirror.registerHelper('hint', 'fromList', function (cm, options) {
+ const cur = cm.getCursor(); const token = cm.getTokenAt(cur)
+ let term; let from = CodeMirror.Pos(cur.line, token.start); const to = cur
if (token.start < cur.ch && /\w/.test(token.string.charAt(cur.ch - token.start - 1))) {
term = token.string.substr(0, cur.ch - token.start)
} else {
- term = ""
+ term = ''
from = cur
}
- var found = [];
- for (var i = 0; i < options.words.length; i++) {
- var word = options.words[i];
- if (word.slice(0, term.length) == term)
- found.push(word);
+ const found = []
+ for (let i = 0; i < options.words.length; i++) {
+ const word = options.words[i]
+ if (word.slice(0, term.length) == term) { found.push(word) }
}
- if (found.length) return {list: found, from: from, to: to};
- });
+ if (found.length) return { list: found, from: from, to: to }
+ })
- CodeMirror.commands.autocomplete = CodeMirror.showHint;
+ CodeMirror.commands.autocomplete = CodeMirror.showHint
var defaultOptions = {
hint: CodeMirror.hint.auto,
@@ -584,8 +579,8 @@ export default function showHint(CodeMirror) {
customKeys: null,
extraKeys: null,
paddingForScrollbar: true,
- moveOnOverlap: true,
- };
+ moveOnOverlap: true
+ }
- CodeMirror.defineOption("hintOptions", null);
+ CodeMirror.defineOption('hintOptions', null)
}
diff --git a/src/components/advancedSearch/showhint/TextSearch/sql-hint.js b/src/components/advancedSearch/showhint/TextSearch/sql-hint.js
index 8ac4f4d3..650ed975 100644
--- a/src/components/advancedSearch/showhint/TextSearch/sql-hint.js
+++ b/src/components/advancedSearch/showhint/TextSearch/sql-hint.js
@@ -1,343 +1,336 @@
-import {cloneDeep} from 'lodash'
-import {matchMain} from './matchRelatedInfo'
+import { cloneDeep } from 'lodash'
+import { matchMain } from './matchRelatedInfo'
export default function (CodeMirror,
- {
- dataset,
- hinthook, //生成提示的hook 拦截
- keywordshook //关键字hook 在关键字里面
- }
+ {
+ dataset,
+ hinthook, // 生成提示的hook 拦截
+ keywordshook // 关键字hook 在关键字里面
+ }
) {
// "use strict";
- var tables;
- var defaultTable;
- var keywords;
- var identifierQuote;
- var CONS = {
- QUERY_DIV: ";",
- ALIAS_KEYWORD: "AS"
- };
- var Pos = CodeMirror.Pos, cmpPos = CodeMirror.cmpPos;
+ let tables
+ let defaultTable
+ let keywords
+ let identifierQuote
+ const CONS = {
+ QUERY_DIV: ';',
+ ALIAS_KEYWORD: 'AS'
+ }
+ const Pos = CodeMirror.Pos; const cmpPos = CodeMirror.cmpPos
- function isArray(val) {
- return Object.prototype.toString.call(val) == "[object Array]"
+ function isArray (val) {
+ return Object.prototype.toString.call(val) == '[object Array]'
}
- function getKeywords(editor) {
- var mode = editor.doc.modeOption;
- if (mode === "sql") mode = "text/x-sql";
- keywords = CodeMirror.resolveMode(mode).keywords;
+ function getKeywords (editor) {
+ let mode = editor.doc.modeOption
+ if (mode === 'sql') mode = 'text/x-sql'
+ keywords = CodeMirror.resolveMode(mode).keywords
if (keywordshook) {
keywords = keywordshook(keywords, CodeMirror.resolveMode(mode)) || keywords
}
return keywords
}
- function getIdentifierQuote(editor) {
- var mode = editor.doc.modeOption;
- if (mode === "sql") mode = "text/x-sql";
- return CodeMirror.resolveMode(mode).identifierQuote || "`";
+ function getIdentifierQuote (editor) {
+ let mode = editor.doc.modeOption
+ if (mode === 'sql') mode = 'text/x-sql'
+ return CodeMirror.resolveMode(mode).identifierQuote || '`'
}
- function getText(item) {
- return typeof item == "string" ? item : item.text;
+ function getText (item) {
+ return typeof item == 'string' ? item : item.text
}
- function wrapTable(name, value) {
- if (isArray(value)) value = {columns: value}
+ function wrapTable (name, value) {
+ if (isArray(value)) value = { columns: value }
if (!value.text) value.text = name
return value
}
- function parseTables(input) {
- //table 名称变大写 统一变成对象格式 columns text
- var result = {}
+ function parseTables (input) {
+ // table 名称变大写 统一变成对象格式 columns text
+ const result = {}
if (isArray(input)) {
- for (var i = input.length - 1; i >= 0; i--) {
- var item = input[i]
+ for (let i = input.length - 1; i >= 0; i--) {
+ const item = input[i]
result[getText(item).toUpperCase()] = wrapTable(getText(item), item)
}
} else if (input) {
- for (var name in input)
- result[name.toUpperCase()] = wrapTable(name, input[name])
+ for (const name in input) { result[name.toUpperCase()] = wrapTable(name, input[name]) }
}
return result
}
- function getTable(name) {
+ function getTable (name) {
return tables[name.toUpperCase()]
}
- function shallowClone(object) {
- var result = {};
- for (var key in object) if (object.hasOwnProperty(key))
- result[key] = object[key];
- return result;
+ function shallowClone (object) {
+ const result = {}
+ for (const key in object) {
+ if (object.hasOwnProperty(key)) { result[key] = object[key] }
+ }
+ return result
}
- function match(string, word) {
- var len = string.length;
- var sub = getText(word).substr(0, len);
- return string.toUpperCase() === sub.toUpperCase();
+ function match (string, word) {
+ const len = string.length
+ const sub = getText(word).substr(0, len)
+ return string.toUpperCase() === sub.toUpperCase()
}
- function addMatches(result, search, wordlist, formatter) {
+ function addMatches (result, search, wordlist, formatter) {
if (isArray(wordlist)) {
- for (var i = 0; i < wordlist.length; i++)
- if (match(search, wordlist[i])) result.push(formatter(wordlist[i]))
+ for (let i = 0; i < wordlist.length; i++) { if (match(search, wordlist[i])) result.push(formatter(wordlist[i])) }
} else {
- for (var word in wordlist) if (wordlist.hasOwnProperty(word)) {
- var val = wordlist[word]
- if (!val || val === true)
- val = word
- else
- val = val.displayText ? {text: val.text, displayText: val.displayText} : val.text
- if (match(search, val)) result.push(formatter(val))
+ for (const word in wordlist) {
+ if (wordlist.hasOwnProperty(word)) {
+ let val = wordlist[word]
+ if (!val || val === true) { val = word } else { val = val.displayText ? { text: val.text, displayText: val.displayText } : val.text }
+ if (match(search, val)) result.push(formatter(val))
+ }
}
}
}
- function cleanName(name) {
+ function cleanName (name) {
// Get rid name from identifierQuote and preceding dot(.)
- if (name.charAt(0) == ".") {
- name = name.substr(1);
+ if (name.charAt(0) == '.') {
+ name = name.substr(1)
}
// replace duplicated identifierQuotes with single identifierQuotes
// and remove single identifierQuotes
- var nameParts = name.split(identifierQuote + identifierQuote);
- for (var i = 0; i < nameParts.length; i++)
- nameParts[i] = nameParts[i].replace(new RegExp(identifierQuote, "g"), "");
- return nameParts.join(identifierQuote);
+ const nameParts = name.split(identifierQuote + identifierQuote)
+ for (let i = 0; i < nameParts.length; i++) { nameParts[i] = nameParts[i].replace(new RegExp(identifierQuote, 'g'), '') }
+ return nameParts.join(identifierQuote)
}
- function insertIdentifierQuotes(name) {
- var nameParts = getText(name).split(".");
- for (var i = 0; i < nameParts.length; i++)
+ function insertIdentifierQuotes (name) {
+ const nameParts = getText(name).split('.')
+ for (let i = 0; i < nameParts.length; i++) {
nameParts[i] = identifierQuote +
// duplicate identifierQuotes
- nameParts[i].replace(new RegExp(identifierQuote, "g"), identifierQuote + identifierQuote) +
- identifierQuote;
- var escaped = nameParts.join(".");
- if (typeof name == "string") return escaped;
- name = shallowClone(name);
- name.text = escaped;
- return name;
+ nameParts[i].replace(new RegExp(identifierQuote, 'g'), identifierQuote + identifierQuote) +
+ identifierQuote
+ }
+ const escaped = nameParts.join('.')
+ if (typeof name == 'string') return escaped
+ name = shallowClone(name)
+ name.text = escaped
+ return name
}
- function getLeftpart(cur, token, result, editor) {
- var nameParts = [];
- var start = token.start;
- var cont = true;
+ function getLeftpart (cur, token, result, editor) {
+ const nameParts = []
+ let start = token.start
+ let cont = true
while (cont) {
- //全是空格 或者 是操作符 就接着往前找
- cont = ((token.type === 'operator' || token.string.match(/^[ ]*$/)) && start !== 0);
- start = token.start;
- nameParts.unshift(token.string);
- token = editor.getTokenAt(Pos(cur.line, token.start));
+ // 全是空格 或者 是操作符 就接着往前找
+ cont = ((token.type === 'operator' || token.string.match(/^[ ]*$/)) && start !== 0)
+ start = token.start
+ nameParts.unshift(token.string)
+ token = editor.getTokenAt(Pos(cur.line, token.start))
if (token.type === 'operator') {
- cont = true;
- token = editor.getTokenAt(Pos(cur.line, token.start));
+ cont = true
+ token = editor.getTokenAt(Pos(cur.line, token.start))
}
}
return nameParts[0]
}
- function isRightpart(cur, token, result, editor) {
- token = editor.getTokenAt(Pos(cur.line, token.start));
+ function isRightpart (cur, token, result, editor) {
+ token = editor.getTokenAt(Pos(cur.line, token.start))
return token.type === 'operator'
}
- function nameCompletion(cur, token, result, editor) {
+ function nameCompletion (cur, token, result, editor) {
// Try to complete table, column names and return start position of completion
- var useIdentifierQuotes = false;
- var nameParts = [];
- var start = token.start;
- var cont = true;
+ let useIdentifierQuotes = false
+ const nameParts = []
+ let start = token.start
+ let cont = true
while (cont) {
- cont = (token.string.charAt(0) == ".");
- useIdentifierQuotes = useIdentifierQuotes || (token.string.charAt(0) == identifierQuote);
+ cont = (token.string.charAt(0) == '.')
+ useIdentifierQuotes = useIdentifierQuotes || (token.string.charAt(0) == identifierQuote)
- start = token.start;
- nameParts.unshift(cleanName(token.string));
+ start = token.start
+ nameParts.unshift(cleanName(token.string))
- token = editor.getTokenAt(Pos(cur.line, token.start));
- if (token.string == ".") {
- cont = true;
- token = editor.getTokenAt(Pos(cur.line, token.start));
+ token = editor.getTokenAt(Pos(cur.line, token.start))
+ if (token.string == '.') {
+ cont = true
+ token = editor.getTokenAt(Pos(cur.line, token.start))
}
}
// Try to complete table names
- var string = nameParts.join(".");
+ let string = nameParts.join('.')
addMatches(result, string, tables, function (w) {
- return useIdentifierQuotes ? insertIdentifierQuotes(w) : w;
- });
+ return useIdentifierQuotes ? insertIdentifierQuotes(w) : w
+ })
// Try to complete columns from defaultTable
addMatches(result, string, defaultTable, function (w) {
- return useIdentifierQuotes ? insertIdentifierQuotes(w) : w;
- });
+ return useIdentifierQuotes ? insertIdentifierQuotes(w) : w
+ })
// Try to complete columns
- string = nameParts.pop();
- var table = nameParts.join(".");
+ string = nameParts.pop()
+ let table = nameParts.join('.')
- var alias = false;
- var aliasTable = table;
+ let alias = false
+ const aliasTable = table
// Check if table is available. If not, find table by Alias
if (!getTable(table)) {
- var oldTable = table;
- table = findTableByAlias(table, editor);
- if (table !== oldTable) alias = true;
+ const oldTable = table
+ table = findTableByAlias(table, editor)
+ if (table !== oldTable) alias = true
}
- var columns = getTable(table);
- if (columns && columns.columns)
- columns = columns.columns;
+ let columns = getTable(table)
+ if (columns && columns.columns) { columns = columns.columns }
if (columns) {
addMatches(result, string, columns, function (w) {
- var tableInsert = table;
- if (alias == true) tableInsert = aliasTable;
- if (typeof w == "string") {
- w = tableInsert + "." + w;
+ let tableInsert = table
+ if (alias == true) tableInsert = aliasTable
+ if (typeof w == 'string') {
+ w = tableInsert + '.' + w
} else {
- w = shallowClone(w);
- w.text = tableInsert + "." + w.text;
+ w = shallowClone(w)
+ w.text = tableInsert + '.' + w.text
}
- return useIdentifierQuotes ? insertIdentifierQuotes(w) : w;
- });
+ return useIdentifierQuotes ? insertIdentifierQuotes(w) : w
+ })
}
- return start;
+ return start
}
- function eachWord(lineText, f) {
- var words = lineText.split(/\s+/)
- for (var i = 0; i < words.length; i++)
- if (words[i]) f(words[i].replace(/[`,;]/g, ''))
+ function eachWord (lineText, f) {
+ const words = lineText.split(/\s+/)
+ for (let i = 0; i < words.length; i++) { if (words[i]) f(words[i].replace(/[`,;]/g, '')) }
}
- function findTableByAlias(alias, editor) {
- var doc = editor.doc;
- var fullQuery = doc.getValue();
- var aliasUpperCase = alias.toUpperCase();
- var previousWord = "";
- var table = "";
- var separator = [];
- var validRange = {
+ function findTableByAlias (alias, editor) {
+ const doc = editor.doc
+ const fullQuery = doc.getValue()
+ const aliasUpperCase = alias.toUpperCase()
+ let previousWord = ''
+ let table = ''
+ const separator = []
+ let validRange = {
start: Pos(0, 0),
end: Pos(editor.lastLine(), editor.getLineHandle(editor.lastLine()).length)
- };
-
- //add separator
- var indexOfSeparator = fullQuery.indexOf(CONS.QUERY_DIV);
- while (indexOfSeparator != -1) {
- separator.push(doc.posFromIndex(indexOfSeparator));
- indexOfSeparator = fullQuery.indexOf(CONS.QUERY_DIV, indexOfSeparator + 1);
}
- separator.unshift(Pos(0, 0));
- separator.push(Pos(editor.lastLine(), editor.getLineHandle(editor.lastLine()).text.length));
- //find valid range
- var prevItem = null;
- var current = editor.getCursor()
+ // add separator
+ let indexOfSeparator = fullQuery.indexOf(CONS.QUERY_DIV)
+ while (indexOfSeparator != -1) {
+ separator.push(doc.posFromIndex(indexOfSeparator))
+ indexOfSeparator = fullQuery.indexOf(CONS.QUERY_DIV, indexOfSeparator + 1)
+ }
+ separator.unshift(Pos(0, 0))
+ separator.push(Pos(editor.lastLine(), editor.getLineHandle(editor.lastLine()).text.length))
+
+ // find valid range
+ let prevItem = null
+ const current = editor.getCursor()
for (var i = 0; i < separator.length; i++) {
if ((prevItem == null || cmpPos(current, prevItem) > 0) && cmpPos(current, separator[i]) <= 0) {
- validRange = {start: prevItem, end: separator[i]};
- break;
+ validRange = { start: prevItem, end: separator[i] }
+ break
}
- prevItem = separator[i];
+ prevItem = separator[i]
}
if (validRange.start) {
- var query = doc.getRange(validRange.start, validRange.end, false);
+ const query = doc.getRange(validRange.start, validRange.end, false)
for (var i = 0; i < query.length; i++) {
- var lineText = query[i];
+ const lineText = query[i]
eachWord(lineText, function (word) {
- var wordUpperCase = word.toUpperCase();
- if (wordUpperCase === aliasUpperCase && getTable(previousWord))
- table = previousWord;
- if (wordUpperCase !== CONS.ALIAS_KEYWORD)
- previousWord = word;
- });
- if (table) break;
+ const wordUpperCase = word.toUpperCase()
+ if (wordUpperCase === aliasUpperCase && getTable(previousWord)) { table = previousWord }
+ if (wordUpperCase !== CONS.ALIAS_KEYWORD) { previousWord = word }
+ })
+ if (table) break
}
}
- return table;
+ return table
}
- CodeMirror.registerHelper("hint", "sql", function (editor, options) {
- tables = parseTables(options && options.tables);
- var defaultTableName = options && options.defaultTable; //默认table 名称
- var disableKeywords = options && options.disableKeywords; //禁用的keyword
- defaultTable = defaultTableName && getTable(defaultTableName);
- keywords = getKeywords(editor); //获取 定义defineMIME 时候的关键字参数
- identifierQuote = getIdentifierQuote(editor); //获取 引用标识符
+ CodeMirror.registerHelper('hint', 'sql', function (editor, options) {
+ tables = parseTables(options && options.tables)
+ const defaultTableName = options && options.defaultTable // 默认table 名称
+ const disableKeywords = options && options.disableKeywords // 禁用的keyword
+ defaultTable = defaultTableName && getTable(defaultTableName)
+ keywords = getKeywords(editor) // 获取 定义defineMIME 时候的关键字参数
+ identifierQuote = getIdentifierQuote(editor) // 获取 引用标识符
- if (defaultTableName && !defaultTable)
- defaultTable = findTableByAlias(defaultTableName, editor);
+ if (defaultTableName && !defaultTable) { defaultTable = findTableByAlias(defaultTableName, editor) }
- defaultTable = defaultTable || [];
+ defaultTable = defaultTable || []
- if (defaultTable.columns)
- defaultTable = defaultTable.columns;
+ if (defaultTable.columns) { defaultTable = defaultTable.columns }
- var cur = editor.getCursor(); //line 当前行 ch 索引 sticky ??
- var result = [];
- var token = editor.getTokenAt(cur), start, end, search;
+ const cur = editor.getCursor() // line 当前行 ch 索引 sticky ??
+ let result = []
+ const token = editor.getTokenAt(cur); let start; let end; let search
if (token.end > cur.ch) {
- token.end = cur.ch;
- token.string = token.string.slice(0, cur.ch - token.start);
+ token.end = cur.ch
+ token.string = token.string.slice(0, cur.ch - token.start)
}
- //start end search 赋值
+ // start end search 赋值
// todo 此处允许字符串包含 .
// if (token.string.match(/^[.`"'\w@][\w$#]*/g)) {
if (token.string.match(/^[.`"'\w@][\w#]*/g)) {
- search = token.string;
- start = token.start;
- end = token.end;
+ search = token.string
+ start = token.start
+ end = token.end
} else {
- start = end = cur.ch;
- search = "";
+ start = end = cur.ch
+ search = ''
}
- //对引用标识符 . 的使用,关联table 列
- if (search.charAt(0) == "." || search.charAt(0) == identifierQuote) {
- start = nameCompletion(cur, token, result, editor);
+ // 对引用标识符 . 的使用,关联table 列
+ if (search.charAt(0) == '.' || search.charAt(0) == identifierQuote) {
+ start = nameCompletion(cur, token, result, editor)
} else {
- var objectOrClass = function (w, className) {
- if (typeof w === "object") {
- w.className = className;
+ const objectOrClass = function (w, className) {
+ if (typeof w === 'object') {
+ w.className = className
} else {
- w = {text: w, className: className};
+ w = { text: w, className: className }
}
- return w;
- };
+ return w
+ }
addMatches(result, search, defaultTable, function (w) {
- return objectOrClass(w, "CodeMirror-hint-table CodeMirror-hint-default-table");
- });
+ return objectOrClass(w, 'CodeMirror-hint-table CodeMirror-hint-default-table')
+ })
addMatches(
result,
search,
tables, function (w) {
- return objectOrClass(w, "CodeMirror-hint-table");
+ return objectOrClass(w, 'CodeMirror-hint-table')
}
- );
- if (!disableKeywords)
+ )
+ if (!disableKeywords) {
addMatches(result, search, keywords, function (w) {
- return objectOrClass(w.toUpperCase(), "CodeMirror-hint-keyword");
- });
+ return objectOrClass(w.toUpperCase(), 'CodeMirror-hint-keyword')
+ })
+ }
}
- //写入一个 钩子,在这里决定提示的内容
+ // 写入一个 钩子,在这里决定提示的内容
if (hinthook) {
- var params = {
- search, //搜索 关键字
- keywords, //关键字列表
- };
+ const params = {
+ search, // 搜索 关键字
+ keywords // 关键字列表
+ }
if (token.type === 'operator') {
params.leftpart = getLeftpart(cur, token, result, editor) || ''
}
@@ -347,8 +340,8 @@ export default function (CodeMirror,
/* 之后的参数 是为manualHinthook 预备的 */
- var manualParams = {
- search, //搜索 关键字
+ const manualParams = {
+ search, // 搜索 关键字
// keywords, //关键字列表 没啥用
from: Pos(cur.line, start),
to: Pos(cur.line, end),
@@ -360,13 +353,13 @@ export default function (CodeMirror,
cur
}
- var refField = matchMain(CodeMirror, params, manualParams);
+ const refField = matchMain(CodeMirror, params, manualParams)
manualParams.refField = refField
- manualParams.leftpart = refField?.label || manualParams.leftpart;
- params.leftpart = refField?.label || params.leftpart;
+ manualParams.leftpart = refField?.label || manualParams.leftpart
+ params.leftpart = refField?.label || params.leftpart
result = hinthook(result, params, manualParams) || result
}
- return {list: result, from: Pos(cur.line, start), to: Pos(cur.line, end)};
- });
+ return { list: result, from: Pos(cur.line, start), to: Pos(cur.line, end) }
+ })
}
diff --git a/src/components/advancedSearch/showhint/TextSearch/sql.js b/src/components/advancedSearch/showhint/TextSearch/sql.js
index 4d188521..0bc6c088 100644
--- a/src/components/advancedSearch/showhint/TextSearch/sql.js
+++ b/src/components/advancedSearch/showhint/TextSearch/sql.js
@@ -1,480 +1,469 @@
-export default function (CodeMirror, {dataset, modehook}) {
+export default function (CodeMirror, { dataset, modehook }) {
// "use strict";
- CodeMirror.defineMode("sql", function (config, parserConfig) {
- var client = parserConfig.client || {},
- atoms = parserConfig.atoms || {"false": true, "true": true, "null": true},
- builtin = parserConfig.builtin || set(defaultBuiltin),
- keywords = parserConfig.keywords || set(sqlKeywords),
- operatorChars = parserConfig.operatorChars || /^[*+\-%<>!=&|~^\/]/,
- support = parserConfig.support || {},
- hooks = parserConfig.hooks || {},
- dateSQL = parserConfig.dateSQL || {"date": true, "time": true, "timestamp": true},
- backslashStringEscapes = parserConfig.backslashStringEscapes !== false,
- brackets = parserConfig.brackets || /^[\{}\(\)\[\]]/,
- punctuation = parserConfig.punctuation || /^[;.,:]/
+ CodeMirror.defineMode('sql', function (config, parserConfig) {
+ const client = parserConfig.client || {}
+ const atoms = parserConfig.atoms || { false: true, true: true, null: true }
+ const builtin = parserConfig.builtin || set(defaultBuiltin)
+ const keywords = parserConfig.keywords || set(sqlKeywords)
+ const operatorChars = parserConfig.operatorChars || /^[*+\-%<>!=&|~^\/]/
+ const support = parserConfig.support || {}
+ const hooks = parserConfig.hooks || {}
+ const dateSQL = parserConfig.dateSQL || { date: true, time: true, timestamp: true }
+ const backslashStringEscapes = parserConfig.backslashStringEscapes !== false
+ const brackets = parserConfig.brackets || /^[\{}\(\)\[\]]/
+ const punctuation = parserConfig.punctuation || /^[;.,:]/
- function tokenBase(stream, state) {
- var ch = stream.next();
+ function tokenBase (stream, state) {
+ const ch = stream.next()
// call hooks from the mime type
if (hooks[ch]) {
- var result = hooks[ch](stream, state);
- if (result !== false) return result;
+ const result = hooks[ch](stream, state)
+ if (result !== false) return result
}
if (support.hexNumber &&
- ((ch == "0" && stream.match(/^[xX][0-9a-fA-F]+/))
- || (ch == "x" || ch == "X") && stream.match(/^'[0-9a-fA-F]+'/))) {
+ ((ch == '0' && stream.match(/^[xX][0-9a-fA-F]+/)) ||
+ (ch == 'x' || ch == 'X') && stream.match(/^'[0-9a-fA-F]+'/))) {
// hex
// ref: http://dev.mysql.com/doc/refman/5.5/en/hexadecimal-literals.html
- return "number";
+ return 'number'
} else if (support.binaryNumber &&
- (((ch == "b" || ch == "B") && stream.match(/^'[01]+'/))
- || (ch == "0" && stream.match(/^b[01]+/)))) {
+ (((ch == 'b' || ch == 'B') && stream.match(/^'[01]+'/)) ||
+ (ch == '0' && stream.match(/^b[01]+/)))) {
// bitstring
// ref: http://dev.mysql.com/doc/refman/5.5/en/bit-field-literals.html
- return "number";
+ return 'number'
} else if (ch.charCodeAt(0) > 47 && ch.charCodeAt(0) < 58) {
// numbers
// ref: http://dev.mysql.com/doc/refman/5.5/en/number-literals.html
- stream.match(/^[0-9]*(\.[0-9]+)?([eE][-+]?[0-9]+)?/);
- support.decimallessFloat && stream.match(/^\.(?!\.)/);
- return "number";
- } else if (ch == "?" && (stream.eatSpace() || stream.eol() || stream.eat(";"))) {
+ stream.match(/^[0-9]*(\.[0-9]+)?([eE][-+]?[0-9]+)?/)
+ support.decimallessFloat && stream.match(/^\.(?!\.)/)
+ return 'number'
+ } else if (ch == '?' && (stream.eatSpace() || stream.eol() || stream.eat(';'))) {
// placeholders
- return "variable-3";
+ return 'variable-3'
} else if (ch == "'" || (ch == '"' && support.doubleQuote)) {
// strings
// ref: http://dev.mysql.com/doc/refman/5.5/en/string-literals.html
- state.tokenize = tokenLiteral(ch);
- return state.tokenize(stream, state);
- } else if ((((support.nCharCast && (ch == "n" || ch == "N"))
- || (support.charsetCast && ch == "_" && stream.match(/[a-z][a-z0-9]*/i)))
- && (stream.peek() == "'" || stream.peek() == '"'))) {
+ state.tokenize = tokenLiteral(ch)
+ return state.tokenize(stream, state)
+ } else if ((((support.nCharCast && (ch == 'n' || ch == 'N')) ||
+ (support.charsetCast && ch == '_' && stream.match(/[a-z][a-z0-9]*/i))) &&
+ (stream.peek() == "'" || stream.peek() == '"'))) {
// charset casting: _utf8'str', N'str', n'str'
// ref: http://dev.mysql.com/doc/refman/5.5/en/string-literals.html
- return "keyword";
- } else if (support.escapeConstant && (ch == "e" || ch == "E")
- && (stream.peek() == "'" || (stream.peek() == '"' && support.doubleQuote))) {
+ return 'keyword'
+ } else if (support.escapeConstant && (ch == 'e' || ch == 'E') &&
+ (stream.peek() == "'" || (stream.peek() == '"' && support.doubleQuote))) {
// escape constant: E'str', e'str'
// ref: https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-STRINGS-ESCAPE
state.tokenize = function (stream, state) {
- return (state.tokenize = tokenLiteral(stream.next(), true))(stream, state);
+ return (state.tokenize = tokenLiteral(stream.next(), true))(stream, state)
}
- return "keyword";
- } else if (support.commentSlashSlash && ch == "/" && stream.eat("/")) {
+ return 'keyword'
+ } else if (support.commentSlashSlash && ch == '/' && stream.eat('/')) {
// 1-line comment
- stream.skipToEnd();
- return "comment";
- } else if ((support.commentHash && ch == "#")
- || (ch == "-" && stream.eat("-") && (!support.commentSpaceRequired || stream.eat(" ")))) {
+ stream.skipToEnd()
+ return 'comment'
+ } else if ((support.commentHash && ch == '#') ||
+ (ch == '-' && stream.eat('-') && (!support.commentSpaceRequired || stream.eat(' ')))) {
// 1-line comments
// ref: https://kb.askmonty.org/en/comment-syntax/
- stream.skipToEnd();
- return "comment";
- } else if (ch == "/" && stream.eat("*")) {
+ stream.skipToEnd()
+ return 'comment'
+ } else if (ch == '/' && stream.eat('*')) {
// multi-line comments
// ref: https://kb.askmonty.org/en/comment-syntax/
- state.tokenize = tokenComment(1);
- return state.tokenize(stream, state);
- } else if (ch == ".") {
+ state.tokenize = tokenComment(1)
+ return state.tokenize(stream, state)
+ } else if (ch == '.') {
// .1 for 0.1
- if (support.zerolessFloat && stream.match(/^(?:\d+(?:e[+-]?\d+)?)/i))
- return "number";
- if (stream.match(/^\.+/))
- return null
+ if (support.zerolessFloat && stream.match(/^(?:\d+(?:e[+-]?\d+)?)/i)) { return 'number' }
+ if (stream.match(/^\.+/)) { return null }
// .table_name (ODBC)
// // ref: http://dev.mysql.com/doc/refman/5.6/en/identifier-qualifiers.html
- if (support.ODBCdotTable && stream.match(/^[\w\d_$#]+/))
- return "variable-2";
+ if (support.ODBCdotTable && stream.match(/^[\w\d_$#]+/)) { return 'variable-2' }
} else if (operatorChars.test(ch)) {
// operators
- stream.eatWhile(operatorChars);
- return "operator";
+ stream.eatWhile(operatorChars)
+ return 'operator'
} else if (brackets.test(ch)) {
// brackets
- return "bracket";
+ return 'bracket'
} else if (punctuation.test(ch)) {
// punctuation
- stream.eatWhile(punctuation);
- return "punctuation";
+ stream.eatWhile(punctuation)
+ return 'punctuation'
} else if (ch == '{' &&
(stream.match(/^( )*(d|D|t|T|ts|TS)( )*'[^']*'( )*}/) || stream.match(/^( )*(d|D|t|T|ts|TS)( )*"[^"]*"( )*}/))) {
// dates (weird ODBC syntax)
// ref: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-literals.html
- return "number";
+ return 'number'
} else {
// todo 修改此处,使得keyword由 a_a 格式变为 a.a
// stream.eatWhile(/^[_\w\d]/);
- stream.eatWhile(/^[.\w\d]/);
- var word = stream.current().toLowerCase();
+ stream.eatWhile(/^[.\w\d]/)
+ const word = stream.current().toLowerCase()
// dates (standard SQL syntax)
// ref: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-literals.html
- if (dateSQL.hasOwnProperty(word) && (stream.match(/^( )+'[^']*'/) || stream.match(/^( )+"[^"]*"/)))
- return "number";
- if (atoms.hasOwnProperty(word)) return "atom";
- if (builtin.hasOwnProperty(word)) return "builtin";
- if (keywords.hasOwnProperty(word)) return "keyword";
- if (client.hasOwnProperty(word)) return "string-2";
- return null;
+ if (dateSQL.hasOwnProperty(word) && (stream.match(/^( )+'[^']*'/) || stream.match(/^( )+"[^"]*"/))) { return 'number' }
+ if (atoms.hasOwnProperty(word)) return 'atom'
+ if (builtin.hasOwnProperty(word)) return 'builtin'
+ if (keywords.hasOwnProperty(word)) return 'keyword'
+ if (client.hasOwnProperty(word)) return 'string-2'
+ return null
}
}
// 'string', with char specified in quote escaped by '\'
- function tokenLiteral(quote, backslashEscapes) {
+ function tokenLiteral (quote, backslashEscapes) {
return function (stream, state) {
- var escaped = false, ch;
+ let escaped = false; let ch
while ((ch = stream.next()) != null) {
if (ch == quote && !escaped) {
- state.tokenize = tokenBase;
- break;
+ state.tokenize = tokenBase
+ break
}
- escaped = (backslashStringEscapes || backslashEscapes) && !escaped && ch == "\\";
+ escaped = (backslashStringEscapes || backslashEscapes) && !escaped && ch == '\\'
}
- return "string";
- };
- }
-
- function tokenComment(depth) {
- return function (stream, state) {
- var m = stream.match(/^.*?(\/\*|\*\/)/)
- if (!m) stream.skipToEnd()
- else if (m[1] == "/*") state.tokenize = tokenComment(depth + 1)
- else if (depth > 1) state.tokenize = tokenComment(depth - 1)
- else state.tokenize = tokenBase
- return "comment"
+ return 'string'
}
}
- function pushContext(stream, state, type) {
+ function tokenComment (depth) {
+ return function (stream, state) {
+ const m = stream.match(/^.*?(\/\*|\*\/)/)
+ if (!m) stream.skipToEnd()
+ else if (m[1] == '/*') state.tokenize = tokenComment(depth + 1)
+ else if (depth > 1) state.tokenize = tokenComment(depth - 1)
+ else state.tokenize = tokenBase
+ return 'comment'
+ }
+ }
+
+ function pushContext (stream, state, type) {
state.context = {
prev: state.context,
indent: stream.indentation(),
col: stream.column(),
type: type
- };
+ }
}
- function popContext(state) {
- state.indent = state.context.indent;
- state.context = state.context.prev;
+ function popContext (state) {
+ state.indent = state.context.indent
+ state.context = state.context.prev
}
return {
startState: function () {
- //tokenize 标记解析
+ // tokenize 标记解析
// Modes that use a state must define a startState method on their mode object.
// This is a function of no arguments that produces a state object to be used at the start of a document.
- return {tokenize: tokenBase, context: null};
+ return { tokenize: tokenBase, context: null }
},
- //依次遍历流
+ // 依次遍历流
token: function (stream, state) {
if (stream.sol()) {
- if (state.context && state.context.align == null)
- state.context.align = false;
+ if (state.context && state.context.align == null) { state.context.align = false }
}
- if (state.tokenize == tokenBase && stream.eatSpace()) return null;
+ if (state.tokenize == tokenBase && stream.eatSpace()) return null
- var style = state.tokenize(stream, state);
- if (style == "comment") return style;
+ const style = state.tokenize(stream, state)
+ if (style == 'comment') return style
- if (state.context && state.context.align == null)
- state.context.align = true;
+ if (state.context && state.context.align == null) { state.context.align = true }
- var tok = stream.current();
- if (tok == "(")
- pushContext(stream, state, ")");
- else if (tok == "[")
- pushContext(stream, state, "]");
- else if (state.context && state.context.type == tok)
- popContext(state);
- return style;
+ const tok = stream.current()
+ if (tok == '(') { pushContext(stream, state, ')') } else if (tok == '[') { pushContext(stream, state, ']') } else if (state.context && state.context.type == tok) { popContext(state) }
+ return style
},
- //智能缩进
+ // 智能缩进
indent: function (state, textAfter) {
- var cx = state.context;
- if (!cx) return CodeMirror.Pass;
- var closing = textAfter.charAt(0) == cx.type;
- if (cx.align) return cx.col + (closing ? 0 : 1);
- else return cx.indent + (closing ? 0 : config.indentUnit);
+ const cx = state.context
+ if (!cx) return CodeMirror.Pass
+ const closing = textAfter.charAt(0) == cx.type
+ if (cx.align) return cx.col + (closing ? 0 : 1)
+ else return cx.indent + (closing ? 0 : config.indentUnit)
},
- //支持注释
- blockCommentStart: "/*",
- blockCommentEnd: "*/",
- lineComment: support.commentSlashSlash ? "//" : support.commentHash ? "#" : "--",
+ // 支持注释
+ blockCommentStart: '/*',
+ blockCommentEnd: '*/',
+ lineComment: support.commentSlashSlash ? '//' : support.commentHash ? '#' : '--',
- //自动闭合括号
+ // 自动闭合括号
closeBrackets: "()[]{}''\"\"``"
- };
- });
+ }
+ })
// `identifier`
- function hookIdentifier(stream) {
+ function hookIdentifier (stream) {
// MySQL/MariaDB identifiers
// ref: http://dev.mysql.com/doc/refman/5.6/en/identifier-qualifiers.html
- var ch;
+ let ch
while ((ch = stream.next()) != null) {
- if (ch == "`" && !stream.eat("`")) return "variable-2";
+ if (ch == '`' && !stream.eat('`')) return 'variable-2'
}
- stream.backUp(stream.current().length - 1);
- return stream.eatWhile(/\w/) ? "variable-2" : null;
+ stream.backUp(stream.current().length - 1)
+ return stream.eatWhile(/\w/) ? 'variable-2' : null
}
// "identifier"
- function hookIdentifierDoublequote(stream) {
+ function hookIdentifierDoublequote (stream) {
// Standard SQL /SQLite identifiers
// ref: http://web.archive.org/web/20160813185132/http://savage.net.au/SQL/sql-99.bnf.html#delimited%20identifier
// ref: http://sqlite.org/lang_keywords.html
- var ch;
+ let ch
while ((ch = stream.next()) != null) {
- if (ch == "\"" && !stream.eat("\"")) return "variable-2";
+ if (ch == '"' && !stream.eat('"')) return 'variable-2'
}
- stream.backUp(stream.current().length - 1);
- return stream.eatWhile(/\w/) ? "variable-2" : null;
+ stream.backUp(stream.current().length - 1)
+ return stream.eatWhile(/\w/) ? 'variable-2' : null
}
// variable token
- function hookVar(stream) {
+ function hookVar (stream) {
// variables
// @@prefix.varName @varName
// varName can be quoted with ` or ' or "
// ref: http://dev.mysql.com/doc/refman/5.5/en/user-variables.html
- if (stream.eat("@")) {
- stream.match('session.');
- stream.match('local.');
- stream.match('global.');
+ if (stream.eat('@')) {
+ stream.match('session.')
+ stream.match('local.')
+ stream.match('global.')
}
if (stream.eat("'")) {
- stream.match(/^.*'/);
- return "variable-2";
+ stream.match(/^.*'/)
+ return 'variable-2'
} else if (stream.eat('"')) {
- stream.match(/^.*"/);
- return "variable-2";
- } else if (stream.eat("`")) {
- stream.match(/^.*`/);
- return "variable-2";
+ stream.match(/^.*"/)
+ return 'variable-2'
+ } else if (stream.eat('`')) {
+ stream.match(/^.*`/)
+ return 'variable-2'
} else if (stream.match(/^[0-9a-zA-Z$\.\_]+/)) {
- return "variable-2";
+ return 'variable-2'
}
- return null;
+ return null
};
// short client keyword token
- function hookClient(stream) {
+ function hookClient (stream) {
// \N means NULL
// ref: http://dev.mysql.com/doc/refman/5.5/en/null-values.html
- if (stream.eat("N")) {
- return "atom";
+ if (stream.eat('N')) {
+ return 'atom'
}
// \g, etc
// ref: http://dev.mysql.com/doc/refman/5.5/en/mysql-commands.html
- return stream.match(/^[a-zA-Z.#!?]/) ? "variable-2" : null;
+ return stream.match(/^[a-zA-Z.#!?]/) ? 'variable-2' : null
}
// these keywords are used by all SQL dialects (however, a mode can still overwrite it)
- var sqlKeywords = "alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit ";
+ var sqlKeywords = 'alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit '
// turn a space-separated list into an array
- function set(str) {
- var obj = {}, words = str.split(" ");
- for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
- return obj;
+ function set (str) {
+ const obj = {}; const words = str.split(' ')
+ for (let i = 0; i < words.length; ++i) obj[words[i]] = true
+ return obj
}
- var defaultBuiltin = "bool boolean bit blob enum long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision real date datetime year unsigned signed decimal numeric"
+ var defaultBuiltin = 'bool boolean bit blob enum long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision real date datetime year unsigned signed decimal numeric'
// A generic SQL Mode. It's not a standard, it just try to support what is generally supported
- CodeMirror.defineMIME("text/x-sql", {
- name: "sql",
- keywords: set(sqlKeywords + "begin"), //sql 关键字
- builtin: set(defaultBuiltin), //内置数据类型
- atoms: set("false true null unknown"), //基本数据类型
- dateSQL: set("date time timestamp"), //时间类型
- support: set("ODBCdotTable doubleQuote binaryNumber hexNumber") //支持的数据编码 ODBC double 二进制 16进制
- });
+ CodeMirror.defineMIME('text/x-sql', {
+ name: 'sql',
+ keywords: set(sqlKeywords + 'begin'), // sql 关键字
+ builtin: set(defaultBuiltin), // 内置数据类型
+ atoms: set('false true null unknown'), // 基本数据类型
+ dateSQL: set('date time timestamp'), // 时间类型
+ support: set('ODBCdotTable doubleQuote binaryNumber hexNumber') // 支持的数据编码 ODBC double 二进制 16进制
+ })
- CodeMirror.defineMIME("text/x-mssql", {
- name: "sql",
- client: set("$partition binary_checksum checksum connectionproperty context_info current_request_id error_line error_message error_number error_procedure error_severity error_state formatmessage get_filestream_transaction_context getansinull host_id host_name isnull isnumeric min_active_rowversion newid newsequentialid rowcount_big xact_state object_id"),
- keywords: set(sqlKeywords + "begin trigger proc view index for add constraint key primary foreign collate clustered nonclustered declare exec go if use index holdlock nolock nowait paglock readcommitted readcommittedlock readpast readuncommitted repeatableread rowlock serializable snapshot tablock tablockx updlock with"),
- builtin: set("bigint numeric bit smallint decimal smallmoney int tinyint money float real char varchar text nchar nvarchar ntext binary varbinary image cursor timestamp hierarchyid uniqueidentifier sql_variant xml table "),
- atoms: set("is not null like and or in left right between inner outer join all any some cross unpivot pivot exists"),
+ CodeMirror.defineMIME('text/x-mssql', {
+ name: 'sql',
+ client: set('$partition binary_checksum checksum connectionproperty context_info current_request_id error_line error_message error_number error_procedure error_severity error_state formatmessage get_filestream_transaction_context getansinull host_id host_name isnull isnumeric min_active_rowversion newid newsequentialid rowcount_big xact_state object_id'),
+ keywords: set(sqlKeywords + 'begin trigger proc view index for add constraint key primary foreign collate clustered nonclustered declare exec go if use index holdlock nolock nowait paglock readcommitted readcommittedlock readpast readuncommitted repeatableread rowlock serializable snapshot tablock tablockx updlock with'),
+ builtin: set('bigint numeric bit smallint decimal smallmoney int tinyint money float real char varchar text nchar nvarchar ntext binary varbinary image cursor timestamp hierarchyid uniqueidentifier sql_variant xml table '),
+ atoms: set('is not null like and or in left right between inner outer join all any some cross unpivot pivot exists'),
operatorChars: /^[*+\-%<>!=^\&|\/]/,
brackets: /^[\{}\(\)]/,
punctuation: /^[;.,:/]/,
backslashStringEscapes: false,
- dateSQL: set("date datetimeoffset datetime2 smalldatetime datetime time"),
+ dateSQL: set('date datetimeoffset datetime2 smalldatetime datetime time'),
hooks: {
- "@": hookVar
+ '@': hookVar
}
- });
+ })
- CodeMirror.defineMIME("text/x-mysql", {
- name: "sql",
- client: set("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),
- keywords: set(sqlKeywords + "accessible action add after algorithm all analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general get global grant grants group group_concat handler hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show signal slave slow smallint snapshot soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),
- builtin: set("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),
- atoms: set("false true null unknown"),
+ CodeMirror.defineMIME('text/x-mysql', {
+ name: 'sql',
+ client: set('charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee'),
+ keywords: set(sqlKeywords + 'accessible action add after algorithm all analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general get global grant grants group group_concat handler hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show signal slave slow smallint snapshot soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views warnings when while with work write xa xor year_month zerofill begin do then else loop repeat'),
+ builtin: set('bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric'),
+ atoms: set('false true null unknown'),
operatorChars: /^[*+\-%<>!=&|^]/,
- dateSQL: set("date time timestamp"),
- support: set("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),
+ dateSQL: set('date time timestamp'),
+ support: set('ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired'),
hooks: {
- "@": hookVar,
- "`": hookIdentifier,
- "\\": hookClient
+ '@': hookVar,
+ '`': hookIdentifier,
+ '\\': hookClient
}
- });
+ })
- CodeMirror.defineMIME("text/x-mariadb", {
- name: "sql",
- client: set("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),
- keywords: set(sqlKeywords + "accessible action add after algorithm all always analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general generated get global grant grants group groupby_concat handler hard hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password persistent phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show shutdown signal slave slow smallint snapshot soft soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views virtual warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),
- builtin: set("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),
- atoms: set("false true null unknown"),
+ CodeMirror.defineMIME('text/x-mariadb', {
+ name: 'sql',
+ client: set('charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee'),
+ keywords: set(sqlKeywords + 'accessible action add after algorithm all always analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general generated get global grant grants group groupby_concat handler hard hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password persistent phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show shutdown signal slave slow smallint snapshot soft soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views virtual warnings when while with work write xa xor year_month zerofill begin do then else loop repeat'),
+ builtin: set('bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric'),
+ atoms: set('false true null unknown'),
operatorChars: /^[*+\-%<>!=&|^]/,
- dateSQL: set("date time timestamp"),
- support: set("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),
+ dateSQL: set('date time timestamp'),
+ support: set('ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired'),
hooks: {
- "@": hookVar,
- "`": hookIdentifier,
- "\\": hookClient
+ '@': hookVar,
+ '`': hookIdentifier,
+ '\\': hookClient
}
- });
+ })
// provided by the phpLiteAdmin project - phpliteadmin.org
- CodeMirror.defineMIME("text/x-sqlite", {
- name: "sql",
+ CodeMirror.defineMIME('text/x-sqlite', {
+ name: 'sql',
// commands of the official SQLite client, ref: https://www.sqlite.org/cli.html#dotcmd
- client: set("auth backup bail binary changes check clone databases dbinfo dump echo eqp exit explain fullschema headers help import imposter indexes iotrace limit lint load log mode nullvalue once open output print prompt quit read restore save scanstats schema separator session shell show stats system tables testcase timeout timer trace vfsinfo vfslist vfsname width"),
+ client: set('auth backup bail binary changes check clone databases dbinfo dump echo eqp exit explain fullschema headers help import imposter indexes iotrace limit lint load log mode nullvalue once open output print prompt quit read restore save scanstats schema separator session shell show stats system tables testcase timeout timer trace vfsinfo vfslist vfsname width'),
// ref: http://sqlite.org/lang_keywords.html
- keywords: set(sqlKeywords + "abort action add after all analyze attach autoincrement before begin cascade case cast check collate column commit conflict constraint cross current_date current_time current_timestamp database default deferrable deferred detach each else end escape except exclusive exists explain fail for foreign full glob if ignore immediate index indexed initially inner instead intersect isnull key left limit match natural no notnull null of offset outer plan pragma primary query raise recursive references regexp reindex release rename replace restrict right rollback row savepoint temp temporary then to transaction trigger unique using vacuum view virtual when with without"),
+ keywords: set(sqlKeywords + 'abort action add after all analyze attach autoincrement before begin cascade case cast check collate column commit conflict constraint cross current_date current_time current_timestamp database default deferrable deferred detach each else end escape except exclusive exists explain fail for foreign full glob if ignore immediate index indexed initially inner instead intersect isnull key left limit match natural no notnull null of offset outer plan pragma primary query raise recursive references regexp reindex release rename replace restrict right rollback row savepoint temp temporary then to transaction trigger unique using vacuum view virtual when with without'),
// SQLite is weakly typed, ref: http://sqlite.org/datatype3.html. This is just a list of some common types.
- builtin: set("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text clob bigint int int2 int8 integer float double char varchar date datetime year unsigned signed numeric real"),
+ builtin: set('bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text clob bigint int int2 int8 integer float double char varchar date datetime year unsigned signed numeric real'),
// ref: http://sqlite.org/syntax/literal-value.html
- atoms: set("null current_date current_time current_timestamp"),
+ atoms: set('null current_date current_time current_timestamp'),
// ref: http://sqlite.org/lang_expr.html#binaryops
operatorChars: /^[*+\-%<>!=&|/~]/,
// SQLite is weakly typed, ref: http://sqlite.org/datatype3.html. This is just a list of some common types.
- dateSQL: set("date time timestamp datetime"),
- support: set("decimallessFloat zerolessFloat"),
- identifierQuote: "\"", //ref: http://sqlite.org/lang_keywords.html
+ dateSQL: set('date time timestamp datetime'),
+ support: set('decimallessFloat zerolessFloat'),
+ identifierQuote: '"', // ref: http://sqlite.org/lang_keywords.html
hooks: {
// bind-parameters ref:http://sqlite.org/lang_expr.html#varparam
- "@": hookVar,
- ":": hookVar,
- "?": hookVar,
- "$": hookVar,
+ '@': hookVar,
+ ':': hookVar,
+ '?': hookVar,
+ $: hookVar,
// The preferred way to escape Identifiers is using double quotes, ref: http://sqlite.org/lang_keywords.html
- "\"": hookIdentifierDoublequote,
+ '"': hookIdentifierDoublequote,
// there is also support for backticks, ref: http://sqlite.org/lang_keywords.html
- "`": hookIdentifier
+ '`': hookIdentifier
}
- });
+ })
// the query language used by Apache Cassandra is called CQL, but this mime type
// is called Cassandra to avoid confusion with Contextual Query Language
- CodeMirror.defineMIME("text/x-cassandra", {
- name: "sql",
+ CodeMirror.defineMIME('text/x-cassandra', {
+ name: 'sql',
client: {},
- keywords: set("add all allow alter and any apply as asc authorize batch begin by clustering columnfamily compact consistency count create custom delete desc distinct drop each_quorum exists filtering from grant if in index insert into key keyspace keyspaces level limit local_one local_quorum modify nan norecursive nosuperuser not of on one order password permission permissions primary quorum rename revoke schema select set storage superuser table three to token truncate ttl two type unlogged update use user users using values where with writetime"),
- builtin: set("ascii bigint blob boolean counter decimal double float frozen inet int list map static text timestamp timeuuid tuple uuid varchar varint"),
- atoms: set("false true infinity NaN"),
+ keywords: set('add all allow alter and any apply as asc authorize batch begin by clustering columnfamily compact consistency count create custom delete desc distinct drop each_quorum exists filtering from grant if in index insert into key keyspace keyspaces level limit local_one local_quorum modify nan norecursive nosuperuser not of on one order password permission permissions primary quorum rename revoke schema select set storage superuser table three to token truncate ttl two type unlogged update use user users using values where with writetime'),
+ builtin: set('ascii bigint blob boolean counter decimal double float frozen inet int list map static text timestamp timeuuid tuple uuid varchar varint'),
+ atoms: set('false true infinity NaN'),
operatorChars: /^[<>=]/,
dateSQL: {},
- support: set("commentSlashSlash decimallessFloat"),
+ support: set('commentSlashSlash decimallessFloat'),
hooks: {}
- });
+ })
// this is based on Peter Raganitsch's 'plsql' mode
- CodeMirror.defineMIME("text/x-plsql", {
- name: "sql",
- client: set("appinfo arraysize autocommit autoprint autorecovery autotrace blockterminator break btitle cmdsep colsep compatibility compute concat copycommit copytypecheck define describe echo editfile embedded escape exec execute feedback flagger flush heading headsep instance linesize lno loboffset logsource long longchunksize markup native newpage numformat numwidth pagesize pause pno recsep recsepchar release repfooter repheader serveroutput shiftinout show showmode size spool sqlblanklines sqlcase sqlcode sqlcontinue sqlnumber sqlpluscompatibility sqlprefix sqlprompt sqlterminator suffix tab term termout time timing trimout trimspool ttitle underline verify version wrap"),
- keywords: set("abort accept access add all alter and any array arraylen as asc assert assign at attributes audit authorization avg base_table begin between binary_integer body boolean by case cast char char_base check close cluster clusters colauth column comment commit compress connect connected constant constraint crash create current currval cursor data_base database date dba deallocate debugoff debugon decimal declare default definition delay delete desc digits dispose distinct do drop else elseif elsif enable end entry escape exception exception_init exchange exclusive exists exit external fast fetch file for force form from function generic goto grant group having identified if immediate in increment index indexes indicator initial initrans insert interface intersect into is key level library like limited local lock log logging long loop master maxextents maxtrans member minextents minus mislabel mode modify multiset new next no noaudit nocompress nologging noparallel not nowait number_base object of off offline on online only open option or order out package parallel partition pctfree pctincrease pctused pls_integer positive positiven pragma primary prior private privileges procedure public raise range raw read rebuild record ref references refresh release rename replace resource restrict return returning returns reverse revoke rollback row rowid rowlabel rownum rows run savepoint schema segment select separate session set share snapshot some space split sql start statement storage subtype successful synonym tabauth table tables tablespace task terminate then to trigger truncate type union unique unlimited unrecoverable unusable update use using validate value values variable view views when whenever where while with work"),
- builtin: set("abs acos add_months ascii asin atan atan2 average bfile bfilename bigserial bit blob ceil character chartorowid chr clob concat convert cos cosh count dec decode deref dual dump dup_val_on_index empty error exp false float floor found glb greatest hextoraw initcap instr instrb int integer isopen last_day least length lengthb ln lower lpad ltrim lub make_ref max min mlslabel mod months_between natural naturaln nchar nclob new_time next_day nextval nls_charset_decl_len nls_charset_id nls_charset_name nls_initcap nls_lower nls_sort nls_upper nlssort no_data_found notfound null number numeric nvarchar2 nvl others power rawtohex real reftohex round rowcount rowidtochar rowtype rpad rtrim serial sign signtype sin sinh smallint soundex sqlcode sqlerrm sqrt stddev string substr substrb sum sysdate tan tanh to_char text to_date to_label to_multi_byte to_number to_single_byte translate true trunc uid unlogged upper user userenv varchar varchar2 variance varying vsize xml"),
+ CodeMirror.defineMIME('text/x-plsql', {
+ name: 'sql',
+ client: set('appinfo arraysize autocommit autoprint autorecovery autotrace blockterminator break btitle cmdsep colsep compatibility compute concat copycommit copytypecheck define describe echo editfile embedded escape exec execute feedback flagger flush heading headsep instance linesize lno loboffset logsource long longchunksize markup native newpage numformat numwidth pagesize pause pno recsep recsepchar release repfooter repheader serveroutput shiftinout show showmode size spool sqlblanklines sqlcase sqlcode sqlcontinue sqlnumber sqlpluscompatibility sqlprefix sqlprompt sqlterminator suffix tab term termout time timing trimout trimspool ttitle underline verify version wrap'),
+ keywords: set('abort accept access add all alter and any array arraylen as asc assert assign at attributes audit authorization avg base_table begin between binary_integer body boolean by case cast char char_base check close cluster clusters colauth column comment commit compress connect connected constant constraint crash create current currval cursor data_base database date dba deallocate debugoff debugon decimal declare default definition delay delete desc digits dispose distinct do drop else elseif elsif enable end entry escape exception exception_init exchange exclusive exists exit external fast fetch file for force form from function generic goto grant group having identified if immediate in increment index indexes indicator initial initrans insert interface intersect into is key level library like limited local lock log logging long loop master maxextents maxtrans member minextents minus mislabel mode modify multiset new next no noaudit nocompress nologging noparallel not nowait number_base object of off offline on online only open option or order out package parallel partition pctfree pctincrease pctused pls_integer positive positiven pragma primary prior private privileges procedure public raise range raw read rebuild record ref references refresh release rename replace resource restrict return returning returns reverse revoke rollback row rowid rowlabel rownum rows run savepoint schema segment select separate session set share snapshot some space split sql start statement storage subtype successful synonym tabauth table tables tablespace task terminate then to trigger truncate type union unique unlimited unrecoverable unusable update use using validate value values variable view views when whenever where while with work'),
+ builtin: set('abs acos add_months ascii asin atan atan2 average bfile bfilename bigserial bit blob ceil character chartorowid chr clob concat convert cos cosh count dec decode deref dual dump dup_val_on_index empty error exp false float floor found glb greatest hextoraw initcap instr instrb int integer isopen last_day least length lengthb ln lower lpad ltrim lub make_ref max min mlslabel mod months_between natural naturaln nchar nclob new_time next_day nextval nls_charset_decl_len nls_charset_id nls_charset_name nls_initcap nls_lower nls_sort nls_upper nlssort no_data_found notfound null number numeric nvarchar2 nvl others power rawtohex real reftohex round rowcount rowidtochar rowtype rpad rtrim serial sign signtype sin sinh smallint soundex sqlcode sqlerrm sqrt stddev string substr substrb sum sysdate tan tanh to_char text to_date to_label to_multi_byte to_number to_single_byte translate true trunc uid unlogged upper user userenv varchar varchar2 variance varying vsize xml'),
operatorChars: /^[*\/+\-%<>!=~]/,
- dateSQL: set("date time timestamp"),
- support: set("doubleQuote nCharCast zerolessFloat binaryNumber hexNumber")
- });
+ dateSQL: set('date time timestamp'),
+ support: set('doubleQuote nCharCast zerolessFloat binaryNumber hexNumber')
+ })
// Created to support specific hive keywords
- CodeMirror.defineMIME("text/x-hive", {
- name: "sql",
- keywords: set("select alter $elem$ $key$ $value$ add after all analyze and archive as asc before between binary both bucket buckets by cascade case cast change cluster clustered clusterstatus collection column columns comment compute concatenate continue create cross cursor data database databases dbproperties deferred delete delimited desc describe directory disable distinct distribute drop else enable end escaped exclusive exists explain export extended external fetch fields fileformat first format formatted from full function functions grant group having hold_ddltime idxproperties if import in index indexes inpath inputdriver inputformat insert intersect into is items join keys lateral left like limit lines load local location lock locks mapjoin materialized minus msck no_drop nocompress not of offline on option or order out outer outputdriver outputformat overwrite partition partitioned partitions percent plus preserve procedure purge range rcfile read readonly reads rebuild recordreader recordwriter recover reduce regexp rename repair replace restrict revoke right rlike row schema schemas semi sequencefile serde serdeproperties set shared show show_database sort sorted ssl statistics stored streamtable table tables tablesample tblproperties temporary terminated textfile then tmp to touch transform trigger unarchive undo union uniquejoin unlock update use using utc utc_tmestamp view when where while with admin authorization char compact compactions conf cube current current_date current_timestamp day decimal defined dependency directories elem_type exchange file following for grouping hour ignore inner interval jar less logical macro minute month more none noscan over owner partialscan preceding pretty principals protection reload rewrite role roles rollup rows second server sets skewed transactions truncate unbounded unset uri user values window year"),
- builtin: set("bool boolean long timestamp tinyint smallint bigint int float double date datetime unsigned string array struct map uniontype key_type utctimestamp value_type varchar"),
- atoms: set("false true null unknown"),
+ CodeMirror.defineMIME('text/x-hive', {
+ name: 'sql',
+ keywords: set('select alter $elem$ $key$ $value$ add after all analyze and archive as asc before between binary both bucket buckets by cascade case cast change cluster clustered clusterstatus collection column columns comment compute concatenate continue create cross cursor data database databases dbproperties deferred delete delimited desc describe directory disable distinct distribute drop else enable end escaped exclusive exists explain export extended external fetch fields fileformat first format formatted from full function functions grant group having hold_ddltime idxproperties if import in index indexes inpath inputdriver inputformat insert intersect into is items join keys lateral left like limit lines load local location lock locks mapjoin materialized minus msck no_drop nocompress not of offline on option or order out outer outputdriver outputformat overwrite partition partitioned partitions percent plus preserve procedure purge range rcfile read readonly reads rebuild recordreader recordwriter recover reduce regexp rename repair replace restrict revoke right rlike row schema schemas semi sequencefile serde serdeproperties set shared show show_database sort sorted ssl statistics stored streamtable table tables tablesample tblproperties temporary terminated textfile then tmp to touch transform trigger unarchive undo union uniquejoin unlock update use using utc utc_tmestamp view when where while with admin authorization char compact compactions conf cube current current_date current_timestamp day decimal defined dependency directories elem_type exchange file following for grouping hour ignore inner interval jar less logical macro minute month more none noscan over owner partialscan preceding pretty principals protection reload rewrite role roles rollup rows second server sets skewed transactions truncate unbounded unset uri user values window year'),
+ builtin: set('bool boolean long timestamp tinyint smallint bigint int float double date datetime unsigned string array struct map uniontype key_type utctimestamp value_type varchar'),
+ atoms: set('false true null unknown'),
operatorChars: /^[*+\-%<>!=]/,
- dateSQL: set("date timestamp"),
- support: set("ODBCdotTable doubleQuote binaryNumber hexNumber")
- });
+ dateSQL: set('date timestamp'),
+ support: set('ODBCdotTable doubleQuote binaryNumber hexNumber')
+ })
- CodeMirror.defineMIME("text/x-pgsql", {
- name: "sql",
- client: set("source"),
+ CodeMirror.defineMIME('text/x-pgsql', {
+ name: 'sql',
+ client: set('source'),
// For PostgreSQL - https://www.postgresql.org/docs/11/sql-keywords-appendix.html
// For pl/pgsql lang - https://github.com/postgres/postgres/blob/REL_11_2/src/pl/plpgsql/src/pl_scanner.c
- keywords: set(sqlKeywords + "a abort abs absent absolute access according action ada add admin after aggregate alias all allocate also alter always analyse analyze and any are array array_agg array_max_cardinality as asc asensitive assert assertion assignment asymmetric at atomic attach attribute attributes authorization avg backward base64 before begin begin_frame begin_partition bernoulli between bigint binary bit bit_length blob blocked bom boolean both breadth by c cache call called cardinality cascade cascaded case cast catalog catalog_name ceil ceiling chain char char_length character character_length character_set_catalog character_set_name character_set_schema characteristics characters check checkpoint class class_origin clob close cluster coalesce cobol collate collation collation_catalog collation_name collation_schema collect column column_name columns command_function command_function_code comment comments commit committed concurrently condition condition_number configuration conflict connect connection connection_name constant constraint constraint_catalog constraint_name constraint_schema constraints constructor contains content continue control conversion convert copy corr corresponding cost count covar_pop covar_samp create cross csv cube cume_dist current current_catalog current_date current_default_transform_group current_path current_role current_row current_schema current_time current_timestamp current_transform_group_for_type current_user cursor cursor_name cycle data database datalink datatype date datetime_interval_code datetime_interval_precision day db deallocate debug dec decimal declare default defaults deferrable deferred defined definer degree delete delimiter delimiters dense_rank depends depth deref derived desc describe descriptor detach detail deterministic diagnostics dictionary disable discard disconnect dispatch distinct dlnewcopy dlpreviouscopy dlurlcomplete dlurlcompleteonly dlurlcompletewrite dlurlpath dlurlpathonly dlurlpathwrite dlurlscheme dlurlserver dlvalue do document domain double drop dump dynamic dynamic_function dynamic_function_code each element else elseif elsif empty enable encoding encrypted end end_frame end_partition endexec enforced enum equals errcode error escape event every except exception exclude excluding exclusive exec execute exists exit exp explain expression extension external extract false family fetch file filter final first first_value flag float floor following for force foreach foreign fortran forward found frame_row free freeze from fs full function functions fusion g general generated get global go goto grant granted greatest group grouping groups handler having header hex hierarchy hint hold hour id identity if ignore ilike immediate immediately immutable implementation implicit import in include including increment indent index indexes indicator info inherit inherits initially inline inner inout input insensitive insert instance instantiable instead int integer integrity intersect intersection interval into invoker is isnull isolation join k key key_member key_type label lag language large last last_value lateral lead leading leakproof least left length level library like like_regex limit link listen ln load local localtime localtimestamp location locator lock locked log logged loop lower m map mapping match matched materialized max max_cardinality maxvalue member merge message message_length message_octet_length message_text method min minute minvalue mod mode modifies module month more move multiset mumps name names namespace national natural nchar nclob nesting new next nfc nfd nfkc nfkd nil no none normalize normalized not nothing notice notify notnull nowait nth_value ntile null nullable nullif nulls number numeric object occurrences_regex octet_length octets of off offset oids old on only open operator option options or order ordering ordinality others out outer output over overlaps overlay overriding owned owner p pad parallel parameter parameter_mode parameter_name parameter_ordinal_position parameter_specific_catalog parameter_specific_name parameter_specific_schema parser partial partition pascal passing passthrough password path percent percent_rank percentile_cont percentile_disc perform period permission pg_context pg_datatype_name pg_exception_context pg_exception_detail pg_exception_hint placing plans pli policy portion position position_regex power precedes preceding precision prepare prepared preserve primary print_strict_params prior privileges procedural procedure procedures program public publication query quote raise range rank read reads real reassign recheck recovery recursive ref references referencing refresh regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy regr_syy reindex relative release rename repeatable replace replica requiring reset respect restart restore restrict result result_oid return returned_cardinality returned_length returned_octet_length returned_sqlstate returning returns reverse revoke right role rollback rollup routine routine_catalog routine_name routine_schema routines row row_count row_number rows rowtype rule savepoint scale schema schema_name schemas scope scope_catalog scope_name scope_schema scroll search second section security select selective self sensitive sequence sequences serializable server server_name session session_user set setof sets share show similar simple size skip slice smallint snapshot some source space specific specific_name specifictype sql sqlcode sqlerror sqlexception sqlstate sqlwarning sqrt stable stacked standalone start state statement static statistics stddev_pop stddev_samp stdin stdout storage strict strip structure style subclass_origin submultiset subscription substring substring_regex succeeds sum symmetric sysid system system_time system_user t table table_name tables tablesample tablespace temp template temporary text then ties time timestamp timezone_hour timezone_minute to token top_level_count trailing transaction transaction_active transactions_committed transactions_rolled_back transform transforms translate translate_regex translation treat trigger trigger_catalog trigger_name trigger_schema trim trim_array true truncate trusted type types uescape unbounded uncommitted under unencrypted union unique unknown unlink unlisten unlogged unnamed unnest until untyped update upper uri usage use_column use_variable user user_defined_type_catalog user_defined_type_code user_defined_type_name user_defined_type_schema using vacuum valid validate validator value value_of values var_pop var_samp varbinary varchar variable_conflict variadic varying verbose version versioning view views volatile warning when whenever where while whitespace width_bucket window with within without work wrapper write xml xmlagg xmlattributes xmlbinary xmlcast xmlcomment xmlconcat xmldeclaration xmldocument xmlelement xmlexists xmlforest xmliterate xmlnamespaces xmlparse xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltext xmlvalidate year yes zone"),
+ keywords: set(sqlKeywords + 'a abort abs absent absolute access according action ada add admin after aggregate alias all allocate also alter always analyse analyze and any are array array_agg array_max_cardinality as asc asensitive assert assertion assignment asymmetric at atomic attach attribute attributes authorization avg backward base64 before begin begin_frame begin_partition bernoulli between bigint binary bit bit_length blob blocked bom boolean both breadth by c cache call called cardinality cascade cascaded case cast catalog catalog_name ceil ceiling chain char char_length character character_length character_set_catalog character_set_name character_set_schema characteristics characters check checkpoint class class_origin clob close cluster coalesce cobol collate collation collation_catalog collation_name collation_schema collect column column_name columns command_function command_function_code comment comments commit committed concurrently condition condition_number configuration conflict connect connection connection_name constant constraint constraint_catalog constraint_name constraint_schema constraints constructor contains content continue control conversion convert copy corr corresponding cost count covar_pop covar_samp create cross csv cube cume_dist current current_catalog current_date current_default_transform_group current_path current_role current_row current_schema current_time current_timestamp current_transform_group_for_type current_user cursor cursor_name cycle data database datalink datatype date datetime_interval_code datetime_interval_precision day db deallocate debug dec decimal declare default defaults deferrable deferred defined definer degree delete delimiter delimiters dense_rank depends depth deref derived desc describe descriptor detach detail deterministic diagnostics dictionary disable discard disconnect dispatch distinct dlnewcopy dlpreviouscopy dlurlcomplete dlurlcompleteonly dlurlcompletewrite dlurlpath dlurlpathonly dlurlpathwrite dlurlscheme dlurlserver dlvalue do document domain double drop dump dynamic dynamic_function dynamic_function_code each element else elseif elsif empty enable encoding encrypted end end_frame end_partition endexec enforced enum equals errcode error escape event every except exception exclude excluding exclusive exec execute exists exit exp explain expression extension external extract false family fetch file filter final first first_value flag float floor following for force foreach foreign fortran forward found frame_row free freeze from fs full function functions fusion g general generated get global go goto grant granted greatest group grouping groups handler having header hex hierarchy hint hold hour id identity if ignore ilike immediate immediately immutable implementation implicit import in include including increment indent index indexes indicator info inherit inherits initially inline inner inout input insensitive insert instance instantiable instead int integer integrity intersect intersection interval into invoker is isnull isolation join k key key_member key_type label lag language large last last_value lateral lead leading leakproof least left length level library like like_regex limit link listen ln load local localtime localtimestamp location locator lock locked log logged loop lower m map mapping match matched materialized max max_cardinality maxvalue member merge message message_length message_octet_length message_text method min minute minvalue mod mode modifies module month more move multiset mumps name names namespace national natural nchar nclob nesting new next nfc nfd nfkc nfkd nil no none normalize normalized not nothing notice notify notnull nowait nth_value ntile null nullable nullif nulls number numeric object occurrences_regex octet_length octets of off offset oids old on only open operator option options or order ordering ordinality others out outer output over overlaps overlay overriding owned owner p pad parallel parameter parameter_mode parameter_name parameter_ordinal_position parameter_specific_catalog parameter_specific_name parameter_specific_schema parser partial partition pascal passing passthrough password path percent percent_rank percentile_cont percentile_disc perform period permission pg_context pg_datatype_name pg_exception_context pg_exception_detail pg_exception_hint placing plans pli policy portion position position_regex power precedes preceding precision prepare prepared preserve primary print_strict_params prior privileges procedural procedure procedures program public publication query quote raise range rank read reads real reassign recheck recovery recursive ref references referencing refresh regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy regr_syy reindex relative release rename repeatable replace replica requiring reset respect restart restore restrict result result_oid return returned_cardinality returned_length returned_octet_length returned_sqlstate returning returns reverse revoke right role rollback rollup routine routine_catalog routine_name routine_schema routines row row_count row_number rows rowtype rule savepoint scale schema schema_name schemas scope scope_catalog scope_name scope_schema scroll search second section security select selective self sensitive sequence sequences serializable server server_name session session_user set setof sets share show similar simple size skip slice smallint snapshot some source space specific specific_name specifictype sql sqlcode sqlerror sqlexception sqlstate sqlwarning sqrt stable stacked standalone start state statement static statistics stddev_pop stddev_samp stdin stdout storage strict strip structure style subclass_origin submultiset subscription substring substring_regex succeeds sum symmetric sysid system system_time system_user t table table_name tables tablesample tablespace temp template temporary text then ties time timestamp timezone_hour timezone_minute to token top_level_count trailing transaction transaction_active transactions_committed transactions_rolled_back transform transforms translate translate_regex translation treat trigger trigger_catalog trigger_name trigger_schema trim trim_array true truncate trusted type types uescape unbounded uncommitted under unencrypted union unique unknown unlink unlisten unlogged unnamed unnest until untyped update upper uri usage use_column use_variable user user_defined_type_catalog user_defined_type_code user_defined_type_name user_defined_type_schema using vacuum valid validate validator value value_of values var_pop var_samp varbinary varchar variable_conflict variadic varying verbose version versioning view views volatile warning when whenever where while whitespace width_bucket window with within without work wrapper write xml xmlagg xmlattributes xmlbinary xmlcast xmlcomment xmlconcat xmldeclaration xmldocument xmlelement xmlexists xmlforest xmliterate xmlnamespaces xmlparse xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltext xmlvalidate year yes zone'),
// https://www.postgresql.org/docs/11/datatype.html
- builtin: set("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time without zone with timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),
- atoms: set("false true null unknown"),
+ builtin: set('bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time without zone with timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml'),
+ atoms: set('false true null unknown'),
operatorChars: /^[*\/+\-%<>!=&|^\/#@?~]/,
backslashStringEscapes: false,
- dateSQL: set("date time timestamp"),
- support: set("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast escapeConstant")
- });
+ dateSQL: set('date time timestamp'),
+ support: set('ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast escapeConstant')
+ })
// Google's SQL-like query language, GQL
- CodeMirror.defineMIME("text/x-gql", {
- name: "sql",
- keywords: set("ancestor and asc by contains desc descendant distinct from group has in is limit offset on order select superset where"),
- atoms: set("false true"),
- builtin: set("blob datetime first key __key__ string integer double boolean null"),
+ CodeMirror.defineMIME('text/x-gql', {
+ name: 'sql',
+ keywords: set('ancestor and asc by contains desc descendant distinct from group has in is limit offset on order select superset where'),
+ atoms: set('false true'),
+ builtin: set('blob datetime first key __key__ string integer double boolean null'),
operatorChars: /^[*+\-%<>!=]/
- });
+ })
// Greenplum
- CodeMirror.defineMIME("text/x-gpsql", {
- name: "sql",
- client: set("source"),
- //https://github.com/greenplum-db/gpdb/blob/master/src/include/parser/kwlist.h
- keywords: set("abort absolute access action active add admin after aggregate all also alter always analyse analyze and any array as asc assertion assignment asymmetric at authorization backward before begin between bigint binary bit boolean both by cache called cascade cascaded case cast chain char character characteristics check checkpoint class close cluster coalesce codegen collate column comment commit committed concurrency concurrently configuration connection constraint constraints contains content continue conversion copy cost cpu_rate_limit create createdb createexttable createrole createuser cross csv cube current current_catalog current_date current_role current_schema current_time current_timestamp current_user cursor cycle data database day deallocate dec decimal declare decode default defaults deferrable deferred definer delete delimiter delimiters deny desc dictionary disable discard distinct distributed do document domain double drop dxl each else enable encoding encrypted end enum errors escape every except exchange exclude excluding exclusive execute exists explain extension external extract false family fetch fields filespace fill filter first float following for force foreign format forward freeze from full function global grant granted greatest group group_id grouping handler hash having header hold host hour identity if ignore ilike immediate immutable implicit in including inclusive increment index indexes inherit inherits initially inline inner inout input insensitive insert instead int integer intersect interval into invoker is isnull isolation join key language large last leading least left level like limit list listen load local localtime localtimestamp location lock log login mapping master match maxvalue median merge minute minvalue missing mode modifies modify month move name names national natural nchar new newline next no nocreatedb nocreateexttable nocreaterole nocreateuser noinherit nologin none noovercommit nosuperuser not nothing notify notnull nowait null nullif nulls numeric object of off offset oids old on only operator option options or order ordered others out outer over overcommit overlaps overlay owned owner parser partial partition partitions passing password percent percentile_cont percentile_disc placing plans position preceding precision prepare prepared preserve primary prior privileges procedural procedure protocol queue quote randomly range read readable reads real reassign recheck recursive ref references reindex reject relative release rename repeatable replace replica reset resource restart restrict returning returns revoke right role rollback rollup rootpartition row rows rule savepoint scatter schema scroll search second security segment select sequence serializable session session_user set setof sets share show similar simple smallint some split sql stable standalone start statement statistics stdin stdout storage strict strip subpartition subpartitions substring superuser symmetric sysid system table tablespace temp template temporary text then threshold ties time timestamp to trailing transaction treat trigger trim true truncate trusted type unbounded uncommitted unencrypted union unique unknown unlisten until update user using vacuum valid validation validator value values varchar variadic varying verbose version view volatile web when where whitespace window with within without work writable write xml xmlattributes xmlconcat xmlelement xmlexists xmlforest xmlparse xmlpi xmlroot xmlserialize year yes zone"),
- builtin: set("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time without zone with timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),
- atoms: set("false true null unknown"),
+ CodeMirror.defineMIME('text/x-gpsql', {
+ name: 'sql',
+ client: set('source'),
+ // https://github.com/greenplum-db/gpdb/blob/master/src/include/parser/kwlist.h
+ keywords: set('abort absolute access action active add admin after aggregate all also alter always analyse analyze and any array as asc assertion assignment asymmetric at authorization backward before begin between bigint binary bit boolean both by cache called cascade cascaded case cast chain char character characteristics check checkpoint class close cluster coalesce codegen collate column comment commit committed concurrency concurrently configuration connection constraint constraints contains content continue conversion copy cost cpu_rate_limit create createdb createexttable createrole createuser cross csv cube current current_catalog current_date current_role current_schema current_time current_timestamp current_user cursor cycle data database day deallocate dec decimal declare decode default defaults deferrable deferred definer delete delimiter delimiters deny desc dictionary disable discard distinct distributed do document domain double drop dxl each else enable encoding encrypted end enum errors escape every except exchange exclude excluding exclusive execute exists explain extension external extract false family fetch fields filespace fill filter first float following for force foreign format forward freeze from full function global grant granted greatest group group_id grouping handler hash having header hold host hour identity if ignore ilike immediate immutable implicit in including inclusive increment index indexes inherit inherits initially inline inner inout input insensitive insert instead int integer intersect interval into invoker is isnull isolation join key language large last leading least left level like limit list listen load local localtime localtimestamp location lock log login mapping master match maxvalue median merge minute minvalue missing mode modifies modify month move name names national natural nchar new newline next no nocreatedb nocreateexttable nocreaterole nocreateuser noinherit nologin none noovercommit nosuperuser not nothing notify notnull nowait null nullif nulls numeric object of off offset oids old on only operator option options or order ordered others out outer over overcommit overlaps overlay owned owner parser partial partition partitions passing password percent percentile_cont percentile_disc placing plans position preceding precision prepare prepared preserve primary prior privileges procedural procedure protocol queue quote randomly range read readable reads real reassign recheck recursive ref references reindex reject relative release rename repeatable replace replica reset resource restart restrict returning returns revoke right role rollback rollup rootpartition row rows rule savepoint scatter schema scroll search second security segment select sequence serializable session session_user set setof sets share show similar simple smallint some split sql stable standalone start statement statistics stdin stdout storage strict strip subpartition subpartitions substring superuser symmetric sysid system table tablespace temp template temporary text then threshold ties time timestamp to trailing transaction treat trigger trim true truncate trusted type unbounded uncommitted unencrypted union unique unknown unlisten until update user using vacuum valid validation validator value values varchar variadic varying verbose version view volatile web when where whitespace window with within without work writable write xml xmlattributes xmlconcat xmlelement xmlexists xmlforest xmlparse xmlpi xmlroot xmlserialize year yes zone'),
+ builtin: set('bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time without zone with timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml'),
+ atoms: set('false true null unknown'),
operatorChars: /^[*+\-%<>!=&|^\/#@?~]/,
- dateSQL: set("date time timestamp"),
- support: set("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast")
- });
+ dateSQL: set('date time timestamp'),
+ support: set('ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast')
+ })
// Spark SQL
- CodeMirror.defineMIME("text/x-sparksql", {
- name: "sql",
- keywords: set("add after all alter analyze and anti archive array as asc at between bucket buckets by cache cascade case cast change clear cluster clustered codegen collection column columns comment commit compact compactions compute concatenate cost create cross cube current current_date current_timestamp database databases data dbproperties defined delete delimited deny desc describe dfs directories distinct distribute drop else end escaped except exchange exists explain export extended external false fields fileformat first following for format formatted from full function functions global grant group grouping having if ignore import in index indexes inner inpath inputformat insert intersect interval into is items join keys last lateral lazy left like limit lines list load local location lock locks logical macro map minus msck natural no not null nulls of on optimize option options or order out outer outputformat over overwrite partition partitioned partitions percent preceding principals purge range recordreader recordwriter recover reduce refresh regexp rename repair replace reset restrict revoke right rlike role roles rollback rollup row rows schema schemas select semi separated serde serdeproperties set sets show skewed sort sorted start statistics stored stratify struct table tables tablesample tblproperties temp temporary terminated then to touch transaction transactions transform true truncate unarchive unbounded uncache union unlock unset use using values view when where window with"),
- builtin: set("tinyint smallint int bigint boolean float double string binary timestamp decimal array map struct uniontype delimited serde sequencefile textfile rcfile inputformat outputformat"),
- atoms: set("false true null"),
+ CodeMirror.defineMIME('text/x-sparksql', {
+ name: 'sql',
+ keywords: set('add after all alter analyze and anti archive array as asc at between bucket buckets by cache cascade case cast change clear cluster clustered codegen collection column columns comment commit compact compactions compute concatenate cost create cross cube current current_date current_timestamp database databases data dbproperties defined delete delimited deny desc describe dfs directories distinct distribute drop else end escaped except exchange exists explain export extended external false fields fileformat first following for format formatted from full function functions global grant group grouping having if ignore import in index indexes inner inpath inputformat insert intersect interval into is items join keys last lateral lazy left like limit lines list load local location lock locks logical macro map minus msck natural no not null nulls of on optimize option options or order out outer outputformat over overwrite partition partitioned partitions percent preceding principals purge range recordreader recordwriter recover reduce refresh regexp rename repair replace reset restrict revoke right rlike role roles rollback rollup row rows schema schemas select semi separated serde serdeproperties set sets show skewed sort sorted start statistics stored stratify struct table tables tablesample tblproperties temp temporary terminated then to touch transaction transactions transform true truncate unarchive unbounded uncache union unlock unset use using values view when where window with'),
+ builtin: set('tinyint smallint int bigint boolean float double string binary timestamp decimal array map struct uniontype delimited serde sequencefile textfile rcfile inputformat outputformat'),
+ atoms: set('false true null'),
operatorChars: /^[*\/+\-%<>!=~&|^]/,
- dateSQL: set("date time timestamp"),
- support: set("ODBCdotTable doubleQuote zerolessFloat")
- });
+ dateSQL: set('date time timestamp'),
+ support: set('ODBCdotTable doubleQuote zerolessFloat')
+ })
// Esper
- CodeMirror.defineMIME("text/x-esper", {
- name: "sql",
- client: set("source"),
+ CodeMirror.defineMIME('text/x-esper', {
+ name: 'sql',
+ client: set('source'),
// http://www.espertech.com/esper/release-5.5.0/esper-reference/html/appendix_keywords.html
- keywords: set("alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit after all and as at asc avedev avg between by case cast coalesce count create current_timestamp day days delete define desc distinct else end escape events every exists false first from full group having hour hours in inner insert instanceof into irstream is istream join last lastweekday left limit like max match_recognize matches median measures metadatasql min minute minutes msec millisecond milliseconds not null offset on or order outer output partition pattern prev prior regexp retain-union retain-intersection right rstream sec second seconds select set some snapshot sql stddev sum then true unidirectional until update variable weekday when where window"),
+ keywords: set('alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit after all and as at asc avedev avg between by case cast coalesce count create current_timestamp day days delete define desc distinct else end escape events every exists false first from full group having hour hours in inner insert instanceof into irstream is istream join last lastweekday left limit like max match_recognize matches median measures metadatasql min minute minutes msec millisecond milliseconds not null offset on or order outer output partition pattern prev prior regexp retain-union retain-intersection right rstream sec second seconds select set some snapshot sql stddev sum then true unidirectional until update variable weekday when where window'),
builtin: {},
- atoms: set("false true null"),
+ atoms: set('false true null'),
operatorChars: /^[*+\-%<>!=&|^\/#@?~]/,
- dateSQL: set("time"),
- support: set("decimallessFloat zerolessFloat binaryNumber hexNumber")
- });
+ dateSQL: set('time'),
+ support: set('decimallessFloat zerolessFloat binaryNumber hexNumber')
+ })
modehook && modehook(CodeMirror, set, {
- hookVar:hookVar,
- client: "charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee",
- keywords: sqlKeywords + "accessible action add after algorithm all analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general get global grant grants group group_concat handler hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show signal slave slow smallint snapshot soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views warnings when while with work write xa xor year_month zerofill begin do then else loop repeat",
- builtin: "bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"
+ hookVar: hookVar,
+ client: 'charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee',
+ keywords: sqlKeywords + 'accessible action add after algorithm all analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general get global grant grants group group_concat handler hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show signal slave slow smallint snapshot soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views warnings when while with work write xa xor year_month zerofill begin do then else loop repeat',
+ builtin: 'bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric'
})
}
diff --git a/src/components/advancedSearch/showhint/const/functionTips.js b/src/components/advancedSearch/showhint/const/functionTips.js
index a9c3ed4c..0a2517c0 100644
--- a/src/components/advancedSearch/showhint/const/functionTips.js
+++ b/src/components/advancedSearch/showhint/const/functionTips.js
@@ -1,4 +1,4 @@
-var renderData = [
+const renderData = [
{
name: 'COUNT',
syntax: 'count(expr)',
@@ -34,7 +34,7 @@ var renderData = [
code: 'count(distinct client_ip)'
},
{
- purpose: `Counts the number of different "Server IP" and "Server port" :`,
+ purpose: 'Counts the number of different "Server IP" and "Server port" :',
code: 'count(distinct server_ip, server_port)'
}
],
@@ -50,11 +50,11 @@ var renderData = [
description: 'Aggregate function is used to calculate the arithmetic mean in the specified field. EXPR must be Integer,Float or Decimal and returned value as Float.',
example: [
{
- purpose: `Calculates the average(mean) "Byte sent (sent_bytes)" field:`,
+ purpose: 'Calculates the average(mean) "Byte sent (sent_bytes)" field:',
code: 'avg(sent_bytes)'
},
{
- purpose: `Calculates the average(mean) "Bytes" , rounded to 2 decimal points:`,
+ purpose: 'Calculates the average(mean) "Bytes" , rounded to 2 decimal points:',
code: 'round(avg(sent_bytes+received_bytes),2)'
}
],
@@ -70,11 +70,11 @@ var renderData = [
description: 'Aggregate function is used to sum of the values of the specified field. EXPR must be Integer,Float or Decimal.',
example: [
{
- purpose: `The sum of the "Byte sent (sent_bytes)" field:`,
+ purpose: 'The sum of the "Byte sent (sent_bytes)" field:',
code: 'sum(sent_bytes)'
},
{
- purpose: `The sum of the "sent_bytes" and "received_bytes" fields , and rename as "Bytes ":`,
+ purpose: 'The sum of the "sent_bytes" and "received_bytes" fields , and rename as "Bytes ":',
code: 'sum(sent_bytes+received_bytes) as Bytes'
}
],
@@ -89,7 +89,7 @@ var renderData = [
description: 'Aggregate function is used to return the maximum value of the specified field.',
example: [
{
- purpose: `Returns the maximum value of the "Byte sent (sent_bytes)" field:`,
+ purpose: 'Returns the maximum value of the "Byte sent (sent_bytes)" field:',
code: 'max(sent_bytes)'
}
],
@@ -105,7 +105,7 @@ var renderData = [
description: 'Aggregate function is used to return the minimum value of the specified field.',
example: [
{
- purpose: `Returns the minimum value of the "Byte sent (sent_bytes)" field:`,
+ purpose: 'Returns the minimum value of the "Byte sent (sent_bytes)" field:',
code: 'min(sent_bytes)'
}
],
@@ -121,7 +121,7 @@ var renderData = [
description: 'Rounds down a timestamp, returning it as a new timestamp,optionally from some reference fill, and fills time gaps and impute missing values.',
example: [
{
- purpose: `Round the recv_time down to a 5 minutes increment and fill time gaps and impute zero value.`,
+ purpose: 'Round the recv_time down to a 5 minutes increment and fill time gaps and impute zero value.',
code: 'TIME_FLOOR_WITH_FILL(recv_time,\'PT5M\',\'zero\')'
}
],
@@ -148,21 +148,21 @@ var renderData = [
},
{
name: 'UNIX_TIMESTAMP',
- syntax: `UNIX_TIMESTAMP(date)`,
- description: `Returns a Unix timestamp the value of the argument as seconds since '1970-01-01 00:00:00' UTC.`,
+ syntax: 'UNIX_TIMESTAMP(date)',
+ description: 'Returns a Unix timestamp the value of the argument as seconds since \'1970-01-01 00:00:00\' UTC.',
example: [
{
- purpose: `Specify a datetime string "2019-06-06 19:11:12", calculate the Unix timestamp:`,
+ purpose: 'Specify a datetime string "2019-06-06 19:11:12", calculate the Unix timestamp:',
code: 'UNIX_TIMESTAMP(\'2019-06-06 19:11:12\')'
},
{
- purpose: `Specify a ISO8601 datetime string with time zone information "2019-10-12T14:20:50+08:00", calculate the Unix timestamp:`,
+ purpose: 'Specify a ISO8601 datetime string with time zone information "2019-10-12T14:20:50+08:00", calculate the Unix timestamp:',
code: 'UNIX_TIMESTAMP(\'2019-10-12T14:20:50+08:00\')'
},
{
- purpose: `Specify a ISO8601 datetime string with UTC+0 time zone information "2019-10-12T14:20:50Z", calculate the Unix timestamp:`,
+ purpose: 'Specify a ISO8601 datetime string with UTC+0 time zone information "2019-10-12T14:20:50Z", calculate the Unix timestamp:',
code: 'UNIX_TIMESTAMP(\'2019-10-12T14:20:50Z\')'
- },
+ }
],
details () {
// 支持jsx 嵌套写法,万一测试要关键字加重呢
@@ -181,13 +181,13 @@ var renderData = [
},
{
name: 'FROM_UNIXTIME',
- syntax: `FROM_UNIXTIME(unix_timestamp)`,
- description: `Returns a representation of unix_timestamp as a datetime or character string value. The value returned is expressed using the UTC+0 time zone.`,
+ syntax: 'FROM_UNIXTIME(unix_timestamp)',
+ description: 'Returns a representation of unix_timestamp as a datetime or character string value. The value returned is expressed using the UTC+0 time zone.',
example: [
{
- purpose: `Specify a Unix Timestamp "1570881546", calculate the datetime string:`,
+ purpose: 'Specify a Unix Timestamp "1570881546", calculate the datetime string:',
code: 'FROM_UNIXTIME(1570881546)'
- },
+ }
],
details () {
// 支持jsx 嵌套写法,万一测试要关键字加重呢
@@ -198,10 +198,10 @@ var renderData = [
{
name: 'DATE_FORMAT',
syntax: 'DATE_FORMAT(date, format)',
- description: `Formats the date value according to the format string.`,
+ description: 'Formats the date value according to the format string.',
example: [
{
- purpose: `Specify a Unix Timestamp "1570881546", calculate the datetime string with format "%Y-%m-%d %H:%i:%s":`,
+ purpose: 'Specify a Unix Timestamp "1570881546", calculate the datetime string with format "%Y-%m-%d %H:%i:%s":',
code: 'DATE_FORMAT(FROM_UNIXTIME(1570881546), \'%Y-%m-%d %H:%i:%s\')'
}
],
@@ -233,21 +233,21 @@ var renderData = [
},
{
name: 'CONVERT_TZ',
- syntax: `CONVERT_TZ(dt, from_tz, to_tz)`,
- description: `Converts a datetime value dt from the time zone given by from_tz to the time zone given by to_tz and returns the resulting value.`,
+ syntax: 'CONVERT_TZ(dt, from_tz, to_tz)',
+ description: 'Converts a datetime value dt from the time zone given by from_tz to the time zone given by to_tz and returns the resulting value.',
example: [
{
- purpose: `Specify a datetime string "2021-11-11 00:00:00", converted from GMT(Greenwich Mean Time) to Asia/Shanghai time zone:`,
+ purpose: 'Specify a datetime string "2021-11-11 00:00:00", converted from GMT(Greenwich Mean Time) to Asia/Shanghai time zone:',
code: 'CONVERT_TZ(\'2021-11-11 00:00:00\',\'GMT\',\'Asia/Shanghai\')'
},
{
- purpose: `Specify a Unix timestamp "1636588800", converted from GMT(Greenwich Mean Time) to Asia/Shanghai time zone:`,
+ purpose: 'Specify a Unix timestamp "1636588800", converted from GMT(Greenwich Mean Time) to Asia/Shanghai time zone:',
code: 'CONVERT_TZ(FROM_UNIXTIME(1636588800),\'GMT\',\'Asia/Shanghai\')'
},
{
- purpose: `Specify a Unix timestamp "1636588800", converted from Europe/London to America/New_York time zone:`,
+ purpose: 'Specify a Unix timestamp "1636588800", converted from Europe/London to America/New_York time zone:',
code: 'CONVERT_TZ(DATE_FORMAT(FROM_UNIXTIME(1636588800), \'%Y-%m-%d %H:%i:%s\'),\'Europe/London\',\'America/New_York\')'
- },
+ }
],
details () {
// 支持jsx 嵌套写法,万一测试要关键字加重呢
@@ -263,11 +263,11 @@ var renderData = [
},
{
name: 'MEDIAN',
- syntax: `MEDIAN()`,
- description: `Aggregate function is used to calculate median value. expr must be Integer, Float or Decimal.`,
+ syntax: 'MEDIAN()',
+ description: 'Aggregate function is used to calculate median value. expr must be Integer, Float or Decimal.',
example: [
{
- purpose: `Calculates the median "TCP Handshake Latency (tcp_handshake_latency_ms)" field:`,
+ purpose: 'Calculates the median "TCP Handshake Latency (tcp_handshake_latency_ms)" field:',
code: 'MEDIAN(tcp_handshake_latency_ms)'
}
],
@@ -279,11 +279,11 @@ var renderData = [
},
{
name: 'QUANTILE',
- syntax: `QUANTILE([, ])`,
- description: `Aggregate function is used to calculate an approximate quantile of a numeric data sequence.`,
+ syntax: 'QUANTILE([, ])',
+ description: 'Aggregate function is used to calculate an approximate quantile of a numeric data sequence.',
example: [
{
- purpose: `Calculates the 90th percentile "TCP Handshake Latency (tcp_handshake_latency_ms)" field:`,
+ purpose: 'Calculates the 90th percentile "TCP Handshake Latency (tcp_handshake_latency_ms)" field:',
code: 'QUANTILE(tcp_handshake_latency_ms, 0.9)'
}
],
@@ -300,13 +300,13 @@ var renderData = [
}
- },
+ }
]
function main () {
- var functionTips = {}
+ const functionTips = {}
renderData.forEach((item, index) => {
- var data = item // 这是个闭包
+ const data = item // 这是个闭包
functionTips[item.name] = {
name: item.name,
syntax: item.syntax,
@@ -327,8 +327,9 @@ function main () {
})}
Details:
- {Object.prototype.toString.call(data.details) === '[object Function]' ?
- : {data.details}
}
+ {Object.prototype.toString.call(data.details) === '[object Function]'
+ ?
+ : {data.details}
}
)
}
}
@@ -337,5 +338,5 @@ function main () {
}
export const functionList = renderData
-var functionTips = main()
+const functionTips = main()
export default functionTips
diff --git a/src/components/advancedSearch/showhint/const/sqlTips.js b/src/components/advancedSearch/showhint/const/sqlTips.js
index 9f655110..461822ba 100644
--- a/src/components/advancedSearch/showhint/const/sqlTips.js
+++ b/src/components/advancedSearch/showhint/const/sqlTips.js
@@ -1,37 +1,37 @@
-var renderData = [
+const renderData = [
{
name: 'FROM',
- syntax: `FROM [db.]table |$log_type`,
+ syntax: 'FROM [db.]table |$log_type',
description: {
- title: `The table name of logs. If you type $log_type, the variable value is the current table name of logs.`
+ title: 'The table name of logs. If you type $log_type, the variable value is the current table name of logs.'
}
},
{
name: 'SELECT',
- syntax: `Optional. The selected columns(also known as dimensions and metrics).`,
+ syntax: 'Optional. The selected columns(also known as dimensions and metrics).',
description: {
title: '可选,获取列',
list: [
- `aggregate_function(field) - Aggregate functions, default is count.`,
- `as field - Use as to specify a aliases for a field or expression.`
+ 'aggregate_function(field) - Aggregate functions, default is count.',
+ 'as field - Use as to specify a aliases for a field or expression.'
]
}
},
{
name: 'GROUP BY',
- syntax: `GROUP BY `,
+ syntax: 'GROUP BY ',
description: {
title: 'Aggregate data. GROUP BY clause switches the SELECT query into an aggregation mode:',
list: [
- `The list of fields known as "grouping key", while each individual expression be referred to as a "key expression".`,
- `All the expressions in the SELECT, HAVING and ORDER BY , must be "key expression" or on aggregate functions.`,
- `The result of aggregating SELECT query will return unique values of "grouping key" in log type.`
+ 'The list of fields known as "grouping key", while each individual expression be referred to as a "key expression".',
+ 'All the expressions in the SELECT, HAVING and ORDER BY , must be "key expression" or on aggregate functions.',
+ 'The result of aggregating SELECT query will return unique values of "grouping key" in log type.'
]
}
},
{
name: 'HAVING',
- syntax: `HAVING `,
+ syntax: 'HAVING ',
description: {
title: `Optional. HAVING clause filtering the aggregation results retrieved by GROUP BY. It is difference is that WHERE is performed before aggregation, while HAVING is performed after it.
Note: HAVING can't be performed if GROUP BY is not performed.`
@@ -39,26 +39,26 @@ var renderData = [
},
{
name: 'LIMIT',
- syntax: `LIMIT [n, ]m`,
+ syntax: 'LIMIT [n, ]m',
description: {
- title: `Select the m rows from the aggregate results after skipping the first n rows. Default is 10 rows.`
+ title: 'Select the m rows from the aggregate results after skipping the first n rows. Default is 10 rows.'
}
},
{
name: 'ORDER BY',
- syntax: `ORDER BY [ASC|DESC]`,
+ syntax: 'ORDER BY [ASC|DESC]',
description: {
- title: `Sort all of the results by the specified fields.`
+ title: 'Sort all of the results by the specified fields.'
}
},
{
name: 'WHERE',
- syntax: `where $filter [and ]`,
+ syntax: 'where $filter [and ]',
description: {
- title: `Filter the data.`,
+ title: 'Filter the data.',
list: [
- `$filter - Default global filter clause. Include Time period, Vsys ID, and other expressions, etc`,
- `and - filter clauses`
+ '$filter - Default global filter clause. Include Time period, Vsys ID, and other expressions, etc',
+ 'and - filter clauses'
]
}
}
@@ -66,9 +66,9 @@ var renderData = [
export const sqlList = renderData
function main () {
- var sqlTips = {}
+ const sqlTips = {}
renderData.forEach((item, index) => {
- var data = item // 这是个闭包
+ const data = item // 这是个闭包
sqlTips[item.name] = {
name: item.name,
syntax: item.syntax,
@@ -93,5 +93,5 @@ function main () {
return sqlTips
}
-var sqlTips = main()
+const sqlTips = main()
export default sqlTips
diff --git a/src/components/advancedSearch/showhint/const/varTips.js b/src/components/advancedSearch/showhint/const/varTips.js
index efb1d18f..3e6de9c1 100644
--- a/src/components/advancedSearch/showhint/const/varTips.js
+++ b/src/components/advancedSearch/showhint/const/varTips.js
@@ -1,4 +1,4 @@
-var renderData = [
+const renderData = [
{
name: '$LOG_TYPE',
description: 'A variable is a symbolic representation of data that enables you to access a value without having to enter it manually wherever you need it. You can use $ to reference variables throughout Advanced Search. ',
@@ -34,8 +34,9 @@ function main () {
Description:
{data.description}
Details:
- {Object.prototype.toString.call(data.details) === '[object Function]' ?
- : {data.details}
}
+ {Object.prototype.toString.call(data.details) === '[object Function]'
+ ?
+ : {data.details}
}
)
}
}
diff --git a/src/components/advancedSearch/showhint/packages/service/DeviceTag.js b/src/components/advancedSearch/showhint/packages/service/DeviceTag.js
index c5805545..9b76cdd6 100644
--- a/src/components/advancedSearch/showhint/packages/service/DeviceTag.js
+++ b/src/components/advancedSearch/showhint/packages/service/DeviceTag.js
@@ -1,22 +1,22 @@
-import {dataTemplate, fieldTemplate} from './template'
+import { dataTemplate, fieldTemplate } from './template'
export class DeviceTag {
- constructor(context, params) {
- //先从缓存获取数据
+ constructor (context, params) {
+ // 先从缓存获取数据
this.queryparams = params
this.context = context
}
- filterQueryData(list) {
+ filterQueryData (list) {
return list
}
- getDataFromRemote() {
- //从 远程,也就是请求接口获取数据
+ getDataFromRemote () {
+ // 从 远程,也就是请求接口获取数据
return this.context.$get('/deviceTag', this.queryparams).then((res) => {
- this.context.initDataReadyCb && this.context.initDataReadyCb(res.data || null); //组件 请求 文件成功回调
+ this.context.initDataReadyCb && this.context.initDataReadyCb(res.data || null) // 组件 请求 文件成功回调
if (res.code === 200) {
- var data = res.data && res.data.list;
+ const data = res.data && res.data.list
return data
} else {
// this.context.$message({
@@ -31,40 +31,40 @@ export class DeviceTag {
})
}
- formatData(data) {
- //格式化 获取的数据
+ formatData (data) {
+ // 格式化 获取的数据
const resultData = {
operatesList: [
{
- "name": "AND",
- "function": "A AND B",
- type: "abstract",
- label: "AND"
+ name: 'AND',
+ function: 'A AND B',
+ type: 'abstract',
+ label: 'AND'
}
],
filtersList: data ? this.filterQueryData(data.fields || []) : [],
- //操作符仓库 用于记录 类型 和 操作符之间的映射关系
+ // 操作符仓库 用于记录 类型 和 操作符之间的映射关系
operatesDic: data ? data.doc.schema_query.references.operator || [] : [],
- //operator 记录运算符的label 和 value 映射 以及操作符的使用方法
+ // operator 记录运算符的label 和 value 映射 以及操作符的使用方法
operatorManual: data ? data.doc.functions.operator || [] : []
}
return resultData
}
- organizeData(data=[]) {
- var fields = []
- var res = JSON.parse(JSON.stringify(dataTemplate));
- if (!data ) {
+ organizeData (data = []) {
+ const fields = []
+ const res = JSON.parse(JSON.stringify(dataTemplate))
+ if (!data) {
return
}
data.forEach((item, index) => {
- var fieldItem = JSON.parse(JSON.stringify(fieldTemplate));
+ const fieldItem = JSON.parse(JSON.stringify(fieldTemplate))
fieldItem.name = item.tagValue
- fieldItem.type = "Array"
+ fieldItem.type = 'Array'
fieldItem.label = item.tagName
fieldItem.doc.data = (item.subTags || []).map(tagItem => {
return {
- code: `'${tagItem.tagValue}'`, //匹配SQL 的时候,这个Code 要加 ''
+ code: `'${tagItem.tagValue}'`, // 匹配SQL 的时候,这个Code 要加 ''
value: tagItem.tagName,
type: tagItem.tagType
}
@@ -75,20 +75,20 @@ export class DeviceTag {
return res
}
- getFormatedData(callback) {
+ getFormatedData (callback) {
this.getDataFromRemote().then(data => {
- //组织数据 模拟scama
- var organizedData = this.organizeData(data);
- //格式化数据
+ // 组织数据 模拟scama
+ const organizedData = this.organizeData(data)
+ // 格式化数据
this.data = this.formatData(organizedData)
- //获取scameData的时候 查询映射字段
+ // 获取scameData的时候 查询映射字段
callback && callback(this.data)
})
}
- dispose(){
- this.context=null
- this.queryparams=null
- this.data=null
+ dispose () {
+ this.context = null
+ this.queryparams = null
+ this.data = null
}
}
diff --git a/src/components/advancedSearch/showhint/packages/service/oldMockData.js b/src/components/advancedSearch/showhint/packages/service/oldMockData.js
index 0b3e99d4..fe7671a9 100644
--- a/src/components/advancedSearch/showhint/packages/service/oldMockData.js
+++ b/src/components/advancedSearch/showhint/packages/service/oldMockData.js
@@ -1,2881 +1,2881 @@
export const cacheData = {
- "type": "record",
- "name": "session_record",
- "namespace": "tsg_galaxy_v3",
- "doc": {
- "primary_key": "log_id",
- "partition_key": "recv_time",
- "index_key": [
- "vsys_id",
- "security_action",
- "proxy_action",
- "decoded_as",
- "data_center",
- "device_group",
- "recv_time"
+ type: 'record',
+ name: 'session_record',
+ namespace: 'tsg_galaxy_v3',
+ doc: {
+ primary_key: 'log_id',
+ partition_key: 'recv_time',
+ index_key: [
+ 'vsys_id',
+ 'security_action',
+ 'proxy_action',
+ 'decoded_as',
+ 'data_center',
+ 'device_group',
+ 'recv_time'
],
- "ttl": 2592000,
- "default_ttl": 2592000,
- "functions": {
- "aggregation": [
+ ttl: 2592000,
+ default_ttl: 2592000,
+ functions: {
+ aggregation: [
{
- "name": "COUNT",
- "label": "COUNT",
- "function": "count(expr)"
+ name: 'COUNT',
+ label: 'COUNT',
+ function: 'count(expr)'
},
{
- "name": "COUNT_DISTINCT",
- "label": "COUNT_DISTINCT",
- "function": "count(distinct expr)"
+ name: 'COUNT_DISTINCT',
+ label: 'COUNT_DISTINCT',
+ function: 'count(distinct expr)'
},
{
- "name": "AVG",
- "label": "AVG",
- "function": "avg(expr)"
+ name: 'AVG',
+ label: 'AVG',
+ function: 'avg(expr)'
},
{
- "name": "SUM",
- "label": "SUM",
- "function": "sum(expr)"
+ name: 'SUM',
+ label: 'SUM',
+ function: 'sum(expr)'
},
{
- "name": "MAX",
- "label": "MAX",
- "function": "max(expr)"
+ name: 'MAX',
+ label: 'MAX',
+ function: 'max(expr)'
},
{
- "name": "MIN",
- "label": "MIN",
- "function": "min(expr)"
+ name: 'MIN',
+ label: 'MIN',
+ function: 'min(expr)'
},
{
- "name": "MEDIAN",
- "label": "MEDIAN",
- "function": "MEDIAN(expr)"
+ name: 'MEDIAN',
+ label: 'MEDIAN',
+ function: 'MEDIAN(expr)'
},
{
- "name": "QUANTILE",
- "label": "QUANTILE",
- "function": "QUANTILE(expr,level)"
+ name: 'QUANTILE',
+ label: 'QUANTILE',
+ function: 'QUANTILE(expr,level)'
},
{
- "name": "TIME_FLOOR_WITH_FILL",
- "label": "TIME_FLOOR_WITH_FILL",
- "function": "TIME_FLOOR_WITH_FILL(expr,period,fill)"
+ name: 'TIME_FLOOR_WITH_FILL',
+ label: 'TIME_FLOOR_WITH_FILL',
+ function: 'TIME_FLOOR_WITH_FILL(expr,period,fill)'
}
],
- "date": [
+ date: [
{
- "name": "UNIX_TIMESTAMP",
- "label": "UNIX_TIMESTAMP",
- "function": "UNIX_TIMESTAMP(expr)"
+ name: 'UNIX_TIMESTAMP',
+ label: 'UNIX_TIMESTAMP',
+ function: 'UNIX_TIMESTAMP(expr)'
},
{
- "name": "FROM_UNIXTIME",
- "label": "FROM_UNIXTIME",
- "function": "FROM_UNIXTIME(expr)"
+ name: 'FROM_UNIXTIME',
+ label: 'FROM_UNIXTIME',
+ function: 'FROM_UNIXTIME(expr)'
},
{
- "name": "DATE_FORMAT",
- "label": "DATE_FORMAT",
- "function": "DATE_FORMAT(expr,format)"
+ name: 'DATE_FORMAT',
+ label: 'DATE_FORMAT',
+ function: 'DATE_FORMAT(expr,format)'
},
{
- "name": "CONVERT_TZ",
- "label": "CONVERT_TZ",
- "function": "CONVERT_TZ(expr, from_tz, to_tz)"
+ name: 'CONVERT_TZ',
+ label: 'CONVERT_TZ',
+ function: 'CONVERT_TZ(expr, from_tz, to_tz)'
}
],
- "operator": [
+ operator: [
{
- "name": "=",
- "label": "=",
- "function": "expr = value"
+ name: '=',
+ label: '=',
+ function: 'expr = value'
},
{
- "name": "!=",
- "label": "!=",
- "function": "expr != value"
+ name: '!=',
+ label: '!=',
+ function: 'expr != value'
},
{
- "name": ">",
- "label": ">",
- "function": "expr > value"
+ name: '>',
+ label: '>',
+ function: 'expr > value'
},
{
- "name": "<",
- "label": "<",
- "function": "expr < value"
+ name: '<',
+ label: '<',
+ function: 'expr < value'
},
{
- "name": ">=",
- "label": ">=",
- "function": "expr >= value"
+ name: '>=',
+ label: '>=',
+ function: 'expr >= value'
},
{
- "name": "<=",
- "label": "<=",
- "function": "expr <= value"
+ name: '<=',
+ label: '<=',
+ function: 'expr <= value'
},
{
- "name": "has",
- "label": "HAS",
- "function": "has(expr, value)"
+ name: 'has',
+ label: 'HAS',
+ function: 'has(expr, value)'
},
{
- "name": "in",
- "label": "IN",
- "function": "expr in (values)"
+ name: 'in',
+ label: 'IN',
+ function: 'expr in (values)'
},
{
- "name": "not in",
- "label": "NOT IN",
- "function": "expr not in (values)"
+ name: 'not in',
+ label: 'NOT IN',
+ function: 'expr not in (values)'
},
{
- "name": "like",
- "label": "LIKE",
- "function": "expr like value"
+ name: 'like',
+ label: 'LIKE',
+ function: 'expr like value'
},
{
- "name": "not like",
- "label": "NOT LIKE",
- "function": "expr not like value"
+ name: 'not like',
+ label: 'NOT LIKE',
+ function: 'expr not like value'
},
{
- "name": "notEmpty",
- "label": "NOT EMPTY",
- "function": "notEmpty(expr)"
+ name: 'notEmpty',
+ label: 'NOT EMPTY',
+ function: 'notEmpty(expr)'
},
{
- "name": "empty",
- "label": "EMPTY",
- "function": "empty(expr)"
+ name: 'empty',
+ label: 'EMPTY',
+ function: 'empty(expr)'
},
{
- "name": "bitAnd",
- "label": "Bitwise AND",
- "function": "bitAnd(expr, value)=value"
+ name: 'bitAnd',
+ label: 'Bitwise AND',
+ function: 'bitAnd(expr, value)=value'
}
],
- "sketch": [
+ sketch: [
{
- "name": "APPROX_COUNT_DISTINCT_HLLD",
- "label": "APPROX_COUNT_DISTINCT_HLLD",
- "function": "APPROX_COUNT_DISTINCT_HLLD(expr, precision,round)"
+ name: 'APPROX_COUNT_DISTINCT_HLLD',
+ label: 'APPROX_COUNT_DISTINCT_HLLD',
+ function: 'APPROX_COUNT_DISTINCT_HLLD(expr, precision,round)'
},
{
- "name": "HLLD",
- "label": "HLLD",
- "function": "HLLD(expr, precision)"
+ name: 'HLLD',
+ label: 'HLLD',
+ function: 'HLLD(expr, precision)'
},
{
- "name": "APPROX_QUANTILE_HDR",
- "label": "APPROX_QUANTILE_HDR",
- "function": "APPROX_QUANTILE_HDR(expr,probability,numberOfSignificantValueDigits)"
+ name: 'APPROX_QUANTILE_HDR',
+ label: 'APPROX_QUANTILE_HDR',
+ function: 'APPROX_QUANTILE_HDR(expr,probability,numberOfSignificantValueDigits)'
},
{
- "name": "HDR_HISTOGRAM",
- "label": "HDR_HISTOGRAM",
- "function": "HDR_HISTOGRAM(expr, numberOfSignificantValueDigits)"
+ name: 'HDR_HISTOGRAM',
+ label: 'HDR_HISTOGRAM',
+ function: 'HDR_HISTOGRAM(expr, numberOfSignificantValueDigits)'
},
{
- "name": "HDR_GET_QUANTILES",
- "label": "HDR_GET_QUANTILES",
- "function": "HDR_GET_QUANTILES(expr,probability0, probability1, ...)"
+ name: 'HDR_GET_QUANTILES',
+ label: 'HDR_GET_QUANTILES',
+ function: 'HDR_GET_QUANTILES(expr,probability0, probability1, ...)'
},
{
- "name": "HDR_GET_PERCENTILES",
- "label": "HDR_GET_PERCENTILES",
- "function": "HDR_GET_QUANTILES(expr,percentileTicksPerHalfDistance)"
+ name: 'HDR_GET_PERCENTILES',
+ label: 'HDR_GET_PERCENTILES',
+ function: 'HDR_GET_QUANTILES(expr,percentileTicksPerHalfDistance)'
}
]
},
- "schema_query": {
- "dimensions": [
- "session_id",
- "start_timestamp_ms",
- "end_timestamp_ms",
- "processing_time",
- "ingestion_time",
- "device_id",
- "out_link_id",
- "in_link_id",
- "data_center",
- "sled_ip",
- "device_group",
- "address_type",
- "decoded_as",
- "vsys_id",
- "flags",
- "flags_identify_info",
- "security_action",
- "security_rule_list",
- "monitor_rule_list",
- "shaping_rule_list",
- "sc_rule_list",
- "sc_rsp_raw",
- "sc_rsp_decrypted",
- "proxy_action",
- "proxy_rule_list",
- "client_ip",
- "client_port",
- "client_os_desc",
- "client_geolocation",
- "client_asn",
- "subscriber_id",
- "imei",
- "imsi",
- "apn",
- "phone_number",
- "packet_capture_file",
- "in_src_mac",
- "out_src_mac",
- "server_ip",
- "server_port",
- "server_os_desc",
- "server_geolocation",
- "server_asn",
- "server_fqdn",
- "server_domain",
- "in_dest_mac",
- "out_dest_mac",
- "app_path",
- "app",
- "app_debug_info",
- "app_content",
- "protocol_path",
- "dup_traffic_flag",
- "tunnel_endpoint_a_desc",
- "tunnel_endpoint_b_desc",
- "http_url",
- "http_host",
- "http_request_line",
- "http_response_line",
- "http_proxy_flag",
- "http_sequence",
- "http_cookie",
- "http_referer",
- "http_user_agent",
- "http_request_content_length",
- "http_request_content_type",
- "http_response_content_length",
- "http_response_content_type",
- "http_set_cookie",
- "http_version",
- "http_status_code",
- "http_response_latency_ms",
- "http_session_duration_ms",
- "http_action_file_size",
- "mail_protocol_type",
- "mail_account",
- "mail_from_cmd",
- "mail_to_cmd",
- "mail_from",
- "mail_password",
- "mail_to",
- "mail_cc",
- "mail_bcc",
- "mail_subject",
- "mail_subject_charset",
- "mail_attachment_name",
- "mail_attachment_name_charset",
- "mail_eml_file",
- "dns_message_id",
- "dns_qr",
- "dns_opcode",
- "dns_aa",
- "dns_tc",
- "dns_rd",
- "dns_ra",
- "dns_rcode",
- "dns_qname",
- "dns_qtype",
- "dns_qclass",
- "dns_cname",
- "dns_sub",
- "ssl_version",
- "ssl_sni",
- "ssl_san",
- "ssl_cn",
- "ssl_ja3_hash",
- "ssl_ja3s_hash",
- "ssl_cert_issuer",
- "ssl_cert_subject",
- "ssl_esni_flag",
- "ssl_ech_flag",
- "dtls_cookie",
- "dtls_version",
- "dtls_sni",
- "dtls_san",
- "dtls_cn",
- "dtls_handshake_latency_ms",
- "dtls_ja3_fingerprint",
- "dtls_ja3_hash",
- "dtls_cert_issuer",
- "dtls_cert_subject",
- "quic_sni",
- "quic_version",
- "quic_user_agent",
- "ftp_account",
- "ftp_url",
- "ftp_link_type",
- "sip_call_id",
- "sip_originator_description",
- "sip_responder_description",
- "sip_user_agent",
- "sip_server",
- "sip_originator_sdp_connect_ip",
- "sip_originator_sdp_media_port",
- "sip_originator_sdp_media_type",
- "sip_responder_sdp_connect_ip",
- "sip_responder_sdp_media_port",
- "sip_responder_sdp_media_type",
- "sip_responder_sdp_content",
- "sip_duration_s",
- "sip_bye",
- "ssh_version",
- "ssh_auth_success",
- "ssh_client_version",
- "ssh_server_version",
- "ssh_cipher_alg",
- "ssh_mac_alg",
- "ssh_compression_alg",
- "ssh_kex_alg",
- "ssh_host_key_alg",
- "ssh_host_key",
- "ssh_hassh",
- "rtp_payload_type_c2s",
- "rtp_payload_type_s2c",
- "rtp_originator_dir",
- "stratum_cryptocurrency",
- "stratum_mining_pools",
- "stratum_mining_program",
- "stratum_mining_subscribe",
- "rdp_cookie",
- "rdp_security_protocol",
- "rdp_client_channels",
- "rdp_keyboard_layout",
- "rdp_client_version",
- "rdp_client_name",
- "rdp_client_product_id",
- "rdp_desktop_width",
- "rdp_desktop_height",
- "rdp_requested_color_depth",
- "rdp_certificate_type",
- "rdp_certificate_count",
- "rdp_certificate_permanent",
- "rdp_encryption_level",
- "rdp_encryption_method"
+ schema_query: {
+ dimensions: [
+ 'session_id',
+ 'start_timestamp_ms',
+ 'end_timestamp_ms',
+ 'processing_time',
+ 'ingestion_time',
+ 'device_id',
+ 'out_link_id',
+ 'in_link_id',
+ 'data_center',
+ 'sled_ip',
+ 'device_group',
+ 'address_type',
+ 'decoded_as',
+ 'vsys_id',
+ 'flags',
+ 'flags_identify_info',
+ 'security_action',
+ 'security_rule_list',
+ 'monitor_rule_list',
+ 'shaping_rule_list',
+ 'sc_rule_list',
+ 'sc_rsp_raw',
+ 'sc_rsp_decrypted',
+ 'proxy_action',
+ 'proxy_rule_list',
+ 'client_ip',
+ 'client_port',
+ 'client_os_desc',
+ 'client_geolocation',
+ 'client_asn',
+ 'subscriber_id',
+ 'imei',
+ 'imsi',
+ 'apn',
+ 'phone_number',
+ 'packet_capture_file',
+ 'in_src_mac',
+ 'out_src_mac',
+ 'server_ip',
+ 'server_port',
+ 'server_os_desc',
+ 'server_geolocation',
+ 'server_asn',
+ 'server_fqdn',
+ 'server_domain',
+ 'in_dest_mac',
+ 'out_dest_mac',
+ 'app_path',
+ 'app',
+ 'app_debug_info',
+ 'app_content',
+ 'protocol_path',
+ 'dup_traffic_flag',
+ 'tunnel_endpoint_a_desc',
+ 'tunnel_endpoint_b_desc',
+ 'http_url',
+ 'http_host',
+ 'http_request_line',
+ 'http_response_line',
+ 'http_proxy_flag',
+ 'http_sequence',
+ 'http_cookie',
+ 'http_referer',
+ 'http_user_agent',
+ 'http_request_content_length',
+ 'http_request_content_type',
+ 'http_response_content_length',
+ 'http_response_content_type',
+ 'http_set_cookie',
+ 'http_version',
+ 'http_status_code',
+ 'http_response_latency_ms',
+ 'http_session_duration_ms',
+ 'http_action_file_size',
+ 'mail_protocol_type',
+ 'mail_account',
+ 'mail_from_cmd',
+ 'mail_to_cmd',
+ 'mail_from',
+ 'mail_password',
+ 'mail_to',
+ 'mail_cc',
+ 'mail_bcc',
+ 'mail_subject',
+ 'mail_subject_charset',
+ 'mail_attachment_name',
+ 'mail_attachment_name_charset',
+ 'mail_eml_file',
+ 'dns_message_id',
+ 'dns_qr',
+ 'dns_opcode',
+ 'dns_aa',
+ 'dns_tc',
+ 'dns_rd',
+ 'dns_ra',
+ 'dns_rcode',
+ 'dns_qname',
+ 'dns_qtype',
+ 'dns_qclass',
+ 'dns_cname',
+ 'dns_sub',
+ 'ssl_version',
+ 'ssl_sni',
+ 'ssl_san',
+ 'ssl_cn',
+ 'ssl_ja3_hash',
+ 'ssl_ja3s_hash',
+ 'ssl_cert_issuer',
+ 'ssl_cert_subject',
+ 'ssl_esni_flag',
+ 'ssl_ech_flag',
+ 'dtls_cookie',
+ 'dtls_version',
+ 'dtls_sni',
+ 'dtls_san',
+ 'dtls_cn',
+ 'dtls_handshake_latency_ms',
+ 'dtls_ja3_fingerprint',
+ 'dtls_ja3_hash',
+ 'dtls_cert_issuer',
+ 'dtls_cert_subject',
+ 'quic_sni',
+ 'quic_version',
+ 'quic_user_agent',
+ 'ftp_account',
+ 'ftp_url',
+ 'ftp_link_type',
+ 'sip_call_id',
+ 'sip_originator_description',
+ 'sip_responder_description',
+ 'sip_user_agent',
+ 'sip_server',
+ 'sip_originator_sdp_connect_ip',
+ 'sip_originator_sdp_media_port',
+ 'sip_originator_sdp_media_type',
+ 'sip_responder_sdp_connect_ip',
+ 'sip_responder_sdp_media_port',
+ 'sip_responder_sdp_media_type',
+ 'sip_responder_sdp_content',
+ 'sip_duration_s',
+ 'sip_bye',
+ 'ssh_version',
+ 'ssh_auth_success',
+ 'ssh_client_version',
+ 'ssh_server_version',
+ 'ssh_cipher_alg',
+ 'ssh_mac_alg',
+ 'ssh_compression_alg',
+ 'ssh_kex_alg',
+ 'ssh_host_key_alg',
+ 'ssh_host_key',
+ 'ssh_hassh',
+ 'rtp_payload_type_c2s',
+ 'rtp_payload_type_s2c',
+ 'rtp_originator_dir',
+ 'stratum_cryptocurrency',
+ 'stratum_mining_pools',
+ 'stratum_mining_program',
+ 'stratum_mining_subscribe',
+ 'rdp_cookie',
+ 'rdp_security_protocol',
+ 'rdp_client_channels',
+ 'rdp_keyboard_layout',
+ 'rdp_client_version',
+ 'rdp_client_name',
+ 'rdp_client_product_id',
+ 'rdp_desktop_width',
+ 'rdp_desktop_height',
+ 'rdp_requested_color_depth',
+ 'rdp_certificate_type',
+ 'rdp_certificate_count',
+ 'rdp_certificate_permanent',
+ 'rdp_encryption_level',
+ 'rdp_encryption_method'
],
- "metrics": [
- "start_timestamp_ms",
- "end_timestamp_ms",
- "device_id",
- "data_center",
- "sled_ip",
- "device_group",
- "address_type",
- "decoded_as",
- "vsys_id",
- "security_action",
- "proxy_action",
- "security_mirrored_pkts",
- "security_mirrored_bytes",
- "client_ip",
- "client_port",
- "client_os_desc",
- "client_geolocation",
- "client_asn",
- "subscriber_id",
- "imei",
- "imsi",
- "apn",
- "phone_number",
- "packet_capture_file",
- "in_src_mac",
- "out_src_mac",
- "server_ip",
- "server_port",
- "server_os_desc",
- "server_geolocation",
- "server_asn",
- "server_fqdn",
- "server_domain",
- "in_dest_mac",
- "out_dest_mac",
- "app_path",
- "app_debug_info",
- "app",
- "app_content",
- "protocol_path",
- "sent_pkts",
- "received_pkts",
- "sent_bytes",
- "received_bytes",
- "duration_ms",
- "tcp_handshake_latency_ms",
- "tcp_c2s_ip_fragments",
- "tcp_s2c_ip_fragments",
- "tcp_c2s_lost_bytes",
- "tcp_s2c_lost_bytes",
- "tcp_c2s_o3_pkts",
- "tcp_s2c_o3_pkts",
- "tcp_c2s_rtx_pkts",
- "tcp_s2c_rtx_pkts",
- "tcp_c2s_rtx_bytes",
- "tcp_s2c_rtx_bytes",
- "tcp_rtt_ms",
- "http_url",
- "http_host",
- "http_request_line",
- "http_response_line",
- "http_proxy_flag",
- "http_sequence",
- "http_cookie",
- "http_referer",
- "http_user_agent",
- "http_request_content_length",
- "http_request_content_type",
- "http_response_content_length",
- "http_response_content_type",
- "http_set_cookie",
- "http_version",
- "http_status_code",
- "http_response_latency_ms",
- "http_session_duration_ms",
- "http_action_file_size",
- "mail_protocol_type",
- "mail_account",
- "mail_from_cmd",
- "mail_to_cmd",
- "mail_from",
- "mail_password",
- "mail_to",
- "mail_cc",
- "mail_bcc",
- "mail_subject",
- "mail_subject_charset",
- "mail_attachment_name",
- "mail_attachment_name_charset",
- "mail_eml_file",
- "dns_message_id",
- "dns_qr",
- "dns_opcode",
- "dns_aa",
- "dns_rd",
- "dns_ra",
- "dns_rcode",
- "dns_qtype",
- "dns_qclass",
- "dns_qdcount",
- "dns_ancount",
- "dns_nscount",
- "dns_arcount",
- "dns_qname",
- "dns_qtype",
- "dns_qclass",
- "dns_cname",
- "dns_sub",
- "dns_rr",
- "dns_response_latency_ms",
- "ssl_version",
- "ssl_sni",
- "ssl_san",
- "ssl_cn",
- "ssl_handshake_latency_ms",
- "ssl_ja3_hash",
- "ssl_ja3s_hash",
- "ssl_cert_issuer",
- "ssl_cert_subject",
- "ssl_esni_flag",
- "ssl_ech_flag",
- "dtls_cookie",
- "dtls_version",
- "dtls_sni",
- "dtls_san",
- "dtls_cn",
- "dtls_handshake_latency_ms",
- "dtls_ja3_fingerprint",
- "dtls_ja3_hash",
- "dtls_cert_issuer",
- "dtls_cert_subject",
- "quic_sni",
- "quic_version",
- "quic_user_agent",
- "ftp_account",
- "ftp_url",
- "ftp_link_type",
- "sip_call_id",
- "sip_originator_description",
- "sip_responder_description",
- "sip_user_agent",
- "sip_server",
- "sip_originator_sdp_connect_ip",
- "sip_originator_sdp_media_port",
- "sip_originator_sdp_media_type",
- "sip_originator_sdp_content",
- "sip_responder_sdp_connect_ip",
- "sip_responder_sdp_media_port",
- "sip_responder_sdp_media_type",
- "sip_responder_sdp_content",
- "sip_duration_s",
- "sip_bye",
- "rtp_payload_type_c2s",
- "rtp_payload_type_s2c",
- "rtp_originator_dir",
- "ssh_version",
- "ssh_auth_success",
- "ssh_client_version",
- "ssh_server_version",
- "ssh_cipher_alg",
- "ssh_mac_alg",
- "ssh_compression_alg",
- "ssh_kex_alg",
- "ssh_host_key_alg",
- "ssh_host_key",
- "ssh_hassh",
- "stratum_cryptocurrency",
- "stratum_mining_pools",
- "stratum_mining_program",
- "stratum_mining_subscribe",
- "rdp_cookie",
- "rdp_security_protocol",
- "rdp_client_channels",
- "rdp_keyboard_layout",
- "rdp_client_version",
- "rdp_client_name",
- "rdp_client_product_id",
- "rdp_desktop_width",
- "rdp_desktop_height",
- "rdp_requested_color_depth",
- "rdp_certificate_type",
- "rdp_certificate_count",
- "rdp_certificate_permanent",
- "rdp_encryption_level",
- "rdp_encryption_method"
+ metrics: [
+ 'start_timestamp_ms',
+ 'end_timestamp_ms',
+ 'device_id',
+ 'data_center',
+ 'sled_ip',
+ 'device_group',
+ 'address_type',
+ 'decoded_as',
+ 'vsys_id',
+ 'security_action',
+ 'proxy_action',
+ 'security_mirrored_pkts',
+ 'security_mirrored_bytes',
+ 'client_ip',
+ 'client_port',
+ 'client_os_desc',
+ 'client_geolocation',
+ 'client_asn',
+ 'subscriber_id',
+ 'imei',
+ 'imsi',
+ 'apn',
+ 'phone_number',
+ 'packet_capture_file',
+ 'in_src_mac',
+ 'out_src_mac',
+ 'server_ip',
+ 'server_port',
+ 'server_os_desc',
+ 'server_geolocation',
+ 'server_asn',
+ 'server_fqdn',
+ 'server_domain',
+ 'in_dest_mac',
+ 'out_dest_mac',
+ 'app_path',
+ 'app_debug_info',
+ 'app',
+ 'app_content',
+ 'protocol_path',
+ 'sent_pkts',
+ 'received_pkts',
+ 'sent_bytes',
+ 'received_bytes',
+ 'duration_ms',
+ 'tcp_handshake_latency_ms',
+ 'tcp_c2s_ip_fragments',
+ 'tcp_s2c_ip_fragments',
+ 'tcp_c2s_lost_bytes',
+ 'tcp_s2c_lost_bytes',
+ 'tcp_c2s_o3_pkts',
+ 'tcp_s2c_o3_pkts',
+ 'tcp_c2s_rtx_pkts',
+ 'tcp_s2c_rtx_pkts',
+ 'tcp_c2s_rtx_bytes',
+ 'tcp_s2c_rtx_bytes',
+ 'tcp_rtt_ms',
+ 'http_url',
+ 'http_host',
+ 'http_request_line',
+ 'http_response_line',
+ 'http_proxy_flag',
+ 'http_sequence',
+ 'http_cookie',
+ 'http_referer',
+ 'http_user_agent',
+ 'http_request_content_length',
+ 'http_request_content_type',
+ 'http_response_content_length',
+ 'http_response_content_type',
+ 'http_set_cookie',
+ 'http_version',
+ 'http_status_code',
+ 'http_response_latency_ms',
+ 'http_session_duration_ms',
+ 'http_action_file_size',
+ 'mail_protocol_type',
+ 'mail_account',
+ 'mail_from_cmd',
+ 'mail_to_cmd',
+ 'mail_from',
+ 'mail_password',
+ 'mail_to',
+ 'mail_cc',
+ 'mail_bcc',
+ 'mail_subject',
+ 'mail_subject_charset',
+ 'mail_attachment_name',
+ 'mail_attachment_name_charset',
+ 'mail_eml_file',
+ 'dns_message_id',
+ 'dns_qr',
+ 'dns_opcode',
+ 'dns_aa',
+ 'dns_rd',
+ 'dns_ra',
+ 'dns_rcode',
+ 'dns_qtype',
+ 'dns_qclass',
+ 'dns_qdcount',
+ 'dns_ancount',
+ 'dns_nscount',
+ 'dns_arcount',
+ 'dns_qname',
+ 'dns_qtype',
+ 'dns_qclass',
+ 'dns_cname',
+ 'dns_sub',
+ 'dns_rr',
+ 'dns_response_latency_ms',
+ 'ssl_version',
+ 'ssl_sni',
+ 'ssl_san',
+ 'ssl_cn',
+ 'ssl_handshake_latency_ms',
+ 'ssl_ja3_hash',
+ 'ssl_ja3s_hash',
+ 'ssl_cert_issuer',
+ 'ssl_cert_subject',
+ 'ssl_esni_flag',
+ 'ssl_ech_flag',
+ 'dtls_cookie',
+ 'dtls_version',
+ 'dtls_sni',
+ 'dtls_san',
+ 'dtls_cn',
+ 'dtls_handshake_latency_ms',
+ 'dtls_ja3_fingerprint',
+ 'dtls_ja3_hash',
+ 'dtls_cert_issuer',
+ 'dtls_cert_subject',
+ 'quic_sni',
+ 'quic_version',
+ 'quic_user_agent',
+ 'ftp_account',
+ 'ftp_url',
+ 'ftp_link_type',
+ 'sip_call_id',
+ 'sip_originator_description',
+ 'sip_responder_description',
+ 'sip_user_agent',
+ 'sip_server',
+ 'sip_originator_sdp_connect_ip',
+ 'sip_originator_sdp_media_port',
+ 'sip_originator_sdp_media_type',
+ 'sip_originator_sdp_content',
+ 'sip_responder_sdp_connect_ip',
+ 'sip_responder_sdp_media_port',
+ 'sip_responder_sdp_media_type',
+ 'sip_responder_sdp_content',
+ 'sip_duration_s',
+ 'sip_bye',
+ 'rtp_payload_type_c2s',
+ 'rtp_payload_type_s2c',
+ 'rtp_originator_dir',
+ 'ssh_version',
+ 'ssh_auth_success',
+ 'ssh_client_version',
+ 'ssh_server_version',
+ 'ssh_cipher_alg',
+ 'ssh_mac_alg',
+ 'ssh_compression_alg',
+ 'ssh_kex_alg',
+ 'ssh_host_key_alg',
+ 'ssh_host_key',
+ 'ssh_hassh',
+ 'stratum_cryptocurrency',
+ 'stratum_mining_pools',
+ 'stratum_mining_program',
+ 'stratum_mining_subscribe',
+ 'rdp_cookie',
+ 'rdp_security_protocol',
+ 'rdp_client_channels',
+ 'rdp_keyboard_layout',
+ 'rdp_client_version',
+ 'rdp_client_name',
+ 'rdp_client_product_id',
+ 'rdp_desktop_width',
+ 'rdp_desktop_height',
+ 'rdp_requested_color_depth',
+ 'rdp_certificate_type',
+ 'rdp_certificate_count',
+ 'rdp_certificate_permanent',
+ 'rdp_encryption_level',
+ 'rdp_encryption_method'
],
- "filters": [
- "session_id",
- "start_timestamp_ms",
- "end_timestamp_ms",
- "duration_ms",
- "tcp_handshake_latency_ms",
- "processing_time",
- "ingestion_time",
- "device_id",
- "data_center",
- "sled_ip",
- "device_group",
- "address_type",
- "decoded_as",
- "vsys_id",
- "flags",
- "flags_identify_info",
- "security_action",
- "security_rule_list",
- "monitor_rule_list",
- "shaping_rule_list",
- "sc_rule_list",
- "sc_rsp_raw",
- "sc_rsp_decrypted",
- "proxy_rule_list",
- "proxy_action",
- "security_mirrored_pkts",
- "security_mirrored_bytes",
- "client_ip",
- "client_port",
- "client_os_desc",
- "client_geolocation",
- "client_asn",
- "subscriber_id",
- "imei",
- "imsi",
- "apn",
- "phone_number",
- "in_src_mac",
- "out_src_mac",
- "server_ip",
- "server_port",
- "server_os_desc",
- "server_geolocation",
- "server_asn",
- "server_fqdn",
- "server_domain",
- "in_dest_mac",
- "out_dest_mac",
- "app_path",
- "app_debug_info",
- "app",
- "app_content",
- "dup_traffic_flag",
- "tunnel_endpoint_a_desc",
- "tunnel_endpoint_b_desc",
- "protocol_path",
- "fqdn_category_list",
- "sent_pkts",
- "received_pkts",
- "sent_bytes",
- "received_bytes",
- "tcp_c2s_ip_fragments",
- "tcp_s2c_ip_fragments",
- "tcp_c2s_lost_bytes",
- "tcp_s2c_lost_bytes",
- "tcp_c2s_o3_pkts",
- "tcp_s2c_o3_pkts",
- "tcp_c2s_rtx_pkts",
- "tcp_s2c_rtx_pkts",
- "tcp_c2s_rtx_bytes",
- "tcp_s2c_rtx_bytes",
- "tcp_rtt_ms",
- "http_url",
- "http_host",
- "http_request_line",
- "http_response_line",
- "http_proxy_flag",
- "http_sequence",
- "http_cookie",
- "http_referer",
- "http_user_agent",
- "http_request_content_length",
- "http_request_content_type",
- "http_response_content_length",
- "http_response_content_type",
- "http_set_cookie",
- "http_version",
- "http_status_code",
- "http_response_latency_ms",
- "http_session_duration_ms",
- "http_action_file_size",
- "mail_protocol_type",
- "mail_account",
- "mail_from_cmd",
- "mail_to_cmd",
- "mail_from",
- "mail_password",
- "mail_to",
- "mail_cc",
- "mail_bcc",
- "mail_subject",
- "mail_subject_charset",
- "mail_attachment_name",
- "mail_attachment_name_charset",
- "mail_eml_file",
- "dns_message_id",
- "dns_qr",
- "dns_opcode",
- "dns_aa",
- "dns_rd",
- "dns_ra",
- "dns_rcode",
- "dns_qtype",
- "dns_qclass",
- "dns_qdcount",
- "dns_ancount",
- "dns_nscount",
- "dns_arcount",
- "dns_qname",
- "dns_qtype",
- "dns_qclass",
- "dns_cname",
- "dns_sub",
- "dns_rr",
- "dns_response_latency_ms",
- "ssl_version",
- "ssl_sni",
- "ssl_san",
- "ssl_cn",
- "ssl_handshake_latency_ms",
- "ssl_ja3_hash",
- "ssl_ja3s_hash",
- "ssl_cert_issuer",
- "ssl_cert_subject",
- "ssl_esni_flag",
- "ssl_ech_flag",
- "dtls_cookie",
- "dtls_version",
- "dtls_sni",
- "dtls_san",
- "dtls_cn",
- "dtls_handshake_latency_ms",
- "dtls_ja3_fingerprint",
- "dtls_ja3_hash",
- "dtls_cert_issuer",
- "dtls_cert_subject",
- "quic_sni",
- "quic_version",
- "quic_user_agent",
- "ftp_account",
- "ftp_url",
- "ftp_link_type",
- "sip_call_id",
- "sip_originator_description",
- "sip_responder_description",
- "sip_user_agent",
- "sip_server",
- "sip_originator_sdp_connect_ip",
- "sip_originator_sdp_media_port",
- "sip_originator_sdp_media_type",
- "sip_originator_sdp_content",
- "sip_responder_sdp_connect_ip",
- "sip_responder_sdp_media_port",
- "sip_responder_sdp_media_type",
- "sip_responder_sdp_content",
- "sip_duration_s",
- "sip_bye",
- "rtp_payload_type_c2s",
- "rtp_payload_type_s2c",
- "rtp_originator_dir",
- "ssh_version",
- "ssh_auth_success",
- "ssh_client_version",
- "ssh_server_version",
- "ssh_cipher_alg",
- "ssh_mac_alg",
- "ssh_compression_alg",
- "ssh_kex_alg",
- "ssh_host_key_alg",
- "ssh_host_key",
- "ssh_hassh",
- "stratum_cryptocurrency",
- "stratum_mining_pools",
- "stratum_mining_program",
- "stratum_mining_subscribe",
- "rdp_cookie",
- "rdp_security_protocol",
- "rdp_client_channels",
- "rdp_keyboard_layout",
- "rdp_client_version",
- "rdp_client_name",
- "rdp_client_product_id",
- "rdp_desktop_width",
- "rdp_desktop_height",
- "rdp_requested_color_depth",
- "rdp_certificate_type",
- "rdp_certificate_count",
- "rdp_certificate_permanent",
- "rdp_encryption_level",
- "rdp_encryption_method"
+ filters: [
+ 'session_id',
+ 'start_timestamp_ms',
+ 'end_timestamp_ms',
+ 'duration_ms',
+ 'tcp_handshake_latency_ms',
+ 'processing_time',
+ 'ingestion_time',
+ 'device_id',
+ 'data_center',
+ 'sled_ip',
+ 'device_group',
+ 'address_type',
+ 'decoded_as',
+ 'vsys_id',
+ 'flags',
+ 'flags_identify_info',
+ 'security_action',
+ 'security_rule_list',
+ 'monitor_rule_list',
+ 'shaping_rule_list',
+ 'sc_rule_list',
+ 'sc_rsp_raw',
+ 'sc_rsp_decrypted',
+ 'proxy_rule_list',
+ 'proxy_action',
+ 'security_mirrored_pkts',
+ 'security_mirrored_bytes',
+ 'client_ip',
+ 'client_port',
+ 'client_os_desc',
+ 'client_geolocation',
+ 'client_asn',
+ 'subscriber_id',
+ 'imei',
+ 'imsi',
+ 'apn',
+ 'phone_number',
+ 'in_src_mac',
+ 'out_src_mac',
+ 'server_ip',
+ 'server_port',
+ 'server_os_desc',
+ 'server_geolocation',
+ 'server_asn',
+ 'server_fqdn',
+ 'server_domain',
+ 'in_dest_mac',
+ 'out_dest_mac',
+ 'app_path',
+ 'app_debug_info',
+ 'app',
+ 'app_content',
+ 'dup_traffic_flag',
+ 'tunnel_endpoint_a_desc',
+ 'tunnel_endpoint_b_desc',
+ 'protocol_path',
+ 'fqdn_category_list',
+ 'sent_pkts',
+ 'received_pkts',
+ 'sent_bytes',
+ 'received_bytes',
+ 'tcp_c2s_ip_fragments',
+ 'tcp_s2c_ip_fragments',
+ 'tcp_c2s_lost_bytes',
+ 'tcp_s2c_lost_bytes',
+ 'tcp_c2s_o3_pkts',
+ 'tcp_s2c_o3_pkts',
+ 'tcp_c2s_rtx_pkts',
+ 'tcp_s2c_rtx_pkts',
+ 'tcp_c2s_rtx_bytes',
+ 'tcp_s2c_rtx_bytes',
+ 'tcp_rtt_ms',
+ 'http_url',
+ 'http_host',
+ 'http_request_line',
+ 'http_response_line',
+ 'http_proxy_flag',
+ 'http_sequence',
+ 'http_cookie',
+ 'http_referer',
+ 'http_user_agent',
+ 'http_request_content_length',
+ 'http_request_content_type',
+ 'http_response_content_length',
+ 'http_response_content_type',
+ 'http_set_cookie',
+ 'http_version',
+ 'http_status_code',
+ 'http_response_latency_ms',
+ 'http_session_duration_ms',
+ 'http_action_file_size',
+ 'mail_protocol_type',
+ 'mail_account',
+ 'mail_from_cmd',
+ 'mail_to_cmd',
+ 'mail_from',
+ 'mail_password',
+ 'mail_to',
+ 'mail_cc',
+ 'mail_bcc',
+ 'mail_subject',
+ 'mail_subject_charset',
+ 'mail_attachment_name',
+ 'mail_attachment_name_charset',
+ 'mail_eml_file',
+ 'dns_message_id',
+ 'dns_qr',
+ 'dns_opcode',
+ 'dns_aa',
+ 'dns_rd',
+ 'dns_ra',
+ 'dns_rcode',
+ 'dns_qtype',
+ 'dns_qclass',
+ 'dns_qdcount',
+ 'dns_ancount',
+ 'dns_nscount',
+ 'dns_arcount',
+ 'dns_qname',
+ 'dns_qtype',
+ 'dns_qclass',
+ 'dns_cname',
+ 'dns_sub',
+ 'dns_rr',
+ 'dns_response_latency_ms',
+ 'ssl_version',
+ 'ssl_sni',
+ 'ssl_san',
+ 'ssl_cn',
+ 'ssl_handshake_latency_ms',
+ 'ssl_ja3_hash',
+ 'ssl_ja3s_hash',
+ 'ssl_cert_issuer',
+ 'ssl_cert_subject',
+ 'ssl_esni_flag',
+ 'ssl_ech_flag',
+ 'dtls_cookie',
+ 'dtls_version',
+ 'dtls_sni',
+ 'dtls_san',
+ 'dtls_cn',
+ 'dtls_handshake_latency_ms',
+ 'dtls_ja3_fingerprint',
+ 'dtls_ja3_hash',
+ 'dtls_cert_issuer',
+ 'dtls_cert_subject',
+ 'quic_sni',
+ 'quic_version',
+ 'quic_user_agent',
+ 'ftp_account',
+ 'ftp_url',
+ 'ftp_link_type',
+ 'sip_call_id',
+ 'sip_originator_description',
+ 'sip_responder_description',
+ 'sip_user_agent',
+ 'sip_server',
+ 'sip_originator_sdp_connect_ip',
+ 'sip_originator_sdp_media_port',
+ 'sip_originator_sdp_media_type',
+ 'sip_originator_sdp_content',
+ 'sip_responder_sdp_connect_ip',
+ 'sip_responder_sdp_media_port',
+ 'sip_responder_sdp_media_type',
+ 'sip_responder_sdp_content',
+ 'sip_duration_s',
+ 'sip_bye',
+ 'rtp_payload_type_c2s',
+ 'rtp_payload_type_s2c',
+ 'rtp_originator_dir',
+ 'ssh_version',
+ 'ssh_auth_success',
+ 'ssh_client_version',
+ 'ssh_server_version',
+ 'ssh_cipher_alg',
+ 'ssh_mac_alg',
+ 'ssh_compression_alg',
+ 'ssh_kex_alg',
+ 'ssh_host_key_alg',
+ 'ssh_host_key',
+ 'ssh_hassh',
+ 'stratum_cryptocurrency',
+ 'stratum_mining_pools',
+ 'stratum_mining_program',
+ 'stratum_mining_subscribe',
+ 'rdp_cookie',
+ 'rdp_security_protocol',
+ 'rdp_client_channels',
+ 'rdp_keyboard_layout',
+ 'rdp_client_version',
+ 'rdp_client_name',
+ 'rdp_client_product_id',
+ 'rdp_desktop_width',
+ 'rdp_desktop_height',
+ 'rdp_requested_color_depth',
+ 'rdp_certificate_type',
+ 'rdp_certificate_count',
+ 'rdp_certificate_permanent',
+ 'rdp_encryption_level',
+ 'rdp_encryption_method'
],
- "references": {
- "aggregation": [
+ references: {
+ aggregation: [
{
- "type": "int",
- "functions": "COUNT,COUNT_DISTINCT,AVG,SUM,MAX,MIN,MEDIAN,QUANTILE"
+ type: 'int',
+ functions: 'COUNT,COUNT_DISTINCT,AVG,SUM,MAX,MIN,MEDIAN,QUANTILE'
},
{
- "type": "long",
- "functions": "COUNT,COUNT_DISTINCT,AVG,SUM,MAX,MIN,MEDIAN,QUANTILE"
+ type: 'long',
+ functions: 'COUNT,COUNT_DISTINCT,AVG,SUM,MAX,MIN,MEDIAN,QUANTILE'
},
{
- "type": "float",
- "functions": "COUNT,COUNT_DISTINCT,AVG,SUM,MAX,MIN,MEDIAN,QUANTILE"
+ type: 'float',
+ functions: 'COUNT,COUNT_DISTINCT,AVG,SUM,MAX,MIN,MEDIAN,QUANTILE'
},
{
- "type": "double",
- "functions": "COUNT,COUNT_DISTINCT,AVG,SUM,MAX,MIN,MEDIAN,QUANTILE"
+ type: 'double',
+ functions: 'COUNT,COUNT_DISTINCT,AVG,SUM,MAX,MIN,MEDIAN,QUANTILE'
},
{
- "type": "string",
- "functions": "COUNT,COUNT_DISTINCT"
+ type: 'string',
+ functions: 'COUNT,COUNT_DISTINCT'
},
{
- "type": "date",
- "functions": "COUNT,COUNT_DISTINCT,MAX,MIN,UNIX_TIMESTAMP,FROM_UNIXTIME,DATE_FORMAT,CONVERT_TZ"
+ type: 'date',
+ functions: 'COUNT,COUNT_DISTINCT,MAX,MIN,UNIX_TIMESTAMP,FROM_UNIXTIME,DATE_FORMAT,CONVERT_TZ'
},
{
- "type": "datetime",
- "functions": "COUNT,COUNT_DISTINCT,MAX,MIN"
+ type: 'datetime',
+ functions: 'COUNT,COUNT_DISTINCT,MAX,MIN'
},
{
- "type": "timestamp",
- "functions": "COUNT,COUNT_DISTINCT,MAX,MIN,UNIX_TIMESTAMP,FROM_UNIXTIME,DATE_FORMAT,CONVERT_TZ"
+ type: 'timestamp',
+ functions: 'COUNT,COUNT_DISTINCT,MAX,MIN,UNIX_TIMESTAMP,FROM_UNIXTIME,DATE_FORMAT,CONVERT_TZ'
},
{
- "type": "array",
- "functions": "COUNT,COUNT_DISTINCT"
+ type: 'array',
+ functions: 'COUNT,COUNT_DISTINCT'
},
{
- "type": "bit",
- "functions": "COUNT,COUNT_DISTINCT"
+ type: 'bit',
+ functions: 'COUNT,COUNT_DISTINCT'
}
],
- "operator": [
+ operator: [
{
- "type": "int",
- "functions": "=,!=,>,<,>=,<=,in,not in"
+ type: 'int',
+ functions: '=,!=,>,<,>=,<=,in,not in'
},
{
- "type": "long",
- "functions": "=,!=,>,<,>=,<=,in,not in"
+ type: 'long',
+ functions: '=,!=,>,<,>=,<=,in,not in'
},
{
- "type": "float",
- "functions": "=,!=,>,<,>=,<="
+ type: 'float',
+ functions: '=,!=,>,<,>=,<='
},
{
- "type": "double",
- "functions": "=,!=,>,<,>=,<="
+ type: 'double',
+ functions: '=,!=,>,<,>=,<='
},
{
- "type": "string",
- "functions": "=,!=,in,not in,like,not like,notEmpty,empty"
+ type: 'string',
+ functions: '=,!=,in,not in,like,not like,notEmpty,empty'
},
{
- "type": "date",
- "functions": "=,!=,>,<,>=,<="
+ type: 'date',
+ functions: '=,!=,>,<,>=,<='
},
{
- "type": "dateTime",
- "functions": "=,!=,>,<,>=,<="
+ type: 'dateTime',
+ functions: '=,!=,>,<,>=,<='
},
{
- "type": "timestamp",
- "functions": "=,!=,>,<,>=,<="
+ type: 'timestamp',
+ functions: '=,!=,>,<,>=,<='
},
{
- "type": "array",
- "functions": "has,notEmpty,empty"
+ type: 'array',
+ functions: 'has,notEmpty,empty'
},
{
- "type": "bit",
- "functions": "=,!=,bitAnd"
+ type: 'bit',
+ functions: '=,!=,bitAnd'
}
]
},
- "details": {
- "general": [
- "recv_time",
- "log_id",
- "decoded_as",
- "session_id",
- "start_timestamp_ms",
- "end_timestamp_ms",
- "duration_ms",
- "tcp_handshake_latency_ms",
- "ingestion_time",
- "processing_time",
- "insert_time",
- "device_id",
- "out_link_id",
- "in_link_id",
- "device_tag",
- "data_center",
- "device_group",
- "sled_ip",
- "address_type",
- "vsys_id",
- "t_vsys_id",
- "flags",
- "flags_identify_info"
+ details: {
+ general: [
+ 'recv_time',
+ 'log_id',
+ 'decoded_as',
+ 'session_id',
+ 'start_timestamp_ms',
+ 'end_timestamp_ms',
+ 'duration_ms',
+ 'tcp_handshake_latency_ms',
+ 'ingestion_time',
+ 'processing_time',
+ 'insert_time',
+ 'device_id',
+ 'out_link_id',
+ 'in_link_id',
+ 'device_tag',
+ 'data_center',
+ 'device_group',
+ 'sled_ip',
+ 'address_type',
+ 'vsys_id',
+ 't_vsys_id',
+ 'flags',
+ 'flags_identify_info'
],
- "treatment": [
- "security_rule_list",
- "security_action",
- "monitor_rule_list",
- "shaping_rule_list",
- "sc_rule_list",
- "sc_rsp_raw",
- "sc_rsp_decrypted",
- "proxy_rule_list",
- "proxy_action",
- "proxy_pinning_status",
- "proxy_intercept_status",
- "proxy_passthrough_reason",
- "proxy_client_side_latency_ms",
- "proxy_server_side_latency_ms",
- "proxy_client_side_version",
- "proxy_server_side_version",
- "proxy_cert_verify",
- "proxy_intercept_error",
- "security_mirrored_pkts",
- "security_mirrored_bytes"
+ treatment: [
+ 'security_rule_list',
+ 'security_action',
+ 'monitor_rule_list',
+ 'shaping_rule_list',
+ 'sc_rule_list',
+ 'sc_rsp_raw',
+ 'sc_rsp_decrypted',
+ 'proxy_rule_list',
+ 'proxy_action',
+ 'proxy_pinning_status',
+ 'proxy_intercept_status',
+ 'proxy_passthrough_reason',
+ 'proxy_client_side_latency_ms',
+ 'proxy_server_side_latency_ms',
+ 'proxy_client_side_version',
+ 'proxy_server_side_version',
+ 'proxy_cert_verify',
+ 'proxy_intercept_error',
+ 'security_mirrored_pkts',
+ 'security_mirrored_bytes'
],
- "source": [
- "client_ip",
- "client_port",
- "client_os_desc",
- "client_geolocation",
- "client_asn",
- "subscriber_id",
- "imei",
- "imsi",
- "apn",
- "phone_number"
+ source: [
+ 'client_ip',
+ 'client_port',
+ 'client_os_desc',
+ 'client_geolocation',
+ 'client_asn',
+ 'subscriber_id',
+ 'imei',
+ 'imsi',
+ 'apn',
+ 'phone_number'
],
- "destination": [
- "server_ip",
- "server_port",
- "server_os_desc",
- "server_geolocation",
- "server_asn",
- "server_fqdn",
- "server_domain"
+ destination: [
+ 'server_ip',
+ 'server_port',
+ 'server_os_desc',
+ 'server_geolocation',
+ 'server_asn',
+ 'server_fqdn',
+ 'server_domain'
],
- "application": [
- "app_path",
- "app",
- "app_debug_info",
- "app_content",
- "fqdn_category_list"
+ application: [
+ 'app_path',
+ 'app',
+ 'app_debug_info',
+ 'app_content',
+ 'fqdn_category_list'
],
- "protocol": [
- "protocol_path",
- "dns_message_id",
- "dns_qr",
- "dns_opcode",
- "dns_aa",
- "dns_tc",
- "dns_rd",
- "dns_ra",
- "dns_rcode",
- "dns_qdcount",
- "dns_ancount",
- "dns_nscount",
- "dns_arcount",
- "dns_qname",
- "dns_qtype",
- "dns_qclass",
- "dns_cname",
- "dns_sub",
- "dns_rr",
- "dns_response_latency_ms",
- "dtls_cookie",
- "dtls_version",
- "dtls_sni",
- "dtls_san",
- "dtls_cn",
- "dtls_handshake_latency_ms",
- "dtls_ja3_fingerprint",
- "dtls_ja3_hash",
- "dtls_cert_issuer",
- "dtls_cert_subject",
- "ftp_account",
- "ftp_url",
- "ftp_link_type",
- "http_url",
- "http_host",
- "http_request_line",
- "http_response_line",
- "http_request_content_length",
- "http_request_content_type",
- "http_response_content_length",
- "http_response_content_type",
- "http_request_body",
- "http_response_body",
- "http_proxy_flag",
- "http_sequence",
- "http_cookie",
- "http_referer",
- "http_user_agent",
- "http_set_cookie",
- "http_version",
- "http_status_code",
- "http_response_latency_ms",
- "http_session_duration_ms",
- "http_action_file_size",
- "mail_protocol_type",
- "mail_account",
- "mail_from_cmd",
- "mail_to_cmd",
- "mail_from",
- "mail_password",
- "mail_to",
- "mail_cc",
- "mail_bcc",
- "mail_subject",
- "mail_subject_charset",
- "mail_attachment_name",
- "mail_attachment_name_charset",
- "mail_eml_file",
- "quic_version",
- "quic_sni",
- "quic_user_agent",
- "rdp_cookie",
- "rdp_security_protocol",
- "rdp_client_channels",
- "rdp_keyboard_layout",
- "rdp_client_version",
- "rdp_client_name",
- "rdp_client_product_id",
- "rdp_desktop_width",
- "rdp_desktop_height",
- "rdp_requested_color_depth",
- "rdp_certificate_type",
- "rdp_certificate_count",
- "rdp_certificate_permanent",
- "rdp_encryption_level",
- "rdp_encryption_method",
- "ssh_version",
- "ssh_auth_success",
- "ssh_client_version",
- "ssh_server_version",
- "ssh_cipher_alg",
- "ssh_mac_alg",
- "ssh_compression_alg",
- "ssh_kex_alg",
- "ssh_host_key_alg",
- "ssh_host_key",
- "ssh_hassh",
- "ssl_version",
- "ssl_sni",
- "ssl_san",
- "ssl_cn",
- "ssl_handshake_latency_ms",
- "ssl_ja3_hash",
- "ssl_ja3s_hash",
- "ssl_cert_issuer",
- "ssl_cert_subject",
- "ssl_esni_flag",
- "ssl_ech_flag",
- "sip_call_id",
- "sip_originator_description",
- "sip_responder_description",
- "sip_user_agent",
- "sip_server",
- "sip_originator_sdp_connect_ip",
- "sip_originator_sdp_media_port",
- "sip_originator_sdp_media_type",
- "sip_originator_sdp_content",
- "sip_responder_sdp_connect_ip",
- "sip_responder_sdp_media_port",
- "sip_responder_sdp_media_type",
- "sip_responder_sdp_content",
- "sip_duration_s",
- "sip_bye",
- "rtp_payload_type_c2s",
- "rtp_payload_type_s2c",
- "rtp_pcap_path",
- "rtp_originator_dir",
- "stratum_cryptocurrency",
- "stratum_mining_pools",
- "stratum_mining_program",
- "stratum_mining_subscribe"
+ protocol: [
+ 'protocol_path',
+ 'dns_message_id',
+ 'dns_qr',
+ 'dns_opcode',
+ 'dns_aa',
+ 'dns_tc',
+ 'dns_rd',
+ 'dns_ra',
+ 'dns_rcode',
+ 'dns_qdcount',
+ 'dns_ancount',
+ 'dns_nscount',
+ 'dns_arcount',
+ 'dns_qname',
+ 'dns_qtype',
+ 'dns_qclass',
+ 'dns_cname',
+ 'dns_sub',
+ 'dns_rr',
+ 'dns_response_latency_ms',
+ 'dtls_cookie',
+ 'dtls_version',
+ 'dtls_sni',
+ 'dtls_san',
+ 'dtls_cn',
+ 'dtls_handshake_latency_ms',
+ 'dtls_ja3_fingerprint',
+ 'dtls_ja3_hash',
+ 'dtls_cert_issuer',
+ 'dtls_cert_subject',
+ 'ftp_account',
+ 'ftp_url',
+ 'ftp_link_type',
+ 'http_url',
+ 'http_host',
+ 'http_request_line',
+ 'http_response_line',
+ 'http_request_content_length',
+ 'http_request_content_type',
+ 'http_response_content_length',
+ 'http_response_content_type',
+ 'http_request_body',
+ 'http_response_body',
+ 'http_proxy_flag',
+ 'http_sequence',
+ 'http_cookie',
+ 'http_referer',
+ 'http_user_agent',
+ 'http_set_cookie',
+ 'http_version',
+ 'http_status_code',
+ 'http_response_latency_ms',
+ 'http_session_duration_ms',
+ 'http_action_file_size',
+ 'mail_protocol_type',
+ 'mail_account',
+ 'mail_from_cmd',
+ 'mail_to_cmd',
+ 'mail_from',
+ 'mail_password',
+ 'mail_to',
+ 'mail_cc',
+ 'mail_bcc',
+ 'mail_subject',
+ 'mail_subject_charset',
+ 'mail_attachment_name',
+ 'mail_attachment_name_charset',
+ 'mail_eml_file',
+ 'quic_version',
+ 'quic_sni',
+ 'quic_user_agent',
+ 'rdp_cookie',
+ 'rdp_security_protocol',
+ 'rdp_client_channels',
+ 'rdp_keyboard_layout',
+ 'rdp_client_version',
+ 'rdp_client_name',
+ 'rdp_client_product_id',
+ 'rdp_desktop_width',
+ 'rdp_desktop_height',
+ 'rdp_requested_color_depth',
+ 'rdp_certificate_type',
+ 'rdp_certificate_count',
+ 'rdp_certificate_permanent',
+ 'rdp_encryption_level',
+ 'rdp_encryption_method',
+ 'ssh_version',
+ 'ssh_auth_success',
+ 'ssh_client_version',
+ 'ssh_server_version',
+ 'ssh_cipher_alg',
+ 'ssh_mac_alg',
+ 'ssh_compression_alg',
+ 'ssh_kex_alg',
+ 'ssh_host_key_alg',
+ 'ssh_host_key',
+ 'ssh_hassh',
+ 'ssl_version',
+ 'ssl_sni',
+ 'ssl_san',
+ 'ssl_cn',
+ 'ssl_handshake_latency_ms',
+ 'ssl_ja3_hash',
+ 'ssl_ja3s_hash',
+ 'ssl_cert_issuer',
+ 'ssl_cert_subject',
+ 'ssl_esni_flag',
+ 'ssl_ech_flag',
+ 'sip_call_id',
+ 'sip_originator_description',
+ 'sip_responder_description',
+ 'sip_user_agent',
+ 'sip_server',
+ 'sip_originator_sdp_connect_ip',
+ 'sip_originator_sdp_media_port',
+ 'sip_originator_sdp_media_type',
+ 'sip_originator_sdp_content',
+ 'sip_responder_sdp_connect_ip',
+ 'sip_responder_sdp_media_port',
+ 'sip_responder_sdp_media_type',
+ 'sip_responder_sdp_content',
+ 'sip_duration_s',
+ 'sip_bye',
+ 'rtp_payload_type_c2s',
+ 'rtp_payload_type_s2c',
+ 'rtp_pcap_path',
+ 'rtp_originator_dir',
+ 'stratum_cryptocurrency',
+ 'stratum_mining_pools',
+ 'stratum_mining_program',
+ 'stratum_mining_subscribe'
],
- "transmission": [
- "sent_pkts",
- "received_pkts",
- "sent_bytes",
- "received_bytes",
- "tcp_c2s_ip_fragments",
- "tcp_s2c_ip_fragments",
- "tcp_c2s_lost_bytes",
- "tcp_s2c_lost_bytes",
- "tcp_c2s_o3_pkts",
- "tcp_s2c_o3_pkts",
- "tcp_c2s_rtx_pkts",
- "tcp_s2c_rtx_pkts",
- "tcp_c2s_rtx_bytes",
- "tcp_s2c_rtx_bytes",
- "tcp_rtt_ms",
- "tcp_client_isn",
- "tcp_server_isn"
+ transmission: [
+ 'sent_pkts',
+ 'received_pkts',
+ 'sent_bytes',
+ 'received_bytes',
+ 'tcp_c2s_ip_fragments',
+ 'tcp_s2c_ip_fragments',
+ 'tcp_c2s_lost_bytes',
+ 'tcp_s2c_lost_bytes',
+ 'tcp_c2s_o3_pkts',
+ 'tcp_s2c_o3_pkts',
+ 'tcp_c2s_rtx_pkts',
+ 'tcp_s2c_rtx_pkts',
+ 'tcp_c2s_rtx_bytes',
+ 'tcp_s2c_rtx_bytes',
+ 'tcp_rtt_ms',
+ 'tcp_client_isn',
+ 'tcp_server_isn'
],
- "other": [
- "packet_capture_file",
- "in_src_mac",
- "out_src_mac",
- "in_dest_mac",
- "out_dest_mac",
- "tunnels",
- "dup_traffic_flag",
- "tunnel_endpoint_a_desc",
- "tunnel_endpoint_b_desc"
+ other: [
+ 'packet_capture_file',
+ 'in_src_mac',
+ 'out_src_mac',
+ 'in_dest_mac',
+ 'out_dest_mac',
+ 'tunnels',
+ 'dup_traffic_flag',
+ 'tunnel_endpoint_a_desc',
+ 'tunnel_endpoint_b_desc'
]
}
},
- "data_view": {
- "PROXY_INTERCEPT_EVENT_VIEW": {
- "columns": [
- "recv_time",
- "log_id",
- "decoded_as",
- "session_id",
- "start_timestamp_ms",
- "end_timestamp_ms",
- "duration_ms",
- "tcp_handshake_latency_ms",
- "ingestion_time",
- "processing_time",
- "insert_time",
- "device_id",
- "out_link_id",
- "in_link_id",
- "device_tag",
- "data_center",
- "device_group",
- "sled_ip",
- "address_type",
- "vsys_id",
- "t_vsys_id",
- "flags",
- "flags_identify_info",
- "proxy_rule_list",
- "proxy_action",
- "proxy_pinning_status",
- "proxy_intercept_status",
- "proxy_passthrough_reason",
- "proxy_client_side_latency_ms",
- "proxy_server_side_latency_ms",
- "proxy_client_side_version",
- "proxy_server_side_version",
- "proxy_cert_verify",
- "proxy_intercept_error",
- "client_ip",
- "client_port",
- "client_os_desc",
- "client_geolocation",
- "client_asn",
- "subscriber_id",
- "imei",
- "imsi",
- "apn",
- "phone_number",
- "server_ip",
- "server_port",
- "server_os_desc",
- "server_geolocation",
- "server_asn",
- "server_fqdn",
- "server_domain",
- "app_path",
- "app",
- "app_debug_info",
- "app_content",
- "protocol_path",
- "fqdn_category_list",
- "sent_pkts",
- "received_pkts",
- "sent_bytes",
- "received_bytes",
- "tcp_c2s_ip_fragments",
- "tcp_s2c_ip_fragments",
- "tcp_c2s_lost_bytes",
- "tcp_s2c_lost_bytes",
- "tcp_c2s_o3_pkts",
- "tcp_s2c_o3_pkts",
- "tcp_c2s_rtx_pkts",
- "tcp_s2c_rtx_pkts",
- "tcp_c2s_rtx_bytes",
- "tcp_s2c_rtx_bytes",
- "tcp_rtt_ms",
- "tcp_client_isn",
- "tcp_server_isn",
- "packet_capture_file",
- "in_src_mac",
- "out_src_mac",
- "in_dest_mac",
- "out_dest_mac",
- "tunnels",
- "dup_traffic_flag",
- "tunnel_endpoint_a_desc",
- "tunnel_endpoint_b_desc",
- "http_url",
- "http_host",
- "http_request_line",
- "http_response_line",
- "http_request_content_length",
- "http_request_content_type",
- "http_response_content_length",
- "http_response_content_type",
- "http_request_body",
- "http_response_body",
- "http_proxy_flag",
- "http_sequence",
- "http_cookie",
- "http_referer",
- "http_user_agent",
- "http_set_cookie",
- "http_version",
- "http_status_code",
- "http_response_latency_ms",
- "http_session_duration_ms",
- "http_action_file_size",
- "ssl_version",
- "ssl_sni",
- "ssl_san",
- "ssl_cn",
- "ssl_handshake_latency_ms",
- "ssl_ja3_hash",
- "ssl_ja3s_hash",
- "ssl_cert_issuer",
- "ssl_cert_subject",
- "ssl_esni_flag",
- "ssl_ech_flag"
+ data_view: {
+ PROXY_INTERCEPT_EVENT_VIEW: {
+ columns: [
+ 'recv_time',
+ 'log_id',
+ 'decoded_as',
+ 'session_id',
+ 'start_timestamp_ms',
+ 'end_timestamp_ms',
+ 'duration_ms',
+ 'tcp_handshake_latency_ms',
+ 'ingestion_time',
+ 'processing_time',
+ 'insert_time',
+ 'device_id',
+ 'out_link_id',
+ 'in_link_id',
+ 'device_tag',
+ 'data_center',
+ 'device_group',
+ 'sled_ip',
+ 'address_type',
+ 'vsys_id',
+ 't_vsys_id',
+ 'flags',
+ 'flags_identify_info',
+ 'proxy_rule_list',
+ 'proxy_action',
+ 'proxy_pinning_status',
+ 'proxy_intercept_status',
+ 'proxy_passthrough_reason',
+ 'proxy_client_side_latency_ms',
+ 'proxy_server_side_latency_ms',
+ 'proxy_client_side_version',
+ 'proxy_server_side_version',
+ 'proxy_cert_verify',
+ 'proxy_intercept_error',
+ 'client_ip',
+ 'client_port',
+ 'client_os_desc',
+ 'client_geolocation',
+ 'client_asn',
+ 'subscriber_id',
+ 'imei',
+ 'imsi',
+ 'apn',
+ 'phone_number',
+ 'server_ip',
+ 'server_port',
+ 'server_os_desc',
+ 'server_geolocation',
+ 'server_asn',
+ 'server_fqdn',
+ 'server_domain',
+ 'app_path',
+ 'app',
+ 'app_debug_info',
+ 'app_content',
+ 'protocol_path',
+ 'fqdn_category_list',
+ 'sent_pkts',
+ 'received_pkts',
+ 'sent_bytes',
+ 'received_bytes',
+ 'tcp_c2s_ip_fragments',
+ 'tcp_s2c_ip_fragments',
+ 'tcp_c2s_lost_bytes',
+ 'tcp_s2c_lost_bytes',
+ 'tcp_c2s_o3_pkts',
+ 'tcp_s2c_o3_pkts',
+ 'tcp_c2s_rtx_pkts',
+ 'tcp_s2c_rtx_pkts',
+ 'tcp_c2s_rtx_bytes',
+ 'tcp_s2c_rtx_bytes',
+ 'tcp_rtt_ms',
+ 'tcp_client_isn',
+ 'tcp_server_isn',
+ 'packet_capture_file',
+ 'in_src_mac',
+ 'out_src_mac',
+ 'in_dest_mac',
+ 'out_dest_mac',
+ 'tunnels',
+ 'dup_traffic_flag',
+ 'tunnel_endpoint_a_desc',
+ 'tunnel_endpoint_b_desc',
+ 'http_url',
+ 'http_host',
+ 'http_request_line',
+ 'http_response_line',
+ 'http_request_content_length',
+ 'http_request_content_type',
+ 'http_response_content_length',
+ 'http_response_content_type',
+ 'http_request_body',
+ 'http_response_body',
+ 'http_proxy_flag',
+ 'http_sequence',
+ 'http_cookie',
+ 'http_referer',
+ 'http_user_agent',
+ 'http_set_cookie',
+ 'http_version',
+ 'http_status_code',
+ 'http_response_latency_ms',
+ 'http_session_duration_ms',
+ 'http_action_file_size',
+ 'ssl_version',
+ 'ssl_sni',
+ 'ssl_san',
+ 'ssl_cn',
+ 'ssl_handshake_latency_ms',
+ 'ssl_ja3_hash',
+ 'ssl_ja3s_hash',
+ 'ssl_cert_issuer',
+ 'ssl_cert_subject',
+ 'ssl_esni_flag',
+ 'ssl_ech_flag'
],
- "default_columns": [
- "recv_time",
- "subscriber_id",
- "security_rule_list",
- "security_action",
- "client_ip",
- "client_port",
- "server_fqdn",
- "app",
- "server_ip",
- "server_port"
+ default_columns: [
+ 'recv_time',
+ 'subscriber_id',
+ 'security_rule_list',
+ 'security_action',
+ 'client_ip',
+ 'client_port',
+ 'server_fqdn',
+ 'app',
+ 'server_ip',
+ 'server_port'
]
}
},
- "decoded_as": {
- "BASE": {
- "columns": [
- "recv_time",
- "log_id",
- "decoded_as",
- "session_id",
- "start_timestamp_ms",
- "end_timestamp_ms",
- "duration_ms",
- "tcp_handshake_latency_ms",
- "ingestion_time",
- "processing_time",
- "insert_time",
- "device_id",
- "out_link_id",
- "in_link_id",
- "device_tag",
- "data_center",
- "device_group",
- "sled_ip",
- "address_type",
- "vsys_id",
- "t_vsys_id",
- "flags",
- "flags_identify_info",
- "security_rule_list",
- "security_action",
- "monitor_rule_list",
- "shaping_rule_list",
- "sc_rule_list",
- "sc_rsp_raw",
- "sc_rsp_decrypted",
- "proxy_rule_list",
- "proxy_action",
- "proxy_pinning_status",
- "proxy_intercept_status",
- "proxy_passthrough_reason",
- "proxy_client_side_latency_ms",
- "proxy_server_side_latency_ms",
- "proxy_client_side_version",
- "proxy_server_side_version",
- "proxy_cert_verify",
- "proxy_intercept_error",
- "security_mirrored_pkts",
- "security_mirrored_bytes",
- "client_ip",
- "client_port",
- "client_os_desc",
- "client_geolocation",
- "client_asn",
- "subscriber_id",
- "imei",
- "imsi",
- "apn",
- "phone_number",
- "server_ip",
- "server_port",
- "server_os_desc",
- "server_geolocation",
- "server_asn",
- "server_fqdn",
- "server_domain",
- "app_path",
- "app",
- "app_debug_info",
- "app_content",
- "protocol_path",
- "fqdn_category_list",
- "sent_pkts",
- "received_pkts",
- "sent_bytes",
- "received_bytes",
- "tcp_c2s_ip_fragments",
- "tcp_s2c_ip_fragments",
- "tcp_c2s_lost_bytes",
- "tcp_s2c_lost_bytes",
- "tcp_c2s_o3_pkts",
- "tcp_s2c_o3_pkts",
- "tcp_c2s_rtx_pkts",
- "tcp_s2c_rtx_pkts",
- "tcp_c2s_rtx_bytes",
- "tcp_s2c_rtx_bytes",
- "tcp_rtt_ms",
- "tcp_client_isn",
- "tcp_server_isn",
- "packet_capture_file",
- "in_src_mac",
- "out_src_mac",
- "in_dest_mac",
- "out_dest_mac",
- "tunnels",
- "dup_traffic_flag",
- "tunnel_endpoint_a_desc",
- "tunnel_endpoint_b_desc"
+ decoded_as: {
+ BASE: {
+ columns: [
+ 'recv_time',
+ 'log_id',
+ 'decoded_as',
+ 'session_id',
+ 'start_timestamp_ms',
+ 'end_timestamp_ms',
+ 'duration_ms',
+ 'tcp_handshake_latency_ms',
+ 'ingestion_time',
+ 'processing_time',
+ 'insert_time',
+ 'device_id',
+ 'out_link_id',
+ 'in_link_id',
+ 'device_tag',
+ 'data_center',
+ 'device_group',
+ 'sled_ip',
+ 'address_type',
+ 'vsys_id',
+ 't_vsys_id',
+ 'flags',
+ 'flags_identify_info',
+ 'security_rule_list',
+ 'security_action',
+ 'monitor_rule_list',
+ 'shaping_rule_list',
+ 'sc_rule_list',
+ 'sc_rsp_raw',
+ 'sc_rsp_decrypted',
+ 'proxy_rule_list',
+ 'proxy_action',
+ 'proxy_pinning_status',
+ 'proxy_intercept_status',
+ 'proxy_passthrough_reason',
+ 'proxy_client_side_latency_ms',
+ 'proxy_server_side_latency_ms',
+ 'proxy_client_side_version',
+ 'proxy_server_side_version',
+ 'proxy_cert_verify',
+ 'proxy_intercept_error',
+ 'security_mirrored_pkts',
+ 'security_mirrored_bytes',
+ 'client_ip',
+ 'client_port',
+ 'client_os_desc',
+ 'client_geolocation',
+ 'client_asn',
+ 'subscriber_id',
+ 'imei',
+ 'imsi',
+ 'apn',
+ 'phone_number',
+ 'server_ip',
+ 'server_port',
+ 'server_os_desc',
+ 'server_geolocation',
+ 'server_asn',
+ 'server_fqdn',
+ 'server_domain',
+ 'app_path',
+ 'app',
+ 'app_debug_info',
+ 'app_content',
+ 'protocol_path',
+ 'fqdn_category_list',
+ 'sent_pkts',
+ 'received_pkts',
+ 'sent_bytes',
+ 'received_bytes',
+ 'tcp_c2s_ip_fragments',
+ 'tcp_s2c_ip_fragments',
+ 'tcp_c2s_lost_bytes',
+ 'tcp_s2c_lost_bytes',
+ 'tcp_c2s_o3_pkts',
+ 'tcp_s2c_o3_pkts',
+ 'tcp_c2s_rtx_pkts',
+ 'tcp_s2c_rtx_pkts',
+ 'tcp_c2s_rtx_bytes',
+ 'tcp_s2c_rtx_bytes',
+ 'tcp_rtt_ms',
+ 'tcp_client_isn',
+ 'tcp_server_isn',
+ 'packet_capture_file',
+ 'in_src_mac',
+ 'out_src_mac',
+ 'in_dest_mac',
+ 'out_dest_mac',
+ 'tunnels',
+ 'dup_traffic_flag',
+ 'tunnel_endpoint_a_desc',
+ 'tunnel_endpoint_b_desc'
],
- "default_columns": [
- "recv_time",
- "subscriber_id",
- "client_ip",
- "client_port",
- "server_ip",
- "server_port"
+ default_columns: [
+ 'recv_time',
+ 'subscriber_id',
+ 'client_ip',
+ 'client_port',
+ 'server_ip',
+ 'server_port'
]
},
- "HTTP": {
- "columns": [
- "recv_time",
- "log_id",
- "decoded_as",
- "session_id",
- "start_timestamp_ms",
- "end_timestamp_ms",
- "duration_ms",
- "tcp_handshake_latency_ms",
- "ingestion_time",
- "processing_time",
- "insert_time",
- "device_id",
- "out_link_id",
- "in_link_id",
- "device_tag",
- "data_center",
- "device_group",
- "sled_ip",
- "address_type",
- "vsys_id",
- "t_vsys_id",
- "flags",
- "flags_identify_info",
- "security_rule_list",
- "security_action",
- "monitor_rule_list",
- "shaping_rule_list",
- "sc_rule_list",
- "sc_rsp_raw",
- "sc_rsp_decrypted",
- "proxy_rule_list",
- "proxy_action",
- "proxy_pinning_status",
- "proxy_intercept_status",
- "proxy_passthrough_reason",
- "proxy_client_side_latency_ms",
- "proxy_server_side_latency_ms",
- "proxy_client_side_version",
- "proxy_server_side_version",
- "proxy_cert_verify",
- "proxy_intercept_error",
- "security_mirrored_pkts",
- "security_mirrored_bytes",
- "client_ip",
- "client_port",
- "client_os_desc",
- "client_geolocation",
- "client_asn",
- "subscriber_id",
- "imei",
- "imsi",
- "apn",
- "phone_number",
- "server_ip",
- "server_port",
- "server_os_desc",
- "server_geolocation",
- "server_asn",
- "server_fqdn",
- "server_domain",
- "app_path",
- "app",
- "app_debug_info",
- "app_content",
- "protocol_path",
- "fqdn_category_list",
- "sent_pkts",
- "received_pkts",
- "sent_bytes",
- "received_bytes",
- "tcp_c2s_ip_fragments",
- "tcp_s2c_ip_fragments",
- "tcp_c2s_lost_bytes",
- "tcp_s2c_lost_bytes",
- "tcp_c2s_o3_pkts",
- "tcp_s2c_o3_pkts",
- "tcp_c2s_rtx_pkts",
- "tcp_s2c_rtx_pkts",
- "tcp_c2s_rtx_bytes",
- "tcp_s2c_rtx_bytes",
- "tcp_rtt_ms",
- "tcp_client_isn",
- "tcp_server_isn",
- "packet_capture_file",
- "in_src_mac",
- "out_src_mac",
- "in_dest_mac",
- "out_dest_mac",
- "tunnels",
- "dup_traffic_flag",
- "tunnel_endpoint_a_desc",
- "tunnel_endpoint_b_desc",
- "http_url",
- "http_host",
- "http_request_line",
- "http_response_line",
- "http_request_content_length",
- "http_request_content_type",
- "http_response_content_length",
- "http_response_content_type",
- "http_request_body",
- "http_response_body",
- "http_proxy_flag",
- "http_sequence",
- "http_cookie",
- "http_referer",
- "http_user_agent",
- "http_set_cookie",
- "http_version",
- "http_status_code",
- "http_response_latency_ms",
- "http_session_duration_ms",
- "http_action_file_size"
+ HTTP: {
+ columns: [
+ 'recv_time',
+ 'log_id',
+ 'decoded_as',
+ 'session_id',
+ 'start_timestamp_ms',
+ 'end_timestamp_ms',
+ 'duration_ms',
+ 'tcp_handshake_latency_ms',
+ 'ingestion_time',
+ 'processing_time',
+ 'insert_time',
+ 'device_id',
+ 'out_link_id',
+ 'in_link_id',
+ 'device_tag',
+ 'data_center',
+ 'device_group',
+ 'sled_ip',
+ 'address_type',
+ 'vsys_id',
+ 't_vsys_id',
+ 'flags',
+ 'flags_identify_info',
+ 'security_rule_list',
+ 'security_action',
+ 'monitor_rule_list',
+ 'shaping_rule_list',
+ 'sc_rule_list',
+ 'sc_rsp_raw',
+ 'sc_rsp_decrypted',
+ 'proxy_rule_list',
+ 'proxy_action',
+ 'proxy_pinning_status',
+ 'proxy_intercept_status',
+ 'proxy_passthrough_reason',
+ 'proxy_client_side_latency_ms',
+ 'proxy_server_side_latency_ms',
+ 'proxy_client_side_version',
+ 'proxy_server_side_version',
+ 'proxy_cert_verify',
+ 'proxy_intercept_error',
+ 'security_mirrored_pkts',
+ 'security_mirrored_bytes',
+ 'client_ip',
+ 'client_port',
+ 'client_os_desc',
+ 'client_geolocation',
+ 'client_asn',
+ 'subscriber_id',
+ 'imei',
+ 'imsi',
+ 'apn',
+ 'phone_number',
+ 'server_ip',
+ 'server_port',
+ 'server_os_desc',
+ 'server_geolocation',
+ 'server_asn',
+ 'server_fqdn',
+ 'server_domain',
+ 'app_path',
+ 'app',
+ 'app_debug_info',
+ 'app_content',
+ 'protocol_path',
+ 'fqdn_category_list',
+ 'sent_pkts',
+ 'received_pkts',
+ 'sent_bytes',
+ 'received_bytes',
+ 'tcp_c2s_ip_fragments',
+ 'tcp_s2c_ip_fragments',
+ 'tcp_c2s_lost_bytes',
+ 'tcp_s2c_lost_bytes',
+ 'tcp_c2s_o3_pkts',
+ 'tcp_s2c_o3_pkts',
+ 'tcp_c2s_rtx_pkts',
+ 'tcp_s2c_rtx_pkts',
+ 'tcp_c2s_rtx_bytes',
+ 'tcp_s2c_rtx_bytes',
+ 'tcp_rtt_ms',
+ 'tcp_client_isn',
+ 'tcp_server_isn',
+ 'packet_capture_file',
+ 'in_src_mac',
+ 'out_src_mac',
+ 'in_dest_mac',
+ 'out_dest_mac',
+ 'tunnels',
+ 'dup_traffic_flag',
+ 'tunnel_endpoint_a_desc',
+ 'tunnel_endpoint_b_desc',
+ 'http_url',
+ 'http_host',
+ 'http_request_line',
+ 'http_response_line',
+ 'http_request_content_length',
+ 'http_request_content_type',
+ 'http_response_content_length',
+ 'http_response_content_type',
+ 'http_request_body',
+ 'http_response_body',
+ 'http_proxy_flag',
+ 'http_sequence',
+ 'http_cookie',
+ 'http_referer',
+ 'http_user_agent',
+ 'http_set_cookie',
+ 'http_version',
+ 'http_status_code',
+ 'http_response_latency_ms',
+ 'http_session_duration_ms',
+ 'http_action_file_size'
],
- "default_columns": [
- "recv_time",
- "subscriber_id",
- "client_ip",
- "client_port",
- "http_url",
- "server_ip",
- "server_port"
+ default_columns: [
+ 'recv_time',
+ 'subscriber_id',
+ 'client_ip',
+ 'client_port',
+ 'http_url',
+ 'server_ip',
+ 'server_port'
]
},
- "MAIL": {
- "columns": [
- "recv_time",
- "log_id",
- "decoded_as",
- "session_id",
- "start_timestamp_ms",
- "end_timestamp_ms",
- "duration_ms",
- "tcp_handshake_latency_ms",
- "ingestion_time",
- "processing_time",
- "insert_time",
- "device_id",
- "out_link_id",
- "in_link_id",
- "device_tag",
- "data_center",
- "device_group",
- "sled_ip",
- "address_type",
- "vsys_id",
- "t_vsys_id",
- "flags",
- "flags_identify_info",
- "security_rule_list",
- "security_action",
- "monitor_rule_list",
- "shaping_rule_list",
- "sc_rule_list",
- "sc_rsp_raw",
- "sc_rsp_decrypted",
- "proxy_rule_list",
- "proxy_action",
- "proxy_pinning_status",
- "proxy_intercept_status",
- "proxy_passthrough_reason",
- "proxy_client_side_latency_ms",
- "proxy_server_side_latency_ms",
- "proxy_client_side_version",
- "proxy_server_side_version",
- "proxy_cert_verify",
- "proxy_intercept_error",
- "security_mirrored_pkts",
- "security_mirrored_bytes",
- "client_ip",
- "client_port",
- "client_os_desc",
- "client_geolocation",
- "client_asn",
- "subscriber_id",
- "imei",
- "imsi",
- "apn",
- "phone_number",
- "server_ip",
- "server_port",
- "server_os_desc",
- "server_geolocation",
- "server_asn",
- "server_fqdn",
- "server_domain",
- "app_path",
- "app",
- "app_debug_info",
- "app_content",
- "protocol_path",
- "fqdn_category_list",
- "sent_pkts",
- "received_pkts",
- "sent_bytes",
- "received_bytes",
- "tcp_c2s_ip_fragments",
- "tcp_s2c_ip_fragments",
- "tcp_c2s_lost_bytes",
- "tcp_s2c_lost_bytes",
- "tcp_c2s_o3_pkts",
- "tcp_s2c_o3_pkts",
- "tcp_c2s_rtx_pkts",
- "tcp_s2c_rtx_pkts",
- "tcp_c2s_rtx_bytes",
- "tcp_s2c_rtx_bytes",
- "tcp_rtt_ms",
- "tcp_client_isn",
- "tcp_server_isn",
- "packet_capture_file",
- "in_src_mac",
- "out_src_mac",
- "in_dest_mac",
- "out_dest_mac",
- "tunnels",
- "dup_traffic_flag",
- "tunnel_endpoint_a_desc",
- "tunnel_endpoint_b_desc",
- "mail_protocol_type",
- "mail_account",
- "mail_from_cmd",
- "mail_to_cmd",
- "mail_from",
- "mail_password",
- "mail_to",
- "mail_cc",
- "mail_bcc",
- "mail_subject",
- "mail_subject_charset",
- "mail_attachment_name",
- "mail_attachment_name_charset",
- "mail_eml_file"
+ MAIL: {
+ columns: [
+ 'recv_time',
+ 'log_id',
+ 'decoded_as',
+ 'session_id',
+ 'start_timestamp_ms',
+ 'end_timestamp_ms',
+ 'duration_ms',
+ 'tcp_handshake_latency_ms',
+ 'ingestion_time',
+ 'processing_time',
+ 'insert_time',
+ 'device_id',
+ 'out_link_id',
+ 'in_link_id',
+ 'device_tag',
+ 'data_center',
+ 'device_group',
+ 'sled_ip',
+ 'address_type',
+ 'vsys_id',
+ 't_vsys_id',
+ 'flags',
+ 'flags_identify_info',
+ 'security_rule_list',
+ 'security_action',
+ 'monitor_rule_list',
+ 'shaping_rule_list',
+ 'sc_rule_list',
+ 'sc_rsp_raw',
+ 'sc_rsp_decrypted',
+ 'proxy_rule_list',
+ 'proxy_action',
+ 'proxy_pinning_status',
+ 'proxy_intercept_status',
+ 'proxy_passthrough_reason',
+ 'proxy_client_side_latency_ms',
+ 'proxy_server_side_latency_ms',
+ 'proxy_client_side_version',
+ 'proxy_server_side_version',
+ 'proxy_cert_verify',
+ 'proxy_intercept_error',
+ 'security_mirrored_pkts',
+ 'security_mirrored_bytes',
+ 'client_ip',
+ 'client_port',
+ 'client_os_desc',
+ 'client_geolocation',
+ 'client_asn',
+ 'subscriber_id',
+ 'imei',
+ 'imsi',
+ 'apn',
+ 'phone_number',
+ 'server_ip',
+ 'server_port',
+ 'server_os_desc',
+ 'server_geolocation',
+ 'server_asn',
+ 'server_fqdn',
+ 'server_domain',
+ 'app_path',
+ 'app',
+ 'app_debug_info',
+ 'app_content',
+ 'protocol_path',
+ 'fqdn_category_list',
+ 'sent_pkts',
+ 'received_pkts',
+ 'sent_bytes',
+ 'received_bytes',
+ 'tcp_c2s_ip_fragments',
+ 'tcp_s2c_ip_fragments',
+ 'tcp_c2s_lost_bytes',
+ 'tcp_s2c_lost_bytes',
+ 'tcp_c2s_o3_pkts',
+ 'tcp_s2c_o3_pkts',
+ 'tcp_c2s_rtx_pkts',
+ 'tcp_s2c_rtx_pkts',
+ 'tcp_c2s_rtx_bytes',
+ 'tcp_s2c_rtx_bytes',
+ 'tcp_rtt_ms',
+ 'tcp_client_isn',
+ 'tcp_server_isn',
+ 'packet_capture_file',
+ 'in_src_mac',
+ 'out_src_mac',
+ 'in_dest_mac',
+ 'out_dest_mac',
+ 'tunnels',
+ 'dup_traffic_flag',
+ 'tunnel_endpoint_a_desc',
+ 'tunnel_endpoint_b_desc',
+ 'mail_protocol_type',
+ 'mail_account',
+ 'mail_from_cmd',
+ 'mail_to_cmd',
+ 'mail_from',
+ 'mail_password',
+ 'mail_to',
+ 'mail_cc',
+ 'mail_bcc',
+ 'mail_subject',
+ 'mail_subject_charset',
+ 'mail_attachment_name',
+ 'mail_attachment_name_charset',
+ 'mail_eml_file'
],
- "default_columns": [
- "recv_time",
- "subscriber_id",
- "client_ip",
- "client_port",
- "mail_from",
- "mail_to",
- "mail_subject",
- "server_ip",
- "server_port"
+ default_columns: [
+ 'recv_time',
+ 'subscriber_id',
+ 'client_ip',
+ 'client_port',
+ 'mail_from',
+ 'mail_to',
+ 'mail_subject',
+ 'server_ip',
+ 'server_port'
]
},
- "DNS": {
- "columns": [
- "recv_time",
- "log_id",
- "decoded_as",
- "session_id",
- "start_timestamp_ms",
- "end_timestamp_ms",
- "duration_ms",
- "tcp_handshake_latency_ms",
- "ingestion_time",
- "processing_time",
- "insert_time",
- "device_id",
- "out_link_id",
- "in_link_id",
- "device_tag",
- "data_center",
- "device_group",
- "sled_ip",
- "address_type",
- "vsys_id",
- "t_vsys_id",
- "flags",
- "flags_identify_info",
- "security_rule_list",
- "security_action",
- "monitor_rule_list",
- "shaping_rule_list",
- "sc_rule_list",
- "sc_rsp_raw",
- "sc_rsp_decrypted",
- "proxy_rule_list",
- "proxy_action",
- "proxy_pinning_status",
- "proxy_intercept_status",
- "proxy_passthrough_reason",
- "proxy_client_side_latency_ms",
- "proxy_server_side_latency_ms",
- "proxy_client_side_version",
- "proxy_server_side_version",
- "proxy_cert_verify",
- "proxy_intercept_error",
- "security_mirrored_pkts",
- "security_mirrored_bytes",
- "client_ip",
- "client_port",
- "client_os_desc",
- "client_geolocation",
- "client_asn",
- "subscriber_id",
- "imei",
- "imsi",
- "apn",
- "phone_number",
- "server_ip",
- "server_port",
- "server_os_desc",
- "server_geolocation",
- "server_asn",
- "server_fqdn",
- "server_domain",
- "app_path",
- "app",
- "app_debug_info",
- "app_content",
- "protocol_path",
- "fqdn_category_list",
- "sent_pkts",
- "received_pkts",
- "sent_bytes",
- "received_bytes",
- "tcp_c2s_ip_fragments",
- "tcp_s2c_ip_fragments",
- "tcp_c2s_lost_bytes",
- "tcp_s2c_lost_bytes",
- "tcp_c2s_o3_pkts",
- "tcp_s2c_o3_pkts",
- "tcp_c2s_rtx_pkts",
- "tcp_s2c_rtx_pkts",
- "tcp_c2s_rtx_bytes",
- "tcp_s2c_rtx_bytes",
- "tcp_rtt_ms",
- "tcp_client_isn",
- "tcp_server_isn",
- "packet_capture_file",
- "in_src_mac",
- "out_src_mac",
- "in_dest_mac",
- "out_dest_mac",
- "tunnels",
- "dup_traffic_flag",
- "tunnel_endpoint_a_desc",
- "tunnel_endpoint_b_desc",
- "dns_message_id",
- "dns_qr",
- "dns_opcode",
- "dns_aa",
- "dns_tc",
- "dns_rd",
- "dns_ra",
- "dns_rcode",
- "dns_qdcount",
- "dns_ancount",
- "dns_nscount",
- "dns_arcount",
- "dns_qname",
- "dns_qtype",
- "dns_qclass",
- "dns_cname",
- "dns_sub",
- "dns_rr",
- "dns_response_latency_ms"
+ DNS: {
+ columns: [
+ 'recv_time',
+ 'log_id',
+ 'decoded_as',
+ 'session_id',
+ 'start_timestamp_ms',
+ 'end_timestamp_ms',
+ 'duration_ms',
+ 'tcp_handshake_latency_ms',
+ 'ingestion_time',
+ 'processing_time',
+ 'insert_time',
+ 'device_id',
+ 'out_link_id',
+ 'in_link_id',
+ 'device_tag',
+ 'data_center',
+ 'device_group',
+ 'sled_ip',
+ 'address_type',
+ 'vsys_id',
+ 't_vsys_id',
+ 'flags',
+ 'flags_identify_info',
+ 'security_rule_list',
+ 'security_action',
+ 'monitor_rule_list',
+ 'shaping_rule_list',
+ 'sc_rule_list',
+ 'sc_rsp_raw',
+ 'sc_rsp_decrypted',
+ 'proxy_rule_list',
+ 'proxy_action',
+ 'proxy_pinning_status',
+ 'proxy_intercept_status',
+ 'proxy_passthrough_reason',
+ 'proxy_client_side_latency_ms',
+ 'proxy_server_side_latency_ms',
+ 'proxy_client_side_version',
+ 'proxy_server_side_version',
+ 'proxy_cert_verify',
+ 'proxy_intercept_error',
+ 'security_mirrored_pkts',
+ 'security_mirrored_bytes',
+ 'client_ip',
+ 'client_port',
+ 'client_os_desc',
+ 'client_geolocation',
+ 'client_asn',
+ 'subscriber_id',
+ 'imei',
+ 'imsi',
+ 'apn',
+ 'phone_number',
+ 'server_ip',
+ 'server_port',
+ 'server_os_desc',
+ 'server_geolocation',
+ 'server_asn',
+ 'server_fqdn',
+ 'server_domain',
+ 'app_path',
+ 'app',
+ 'app_debug_info',
+ 'app_content',
+ 'protocol_path',
+ 'fqdn_category_list',
+ 'sent_pkts',
+ 'received_pkts',
+ 'sent_bytes',
+ 'received_bytes',
+ 'tcp_c2s_ip_fragments',
+ 'tcp_s2c_ip_fragments',
+ 'tcp_c2s_lost_bytes',
+ 'tcp_s2c_lost_bytes',
+ 'tcp_c2s_o3_pkts',
+ 'tcp_s2c_o3_pkts',
+ 'tcp_c2s_rtx_pkts',
+ 'tcp_s2c_rtx_pkts',
+ 'tcp_c2s_rtx_bytes',
+ 'tcp_s2c_rtx_bytes',
+ 'tcp_rtt_ms',
+ 'tcp_client_isn',
+ 'tcp_server_isn',
+ 'packet_capture_file',
+ 'in_src_mac',
+ 'out_src_mac',
+ 'in_dest_mac',
+ 'out_dest_mac',
+ 'tunnels',
+ 'dup_traffic_flag',
+ 'tunnel_endpoint_a_desc',
+ 'tunnel_endpoint_b_desc',
+ 'dns_message_id',
+ 'dns_qr',
+ 'dns_opcode',
+ 'dns_aa',
+ 'dns_tc',
+ 'dns_rd',
+ 'dns_ra',
+ 'dns_rcode',
+ 'dns_qdcount',
+ 'dns_ancount',
+ 'dns_nscount',
+ 'dns_arcount',
+ 'dns_qname',
+ 'dns_qtype',
+ 'dns_qclass',
+ 'dns_cname',
+ 'dns_sub',
+ 'dns_rr',
+ 'dns_response_latency_ms'
],
- "default_columns": [
- "recv_time",
- "client_ip",
- "client_port",
- "dns_qr",
- "dns_qname",
- "dns_qtype",
- "server_ip",
- "server_port"
+ default_columns: [
+ 'recv_time',
+ 'client_ip',
+ 'client_port',
+ 'dns_qr',
+ 'dns_qname',
+ 'dns_qtype',
+ 'server_ip',
+ 'server_port'
]
},
- "SSL": {
- "columns": [
- "recv_time",
- "log_id",
- "decoded_as",
- "session_id",
- "start_timestamp_ms",
- "end_timestamp_ms",
- "duration_ms",
- "tcp_handshake_latency_ms",
- "ingestion_time",
- "processing_time",
- "insert_time",
- "device_id",
- "out_link_id",
- "in_link_id",
- "device_tag",
- "data_center",
- "device_group",
- "sled_ip",
- "address_type",
- "vsys_id",
- "t_vsys_id",
- "flags",
- "flags_identify_info",
- "security_rule_list",
- "security_action",
- "monitor_rule_list",
- "shaping_rule_list",
- "sc_rule_list",
- "sc_rsp_raw",
- "sc_rsp_decrypted",
- "proxy_rule_list",
- "proxy_action",
- "proxy_pinning_status",
- "proxy_intercept_status",
- "proxy_passthrough_reason",
- "proxy_client_side_latency_ms",
- "proxy_server_side_latency_ms",
- "proxy_client_side_version",
- "proxy_server_side_version",
- "proxy_cert_verify",
- "proxy_intercept_error",
- "security_mirrored_pkts",
- "security_mirrored_bytes",
- "client_ip",
- "client_port",
- "client_os_desc",
- "client_geolocation",
- "client_asn",
- "subscriber_id",
- "imei",
- "imsi",
- "apn",
- "phone_number",
- "server_ip",
- "server_port",
- "server_os_desc",
- "server_geolocation",
- "server_asn",
- "server_fqdn",
- "server_domain",
- "app_path",
- "app",
- "app_debug_info",
- "app_content",
- "protocol_path",
- "fqdn_category_list",
- "sent_pkts",
- "received_pkts",
- "sent_bytes",
- "received_bytes",
- "tcp_c2s_ip_fragments",
- "tcp_s2c_ip_fragments",
- "tcp_c2s_lost_bytes",
- "tcp_s2c_lost_bytes",
- "tcp_c2s_o3_pkts",
- "tcp_s2c_o3_pkts",
- "tcp_c2s_rtx_pkts",
- "tcp_s2c_rtx_pkts",
- "tcp_c2s_rtx_bytes",
- "tcp_s2c_rtx_bytes",
- "tcp_rtt_ms",
- "tcp_client_isn",
- "tcp_server_isn",
- "packet_capture_file",
- "in_src_mac",
- "out_src_mac",
- "in_dest_mac",
- "out_dest_mac",
- "tunnels",
- "dup_traffic_flag",
- "tunnel_endpoint_a_desc",
- "tunnel_endpoint_b_desc",
- "ssl_version",
- "ssl_sni",
- "ssl_san",
- "ssl_cn",
- "ssl_handshake_latency_ms",
- "ssl_ja3_hash",
- "ssl_ja3s_hash",
- "ssl_cert_issuer",
- "ssl_cert_subject",
- "ssl_esni_flag",
- "ssl_ech_flag"
+ SSL: {
+ columns: [
+ 'recv_time',
+ 'log_id',
+ 'decoded_as',
+ 'session_id',
+ 'start_timestamp_ms',
+ 'end_timestamp_ms',
+ 'duration_ms',
+ 'tcp_handshake_latency_ms',
+ 'ingestion_time',
+ 'processing_time',
+ 'insert_time',
+ 'device_id',
+ 'out_link_id',
+ 'in_link_id',
+ 'device_tag',
+ 'data_center',
+ 'device_group',
+ 'sled_ip',
+ 'address_type',
+ 'vsys_id',
+ 't_vsys_id',
+ 'flags',
+ 'flags_identify_info',
+ 'security_rule_list',
+ 'security_action',
+ 'monitor_rule_list',
+ 'shaping_rule_list',
+ 'sc_rule_list',
+ 'sc_rsp_raw',
+ 'sc_rsp_decrypted',
+ 'proxy_rule_list',
+ 'proxy_action',
+ 'proxy_pinning_status',
+ 'proxy_intercept_status',
+ 'proxy_passthrough_reason',
+ 'proxy_client_side_latency_ms',
+ 'proxy_server_side_latency_ms',
+ 'proxy_client_side_version',
+ 'proxy_server_side_version',
+ 'proxy_cert_verify',
+ 'proxy_intercept_error',
+ 'security_mirrored_pkts',
+ 'security_mirrored_bytes',
+ 'client_ip',
+ 'client_port',
+ 'client_os_desc',
+ 'client_geolocation',
+ 'client_asn',
+ 'subscriber_id',
+ 'imei',
+ 'imsi',
+ 'apn',
+ 'phone_number',
+ 'server_ip',
+ 'server_port',
+ 'server_os_desc',
+ 'server_geolocation',
+ 'server_asn',
+ 'server_fqdn',
+ 'server_domain',
+ 'app_path',
+ 'app',
+ 'app_debug_info',
+ 'app_content',
+ 'protocol_path',
+ 'fqdn_category_list',
+ 'sent_pkts',
+ 'received_pkts',
+ 'sent_bytes',
+ 'received_bytes',
+ 'tcp_c2s_ip_fragments',
+ 'tcp_s2c_ip_fragments',
+ 'tcp_c2s_lost_bytes',
+ 'tcp_s2c_lost_bytes',
+ 'tcp_c2s_o3_pkts',
+ 'tcp_s2c_o3_pkts',
+ 'tcp_c2s_rtx_pkts',
+ 'tcp_s2c_rtx_pkts',
+ 'tcp_c2s_rtx_bytes',
+ 'tcp_s2c_rtx_bytes',
+ 'tcp_rtt_ms',
+ 'tcp_client_isn',
+ 'tcp_server_isn',
+ 'packet_capture_file',
+ 'in_src_mac',
+ 'out_src_mac',
+ 'in_dest_mac',
+ 'out_dest_mac',
+ 'tunnels',
+ 'dup_traffic_flag',
+ 'tunnel_endpoint_a_desc',
+ 'tunnel_endpoint_b_desc',
+ 'ssl_version',
+ 'ssl_sni',
+ 'ssl_san',
+ 'ssl_cn',
+ 'ssl_handshake_latency_ms',
+ 'ssl_ja3_hash',
+ 'ssl_ja3s_hash',
+ 'ssl_cert_issuer',
+ 'ssl_cert_subject',
+ 'ssl_esni_flag',
+ 'ssl_ech_flag'
],
- "default_columns": [
- "recv_time",
- "subscriber_id",
- "client_ip",
- "client_port",
- "ssl_sni",
- "server_ip",
- "server_port"
+ default_columns: [
+ 'recv_time',
+ 'subscriber_id',
+ 'client_ip',
+ 'client_port',
+ 'ssl_sni',
+ 'server_ip',
+ 'server_port'
]
},
- "DTLS": {
- "columns": [
- "recv_time",
- "log_id",
- "decoded_as",
- "session_id",
- "start_timestamp_ms",
- "end_timestamp_ms",
- "duration_ms",
- "tcp_handshake_latency_ms",
- "ingestion_time",
- "processing_time",
- "insert_time",
- "device_id",
- "out_link_id",
- "in_link_id",
- "device_tag",
- "data_center",
- "device_group",
- "sled_ip",
- "address_type",
- "vsys_id",
- "t_vsys_id",
- "flags",
- "flags_identify_info",
- "security_rule_list",
- "security_action",
- "monitor_rule_list",
- "shaping_rule_list",
- "sc_rule_list",
- "sc_rsp_raw",
- "sc_rsp_decrypted",
- "proxy_rule_list",
- "proxy_action",
- "proxy_pinning_status",
- "proxy_intercept_status",
- "proxy_passthrough_reason",
- "proxy_client_side_latency_ms",
- "proxy_server_side_latency_ms",
- "proxy_client_side_version",
- "proxy_server_side_version",
- "proxy_cert_verify",
- "proxy_intercept_error",
- "security_mirrored_pkts",
- "security_mirrored_bytes",
- "client_ip",
- "client_port",
- "client_os_desc",
- "client_geolocation",
- "client_asn",
- "subscriber_id",
- "imei",
- "imsi",
- "apn",
- "phone_number",
- "server_ip",
- "server_port",
- "server_os_desc",
- "server_geolocation",
- "server_asn",
- "server_fqdn",
- "server_domain",
- "app_path",
- "app",
- "app_debug_info",
- "app_content",
- "protocol_path",
- "fqdn_category_list",
- "sent_pkts",
- "received_pkts",
- "sent_bytes",
- "received_bytes",
- "tcp_c2s_ip_fragments",
- "tcp_s2c_ip_fragments",
- "tcp_c2s_lost_bytes",
- "tcp_s2c_lost_bytes",
- "tcp_c2s_o3_pkts",
- "tcp_s2c_o3_pkts",
- "tcp_c2s_rtx_pkts",
- "tcp_s2c_rtx_pkts",
- "tcp_c2s_rtx_bytes",
- "tcp_s2c_rtx_bytes",
- "tcp_rtt_ms",
- "tcp_client_isn",
- "tcp_server_isn",
- "packet_capture_file",
- "in_src_mac",
- "out_src_mac",
- "in_dest_mac",
- "out_dest_mac",
- "tunnels",
- "dup_traffic_flag",
- "tunnel_endpoint_a_desc",
- "tunnel_endpoint_b_desc",
- "dtls_cookie",
- "dtls_version",
- "dtls_sni",
- "dtls_san",
- "dtls_cn",
- "dtls_handshake_latency_ms",
- "dtls_ja3_fingerprint",
- "dtls_ja3_hash",
- "dtls_cert_issuer",
- "dtls_cert_subject"
+ DTLS: {
+ columns: [
+ 'recv_time',
+ 'log_id',
+ 'decoded_as',
+ 'session_id',
+ 'start_timestamp_ms',
+ 'end_timestamp_ms',
+ 'duration_ms',
+ 'tcp_handshake_latency_ms',
+ 'ingestion_time',
+ 'processing_time',
+ 'insert_time',
+ 'device_id',
+ 'out_link_id',
+ 'in_link_id',
+ 'device_tag',
+ 'data_center',
+ 'device_group',
+ 'sled_ip',
+ 'address_type',
+ 'vsys_id',
+ 't_vsys_id',
+ 'flags',
+ 'flags_identify_info',
+ 'security_rule_list',
+ 'security_action',
+ 'monitor_rule_list',
+ 'shaping_rule_list',
+ 'sc_rule_list',
+ 'sc_rsp_raw',
+ 'sc_rsp_decrypted',
+ 'proxy_rule_list',
+ 'proxy_action',
+ 'proxy_pinning_status',
+ 'proxy_intercept_status',
+ 'proxy_passthrough_reason',
+ 'proxy_client_side_latency_ms',
+ 'proxy_server_side_latency_ms',
+ 'proxy_client_side_version',
+ 'proxy_server_side_version',
+ 'proxy_cert_verify',
+ 'proxy_intercept_error',
+ 'security_mirrored_pkts',
+ 'security_mirrored_bytes',
+ 'client_ip',
+ 'client_port',
+ 'client_os_desc',
+ 'client_geolocation',
+ 'client_asn',
+ 'subscriber_id',
+ 'imei',
+ 'imsi',
+ 'apn',
+ 'phone_number',
+ 'server_ip',
+ 'server_port',
+ 'server_os_desc',
+ 'server_geolocation',
+ 'server_asn',
+ 'server_fqdn',
+ 'server_domain',
+ 'app_path',
+ 'app',
+ 'app_debug_info',
+ 'app_content',
+ 'protocol_path',
+ 'fqdn_category_list',
+ 'sent_pkts',
+ 'received_pkts',
+ 'sent_bytes',
+ 'received_bytes',
+ 'tcp_c2s_ip_fragments',
+ 'tcp_s2c_ip_fragments',
+ 'tcp_c2s_lost_bytes',
+ 'tcp_s2c_lost_bytes',
+ 'tcp_c2s_o3_pkts',
+ 'tcp_s2c_o3_pkts',
+ 'tcp_c2s_rtx_pkts',
+ 'tcp_s2c_rtx_pkts',
+ 'tcp_c2s_rtx_bytes',
+ 'tcp_s2c_rtx_bytes',
+ 'tcp_rtt_ms',
+ 'tcp_client_isn',
+ 'tcp_server_isn',
+ 'packet_capture_file',
+ 'in_src_mac',
+ 'out_src_mac',
+ 'in_dest_mac',
+ 'out_dest_mac',
+ 'tunnels',
+ 'dup_traffic_flag',
+ 'tunnel_endpoint_a_desc',
+ 'tunnel_endpoint_b_desc',
+ 'dtls_cookie',
+ 'dtls_version',
+ 'dtls_sni',
+ 'dtls_san',
+ 'dtls_cn',
+ 'dtls_handshake_latency_ms',
+ 'dtls_ja3_fingerprint',
+ 'dtls_ja3_hash',
+ 'dtls_cert_issuer',
+ 'dtls_cert_subject'
],
- "default_columns": [
- "recv_time",
- "subscriber_id",
- "client_ip",
- "client_port",
- "dtls_sni",
- "server_ip",
- "server_port"
+ default_columns: [
+ 'recv_time',
+ 'subscriber_id',
+ 'client_ip',
+ 'client_port',
+ 'dtls_sni',
+ 'server_ip',
+ 'server_port'
]
},
- "QUIC": {
- "columns": [
- "recv_time",
- "log_id",
- "decoded_as",
- "session_id",
- "start_timestamp_ms",
- "end_timestamp_ms",
- "duration_ms",
- "tcp_handshake_latency_ms",
- "ingestion_time",
- "processing_time",
- "insert_time",
- "device_id",
- "out_link_id",
- "in_link_id",
- "device_tag",
- "data_center",
- "device_group",
- "sled_ip",
- "address_type",
- "vsys_id",
- "t_vsys_id",
- "flags",
- "flags_identify_info",
- "security_rule_list",
- "security_action",
- "monitor_rule_list",
- "shaping_rule_list",
- "sc_rule_list",
- "sc_rsp_raw",
- "sc_rsp_decrypted",
- "proxy_rule_list",
- "proxy_action",
- "proxy_pinning_status",
- "proxy_intercept_status",
- "proxy_passthrough_reason",
- "proxy_client_side_latency_ms",
- "proxy_server_side_latency_ms",
- "proxy_client_side_version",
- "proxy_server_side_version",
- "proxy_cert_verify",
- "proxy_intercept_error",
- "security_mirrored_pkts",
- "security_mirrored_bytes",
- "client_ip",
- "client_port",
- "client_os_desc",
- "client_geolocation",
- "client_asn",
- "subscriber_id",
- "imei",
- "imsi",
- "apn",
- "phone_number",
- "server_ip",
- "server_port",
- "server_os_desc",
- "server_geolocation",
- "server_asn",
- "server_fqdn",
- "server_domain",
- "app_path",
- "app",
- "app_debug_info",
- "app_content",
- "protocol_path",
- "fqdn_category_list",
- "sent_pkts",
- "received_pkts",
- "sent_bytes",
- "received_bytes",
- "tcp_c2s_ip_fragments",
- "tcp_s2c_ip_fragments",
- "tcp_c2s_lost_bytes",
- "tcp_s2c_lost_bytes",
- "tcp_c2s_o3_pkts",
- "tcp_s2c_o3_pkts",
- "tcp_c2s_rtx_pkts",
- "tcp_s2c_rtx_pkts",
- "tcp_c2s_rtx_bytes",
- "tcp_s2c_rtx_bytes",
- "tcp_rtt_ms",
- "tcp_client_isn",
- "tcp_server_isn",
- "packet_capture_file",
- "in_src_mac",
- "out_src_mac",
- "in_dest_mac",
- "out_dest_mac",
- "tunnels",
- "dup_traffic_flag",
- "tunnel_endpoint_a_desc",
- "tunnel_endpoint_b_desc",
- "quic_version",
- "quic_sni",
- "quic_user_agent"
+ QUIC: {
+ columns: [
+ 'recv_time',
+ 'log_id',
+ 'decoded_as',
+ 'session_id',
+ 'start_timestamp_ms',
+ 'end_timestamp_ms',
+ 'duration_ms',
+ 'tcp_handshake_latency_ms',
+ 'ingestion_time',
+ 'processing_time',
+ 'insert_time',
+ 'device_id',
+ 'out_link_id',
+ 'in_link_id',
+ 'device_tag',
+ 'data_center',
+ 'device_group',
+ 'sled_ip',
+ 'address_type',
+ 'vsys_id',
+ 't_vsys_id',
+ 'flags',
+ 'flags_identify_info',
+ 'security_rule_list',
+ 'security_action',
+ 'monitor_rule_list',
+ 'shaping_rule_list',
+ 'sc_rule_list',
+ 'sc_rsp_raw',
+ 'sc_rsp_decrypted',
+ 'proxy_rule_list',
+ 'proxy_action',
+ 'proxy_pinning_status',
+ 'proxy_intercept_status',
+ 'proxy_passthrough_reason',
+ 'proxy_client_side_latency_ms',
+ 'proxy_server_side_latency_ms',
+ 'proxy_client_side_version',
+ 'proxy_server_side_version',
+ 'proxy_cert_verify',
+ 'proxy_intercept_error',
+ 'security_mirrored_pkts',
+ 'security_mirrored_bytes',
+ 'client_ip',
+ 'client_port',
+ 'client_os_desc',
+ 'client_geolocation',
+ 'client_asn',
+ 'subscriber_id',
+ 'imei',
+ 'imsi',
+ 'apn',
+ 'phone_number',
+ 'server_ip',
+ 'server_port',
+ 'server_os_desc',
+ 'server_geolocation',
+ 'server_asn',
+ 'server_fqdn',
+ 'server_domain',
+ 'app_path',
+ 'app',
+ 'app_debug_info',
+ 'app_content',
+ 'protocol_path',
+ 'fqdn_category_list',
+ 'sent_pkts',
+ 'received_pkts',
+ 'sent_bytes',
+ 'received_bytes',
+ 'tcp_c2s_ip_fragments',
+ 'tcp_s2c_ip_fragments',
+ 'tcp_c2s_lost_bytes',
+ 'tcp_s2c_lost_bytes',
+ 'tcp_c2s_o3_pkts',
+ 'tcp_s2c_o3_pkts',
+ 'tcp_c2s_rtx_pkts',
+ 'tcp_s2c_rtx_pkts',
+ 'tcp_c2s_rtx_bytes',
+ 'tcp_s2c_rtx_bytes',
+ 'tcp_rtt_ms',
+ 'tcp_client_isn',
+ 'tcp_server_isn',
+ 'packet_capture_file',
+ 'in_src_mac',
+ 'out_src_mac',
+ 'in_dest_mac',
+ 'out_dest_mac',
+ 'tunnels',
+ 'dup_traffic_flag',
+ 'tunnel_endpoint_a_desc',
+ 'tunnel_endpoint_b_desc',
+ 'quic_version',
+ 'quic_sni',
+ 'quic_user_agent'
],
- "default_columns": [
- "recv_time",
- "subscriber_id",
- "client_ip",
- "client_port",
- "quic_sni",
- "server_ip",
- "server_port"
+ default_columns: [
+ 'recv_time',
+ 'subscriber_id',
+ 'client_ip',
+ 'client_port',
+ 'quic_sni',
+ 'server_ip',
+ 'server_port'
]
},
- "FTP": {
- "columns": [
- "recv_time",
- "log_id",
- "decoded_as",
- "session_id",
- "start_timestamp_ms",
- "end_timestamp_ms",
- "duration_ms",
- "tcp_handshake_latency_ms",
- "ingestion_time",
- "processing_time",
- "insert_time",
- "device_id",
- "out_link_id",
- "in_link_id",
- "device_tag",
- "data_center",
- "device_group",
- "sled_ip",
- "address_type",
- "vsys_id",
- "t_vsys_id",
- "flags",
- "flags_identify_info",
- "security_rule_list",
- "security_action",
- "monitor_rule_list",
- "shaping_rule_list",
- "sc_rule_list",
- "sc_rsp_raw",
- "sc_rsp_decrypted",
- "proxy_rule_list",
- "proxy_action",
- "proxy_pinning_status",
- "proxy_intercept_status",
- "proxy_passthrough_reason",
- "proxy_client_side_latency_ms",
- "proxy_server_side_latency_ms",
- "proxy_client_side_version",
- "proxy_server_side_version",
- "proxy_cert_verify",
- "proxy_intercept_error",
- "security_mirrored_pkts",
- "security_mirrored_bytes",
- "client_ip",
- "client_port",
- "client_os_desc",
- "client_geolocation",
- "client_asn",
- "subscriber_id",
- "imei",
- "imsi",
- "apn",
- "phone_number",
- "server_ip",
- "server_port",
- "server_os_desc",
- "server_geolocation",
- "server_asn",
- "server_fqdn",
- "server_domain",
- "app_path",
- "app",
- "app_debug_info",
- "app_content",
- "protocol_path",
- "fqdn_category_list",
- "sent_pkts",
- "received_pkts",
- "sent_bytes",
- "received_bytes",
- "tcp_c2s_ip_fragments",
- "tcp_s2c_ip_fragments",
- "tcp_c2s_lost_bytes",
- "tcp_s2c_lost_bytes",
- "tcp_c2s_o3_pkts",
- "tcp_s2c_o3_pkts",
- "tcp_c2s_rtx_pkts",
- "tcp_s2c_rtx_pkts",
- "tcp_c2s_rtx_bytes",
- "tcp_s2c_rtx_bytes",
- "tcp_rtt_ms",
- "tcp_client_isn",
- "tcp_server_isn",
- "packet_capture_file",
- "in_src_mac",
- "out_src_mac",
- "in_dest_mac",
- "out_dest_mac",
- "tunnels",
- "dup_traffic_flag",
- "tunnel_endpoint_a_desc",
- "tunnel_endpoint_b_desc",
- "ftp_account",
- "ftp_url",
- "ftp_link_type"
+ FTP: {
+ columns: [
+ 'recv_time',
+ 'log_id',
+ 'decoded_as',
+ 'session_id',
+ 'start_timestamp_ms',
+ 'end_timestamp_ms',
+ 'duration_ms',
+ 'tcp_handshake_latency_ms',
+ 'ingestion_time',
+ 'processing_time',
+ 'insert_time',
+ 'device_id',
+ 'out_link_id',
+ 'in_link_id',
+ 'device_tag',
+ 'data_center',
+ 'device_group',
+ 'sled_ip',
+ 'address_type',
+ 'vsys_id',
+ 't_vsys_id',
+ 'flags',
+ 'flags_identify_info',
+ 'security_rule_list',
+ 'security_action',
+ 'monitor_rule_list',
+ 'shaping_rule_list',
+ 'sc_rule_list',
+ 'sc_rsp_raw',
+ 'sc_rsp_decrypted',
+ 'proxy_rule_list',
+ 'proxy_action',
+ 'proxy_pinning_status',
+ 'proxy_intercept_status',
+ 'proxy_passthrough_reason',
+ 'proxy_client_side_latency_ms',
+ 'proxy_server_side_latency_ms',
+ 'proxy_client_side_version',
+ 'proxy_server_side_version',
+ 'proxy_cert_verify',
+ 'proxy_intercept_error',
+ 'security_mirrored_pkts',
+ 'security_mirrored_bytes',
+ 'client_ip',
+ 'client_port',
+ 'client_os_desc',
+ 'client_geolocation',
+ 'client_asn',
+ 'subscriber_id',
+ 'imei',
+ 'imsi',
+ 'apn',
+ 'phone_number',
+ 'server_ip',
+ 'server_port',
+ 'server_os_desc',
+ 'server_geolocation',
+ 'server_asn',
+ 'server_fqdn',
+ 'server_domain',
+ 'app_path',
+ 'app',
+ 'app_debug_info',
+ 'app_content',
+ 'protocol_path',
+ 'fqdn_category_list',
+ 'sent_pkts',
+ 'received_pkts',
+ 'sent_bytes',
+ 'received_bytes',
+ 'tcp_c2s_ip_fragments',
+ 'tcp_s2c_ip_fragments',
+ 'tcp_c2s_lost_bytes',
+ 'tcp_s2c_lost_bytes',
+ 'tcp_c2s_o3_pkts',
+ 'tcp_s2c_o3_pkts',
+ 'tcp_c2s_rtx_pkts',
+ 'tcp_s2c_rtx_pkts',
+ 'tcp_c2s_rtx_bytes',
+ 'tcp_s2c_rtx_bytes',
+ 'tcp_rtt_ms',
+ 'tcp_client_isn',
+ 'tcp_server_isn',
+ 'packet_capture_file',
+ 'in_src_mac',
+ 'out_src_mac',
+ 'in_dest_mac',
+ 'out_dest_mac',
+ 'tunnels',
+ 'dup_traffic_flag',
+ 'tunnel_endpoint_a_desc',
+ 'tunnel_endpoint_b_desc',
+ 'ftp_account',
+ 'ftp_url',
+ 'ftp_link_type'
],
- "default_columns": [
- "recv_time",
- "subscriber_id",
- "client_ip",
- "client_port",
- "ftp_url",
- "server_ip",
- "server_port"
+ default_columns: [
+ 'recv_time',
+ 'subscriber_id',
+ 'client_ip',
+ 'client_port',
+ 'ftp_url',
+ 'server_ip',
+ 'server_port'
]
},
- "SIP": {
- "columns": [
- "recv_time",
- "log_id",
- "decoded_as",
- "session_id",
- "start_timestamp_ms",
- "end_timestamp_ms",
- "duration_ms",
- "tcp_handshake_latency_ms",
- "ingestion_time",
- "processing_time",
- "insert_time",
- "device_id",
- "out_link_id",
- "in_link_id",
- "device_tag",
- "data_center",
- "device_group",
- "sled_ip",
- "address_type",
- "vsys_id",
- "t_vsys_id",
- "flags",
- "flags_identify_info",
- "security_rule_list",
- "security_action",
- "monitor_rule_list",
- "shaping_rule_list",
- "sc_rule_list",
- "sc_rsp_raw",
- "sc_rsp_decrypted",
- "proxy_rule_list",
- "proxy_action",
- "proxy_pinning_status",
- "proxy_intercept_status",
- "proxy_passthrough_reason",
- "proxy_client_side_latency_ms",
- "proxy_server_side_latency_ms",
- "proxy_client_side_version",
- "proxy_server_side_version",
- "proxy_cert_verify",
- "proxy_intercept_error",
- "security_mirrored_pkts",
- "security_mirrored_bytes",
- "client_ip",
- "client_port",
- "client_os_desc",
- "client_geolocation",
- "client_asn",
- "subscriber_id",
- "imei",
- "imsi",
- "apn",
- "phone_number",
- "server_ip",
- "server_port",
- "server_os_desc",
- "server_geolocation",
- "server_asn",
- "server_fqdn",
- "server_domain",
- "app_path",
- "app",
- "app_debug_info",
- "app_content",
- "protocol_path",
- "fqdn_category_list",
- "sent_pkts",
- "received_pkts",
- "sent_bytes",
- "received_bytes",
- "tcp_c2s_ip_fragments",
- "tcp_s2c_ip_fragments",
- "tcp_c2s_lost_bytes",
- "tcp_s2c_lost_bytes",
- "tcp_c2s_o3_pkts",
- "tcp_s2c_o3_pkts",
- "tcp_c2s_rtx_pkts",
- "tcp_s2c_rtx_pkts",
- "tcp_c2s_rtx_bytes",
- "tcp_s2c_rtx_bytes",
- "tcp_rtt_ms",
- "tcp_client_isn",
- "tcp_server_isn",
- "packet_capture_file",
- "in_src_mac",
- "out_src_mac",
- "in_dest_mac",
- "out_dest_mac",
- "tunnels",
- "dup_traffic_flag",
- "tunnel_endpoint_a_desc",
- "tunnel_endpoint_b_desc",
- "sip_call_id",
- "sip_originator_description",
- "sip_responder_description",
- "sip_user_agent",
- "sip_server",
- "sip_originator_sdp_connect_ip",
- "sip_originator_sdp_media_port",
- "sip_originator_sdp_media_type",
- "sip_originator_sdp_content",
- "sip_responder_sdp_connect_ip",
- "sip_responder_sdp_media_port",
- "sip_responder_sdp_media_type",
- "sip_responder_sdp_content",
- "sip_duration_s",
- "sip_bye"
+ SIP: {
+ columns: [
+ 'recv_time',
+ 'log_id',
+ 'decoded_as',
+ 'session_id',
+ 'start_timestamp_ms',
+ 'end_timestamp_ms',
+ 'duration_ms',
+ 'tcp_handshake_latency_ms',
+ 'ingestion_time',
+ 'processing_time',
+ 'insert_time',
+ 'device_id',
+ 'out_link_id',
+ 'in_link_id',
+ 'device_tag',
+ 'data_center',
+ 'device_group',
+ 'sled_ip',
+ 'address_type',
+ 'vsys_id',
+ 't_vsys_id',
+ 'flags',
+ 'flags_identify_info',
+ 'security_rule_list',
+ 'security_action',
+ 'monitor_rule_list',
+ 'shaping_rule_list',
+ 'sc_rule_list',
+ 'sc_rsp_raw',
+ 'sc_rsp_decrypted',
+ 'proxy_rule_list',
+ 'proxy_action',
+ 'proxy_pinning_status',
+ 'proxy_intercept_status',
+ 'proxy_passthrough_reason',
+ 'proxy_client_side_latency_ms',
+ 'proxy_server_side_latency_ms',
+ 'proxy_client_side_version',
+ 'proxy_server_side_version',
+ 'proxy_cert_verify',
+ 'proxy_intercept_error',
+ 'security_mirrored_pkts',
+ 'security_mirrored_bytes',
+ 'client_ip',
+ 'client_port',
+ 'client_os_desc',
+ 'client_geolocation',
+ 'client_asn',
+ 'subscriber_id',
+ 'imei',
+ 'imsi',
+ 'apn',
+ 'phone_number',
+ 'server_ip',
+ 'server_port',
+ 'server_os_desc',
+ 'server_geolocation',
+ 'server_asn',
+ 'server_fqdn',
+ 'server_domain',
+ 'app_path',
+ 'app',
+ 'app_debug_info',
+ 'app_content',
+ 'protocol_path',
+ 'fqdn_category_list',
+ 'sent_pkts',
+ 'received_pkts',
+ 'sent_bytes',
+ 'received_bytes',
+ 'tcp_c2s_ip_fragments',
+ 'tcp_s2c_ip_fragments',
+ 'tcp_c2s_lost_bytes',
+ 'tcp_s2c_lost_bytes',
+ 'tcp_c2s_o3_pkts',
+ 'tcp_s2c_o3_pkts',
+ 'tcp_c2s_rtx_pkts',
+ 'tcp_s2c_rtx_pkts',
+ 'tcp_c2s_rtx_bytes',
+ 'tcp_s2c_rtx_bytes',
+ 'tcp_rtt_ms',
+ 'tcp_client_isn',
+ 'tcp_server_isn',
+ 'packet_capture_file',
+ 'in_src_mac',
+ 'out_src_mac',
+ 'in_dest_mac',
+ 'out_dest_mac',
+ 'tunnels',
+ 'dup_traffic_flag',
+ 'tunnel_endpoint_a_desc',
+ 'tunnel_endpoint_b_desc',
+ 'sip_call_id',
+ 'sip_originator_description',
+ 'sip_responder_description',
+ 'sip_user_agent',
+ 'sip_server',
+ 'sip_originator_sdp_connect_ip',
+ 'sip_originator_sdp_media_port',
+ 'sip_originator_sdp_media_type',
+ 'sip_originator_sdp_content',
+ 'sip_responder_sdp_connect_ip',
+ 'sip_responder_sdp_media_port',
+ 'sip_responder_sdp_media_type',
+ 'sip_responder_sdp_content',
+ 'sip_duration_s',
+ 'sip_bye'
],
- "default_columns": [
- "recv_time",
- "client_ip",
- "client_port",
- "sip_originator_description",
- "sip_responder_description",
- "sip_call_id",
- "server_ip",
- "server_port"
+ default_columns: [
+ 'recv_time',
+ 'client_ip',
+ 'client_port',
+ 'sip_originator_description',
+ 'sip_responder_description',
+ 'sip_call_id',
+ 'server_ip',
+ 'server_port'
]
},
- "RTP": {
- "columns": [
- "recv_time",
- "log_id",
- "decoded_as",
- "session_id",
- "start_timestamp_ms",
- "end_timestamp_ms",
- "duration_ms",
- "tcp_handshake_latency_ms",
- "ingestion_time",
- "processing_time",
- "insert_time",
- "device_id",
- "out_link_id",
- "in_link_id",
- "device_tag",
- "data_center",
- "device_group",
- "sled_ip",
- "address_type",
- "vsys_id",
- "t_vsys_id",
- "flags",
- "flags_identify_info",
- "security_rule_list",
- "security_action",
- "monitor_rule_list",
- "shaping_rule_list",
- "sc_rule_list",
- "sc_rsp_raw",
- "sc_rsp_decrypted",
- "proxy_rule_list",
- "proxy_action",
- "proxy_pinning_status",
- "proxy_intercept_status",
- "proxy_passthrough_reason",
- "proxy_client_side_latency_ms",
- "proxy_server_side_latency_ms",
- "proxy_client_side_version",
- "proxy_server_side_version",
- "proxy_cert_verify",
- "proxy_intercept_error",
- "security_mirrored_pkts",
- "security_mirrored_bytes",
- "client_ip",
- "client_port",
- "client_os_desc",
- "client_geolocation",
- "client_asn",
- "subscriber_id",
- "imei",
- "imsi",
- "apn",
- "phone_number",
- "server_ip",
- "server_port",
- "server_os_desc",
- "server_geolocation",
- "server_asn",
- "server_fqdn",
- "server_domain",
- "app_path",
- "app",
- "app_debug_info",
- "app_content",
- "protocol_path",
- "fqdn_category_list",
- "sent_pkts",
- "received_pkts",
- "sent_bytes",
- "received_bytes",
- "tcp_c2s_ip_fragments",
- "tcp_s2c_ip_fragments",
- "tcp_c2s_lost_bytes",
- "tcp_s2c_lost_bytes",
- "tcp_c2s_o3_pkts",
- "tcp_s2c_o3_pkts",
- "tcp_c2s_rtx_pkts",
- "tcp_s2c_rtx_pkts",
- "tcp_c2s_rtx_bytes",
- "tcp_s2c_rtx_bytes",
- "tcp_rtt_ms",
- "tcp_client_isn",
- "tcp_server_isn",
- "packet_capture_file",
- "in_src_mac",
- "out_src_mac",
- "in_dest_mac",
- "out_dest_mac",
- "tunnels",
- "dup_traffic_flag",
- "tunnel_endpoint_a_desc",
- "tunnel_endpoint_b_desc",
- "rtp_payload_type_c2s",
- "rtp_payload_type_s2c",
- "rtp_pcap_path",
- "rtp_originator_dir"
+ RTP: {
+ columns: [
+ 'recv_time',
+ 'log_id',
+ 'decoded_as',
+ 'session_id',
+ 'start_timestamp_ms',
+ 'end_timestamp_ms',
+ 'duration_ms',
+ 'tcp_handshake_latency_ms',
+ 'ingestion_time',
+ 'processing_time',
+ 'insert_time',
+ 'device_id',
+ 'out_link_id',
+ 'in_link_id',
+ 'device_tag',
+ 'data_center',
+ 'device_group',
+ 'sled_ip',
+ 'address_type',
+ 'vsys_id',
+ 't_vsys_id',
+ 'flags',
+ 'flags_identify_info',
+ 'security_rule_list',
+ 'security_action',
+ 'monitor_rule_list',
+ 'shaping_rule_list',
+ 'sc_rule_list',
+ 'sc_rsp_raw',
+ 'sc_rsp_decrypted',
+ 'proxy_rule_list',
+ 'proxy_action',
+ 'proxy_pinning_status',
+ 'proxy_intercept_status',
+ 'proxy_passthrough_reason',
+ 'proxy_client_side_latency_ms',
+ 'proxy_server_side_latency_ms',
+ 'proxy_client_side_version',
+ 'proxy_server_side_version',
+ 'proxy_cert_verify',
+ 'proxy_intercept_error',
+ 'security_mirrored_pkts',
+ 'security_mirrored_bytes',
+ 'client_ip',
+ 'client_port',
+ 'client_os_desc',
+ 'client_geolocation',
+ 'client_asn',
+ 'subscriber_id',
+ 'imei',
+ 'imsi',
+ 'apn',
+ 'phone_number',
+ 'server_ip',
+ 'server_port',
+ 'server_os_desc',
+ 'server_geolocation',
+ 'server_asn',
+ 'server_fqdn',
+ 'server_domain',
+ 'app_path',
+ 'app',
+ 'app_debug_info',
+ 'app_content',
+ 'protocol_path',
+ 'fqdn_category_list',
+ 'sent_pkts',
+ 'received_pkts',
+ 'sent_bytes',
+ 'received_bytes',
+ 'tcp_c2s_ip_fragments',
+ 'tcp_s2c_ip_fragments',
+ 'tcp_c2s_lost_bytes',
+ 'tcp_s2c_lost_bytes',
+ 'tcp_c2s_o3_pkts',
+ 'tcp_s2c_o3_pkts',
+ 'tcp_c2s_rtx_pkts',
+ 'tcp_s2c_rtx_pkts',
+ 'tcp_c2s_rtx_bytes',
+ 'tcp_s2c_rtx_bytes',
+ 'tcp_rtt_ms',
+ 'tcp_client_isn',
+ 'tcp_server_isn',
+ 'packet_capture_file',
+ 'in_src_mac',
+ 'out_src_mac',
+ 'in_dest_mac',
+ 'out_dest_mac',
+ 'tunnels',
+ 'dup_traffic_flag',
+ 'tunnel_endpoint_a_desc',
+ 'tunnel_endpoint_b_desc',
+ 'rtp_payload_type_c2s',
+ 'rtp_payload_type_s2c',
+ 'rtp_pcap_path',
+ 'rtp_originator_dir'
],
- "default_columns": [
- "recv_time",
- "subscriber_id",
- "client_ip",
- "client_port",
- "server_ip",
- "server_port",
- "rtp_pcap_path",
- "rtp_originator_dir"
+ default_columns: [
+ 'recv_time',
+ 'subscriber_id',
+ 'client_ip',
+ 'client_port',
+ 'server_ip',
+ 'server_port',
+ 'rtp_pcap_path',
+ 'rtp_originator_dir'
]
},
- "SSH": {
- "columns": [
- "recv_time",
- "log_id",
- "decoded_as",
- "session_id",
- "start_timestamp_ms",
- "end_timestamp_ms",
- "duration_ms",
- "tcp_handshake_latency_ms",
- "ingestion_time",
- "processing_time",
- "insert_time",
- "device_id",
- "out_link_id",
- "in_link_id",
- "device_tag",
- "data_center",
- "device_group",
- "sled_ip",
- "address_type",
- "vsys_id",
- "t_vsys_id",
- "flags",
- "flags_identify_info",
- "security_rule_list",
- "security_action",
- "monitor_rule_list",
- "shaping_rule_list",
- "sc_rule_list",
- "sc_rsp_raw",
- "sc_rsp_decrypted",
- "proxy_rule_list",
- "proxy_action",
- "proxy_pinning_status",
- "proxy_intercept_status",
- "proxy_passthrough_reason",
- "proxy_client_side_latency_ms",
- "proxy_server_side_latency_ms",
- "proxy_client_side_version",
- "proxy_server_side_version",
- "proxy_cert_verify",
- "proxy_intercept_error",
- "security_mirrored_pkts",
- "security_mirrored_bytes",
- "client_ip",
- "client_port",
- "client_os_desc",
- "client_geolocation",
- "client_asn",
- "subscriber_id",
- "imei",
- "imsi",
- "phone_number",
- "server_ip",
- "server_port",
- "server_os_desc",
- "server_geolocation",
- "server_asn",
- "server_fqdn",
- "server_domain",
- "app_path",
- "app",
- "app_debug_info",
- "app_content",
- "protocol_path",
- "fqdn_category_list",
- "sent_pkts",
- "received_pkts",
- "sent_bytes",
- "received_bytes",
- "tcp_c2s_ip_fragments",
- "tcp_s2c_ip_fragments",
- "tcp_c2s_lost_bytes",
- "tcp_s2c_lost_bytes",
- "tcp_c2s_o3_pkts",
- "tcp_s2c_o3_pkts",
- "tcp_c2s_rtx_pkts",
- "tcp_s2c_rtx_pkts",
- "tcp_c2s_rtx_bytes",
- "tcp_s2c_rtx_bytes",
- "tcp_rtt_ms",
- "tcp_client_isn",
- "tcp_server_isn",
- "packet_capture_file",
- "in_src_mac",
- "out_src_mac",
- "in_dest_mac",
- "out_dest_mac",
- "tunnels",
- "dup_traffic_flag",
- "tunnel_endpoint_a_desc",
- "tunnel_endpoint_b_desc",
- "ssh_version",
- "ssh_auth_success",
- "ssh_client_version",
- "ssh_server_version",
- "ssh_cipher_alg",
- "ssh_mac_alg",
- "ssh_compression_alg",
- "ssh_kex_alg",
- "ssh_host_key_alg",
- "ssh_host_key",
- "ssh_hassh"
+ SSH: {
+ columns: [
+ 'recv_time',
+ 'log_id',
+ 'decoded_as',
+ 'session_id',
+ 'start_timestamp_ms',
+ 'end_timestamp_ms',
+ 'duration_ms',
+ 'tcp_handshake_latency_ms',
+ 'ingestion_time',
+ 'processing_time',
+ 'insert_time',
+ 'device_id',
+ 'out_link_id',
+ 'in_link_id',
+ 'device_tag',
+ 'data_center',
+ 'device_group',
+ 'sled_ip',
+ 'address_type',
+ 'vsys_id',
+ 't_vsys_id',
+ 'flags',
+ 'flags_identify_info',
+ 'security_rule_list',
+ 'security_action',
+ 'monitor_rule_list',
+ 'shaping_rule_list',
+ 'sc_rule_list',
+ 'sc_rsp_raw',
+ 'sc_rsp_decrypted',
+ 'proxy_rule_list',
+ 'proxy_action',
+ 'proxy_pinning_status',
+ 'proxy_intercept_status',
+ 'proxy_passthrough_reason',
+ 'proxy_client_side_latency_ms',
+ 'proxy_server_side_latency_ms',
+ 'proxy_client_side_version',
+ 'proxy_server_side_version',
+ 'proxy_cert_verify',
+ 'proxy_intercept_error',
+ 'security_mirrored_pkts',
+ 'security_mirrored_bytes',
+ 'client_ip',
+ 'client_port',
+ 'client_os_desc',
+ 'client_geolocation',
+ 'client_asn',
+ 'subscriber_id',
+ 'imei',
+ 'imsi',
+ 'phone_number',
+ 'server_ip',
+ 'server_port',
+ 'server_os_desc',
+ 'server_geolocation',
+ 'server_asn',
+ 'server_fqdn',
+ 'server_domain',
+ 'app_path',
+ 'app',
+ 'app_debug_info',
+ 'app_content',
+ 'protocol_path',
+ 'fqdn_category_list',
+ 'sent_pkts',
+ 'received_pkts',
+ 'sent_bytes',
+ 'received_bytes',
+ 'tcp_c2s_ip_fragments',
+ 'tcp_s2c_ip_fragments',
+ 'tcp_c2s_lost_bytes',
+ 'tcp_s2c_lost_bytes',
+ 'tcp_c2s_o3_pkts',
+ 'tcp_s2c_o3_pkts',
+ 'tcp_c2s_rtx_pkts',
+ 'tcp_s2c_rtx_pkts',
+ 'tcp_c2s_rtx_bytes',
+ 'tcp_s2c_rtx_bytes',
+ 'tcp_rtt_ms',
+ 'tcp_client_isn',
+ 'tcp_server_isn',
+ 'packet_capture_file',
+ 'in_src_mac',
+ 'out_src_mac',
+ 'in_dest_mac',
+ 'out_dest_mac',
+ 'tunnels',
+ 'dup_traffic_flag',
+ 'tunnel_endpoint_a_desc',
+ 'tunnel_endpoint_b_desc',
+ 'ssh_version',
+ 'ssh_auth_success',
+ 'ssh_client_version',
+ 'ssh_server_version',
+ 'ssh_cipher_alg',
+ 'ssh_mac_alg',
+ 'ssh_compression_alg',
+ 'ssh_kex_alg',
+ 'ssh_host_key_alg',
+ 'ssh_host_key',
+ 'ssh_hassh'
],
- "default_columns": [
- "recv_time",
- "subscriber_id",
- "client_ip",
- "client_port",
- "server_ip",
- "server_port",
- "ssh_auth_success"
+ default_columns: [
+ 'recv_time',
+ 'subscriber_id',
+ 'client_ip',
+ 'client_port',
+ 'server_ip',
+ 'server_port',
+ 'ssh_auth_success'
]
},
- "Stratum": {
- "columns": [
- "recv_time",
- "log_id",
- "decoded_as",
- "session_id",
- "start_timestamp_ms",
- "end_timestamp_ms",
- "duration_ms",
- "tcp_handshake_latency_ms",
- "ingestion_time",
- "processing_time",
- "insert_time",
- "device_id",
- "out_link_id",
- "in_link_id",
- "device_tag",
- "data_center",
- "device_group",
- "sled_ip",
- "address_type",
- "vsys_id",
- "t_vsys_id",
- "flags",
- "flags_identify_info",
- "security_rule_list",
- "security_action",
- "monitor_rule_list",
- "shaping_rule_list",
- "sc_rule_list",
- "sc_rsp_raw",
- "sc_rsp_decrypted",
- "proxy_rule_list",
- "proxy_action",
- "proxy_pinning_status",
- "proxy_intercept_status",
- "proxy_passthrough_reason",
- "proxy_client_side_latency_ms",
- "proxy_server_side_latency_ms",
- "proxy_client_side_version",
- "proxy_server_side_version",
- "proxy_cert_verify",
- "proxy_intercept_error",
- "security_mirrored_pkts",
- "security_mirrored_bytes",
- "client_ip",
- "client_port",
- "client_os_desc",
- "client_geolocation",
- "client_asn",
- "subscriber_id",
- "imei",
- "imsi",
- "apn",
- "phone_number",
- "server_ip",
- "server_port",
- "server_os_desc",
- "server_geolocation",
- "server_asn",
- "server_fqdn",
- "server_domain",
- "app_path",
- "app",
- "app_debug_info",
- "app_content",
- "protocol_path",
- "fqdn_category_list",
- "sent_pkts",
- "received_pkts",
- "sent_bytes",
- "received_bytes",
- "tcp_c2s_ip_fragments",
- "tcp_s2c_ip_fragments",
- "tcp_c2s_lost_bytes",
- "tcp_s2c_lost_bytes",
- "tcp_c2s_o3_pkts",
- "tcp_s2c_o3_pkts",
- "tcp_c2s_rtx_pkts",
- "tcp_s2c_rtx_pkts",
- "tcp_c2s_rtx_bytes",
- "tcp_s2c_rtx_bytes",
- "tcp_rtt_ms",
- "tcp_client_isn",
- "tcp_server_isn",
- "packet_capture_file",
- "in_src_mac",
- "out_src_mac",
- "in_dest_mac",
- "out_dest_mac",
- "tunnels",
- "dup_traffic_flag",
- "tunnel_endpoint_a_desc",
- "tunnel_endpoint_b_desc",
- "stratum_cryptocurrency",
- "stratum_mining_pools",
- "stratum_mining_program",
- "stratum_mining_subscribe"
+ Stratum: {
+ columns: [
+ 'recv_time',
+ 'log_id',
+ 'decoded_as',
+ 'session_id',
+ 'start_timestamp_ms',
+ 'end_timestamp_ms',
+ 'duration_ms',
+ 'tcp_handshake_latency_ms',
+ 'ingestion_time',
+ 'processing_time',
+ 'insert_time',
+ 'device_id',
+ 'out_link_id',
+ 'in_link_id',
+ 'device_tag',
+ 'data_center',
+ 'device_group',
+ 'sled_ip',
+ 'address_type',
+ 'vsys_id',
+ 't_vsys_id',
+ 'flags',
+ 'flags_identify_info',
+ 'security_rule_list',
+ 'security_action',
+ 'monitor_rule_list',
+ 'shaping_rule_list',
+ 'sc_rule_list',
+ 'sc_rsp_raw',
+ 'sc_rsp_decrypted',
+ 'proxy_rule_list',
+ 'proxy_action',
+ 'proxy_pinning_status',
+ 'proxy_intercept_status',
+ 'proxy_passthrough_reason',
+ 'proxy_client_side_latency_ms',
+ 'proxy_server_side_latency_ms',
+ 'proxy_client_side_version',
+ 'proxy_server_side_version',
+ 'proxy_cert_verify',
+ 'proxy_intercept_error',
+ 'security_mirrored_pkts',
+ 'security_mirrored_bytes',
+ 'client_ip',
+ 'client_port',
+ 'client_os_desc',
+ 'client_geolocation',
+ 'client_asn',
+ 'subscriber_id',
+ 'imei',
+ 'imsi',
+ 'apn',
+ 'phone_number',
+ 'server_ip',
+ 'server_port',
+ 'server_os_desc',
+ 'server_geolocation',
+ 'server_asn',
+ 'server_fqdn',
+ 'server_domain',
+ 'app_path',
+ 'app',
+ 'app_debug_info',
+ 'app_content',
+ 'protocol_path',
+ 'fqdn_category_list',
+ 'sent_pkts',
+ 'received_pkts',
+ 'sent_bytes',
+ 'received_bytes',
+ 'tcp_c2s_ip_fragments',
+ 'tcp_s2c_ip_fragments',
+ 'tcp_c2s_lost_bytes',
+ 'tcp_s2c_lost_bytes',
+ 'tcp_c2s_o3_pkts',
+ 'tcp_s2c_o3_pkts',
+ 'tcp_c2s_rtx_pkts',
+ 'tcp_s2c_rtx_pkts',
+ 'tcp_c2s_rtx_bytes',
+ 'tcp_s2c_rtx_bytes',
+ 'tcp_rtt_ms',
+ 'tcp_client_isn',
+ 'tcp_server_isn',
+ 'packet_capture_file',
+ 'in_src_mac',
+ 'out_src_mac',
+ 'in_dest_mac',
+ 'out_dest_mac',
+ 'tunnels',
+ 'dup_traffic_flag',
+ 'tunnel_endpoint_a_desc',
+ 'tunnel_endpoint_b_desc',
+ 'stratum_cryptocurrency',
+ 'stratum_mining_pools',
+ 'stratum_mining_program',
+ 'stratum_mining_subscribe'
],
- "default_columns": [
- "recv_time",
- "subscriber_id",
- "client_port",
- "client_ip",
- "server_ip",
- "server_port",
- "stratum_cryptocurrency",
- "stratum_mining_pools",
- "stratum_mining_program"
+ default_columns: [
+ 'recv_time',
+ 'subscriber_id',
+ 'client_port',
+ 'client_ip',
+ 'server_ip',
+ 'server_port',
+ 'stratum_cryptocurrency',
+ 'stratum_mining_pools',
+ 'stratum_mining_program'
]
}
},
- "default_columns": [
- "recv_time",
- "subscriber_id",
- "client_ip",
- "client_port",
- "server_ip",
- "server_port",
- "decoded_as",
- "server_fqdn"
+ default_columns: [
+ 'recv_time',
+ 'subscriber_id',
+ 'client_ip',
+ 'client_port',
+ 'server_ip',
+ 'server_port',
+ 'decoded_as',
+ 'server_fqdn'
],
- "internal_columns": [
- "recv_time",
- "log_id",
- "flags_identify_info",
- "tunnels",
- "app_debug_info",
- "app_content",
- "packet_capture_file",
- "tunnel_endpoint_a_desc",
- "tunnel_endpoint_b_desc"
+ internal_columns: [
+ 'recv_time',
+ 'log_id',
+ 'flags_identify_info',
+ 'tunnels',
+ 'app_debug_info',
+ 'app_content',
+ 'packet_capture_file',
+ 'tunnel_endpoint_a_desc',
+ 'tunnel_endpoint_b_desc'
],
- "tunnel_type": {
- "GTP": [
+ tunnel_type: {
+ GTP: [
{
- "name": "gtp_endpoint_a_ip",
- "label": "Endpoint A IP",
- "type": "string"
+ name: 'gtp_endpoint_a_ip',
+ label: 'Endpoint A IP',
+ type: 'string'
},
{
- "name": "gtp_endpoint_b_ip",
- "label": "Endpoint B IP",
- "type": "string"
+ name: 'gtp_endpoint_b_ip',
+ label: 'Endpoint B IP',
+ type: 'string'
},
{
- "name": "gtp_endpoint_a_port",
- "label": "Endpoint A Port",
- "type": "int"
+ name: 'gtp_endpoint_a_port',
+ label: 'Endpoint A Port',
+ type: 'int'
},
{
- "name": "gtp_endpoint_b_port",
- "label": "Endpoint B Port",
- "type": "int"
+ name: 'gtp_endpoint_b_port',
+ label: 'Endpoint B Port',
+ type: 'int'
},
{
- "name": "gtp_endpoint_a2b_teid",
- "label": "Endpoint A2B TEID",
- "type": "long"
+ name: 'gtp_endpoint_a2b_teid',
+ label: 'Endpoint A2B TEID',
+ type: 'long'
},
{
- "name": "gtp_endpoint_b2a_teid",
- "label": "Endpoint B2A TEID",
- "type": "long"
+ name: 'gtp_endpoint_b2a_teid',
+ label: 'Endpoint B2A TEID',
+ type: 'long'
}
],
- "MPLS": [
+ MPLS: [
{
- "name": "mpls_c2s_direction_label",
- "label": "Multiprotocol Label (c2s)",
- "type": {
- "type": "array",
- "items": "int",
- "logicalType": "array"
+ name: 'mpls_c2s_direction_label',
+ label: 'Multiprotocol Label (c2s)',
+ type: {
+ type: 'array',
+ items: 'int',
+ logicalType: 'array'
}
},
{
- "name": "mpls_s2c_direction_label",
- "label": "Multiprotocol Label (s2c)",
- "type": {
- "type": "array",
- "items": "int",
- "logicalType": "array"
+ name: 'mpls_s2c_direction_label',
+ label: 'Multiprotocol Label (s2c)',
+ type: {
+ type: 'array',
+ items: 'int',
+ logicalType: 'array'
}
}
],
- "VLAN": [
+ VLAN: [
{
- "name": "vlan_c2s_direction_id",
- "label": "VLAN Direction (c2s)",
- "type": {
- "type": "array",
- "items": "int",
- "logicalType": "array"
+ name: 'vlan_c2s_direction_id',
+ label: 'VLAN Direction (c2s)',
+ type: {
+ type: 'array',
+ items: 'int',
+ logicalType: 'array'
}
},
{
- "name": "vlan_s2c_direction_id",
- "label": "VLAN Direction (s2c)",
- "type": {
- "type": "array",
- "items": "int",
- "logicalType": "array"
+ name: 'vlan_s2c_direction_id',
+ label: 'VLAN Direction (s2c)',
+ type: {
+ type: 'array',
+ items: 'int',
+ logicalType: 'array'
}
}
],
- "ETHERNET": [
+ ETHERNET: [
{
- "name": "source_mac",
- "label": "Source MAC",
- "type": "string"
+ name: 'source_mac',
+ label: 'Source MAC',
+ type: 'string'
},
{
- "name": "destination_mac",
- "label": "Destination MAC",
- "type": "string"
+ name: 'destination_mac',
+ label: 'Destination MAC',
+ type: 'string'
}
],
- "MULTIPATH_ETHERNET": [
+ MULTIPATH_ETHERNET: [
{
- "name": "c2s_source_mac",
- "label": "Source MAC (c2s)",
- "type": "string"
+ name: 'c2s_source_mac',
+ label: 'Source MAC (c2s)',
+ type: 'string'
},
{
- "name": "c2s_destination_mac",
- "label": "Destination MAC (c2s)",
- "type": "string"
+ name: 'c2s_destination_mac',
+ label: 'Destination MAC (c2s)',
+ type: 'string'
},
{
- "name": "s2c_source_mac",
- "label": "Source MAC (s2c)",
- "type": "string"
+ name: 's2c_source_mac',
+ label: 'Source MAC (s2c)',
+ type: 'string'
},
{
- "name": "s2c_destination_mac",
- "label": "Destination MAC (s2c)",
- "type": "string"
+ name: 's2c_destination_mac',
+ label: 'Destination MAC (s2c)',
+ type: 'string'
}
],
- "L2TP": [
+ L2TP: [
{
- "name": "l2tp_version",
- "label": "Version",
- "type": "string"
+ name: 'l2tp_version',
+ label: 'Version',
+ type: 'string'
},
{
- "name": "l2tp_lac2lns_tunnel_id",
- "label": "LAC2LNS Tunnel ID",
- "type": "int"
+ name: 'l2tp_lac2lns_tunnel_id',
+ label: 'LAC2LNS Tunnel ID',
+ type: 'int'
},
{
- "name": "l2tp_lns2lac_tunnel_id",
- "label": "LNS2LAC Tunnel ID",
- "type": "int"
+ name: 'l2tp_lns2lac_tunnel_id',
+ label: 'LNS2LAC Tunnel ID',
+ type: 'int'
},
{
- "name": "l2tp_lac2lns_session_id",
- "label": "LAC2LNS Session ID",
- "type": "int"
+ name: 'l2tp_lac2lns_session_id',
+ label: 'LAC2LNS Session ID',
+ type: 'int'
},
{
- "name": "l2tp_lns2lac_session_id",
- "label": "LNS2LAC Session ID",
- "type": "int"
+ name: 'l2tp_lns2lac_session_id',
+ label: 'LNS2LAC Session ID',
+ type: 'int'
},
{
- "name": "l2tp_access_concentrator_ip",
- "label": "Access Concentrator IP",
- "type": "string"
+ name: 'l2tp_access_concentrator_ip',
+ label: 'Access Concentrator IP',
+ type: 'string'
},
{
- "name": "l2tp_access_concentrator_port",
- "label": "Access Concentrator Port",
- "type": "int"
+ name: 'l2tp_access_concentrator_port',
+ label: 'Access Concentrator Port',
+ type: 'int'
},
{
- "name": "l2tp_network_server_ip",
- "label": "Network Server IP",
- "type": "string"
+ name: 'l2tp_network_server_ip',
+ label: 'Network Server IP',
+ type: 'string'
},
{
- "name": "l2tp_network_server_port",
- "label": "Network Server Port",
- "type": "int"
+ name: 'l2tp_network_server_port',
+ label: 'Network Server Port',
+ type: 'int'
}
],
- "PPTP": [
+ PPTP: [
{
- "name": "pptp_uplink_tunnel_id",
- "label": "UpLink Tunnel ID",
- "type": "int"
+ name: 'pptp_uplink_tunnel_id',
+ label: 'UpLink Tunnel ID',
+ type: 'int'
},
{
- "name": "pptp_downlink_tunnel_id",
- "label": "Down Tunnel ID",
- "type": "int"
+ name: 'pptp_downlink_tunnel_id',
+ label: 'Down Tunnel ID',
+ type: 'int'
}
]
},
- "measurements": {
- "aggregates": {
- "sessions": [
+ measurements: {
+ aggregates: {
+ sessions: [
{
- "fn": "count",
- "column": "log_id",
- "value": "sessions",
- "label": "Sessions",
- "unit": "sessions"
+ fn: 'count',
+ column: 'log_id',
+ value: 'sessions',
+ label: 'Sessions',
+ unit: 'sessions'
}
],
- "bytes": [
+ bytes: [
{
- "fn": "sum",
- "column": "sent_bytes + received_bytes",
- "value": "bytes",
- "label": "Bytes",
- "unit": "bytes"
+ fn: 'sum',
+ column: 'sent_bytes + received_bytes',
+ value: 'bytes',
+ label: 'Bytes',
+ unit: 'bytes'
}
],
- "incoming_bytes": [
+ incoming_bytes: [
{
- "fn": "sum",
- "column": "if(bitAnd(flags, 8) = 8, received_bytes, sent_bytes)",
- "value": "incoming_bytes",
- "label": "Incoming Bytes",
- "unit": "bytes"
+ fn: 'sum',
+ column: 'if(bitAnd(flags, 8) = 8, received_bytes, sent_bytes)',
+ value: 'incoming_bytes',
+ label: 'Incoming Bytes',
+ unit: 'bytes'
}
],
- "outgoing_bytes": [
+ outgoing_bytes: [
{
- "fn": "sum",
- "column": "if(bitAnd(flags, 8) = 8, sent_bytes, received_bytes)",
- "value": "outgoing_bytes",
- "label": "Outgoing Bytes",
- "unit": "bytes"
+ fn: 'sum',
+ column: 'if(bitAnd(flags, 8) = 8, sent_bytes, received_bytes)',
+ value: 'outgoing_bytes',
+ label: 'Outgoing Bytes',
+ unit: 'bytes'
}
]
}
},
- "size": 56704740769
+ size: 56704740769
},
- "fields": [
+ fields: [
{
- "name": "log_id",
- "type": "long",
- "doc": {
- "format": [
+ name: 'log_id',
+ type: 'long',
+ doc: {
+ format: [
{
- "function": "snowflake_id"
+ function: 'snowflake_id'
}
],
- "visibility": "enabled",
- "ttl": 2592000,
- "size": 4979695654
+ visibility: 'enabled',
+ ttl: 2592000,
+ size: 4979695654
},
- "label": "log.id"
+ label: 'log.id'
},
{
- "name": "session_id",
- "type": "long",
- "doc": {
- "visibility": "enabled",
- "ttl": 2592000,
- "size": 4700016584
+ name: 'session_id',
+ type: 'long',
+ doc: {
+ visibility: 'enabled',
+ ttl: 2592000,
+ size: 4700016584
},
- "label": "session.id"
+ label: 'session.id'
},
{
- "name": "start_timestamp_ms",
- "type": {
- "type": "string",
- "logicalType": "datetime64"
+ name: 'start_timestamp_ms',
+ type: {
+ type: 'string',
+ logicalType: 'datetime64'
},
- "doc": {
- "constraints": {
- "operator_functions": "=,!=,>,<,>=,<=",
- "type": "datetime64"
+ doc: {
+ constraints: {
+ operator_functions: '=,!=,>,<,>=,<=',
+ type: 'datetime64'
},
- "format": [
+ format: [
{
- "function": "from_unix_timestamp_ms"
+ function: 'from_unix_timestamp_ms'
}
],
- "visibility": "enabled",
- "ttl": 2592000,
- "size": 3465933698
+ visibility: 'enabled',
+ ttl: 2592000,
+ size: 3465933698
},
- "label": "start.time"
+ label: 'start.time'
}
]
}
diff --git a/src/components/advancedSearch/showhint/packages/service/template.js b/src/components/advancedSearch/showhint/packages/service/template.js
index 74e03599..8b08facc 100644
--- a/src/components/advancedSearch/showhint/packages/service/template.js
+++ b/src/components/advancedSearch/showhint/packages/service/template.js
@@ -1,156 +1,156 @@
export const dataTemplate = {
- "doc": {
- "functions": {
- "aggregation": [
+ doc: {
+ functions: {
+ aggregation: [
{
- "name": "COUNT",
- "function": "count(expr)",
- "label": "COUNT"
+ name: 'COUNT',
+ function: 'count(expr)',
+ label: 'COUNT'
}, {
- "name": "COUNT_DISTINCT",
- "function": "count(distinct expr)",
- "label": "COUNT_DISTINCT"
+ name: 'COUNT_DISTINCT',
+ function: 'count(distinct expr)',
+ label: 'COUNT_DISTINCT'
}, {
- "name": "AVG",
- "function": "avg(expr)",
- "label": "AVG"
+ name: 'AVG',
+ function: 'avg(expr)',
+ label: 'AVG'
}, {
- "name": "SUM",
- "function": "sum(expr)",
- "label": "SUM"
+ name: 'SUM',
+ function: 'sum(expr)',
+ label: 'SUM'
}, {
- "name": "MAX",
- "function": "max(expr)",
- "label": "MAX"
+ name: 'MAX',
+ function: 'max(expr)',
+ label: 'MAX'
}, {
- "name": "MIN",
- "function": "min(expr)",
- "label": "MIN"
+ name: 'MIN',
+ function: 'min(expr)',
+ label: 'MIN'
}],
- "operator": [
+ operator: [
{
- "name": "=",
- "function": "expr = value",
- "label": "="
+ name: '=',
+ function: 'expr = value',
+ label: '='
}, {
- "name": "!=",
- "function": "expr != value",
- "label": "!="
+ name: '!=',
+ function: 'expr != value',
+ label: '!='
}, {
- "name": ">",
- "function": "expr > value",
- "label": ">"
+ name: '>',
+ function: 'expr > value',
+ label: '>'
}, {
- "name": "<",
- "function": "expr < value",
- "label": "<"
+ name: '<',
+ function: 'expr < value',
+ label: '<'
}, {
- "name": ">=",
- "function": "expr >= value",
- "label": ">="
+ name: '>=',
+ function: 'expr >= value',
+ label: '>='
}, {
- "name": "<=",
- "function": "expr <= value",
- "label": "<="
+ name: '<=',
+ function: 'expr <= value',
+ label: '<='
}, {
- "name": "has",
- "function": "has(expr, value)",
- "label": "HAS"
+ name: 'has',
+ function: 'has(expr, value)',
+ label: 'HAS'
}, {
- "name": "in",
- "function": "expr in (values)",
- "label": "IN"
+ name: 'in',
+ function: 'expr in (values)',
+ label: 'IN'
}, {
- "name": "not in",
- "function": "expr not in (values)",
- "label": "NOT IN"
+ name: 'not in',
+ function: 'expr not in (values)',
+ label: 'NOT IN'
}, {
- "name": "like",
- "function": "expr like value",
- "label": "LIKE"
+ name: 'like',
+ function: 'expr like value',
+ label: 'LIKE'
}, {
- "name": "not like",
- "function": "expr not like value",
- "label": "NOT LIKE"
+ name: 'not like',
+ function: 'expr not like value',
+ label: 'NOT LIKE'
}, {
- "name": "notEmpty",
- "function": "notEmpty(expr)",
- "label": "NOT EMPTY"
+ name: 'notEmpty',
+ function: 'notEmpty(expr)',
+ label: 'NOT EMPTY'
}, {
- "name": "empty",
- "function": "empty(expr)",
- "label": "EMPTY"
+ name: 'empty',
+ function: 'empty(expr)',
+ label: 'EMPTY'
}]
},
- "schema_query": {
- "references": {
- "aggregation": [
+ schema_query: {
+ references: {
+ aggregation: [
{
- "type": "int",
- "functions": "COUNT,COUNT_DISTINCT,AVG,SUM,MAX,MIN"
+ type: 'int',
+ functions: 'COUNT,COUNT_DISTINCT,AVG,SUM,MAX,MIN'
}, {
- "type": "long",
- "functions": "COUNT,COUNT_DISTINCT,AVG,SUM,MAX,MIN"
+ type: 'long',
+ functions: 'COUNT,COUNT_DISTINCT,AVG,SUM,MAX,MIN'
}, {
- "type": "float",
- "functions": "COUNT,COUNT_DISTINCT,AVG,SUM,MAX,MIN"
+ type: 'float',
+ functions: 'COUNT,COUNT_DISTINCT,AVG,SUM,MAX,MIN'
}, {
- "type": "double",
- "functions": "COUNT,COUNT_DISTINCT,AVG,SUM,MAX,MIN"
+ type: 'double',
+ functions: 'COUNT,COUNT_DISTINCT,AVG,SUM,MAX,MIN'
}, {
- "type": "string",
- "functions": "COUNT,COUNT_DISTINCT"
+ type: 'string',
+ functions: 'COUNT,COUNT_DISTINCT'
}, {
- "type": "date",
- "functions": "COUNT,COUNT_DISTINCT,MAX,MIN"
+ type: 'date',
+ functions: 'COUNT,COUNT_DISTINCT,MAX,MIN'
}, {
- "type": "timestamp",
- "functions": "COUNT,COUNT_DISTINCT,MAX,MIN"
+ type: 'timestamp',
+ functions: 'COUNT,COUNT_DISTINCT,MAX,MIN'
}
],
- "operator": [
+ operator: [
{
- "type": "int",
- "functions": "=,!=,>,<,>=,<=,in,not in"
+ type: 'int',
+ functions: '=,!=,>,<,>=,<=,in,not in'
}, {
- "type": "long",
- "functions": "=,!=,>,<,>=,<=,in,not in"
+ type: 'long',
+ functions: '=,!=,>,<,>=,<=,in,not in'
}, {
- "type": "float",
- "functions": "=,!=,>,<,>=,<="
+ type: 'float',
+ functions: '=,!=,>,<,>=,<='
}, {
- "type": "double",
- "functions": "=,!=,>,<,>=,<="
+ type: 'double',
+ functions: '=,!=,>,<,>=,<='
}, {
- "type": "string",
- "functions": "=,!=,in,not in,like,not like,notEmpty,empty"
+ type: 'string',
+ functions: '=,!=,in,not in,like,not like,notEmpty,empty'
}, {
- "type": "date",
- "functions": "=,!=,>,<,>=,<="
+ type: 'date',
+ functions: '=,!=,>,<,>=,<='
}, {
- "type": "timestamp",
- "functions": "=,!=,>,<,>=,<="
+ type: 'timestamp',
+ functions: '=,!=,>,<,>=,<='
}, {
- "type": "array",
- "functions": "has"
+ type: 'array',
+ functions: 'has'
}]
}
}
},
- "fields": []
+ fields: []
}
export const fieldTemplate = {
- "name": "",
- "label": "",
- "doc": {
- "allow_query": "true",
- "visibility": null,
- "constraints": {
- "type": "tag",
- "operator_functions": "in,not in"
+ name: '',
+ label: '',
+ doc: {
+ allow_query: 'true',
+ visibility: null,
+ constraints: {
+ type: 'tag',
+ operator_functions: 'in,not in'
},
- "data": []
+ data: []
},
- "type": "Array"
+ type: 'Array'
}
diff --git a/src/components/layout/Header.vue b/src/components/layout/Header.vue
index 2a3381de..9e101864 100644
--- a/src/components/layout/Header.vue
+++ b/src/components/layout/Header.vue
@@ -250,7 +250,7 @@ import {
import { getNowTime, getSecond } from '@/utils/date-util'
import _ from 'lodash'
import { useRoute } from 'vue-router'
-import { useDark, useToggle } from '@vueuse/core'
+import { useToggle } from '@vueuse/core'
export default {
name: 'Header',
@@ -336,8 +336,7 @@ export default {
wholeScreenRouterMapping,
logo: 'images/logo-header.svg',
ZH,
- EN,
- // isDark: useDark()
+ EN
}
},
computed: {
diff --git a/src/components/table/ColumnCustomize.vue b/src/components/table/ColumnCustomize.vue
index c68c8602..ae5e6f93 100644
--- a/src/components/table/ColumnCustomize.vue
+++ b/src/components/table/ColumnCustomize.vue
@@ -59,7 +59,7 @@