- GRAYBYTE UNDETECTABLE CODES -

403Webshell
Server IP : 184.154.167.98  /  Your IP : 18.226.187.60
Web Server : Apache
System : Linux pink.dnsnetservice.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
User : puertode ( 1767)
PHP Version : 8.2.26
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/grafana/plugins-bundled/internal/input-datasource/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/grafana/plugins-bundled/internal/input-datasource/module.js.map
{"version":3,"file":"module.js","mappings":"uFAAAA,EAAOC,QAAUC,G,ICAjBF,EAAOC,QAAUE,G,ICAjBH,EAAOC,QAAUG,ICCbC,EAA2B,GAG/B,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaP,QAGrB,IAAID,EAASK,EAAyBE,GAAY,CAGjDN,QAAS,IAOV,OAHAS,EAAoBH,GAAUP,EAAQA,EAAOC,QAASK,GAG/CN,EAAOC,QCpBfK,EAAoBK,EAAKX,IACxB,IAAIY,EAASZ,GAAUA,EAAOa,WAC7B,IAAOb,EAAiB,QACxB,IAAM,EAEP,OADAM,EAAoBQ,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,GCLRN,EAAoBQ,EAAI,CAACb,EAASe,KACjC,IAAI,IAAIC,KAAOD,EACXV,EAAoBY,EAAEF,EAAYC,KAASX,EAAoBY,EAAEjB,EAASgB,IAC5EE,OAAOC,eAAenB,EAASgB,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,MCJ3EX,EAAoBY,EAAI,CAACK,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFlB,EAAoBsB,EAAK3B,IACH,oBAAX4B,QAA0BA,OAAOC,a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jC,GAAS6B,GAChB,KAAEtD,GAASI,KAAKO,MAEhBgD,EAAWpC,EAAMtB,KAAOC,EAAQ,GAAKA,EAAQ,GACnD,OACE,6BACE,kBAAC,EAAA0D,YAAD,CAAaV,MAAM,OAAOW,WAAY,GACpC,oCACE,kBAAC,EAAAC,OAAD,CAAQ/C,MAAO,GAAIb,QAASA,EAASZ,MAAOqE,EAAUJ,SAAUnD,KAAK2D,iBACpExC,EAAMtB,KACL,yBAAK+D,MAAO,CAAEC,UAAW,WAAazC,EAAkBD,EAAMtB,OAE9D,kBAAC,EAAAiE,WAAD,CAAYC,KAAK,OAAOC,KAAO,oBAAmBV,MAC/CjC,EADH,KACWD,EAAkB8B,EAAWrD,MADxC,YAEE,kBAAC,EAAAoE,KAAD,CAAM5C,KAAK,YAKlBF,EAAMtB,MAAQ,kBAAC,EAAAY,cAAD,CAAeb,KAAMA,EAAMc,eAAgBV,KAAKU,eAAgBC,MAAO,OAAQC,OAAQ,QC1EvG,MAAMsD,EAAS,IAAIC,EAAAA,iBAA4DtD,GACnFuD,gBAAgB1E,GAChB2E,eAAerB,I","sources":["webpack:///external amd \"@grafana/data\"","webpack:///external amd \"react\"","webpack:///external amd \"@grafana/ui\"","webpack:///webpack/bootstrap","webpack:///webpack/runtime/compat get default export","webpack:///webpack/runtime/define property getters","webpack:///webpack/runtime/hasOwnProperty shorthand","webpack:///webpack/runtime/make namespace object","webpack:///./utils.ts","webpack:///./InputConfigEditor.tsx","webpack:///./InputDatasource.ts","webpack:///./InputQueryEditor.tsx","webpack:///./module.ts"],"sourcesContent":["module.exports = __WEBPACK_EXTERNAL_MODULE__0__;","module.exports = __WEBPACK_EXTERNAL_MODULE__1__;","module.exports = __WEBPACK_EXTERNAL_MODULE__2__;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import { toDataFrame, DataFrameDTO, toCSV } from '@grafana/data';\n\nexport function dataFrameToCSV(dto?: DataFrameDTO[]) {\n  if (!dto || !dto.length) {\n    return '';\n  }\n  return toCSV(dto.map((v) => toDataFrame(v)));\n}\n","// Libraries\nimport React, { PureComponent } from 'react';\n\n// Types\nimport { DataSourcePluginOptionsEditorProps, DataFrame, MutableDataFrame } from '@grafana/data';\nimport { TableInputCSV } from '@grafana/ui';\n\nimport { InputOptions } from './types';\nimport { dataFrameToCSV } from './utils';\n\ninterface Props extends DataSourcePluginOptionsEditorProps<InputOptions> {}\n\ninterface State {\n  text: string;\n}\n\nexport class InputConfigEditor extends PureComponent<Props, State> {\n  state = {\n    text: '',\n  };\n\n  componentDidMount() {\n    const { options } = this.props;\n    if (options.jsonData.data) {\n      const text = dataFrameToCSV(options.jsonData.data);\n      this.setState({ text });\n    }\n  }\n\n  onSeriesParsed = (data: DataFrame[], text: string) => {\n    const { options, onOptionsChange } = this.props;\n    if (!data) {\n      data = [new MutableDataFrame()];\n    }\n    // data is a property on 'jsonData'\n    const jsonData = {\n      ...options.jsonData,\n      data,\n    };\n\n    onOptionsChange({\n      ...options,\n      jsonData,\n    });\n    this.setState({ text });\n  };\n\n  render() {\n    const { text } = this.state;\n    return (\n      <div>\n        <div className=\"gf-form-group\">\n          <h4>Shared Data:</h4>\n          <span>Enter CSV</span>\n          <TableInputCSV text={text} onSeriesParsed={this.onSeriesParsed} width={'100%'} height={200} />\n        </div>\n\n        <div className=\"grafana-info-box\">\n          This data is stored in the datasource json and is returned to every user in the initial request for any\n          datasource. This is an appropriate place to enter a few values. Large datasets will perform better in other\n          datasources.\n          <br />\n          <br />\n          <b>NOTE:</b> Changes to this data will only be reflected after a browser refresh.\n        </div>\n      </div>\n    );\n  }\n}\n","// Types\nimport {\n  DataQueryRequest,\n  DataQueryResponse,\n  DataSourceApi,\n  DataSourceInstanceSettings,\n  MetricFindValue,\n  DataFrame,\n  DataFrameDTO,\n  toDataFrame,\n} from '@grafana/data';\n\nimport { InputQuery, InputOptions } from './types';\n\nexport class InputDatasource extends DataSourceApi<InputQuery, InputOptions> {\n  data: DataFrame[] = [];\n\n  constructor(instanceSettings: DataSourceInstanceSettings<InputOptions>) {\n    super(instanceSettings);\n\n    if (instanceSettings.jsonData.data) {\n      this.data = instanceSettings.jsonData.data.map((v) => toDataFrame(v));\n    }\n  }\n\n  /**\n   * Convert a query to a simple text string\n   */\n  getQueryDisplayText(query: InputQuery): string {\n    if (query.data) {\n      return 'Panel Data: ' + describeDataFrame(query.data);\n    }\n    return `Shared Data From: ${this.name} (${describeDataFrame(this.data)})`;\n  }\n\n  metricFindQuery(query: string, options?: any): Promise<MetricFindValue[]> {\n    return new Promise((resolve, reject) => {\n      const names = [];\n      for (const series of this.data) {\n        for (const field of series.fields) {\n          // TODO, match query/options?\n          names.push({\n            text: field.name,\n          });\n        }\n      }\n      resolve(names);\n    });\n  }\n\n  query(options: DataQueryRequest<InputQuery>): Promise<DataQueryResponse> {\n    const results: DataFrame[] = [];\n    for (const query of options.targets) {\n      if (query.hide) {\n        continue;\n      }\n      let data = this.data;\n      if (query.data) {\n        data = query.data.map((v) => toDataFrame(v));\n      }\n      for (let i = 0; i < data.length; i++) {\n        results.push({\n          ...data[i],\n          refId: query.refId,\n        });\n      }\n    }\n    return Promise.resolve({ data: results });\n  }\n\n  testDatasource() {\n    return new Promise((resolve, reject) => {\n      let rowCount = 0;\n      let info = `${this.data.length} Series:`;\n      for (const series of this.data) {\n        const length = series.length;\n        info += ` [${series.fields.length} Fields, ${length} Rows]`;\n        rowCount += length;\n      }\n\n      if (rowCount > 0) {\n        resolve({\n          status: 'success',\n          message: info,\n        });\n      }\n      reject({\n        status: 'error',\n        message: 'No Data Entered',\n      });\n    });\n  }\n}\n\nfunction getLength(data?: DataFrameDTO | DataFrame) {\n  if (!data || !data.fields || !data.fields.length) {\n    return 0;\n  }\n  if (data.hasOwnProperty('length')) {\n    return (data as DataFrame).length;\n  }\n  return data.fields[0].values!.length;\n}\n\nexport function describeDataFrame(data: Array<DataFrameDTO | DataFrame>): string {\n  if (!data || !data.length) {\n    return '';\n  }\n  if (data.length > 1) {\n    const count = data.reduce((acc, series) => {\n      return acc + getLength(series);\n    }, 0);\n    return `${data.length} Series, ${count} Rows`;\n  }\n  const series = data[0];\n  if (!series.fields) {\n    return 'Missing Fields';\n  }\n  const length = getLength(series);\n  return `${series.fields.length} Fields, ${length} Rows`;\n}\n\nexport default InputDatasource;\n","// Libraries\nimport React, { PureComponent } from 'react';\n\n// Types\nimport { DataFrame, toCSV, SelectableValue, MutableDataFrame, QueryEditorProps } from '@grafana/data';\nimport { Select, TableInputCSV, LinkButton, Icon, InlineField } from '@grafana/ui';\n\nimport { InputDatasource, describeDataFrame } from './InputDatasource';\nimport { InputQuery, InputOptions } from './types';\nimport { dataFrameToCSV } from './utils';\n\ntype Props = QueryEditorProps<InputDatasource, InputQuery, InputOptions>;\n\nconst options = [\n  { value: 'panel', label: 'Panel', description: 'Save data in the panel configuration.' },\n  { value: 'shared', label: 'Shared', description: 'Save data in the shared datasource object.' },\n];\n\ninterface State {\n  text: string;\n}\n\nexport class InputQueryEditor extends PureComponent<Props, State> {\n  state = {\n    text: '',\n  };\n\n  onComponentDidMount() {\n    const { query } = this.props;\n    const text = dataFrameToCSV(query.data);\n    this.setState({ text });\n  }\n\n  onSourceChange = (item: SelectableValue<string>) => {\n    const { datasource, query, onChange, onRunQuery } = this.props;\n    let data: DataFrame[] | undefined = undefined;\n    if (item.value === 'panel') {\n      if (query.data) {\n        return;\n      }\n      data = [...datasource.data];\n      if (!data) {\n        data = [new MutableDataFrame()];\n      }\n      this.setState({ text: toCSV(data) });\n    }\n    onChange({ ...query, data });\n    onRunQuery();\n  };\n\n  onSeriesParsed = (data: DataFrame[], text: string) => {\n    const { query, onChange, onRunQuery } = this.props;\n    this.setState({ text });\n    if (!data) {\n      data = [new MutableDataFrame()];\n    }\n    onChange({ ...query, data });\n    onRunQuery();\n  };\n\n  render() {\n    const { datasource, query } = this.props;\n    const { uid, name } = datasource;\n    const { text } = this.state;\n\n    const selected = query.data ? options[0] : options[1];\n    return (\n      <div>\n        <InlineField label=\"Data\" labelWidth={8}>\n          <>\n            <Select width={20} options={options} value={selected} onChange={this.onSourceChange} />\n            {query.data ? (\n              <div style={{ alignSelf: 'center' }}>{describeDataFrame(query.data)}</div>\n            ) : (\n              <LinkButton fill=\"text\" href={`datasources/edit/${uid}/`}>\n                {name}: {describeDataFrame(datasource.data)} &nbsp;&nbsp;\n                <Icon name=\"pen\" />\n              </LinkButton>\n            )}\n          </>\n        </InlineField>\n        {query.data && <TableInputCSV text={text} onSeriesParsed={this.onSeriesParsed} width={'100%'} height={200} />}\n      </div>\n    );\n  }\n}\n","import { DataSourcePlugin } from '@grafana/data';\n\nimport { InputConfigEditor } from './InputConfigEditor';\nimport { InputDatasource } from './InputDatasource';\nimport { InputQueryEditor } from './InputQueryEditor';\nimport { InputOptions, InputQuery } from './types';\n\nexport const plugin = new DataSourcePlugin<InputDatasource, InputQuery, InputOptions>(InputDatasource)\n  .setConfigEditor(InputConfigEditor)\n  .setQueryEditor(InputQueryEditor);\n"],"names":["module","exports","__WEBPACK_EXTERNAL_MODULE__0__","__WEBPACK_EXTERNAL_MODULE__1__","__WEBPACK_EXTERNAL_MODULE__2__","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","value","dataFrameToCSV","dto","length","toCSV","map","v","toDataFrame","InputConfigEditor","PureComponent","text","data","options","onOptionsChange","this","props","MutableDataFrame","jsonData","setState","componentDidMount","render","state","className","TableInputCSV","onSeriesParsed","width","height","InputDatasource","DataSourceApi","constructor","instanceSettings","super","getQueryDisplayText","query","describeDataFrame","name","metricFindQuery","Promise","resolve","reject","names","series","field","fields","push","results","targets","hide","i","refId","testDatasource","rowCount","info","status","message","getLength","values","count","reduce","acc","label","description","InputQueryEditor","item","datasource","onChange","onRunQuery","onComponentDidMount","uid","selected","InlineField","labelWidth","Select","onSourceChange","style","alignSelf","LinkButton","fill","href","Icon","plugin","DataSourcePlugin","setConfigEditor","setQueryEditor"],"sourceRoot":""}

Youez - 2016 - github.com/yon3zu
LinuXploit