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2H,KAAK0D,WAC9BtO,KAAKsO,WAAWuB,SAAW7P,KAAKsO,WAAWuB,UAnBzB,mM,iCAYC,oC,EADjB0C,iB,EAAAA,G,sFAYC,MAAMjK,EAAS,IAAIkK,EAAAA,iBAA8C9D,GACrE+D,aAAab,GACbc,cAAchH,GACdiH,uBAAuBJ,I,oLC3B1B,MAAMvP,GAAY4P,EAAAA,EAAAA,wBAAuBC,EAAAA,GACnC9P,GAAmB6P,EAAAA,EAAAA,wBAAuBE,EAAAA,GAC1CpI,GAAYkI,EAAAA,EAAAA,wBAAuBG,EAAAA","sources":["webpack://grafana/./public/app/angular/AngularLocationWrapper.ts","webpack://grafana/./public/app/angular/panel/metrics_panel_ctrl.ts","webpack://grafana/./public/app/angular/panel/panel_ctrl.ts","webpack://grafana/./public/app/angular/panel/query_ctrl.ts","webpack://grafana/./public/app/features/datasources/utils/passwordHandlers.ts","webpack://grafana/./public/app/plugins/datasource/mssql/config_ctrl.ts","webpack://grafana/./public/app/plugins/datasource/mssql/response_parser.ts","webpack://grafana/./public/app/plugins/datasource/mssql/datasource.ts","webpack://grafana/./public/app/plugins/datasource/mssql/query_ctrl.ts","webpack://grafana/./public/app/plugins/datasource/mssql/module.ts","webpack://grafana/./public/app/plugins/sdk.ts"],"sourcesContent":["import { deprecationWarning, urlUtil } from '@grafana/data';\nimport { locationSearchToObject, locationService, navigationLogger } from '@grafana/runtime';\n\n// Ref: https://github.com/angular/angular.js/blob/ae8e903edf88a83fedd116ae02c0628bf72b150c/src/ng/location.js#L5\nconst DEFAULT_PORTS: Record<string, number> = { http: 80, https: 443, ftp: 21 };\n\nexport class AngularLocationWrapper {\n constructor() {\n this.absUrl = this.wrapInDeprecationWarning(this.absUrl);\n this.hash = this.wrapInDeprecationWarning(this.hash);\n this.host = this.wrapInDeprecationWarning(this.host);\n this.path = this.wrapInDeprecationWarning(this.path);\n this.port = this.wrapInDeprecationWarning(this.port, 'window.location');\n this.protocol = this.wrapInDeprecationWarning(this.protocol, 'window.location');\n this.replace = this.wrapInDeprecationWarning(this.replace);\n this.search = this.wrapInDeprecationWarning(this.search);\n this.state = this.wrapInDeprecationWarning(this.state);\n this.url = this.wrapInDeprecationWarning(this.url);\n }\n\n wrapInDeprecationWarning(fn: Function, replacement?: string) {\n let self = this;\n\n return function wrapper() {\n deprecationWarning('$location', fn.name, replacement || 'locationService');\n return fn.apply(self, arguments);\n };\n }\n\n absUrl(): string {\n return `${window.location.origin}${this.url()}`;\n }\n\n hash(newHash?: string | null) {\n navigationLogger('AngularLocationWrapper', false, 'Angular compat layer: hash');\n\n if (!newHash) {\n return locationService.getLocation().hash.slice(1);\n } else {\n throw new Error('AngularLocationWrapper method not implemented.');\n }\n }\n\n host(): string {\n return new URL(window.location.href).hostname;\n }\n\n path(pathname?: any) {\n navigationLogger('AngularLocationWrapper', false, 'Angular compat layer: path');\n\n const location = locationService.getLocation();\n\n if (pathname !== undefined && pathname !== null) {\n let parsedPath = String(pathname);\n parsedPath = parsedPath.startsWith('/') ? parsedPath : `/${parsedPath}`;\n const url = new URL(`${window.location.origin}${parsedPath}`);\n\n locationService.push({\n pathname: url.pathname,\n search: url.search.length > 0 ? url.search : location.search,\n hash: url.hash.length > 0 ? url.hash : location.hash,\n });\n return this;\n }\n\n if (pathname === null) {\n locationService.push('/');\n return this;\n }\n\n return location.pathname;\n }\n\n port(): number | null {\n const url = new URL(window.location.href);\n return parseInt(url.port, 10) || DEFAULT_PORTS[url.protocol] || null;\n }\n\n protocol(): string {\n return new URL(window.location.href).protocol.slice(0, -1);\n }\n\n replace() {\n throw new Error('AngularLocationWrapper method not implemented.');\n }\n\n search(search?: any, paramValue?: any) {\n navigationLogger('AngularLocationWrapper', false, 'Angular compat layer: search');\n if (!search) {\n return locationService.getSearchObject();\n }\n\n if (search && arguments.length > 1) {\n locationService.partial({\n [search]: paramValue,\n });\n\n return this;\n }\n\n if (search) {\n let newQuery;\n\n if (typeof search === 'object') {\n newQuery = { ...search };\n } else {\n newQuery = locationSearchToObject(search);\n }\n\n for (const key of Object.keys(newQuery)) {\n // removing params with null | undefined\n if (newQuery[key] === null || newQuery[key] === undefined) {\n delete newQuery[key];\n }\n }\n\n const updatedUrl = urlUtil.renderUrl(locationService.getLocation().pathname, newQuery);\n locationService.push(updatedUrl);\n }\n\n return this;\n }\n\n state(state?: any) {\n navigationLogger('AngularLocationWrapper', false, 'Angular compat layer: state');\n throw new Error('AngularLocationWrapper method not implemented.');\n }\n\n url(newUrl?: any) {\n navigationLogger('AngularLocationWrapper', false, 'Angular compat layer: url');\n\n if (newUrl !== undefined) {\n if (newUrl.startsWith('#')) {\n locationService.push({ ...locationService.getLocation(), hash: newUrl });\n } else if (newUrl.startsWith('?')) {\n locationService.push({ ...locationService.getLocation(), search: newUrl });\n } else if (newUrl.trim().length === 0) {\n locationService.push('/');\n } else {\n locationService.push(newUrl);\n }\n\n return locationService;\n }\n\n const location = locationService.getLocation();\n return `${location.pathname}${location.search}${location.hash}`;\n }\n}\n","import { isArray } from 'lodash';\nimport { Unsubscribable } from 'rxjs';\n\nimport {\n DataFrame,\n DataQueryResponse,\n DataSourceApi,\n LegacyResponseData,\n LoadingState,\n PanelData,\n PanelEvents,\n TimeRange,\n toDataFrameDTO,\n toLegacyResponseData,\n} from '@grafana/data';\nimport { PanelCtrl } from 'app/angular/panel/panel_ctrl';\nimport { ContextSrv } from 'app/core/services/context_srv';\nimport { PanelModel } from 'app/features/dashboard/state';\nimport { applyPanelTimeOverrides } from 'app/features/dashboard/utils/panel';\n\nimport { PanelQueryRunner } from '../../features/query/state/PanelQueryRunner';\n\nclass MetricsPanelCtrl extends PanelCtrl {\n declare datasource: DataSourceApi;\n declare range: TimeRange;\n\n contextSrv: ContextSrv;\n datasourceSrv: any;\n timeSrv: any;\n templateSrv: any;\n interval: any;\n intervalMs: any;\n resolution: any;\n timeInfo?: string;\n skipDataOnInit = false;\n dataList: LegacyResponseData[] = [];\n querySubscription?: Unsubscribable | null;\n useDataFrames = false;\n panelData?: PanelData;\n\n constructor($scope: any, $injector: any) {\n super($scope, $injector);\n\n this.contextSrv = $injector.get('contextSrv');\n this.datasourceSrv = $injector.get('datasourceSrv');\n this.timeSrv = $injector.get('timeSrv');\n this.templateSrv = $injector.get('templateSrv');\n this.panel.datasource = this.panel.datasource || null;\n\n this.events.on(PanelEvents.refresh, this.onMetricsPanelRefresh.bind(this));\n this.events.on(PanelEvents.panelTeardown, this.onPanelTearDown.bind(this));\n this.events.on(PanelEvents.componentDidMount, this.onMetricsPanelMounted.bind(this));\n }\n\n private onMetricsPanelMounted() {\n const queryRunner = this.panel.getQueryRunner() as PanelQueryRunner;\n this.querySubscription = queryRunner\n .getData({ withTransforms: true, withFieldConfig: true })\n .subscribe(this.panelDataObserver);\n }\n\n private onPanelTearDown() {\n if (this.querySubscription) {\n this.querySubscription.unsubscribe();\n this.querySubscription = null;\n }\n }\n\n private onMetricsPanelRefresh() {\n // ignore fetching data if another panel is in fullscreen\n if (this.otherPanelInFullscreenMode()) {\n return;\n }\n\n // if we have snapshot data use that\n if (this.panel.snapshotData) {\n this.updateTimeRange();\n let data = this.panel.snapshotData;\n // backward compatibility\n if (!isArray(data)) {\n data = data.data;\n }\n\n this.panelData = {\n state: LoadingState.Done,\n series: data,\n timeRange: this.range,\n };\n\n // Defer panel rendering till the next digest cycle.\n // For some reason snapshot panels don't init at this time, so this helps to avoid rendering issues.\n return this.$timeout(() => {\n this.events.emit(PanelEvents.dataSnapshotLoad, data);\n });\n }\n\n // clear loading/error state\n delete this.error;\n this.loading = true;\n\n // load datasource service\n return this.datasourceSrv\n .get(this.panel.datasource, this.panel.scopedVars)\n .then(this.issueQueries.bind(this))\n .catch((err: any) => {\n this.processDataError(err);\n });\n }\n\n processDataError(err: any) {\n // if canceled keep loading set to true\n if (err.cancelled) {\n console.log('Panel request cancelled', err);\n return;\n }\n\n this.error = err.message || 'Request Error';\n\n if (err.data) {\n if (err.data.message) {\n this.error = err.data.message;\n } else if (err.data.error) {\n this.error = err.data.error;\n }\n }\n\n this.angularDirtyCheck();\n }\n\n angularDirtyCheck() {\n if (!this.$scope.$root.$$phase) {\n this.$scope.$digest();\n }\n }\n\n // Updates the response with information from the stream\n panelDataObserver = {\n next: (data: PanelData) => {\n this.panelData = data;\n\n if (data.state === LoadingState.Error) {\n this.loading = false;\n this.processDataError(data.error);\n }\n\n // Ignore data in loading state\n if (data.state === LoadingState.Loading) {\n this.loading = true;\n this.angularDirtyCheck();\n return;\n }\n\n if (data.request) {\n const { timeInfo } = data.request;\n if (timeInfo) {\n this.timeInfo = timeInfo;\n }\n }\n\n if (data.timeRange) {\n this.range = data.timeRange;\n }\n\n if (this.useDataFrames) {\n this.handleDataFrames(data.series);\n } else {\n // Make the results look as if they came directly from a <6.2 datasource request\n const legacy = data.series.map((v) => toLegacyResponseData(v));\n this.handleQueryResult({ data: legacy });\n }\n\n this.angularDirtyCheck();\n },\n };\n\n updateTimeRange(datasource?: DataSourceApi) {\n this.datasource = datasource || this.datasource;\n this.range = this.timeSrv.timeRange();\n\n const newTimeData = applyPanelTimeOverrides(this.panel, this.range);\n this.timeInfo = newTimeData.timeInfo;\n this.range = newTimeData.timeRange;\n }\n\n issueQueries(datasource: DataSourceApi) {\n this.updateTimeRange(datasource);\n\n this.datasource = datasource;\n\n const panel = this.panel as PanelModel;\n const queryRunner = panel.getQueryRunner();\n\n return queryRunner.run({\n datasource: panel.datasource,\n queries: panel.targets,\n panelId: panel.id,\n dashboardId: this.dashboard.id,\n timezone: this.dashboard.getTimezone(),\n timeInfo: this.timeInfo,\n timeRange: this.range,\n maxDataPoints: panel.maxDataPoints || this.width,\n minInterval: panel.interval,\n scopedVars: panel.scopedVars,\n cacheTimeout: panel.cacheTimeout,\n transformations: panel.transformations,\n });\n }\n\n handleDataFrames(data: DataFrame[]) {\n this.loading = false;\n\n if (this.dashboard && this.dashboard.snapshot) {\n this.panel.snapshotData = data.map((frame) => toDataFrameDTO(frame));\n }\n\n try {\n this.events.emit(PanelEvents.dataFramesReceived, data);\n } catch (err) {\n this.processDataError(err);\n }\n }\n\n handleQueryResult(result: DataQueryResponse) {\n this.loading = false;\n\n if (this.dashboard.snapshot) {\n this.panel.snapshotData = result.data;\n }\n\n if (!result || !result.data) {\n console.log('Data source query result invalid, missing data field:', result);\n result = { data: [] };\n }\n\n try {\n this.events.emit(PanelEvents.dataReceived, result.data);\n } catch (err) {\n this.processDataError(err);\n }\n }\n}\n\nexport { MetricsPanelCtrl };\n","import { auto } from 'angular';\nimport { isString } from 'lodash';\n\nimport {\n AppEvent,\n PanelEvents,\n PanelPluginMeta,\n AngularPanelMenuItem,\n EventBusExtended,\n EventBusSrv,\n} from '@grafana/data';\nimport { AngularLocationWrapper } from 'app/angular/AngularLocationWrapper';\nimport config from 'app/core/config';\nimport { profiler } from 'app/core/core';\n\nimport { DashboardModel } from '../../features/dashboard/state';\n\nexport class PanelCtrl {\n panel: any;\n error: any;\n declare dashboard: DashboardModel;\n pluginName = '';\n pluginId = '';\n editorTabs: any;\n $scope: any;\n $injector: auto.IInjectorService;\n $timeout: any;\n editModeInitiated = false;\n declare height: number;\n declare width: number;\n containerHeight: any;\n events: EventBusExtended;\n loading = false;\n timing: any;\n $location: AngularLocationWrapper;\n\n constructor($scope: any, $injector: auto.IInjectorService) {\n this.panel = this.panel ?? $scope.$parent.panel;\n this.dashboard = this.dashboard ?? $scope.$parent.dashboard;\n this.$injector = $injector;\n this.$scope = $scope;\n this.$timeout = $injector.get('$timeout');\n this.editorTabs = [];\n this.$location = new AngularLocationWrapper();\n this.events = new EventBusSrv();\n this.timing = {}; // not used but here to not break plugins\n\n const plugin = config.panels[this.panel.type];\n if (plugin) {\n this.pluginId = plugin.id;\n this.pluginName = plugin.name;\n }\n\n $scope.$on(PanelEvents.componentDidMount.name, () => this.panelDidMount());\n }\n\n panelDidMount() {\n this.events.emit(PanelEvents.componentDidMount);\n this.events.emit(PanelEvents.initialized);\n this.dashboard.panelInitialized(this.panel);\n }\n\n renderingCompleted() {\n profiler.renderingCompleted();\n }\n\n refresh() {\n this.panel.refresh();\n }\n\n publishAppEvent<T>(event: AppEvent<T>, payload?: T) {\n this.$scope.$root.appEvent(event, payload);\n }\n\n initEditMode() {\n if (!this.editModeInitiated) {\n this.editModeInitiated = true;\n this.events.emit(PanelEvents.editModeInitialized);\n }\n }\n\n addEditorTab(title: string, directiveFn: any, index?: number, icon?: any) {\n const editorTab = { title, directiveFn, icon };\n\n if (isString(directiveFn)) {\n editorTab.directiveFn = () => {\n return { templateUrl: directiveFn };\n };\n }\n\n if (index) {\n this.editorTabs.splice(index, 0, editorTab);\n } else {\n this.editorTabs.push(editorTab);\n }\n }\n\n getExtendedMenu() {\n const menu: AngularPanelMenuItem[] = [];\n this.events.emit(PanelEvents.initPanelActions, menu);\n return menu;\n }\n\n // Override in sub-class to add items before extended menu\n async getAdditionalMenuItems(): Promise<any[]> {\n return [];\n }\n\n otherPanelInFullscreenMode() {\n return this.dashboard.otherPanelInFullscreen(this.panel);\n }\n\n render(payload?: any) {\n this.events.emit(PanelEvents.render, payload);\n }\n\n // overriden from react\n onPluginTypeChange = (plugin: PanelPluginMeta) => {};\n}\n","import { auto } from 'angular';\nimport { indexOf } from 'lodash';\n\nexport class QueryCtrl<T = any> {\n target!: T;\n datasource!: any;\n panelCtrl!: any;\n panel: any;\n hasRawMode!: boolean;\n error?: string | null;\n isLastQuery: boolean;\n\n constructor(public $scope: any, public $injector: auto.IInjectorService) {\n this.panelCtrl = this.panelCtrl ?? $scope.ctrl.panelCtrl;\n this.target = this.target ?? $scope.ctrl.target;\n this.datasource = this.datasource ?? $scope.ctrl.datasource;\n this.panel = this.panelCtrl?.panel ?? $scope.ctrl.panelCtrl.panel;\n this.isLastQuery = indexOf(this.panel.targets, this.target) === this.panel.targets.length - 1;\n }\n\n refresh() {\n this.panelCtrl.refresh();\n }\n}\n","/**\n * Set of handlers for secure password field in Angular components. They handle backward compatibility with\n * passwords stored in plain text fields.\n */\n\nimport { SyntheticEvent } from 'react';\n\nexport enum PasswordFieldEnum {\n Password = 'password',\n BasicAuthPassword = 'basicAuthPassword',\n}\n\n/**\n * Basic shape for settings controllers in at the moment mostly angular data source plugins.\n */\nexport type Ctrl = {\n current: {\n secureJsonFields: {\n [key: string]: boolean;\n };\n secureJsonData?: {\n [key: string]: string;\n };\n password?: string;\n basicAuthPassword?: string;\n };\n};\n\nexport const createResetHandler =\n (ctrl: Ctrl, field: PasswordFieldEnum) => (event: SyntheticEvent<HTMLInputElement>) => {\n event.preventDefault();\n // Reset also normal plain text password to remove it and only save it in secureJsonData.\n ctrl.current[field] = undefined;\n ctrl.current.secureJsonFields[field] = false;\n ctrl.current.secureJsonData = ctrl.current.secureJsonData || {};\n ctrl.current.secureJsonData[field] = '';\n };\n\nexport const createChangeHandler =\n (ctrl: any, field: PasswordFieldEnum) => (event: SyntheticEvent<HTMLInputElement>) => {\n ctrl.current.secureJsonData = ctrl.current.secureJsonData || {};\n ctrl.current.secureJsonData[field] = event.currentTarget.value;\n };\n","import {\n createChangeHandler,\n createResetHandler,\n PasswordFieldEnum,\n} from '../../../features/datasources/utils/passwordHandlers';\n\nexport class MssqlConfigCtrl {\n static templateUrl = 'partials/config.html';\n\n // Set through angular bindings\n declare current: any;\n\n onPasswordReset: ReturnType<typeof createResetHandler>;\n onPasswordChange: ReturnType<typeof createChangeHandler>;\n showUserCredentials = false;\n showTlsConfig = false;\n showCertificateConfig = false;\n\n /** @ngInject */\n constructor($scope: any) {\n this.current = $scope.ctrl.current;\n this.current.jsonData.encrypt = this.current.jsonData.encrypt || 'false';\n this.current.jsonData.sslRootCertFile = this.current.jsonData.sslRootCertFile || '';\n this.current.jsonData.tlsSkipVerify = this.current.jsonData.tlsSkipVerify || false;\n this.current.jsonData.serverName = this.current.jsonData.serverName || '';\n this.current.jsonData.authenticationType = this.current.jsonData.authenticationType || 'SQL Server Authentication';\n this.onPasswordReset = createResetHandler(this, PasswordFieldEnum.Password);\n this.onPasswordChange = createChangeHandler(this, PasswordFieldEnum.Password);\n this.onAuthenticationTypeChange();\n this.onEncryptChange();\n }\n\n onAuthenticationTypeChange() {\n // This is using the fallback in https://github.com/denisenkom/go-mssqldb to use Windows Auth if login/user id is empty.\n if (this.current.jsonData.authenticationType === 'Windows Authentication') {\n this.current.user = '';\n this.current.password = '';\n }\n\n this.showUserCredentials = this.current.jsonData.authenticationType !== 'Windows Authentication';\n }\n\n onEncryptChange() {\n this.showTlsConfig = this.current.jsonData.encrypt === 'true';\n this.showCertificateConfig = this.showTlsConfig && this.current.jsonData.tlsSkipVerify === false;\n }\n}\n","import { AnnotationEvent, DataFrame, MetricFindValue } from '@grafana/data';\nimport { BackendDataSourceResponse, toDataQueryResponse, FetchResponse } from '@grafana/runtime';\n\nexport default class ResponseParser {\n transformMetricFindResponse(raw: FetchResponse<BackendDataSourceResponse>): MetricFindValue[] {\n const frames = toDataQueryResponse(raw).data as DataFrame[];\n\n if (!frames || !frames.length) {\n return [];\n }\n\n const frame = frames[0];\n\n const values: MetricFindValue[] = [];\n const textField = frame.fields.find((f) => f.name === '__text');\n const valueField = frame.fields.find((f) => f.name === '__value');\n\n if (textField && valueField) {\n for (let i = 0; i < textField.values.length; i++) {\n values.push({ text: '' + textField.values.get(i), value: '' + valueField.values.get(i) });\n }\n } else {\n values.push(\n ...frame.fields\n .flatMap((f) => f.values.toArray())\n .map((v) => ({\n text: v,\n }))\n );\n }\n\n return Array.from(new Set(values.map((v) => v.text))).map((text) => ({\n text,\n value: values.find((v) => v.text === text)?.value,\n }));\n }\n\n async transformAnnotationResponse(options: any, data: BackendDataSourceResponse): Promise<AnnotationEvent[]> {\n const frames = toDataQueryResponse({ data: data }).data as DataFrame[];\n if (!frames || !frames.length) {\n return [];\n }\n const frame = frames[0];\n const timeField = frame.fields.find((f) => f.name === 'time');\n\n if (!timeField) {\n return Promise.reject({ message: 'Missing mandatory time column (with time column alias) in annotation query.' });\n }\n\n const timeEndField = frame.fields.find((f) => f.name === 'timeend');\n const textField = frame.fields.find((f) => f.name === 'text');\n const tagsField = frame.fields.find((f) => f.name === 'tags');\n\n const list: AnnotationEvent[] = [];\n for (let i = 0; i < frame.length; i++) {\n const timeEnd = timeEndField && timeEndField.values.get(i) ? Math.floor(timeEndField.values.get(i)) : undefined;\n list.push({\n annotation: options.annotation,\n time: Math.floor(timeField.values.get(i)),\n timeEnd,\n text: textField && textField.values.get(i) ? textField.values.get(i) : '',\n tags:\n tagsField && tagsField.values.get(i)\n ? tagsField.values\n .get(i)\n .trim()\n .split(/\\s*,\\s*/)\n : [],\n });\n }\n\n return list;\n }\n}\n","import { map as _map } from 'lodash';\nimport { lastValueFrom, of } from 'rxjs';\nimport { catchError, map, mapTo } from 'rxjs/operators';\n\nimport { AnnotationEvent, DataSourceInstanceSettings, MetricFindValue, ScopedVars, TimeRange } from '@grafana/data';\nimport { BackendDataSourceResponse, DataSourceWithBackend, FetchResponse, getBackendSrv } from '@grafana/runtime';\nimport { toTestingStatus } from '@grafana/runtime/src/utils/queryResponse';\nimport { getTemplateSrv, TemplateSrv } from 'app/features/templating/template_srv';\n\nimport ResponseParser from './response_parser';\nimport { MssqlOptions, MssqlQuery, MssqlQueryForInterpolation } from './types';\n\nexport class MssqlDatasource extends DataSourceWithBackend<MssqlQuery, MssqlOptions> {\n id: any;\n name: any;\n responseParser: ResponseParser;\n interval: string;\n\n constructor(\n instanceSettings: DataSourceInstanceSettings<MssqlOptions>,\n private readonly templateSrv: TemplateSrv = getTemplateSrv()\n ) {\n super(instanceSettings);\n this.name = instanceSettings.name;\n this.id = instanceSettings.id;\n this.responseParser = new ResponseParser();\n const settingsData = instanceSettings.jsonData || ({} as MssqlOptions);\n this.interval = settingsData.timeInterval || '1m';\n }\n\n interpolateVariable(value: any, variable: any) {\n if (typeof value === 'string') {\n if (variable.multi || variable.includeAll) {\n return \"'\" + value.replace(/'/g, `''`) + \"'\";\n } else {\n return value;\n }\n }\n\n if (typeof value === 'number') {\n return value;\n }\n\n const quotedValues = _map(value, (val) => {\n if (typeof value === 'number') {\n return value;\n }\n\n return \"'\" + val.replace(/'/g, `''`) + \"'\";\n });\n return quotedValues.join(',');\n }\n\n interpolateVariablesInQueries(\n queries: MssqlQueryForInterpolation[],\n scopedVars: ScopedVars\n ): MssqlQueryForInterpolation[] {\n let expandedQueries = queries;\n if (queries && queries.length > 0) {\n expandedQueries = queries.map((query) => {\n const expandedQuery = {\n ...query,\n datasource: this.getRef(),\n rawSql: this.templateSrv.replace(query.rawSql, scopedVars, this.interpolateVariable),\n rawQuery: true,\n };\n return expandedQuery;\n });\n }\n return expandedQueries;\n }\n\n applyTemplateVariables(target: MssqlQuery, scopedVars: ScopedVars): Record<string, any> {\n return {\n refId: target.refId,\n datasource: this.getRef(),\n rawSql: this.templateSrv.replace(target.rawSql, scopedVars, this.interpolateVariable),\n format: target.format,\n };\n }\n\n async annotationQuery(options: any): Promise<AnnotationEvent[]> {\n if (!options.annotation.rawQuery) {\n return Promise.reject({ message: 'Query missing in annotation definition' });\n }\n\n const query = {\n refId: options.annotation.name,\n datasource: this.getRef(),\n rawSql: this.templateSrv.replace(options.annotation.rawQuery, options.scopedVars, this.interpolateVariable),\n format: 'table',\n };\n\n return lastValueFrom(\n getBackendSrv()\n .fetch<BackendDataSourceResponse>({\n url: '/api/ds/query',\n method: 'POST',\n data: {\n from: options.range.from.valueOf().toString(),\n to: options.range.to.valueOf().toString(),\n queries: [query],\n },\n requestId: options.annotation.name,\n })\n .pipe(\n map(\n async (res: FetchResponse<BackendDataSourceResponse>) =>\n await this.responseParser.transformAnnotationResponse(options, res.data)\n )\n )\n );\n }\n\n filterQuery(query: MssqlQuery): boolean {\n return !query.hide;\n }\n\n metricFindQuery(query: string, optionalOptions: any): Promise<MetricFindValue[]> {\n let refId = 'tempvar';\n if (optionalOptions && optionalOptions.variable && optionalOptions.variable.name) {\n refId = optionalOptions.variable.name;\n }\n\n const range = optionalOptions?.range as TimeRange;\n\n const interpolatedQuery = {\n refId: refId,\n datasource: this.getRef(),\n rawSql: this.templateSrv.replace(query, {}, this.interpolateVariable),\n format: 'table',\n };\n\n return lastValueFrom(\n getBackendSrv()\n .fetch<BackendDataSourceResponse>({\n url: '/api/ds/query',\n method: 'POST',\n data: {\n from: range?.from?.valueOf()?.toString(),\n to: range?.to?.valueOf()?.toString(),\n queries: [interpolatedQuery],\n },\n requestId: refId,\n })\n .pipe(\n map((rsp) => {\n return this.responseParser.transformMetricFindResponse(rsp);\n }),\n catchError((err) => {\n return of([]);\n })\n )\n );\n }\n\n testDatasource(): Promise<any> {\n return lastValueFrom(\n getBackendSrv()\n .fetch({\n url: '/api/ds/query',\n method: 'POST',\n data: {\n from: '5m',\n to: 'now',\n queries: [\n {\n refId: 'A',\n intervalMs: 1,\n maxDataPoints: 1,\n datasource: this.getRef(),\n rawSql: 'SELECT 1',\n format: 'table',\n },\n ],\n },\n })\n .pipe(\n mapTo({ status: 'success', message: 'Database Connection OK' }),\n catchError((err) => {\n return of(toTestingStatus(err));\n })\n )\n );\n }\n\n targetContainsTemplate(query: MssqlQuery): boolean {\n const rawSql = query.rawSql.replace('$__', '');\n return this.templateSrv.containsTemplate(rawSql);\n }\n}\n","import { auto } from 'angular';\n\nimport { PanelEvents, QueryResultMeta } from '@grafana/data';\nimport { QueryCtrl } from 'app/plugins/sdk';\n\nimport { MssqlQuery } from './types';\n\nconst defaultQuery = `SELECT\n $__timeEpoch(<time_column>),\n <value column> as value,\n <series name column> as metric\nFROM\n <table name>\nWHERE\n $__timeFilter(time_column)\nORDER BY\n <time_column> ASC`;\n\nexport class MssqlQueryCtrl extends QueryCtrl<MssqlQuery> {\n static templateUrl = 'partials/query.editor.html';\n\n formats: any[];\n lastQueryMeta?: QueryResultMeta;\n lastQueryError?: string;\n showHelp = false;\n\n /** @ngInject */\n constructor($scope: any, $injector: auto.IInjectorService) {\n super($scope, $injector);\n\n this.target.format = this.target.format || 'time_series';\n this.target.alias = '';\n this.formats = [\n { text: 'Time series', value: 'time_series' },\n { text: 'Table', value: 'table' },\n ];\n\n if (!this.target.rawSql) {\n // special handling when in table panel\n if (this.panelCtrl.panel.type === 'table') {\n this.target.format = 'table';\n this.target.rawSql = 'SELECT 1';\n } else {\n this.target.rawSql = defaultQuery;\n }\n }\n\n this.panelCtrl.events.on(PanelEvents.dataReceived, this.onDataReceived.bind(this), $scope);\n this.panelCtrl.events.on(PanelEvents.dataError, this.onDataError.bind(this), $scope);\n }\n\n onDataReceived(dataList: any) {\n this.lastQueryError = undefined;\n this.lastQueryMeta = dataList[0]?.meta;\n }\n\n onDataError(err: any) {\n if (err.data && err.data.results) {\n const queryRes = err.data.results[this.target.refId];\n if (queryRes) {\n this.lastQueryError = queryRes.error;\n }\n }\n }\n}\n","import { DataSourcePlugin } from '@grafana/data';\n\nimport { MssqlConfigCtrl } from './config_ctrl';\nimport { MssqlDatasource } from './datasource';\nimport { MssqlQueryCtrl } from './query_ctrl';\nimport { MssqlQuery } from './types';\n\nconst defaultQuery = `SELECT\n <time_column> as time,\n <text_column> as text,\n <tags_column> as tags\n FROM\n <table name>\n WHERE\n $__timeFilter(time_column)\n ORDER BY\n <time_column> ASC`;\n\nclass MssqlAnnotationsQueryCtrl {\n static templateUrl = 'partials/annotations.editor.html';\n\n declare annotation: any;\n\n /** @ngInject */\n constructor($scope: any) {\n this.annotation = $scope.ctrl.annotation;\n this.annotation.rawQuery = this.annotation.rawQuery || defaultQuery;\n }\n}\n\nexport const plugin = new DataSourcePlugin<MssqlDatasource, MssqlQuery>(MssqlDatasource)\n .setQueryCtrl(MssqlQueryCtrl)\n .setConfigCtrl(MssqlConfigCtrl)\n .setAnnotationQueryCtrl(MssqlAnnotationsQueryCtrl);\n","import { makeClassES5Compatible } from '@grafana/data';\nimport { loadPluginCss } from '@grafana/runtime';\nimport { MetricsPanelCtrl as MetricsPanelCtrlES6 } from 'app/angular/panel/metrics_panel_ctrl';\nimport { PanelCtrl as PanelCtrlES6 } from 'app/angular/panel/panel_ctrl';\nimport { QueryCtrl as QueryCtrlES6 } from 'app/angular/panel/query_ctrl';\n\nconst PanelCtrl = makeClassES5Compatible(PanelCtrlES6);\nconst MetricsPanelCtrl = makeClassES5Compatible(MetricsPanelCtrlES6);\nconst QueryCtrl = makeClassES5Compatible(QueryCtrlES6);\n\nexport { PanelCtrl, MetricsPanelCtrl, QueryCtrl, loadPluginCss };\n"],"names":["DEFAULT_PORTS","http","https","ftp","AngularLocationWrapper","constructor","this","absUrl","wrapInDeprecationWarning","hash","host","path","port","protocol","replace","search","state","url","fn","replacement","self","deprecationWarning","name","apply","arguments","window","location","origin","newHash","navigationLogger","Error","locationService","slice","URL","href","hostname","pathname","parsedPath","String","startsWith","length","parseInt","paramValue","newQuery","locationSearchToObject","key","Object","keys","undefined","updatedUrl","urlUtil","newUrl","trim","MetricsPanelCtrl","PanelCtrl","$scope","$injector","super","next","data","panelData","LoadingState","loading","processDataError","error","angularDirtyCheck","request","timeInfo","timeRange","range","useDataFrames","handleDataFrames","series","legacy","map","v","toLegacyResponseData","handleQueryResult","contextSrv","get","datasourceSrv","timeSrv","templateSrv","panel","datasource","events","on","PanelEvents","onMetricsPanelRefresh","bind","onPanelTearDown","onMetricsPanelMounted","queryRunner","getQueryRunner","querySubscription","getData","withTransforms","withFieldConfig","subscribe","panelDataObserver","unsubscribe","otherPanelInFullscreenMode","snapshotData","updateTimeRange","isArray","$timeout","emit","scopedVars","then","issueQueries","catch","err","cancelled","console","log","message","$root","$$phase","$digest","newTimeData","applyPanelTimeOverrides","run","queries","targets","panelId","id","dashboardId","dashboard","timezone","getTimezone","maxDataPoints","width","minInterval","interval","cacheTimeout","transformations","snapshot","frame","toDataFrameDTO","result","plugin","$parent","editorTabs","$location","EventBusSrv","timing","config","type","pluginId","pluginName","$on","panelDidMount","panelInitialized","renderingCompleted","profiler","refresh","publishAppEvent","event","payload","appEvent","initEditMode","editModeInitiated","addEditorTab","title","directiveFn","index","icon","editorTab","isString","templateUrl","splice","push","getExtendedMenu","menu","otherPanelInFullscreen","render","QueryCtrl","panelCtrl","ctrl","target","isLastQuery","indexOf","PasswordFieldEnum","createResetHandler","field","preventDefault","current","secureJsonFields","secureJsonData","createChangeHandler","currentTarget","value","MssqlConfigCtrl","jsonData","encrypt","sslRootCertFile","tlsSkipVerify","serverName","authenticationType","onPasswordReset","onPasswordChange","onAuthenticationTypeChange","onEncryptChange","user","password","showUserCredentials","showTlsConfig","showCertificateConfig","ResponseParser","transformMetricFindResponse","raw","frames","toDataQueryResponse","values","textField","fields","find","f","valueField","i","text","flatMap","toArray","Array","from","Set","options","timeField","Promise","reject","timeEndField","tagsField","list","timeEnd","Math","floor","annotation","time","tags","split","MssqlDatasource","DataSourceWithBackend","instanceSettings","getTemplateSrv","responseParser","settingsData","timeInterval","interpolateVariable","variable","multi","includeAll","_map","val","join","interpolateVariablesInQueries","expandedQueries","query","getRef","rawSql","rawQuery","applyTemplateVariables","refId","format","lastValueFrom","getBackendSrv","fetch","method","valueOf","toString","to","requestId","pipe","async","transformAnnotationResponse","res","filterQuery","hide","metricFindQuery","optionalOptions","interpolatedQuery","rsp","catchError","of","testDatasource","intervalMs","mapTo","status","toTestingStatus","targetContainsTemplate","containsTemplate","MssqlQueryCtrl","alias","formats","onDataReceived","onDataError","dataList","lastQueryError","lastQueryMeta","meta","results","queryRes","MssqlAnnotationsQueryCtrl","DataSourcePlugin","setQueryCtrl","setConfigCtrl","setAnnotationQueryCtrl","makeClassES5Compatible","PanelCtrlES6","MetricsPanelCtrlES6","QueryCtrlES6"],"sourceRoot":""}