/usr/share/grafana/public/app/plugins/datasource/zipkin/dist
/*! For license information please see module.js.LICENSE.txt */ /* [create-plugin] version: 5.22.0 */ define(["module","@grafana/data","react","@emotion/css","@grafana/ui","@grafana/runtime","lodash","rxjs","rxjs/operators"],((e,t,n,r,a,o,i,s,l)=>(()=>{"use strict";var c={7:e=>{e.exports=a},44:(e,t,n)=>{var r=n(959),a=Symbol.for("react.element"),o=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,o={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)i.call(t,r)&&!l.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===o[r]&&(o[r]=t[r]);return{$$typeof:a,type:e,key:c,ref:u,props:o,_owner:s.current}}t.Fragment=o,t.jsx=c,t.jsxs=c},59:e=>{e.exports=l},89:e=>{e.exports=r},241:e=>{e.exports=i},269:e=>{e.exports=s},308:t=>{t.exports=e},531:e=>{e.exports=o},728:(e,t,n)=>{e.exports=n(44)},781:e=>{e.exports=t},959:e=>{e.exports=n}},u={};function d(e){var t=u[e];if(void 0!==t)return t.exports;var n=u[e]={exports:{}};return c[e](n,n.exports,d),n.exports}d.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return d.d(t,{a:t}),t},d.d=(e,t)=>{for(var n in t)d.o(t,n)&&!d.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},d.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),d.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},d.p="public/plugins/zipkin/";var p={};d.r(p),d.d(p,{plugin:()=>Ct});var h=d(308),m=d.n(h);d.p=m()&&m().uri?m().uri.slice(0,m().uri.lastIndexOf("/")+1):"public/plugins/zipkin/";var g=d(781),f=d(728),y=d(89),b=d(959),v=d(7);const O=({children:e,title:t,description:n,isCollapsible:r=!1,isInitiallyOpen:a=!0,kind:o="section",className:i})=>{const{colors:s,typography:l,spacing:c}=(0,v.useTheme2)(),[u,d]=(0,b.useState)(!r||a),p=u?"angle-up":"angle-down",h="sub-section"===o,m=`${u?"Collapse":"Expand"} section ${t}`,g={header:(0,y.css)({display:"flex",justifyContent:"space-between",alignItems:"center"}),title:(0,y.css)({margin:0}),subtitle:(0,y.css)({margin:0,fontWeight:l.fontWeightRegular}),descriptionText:(0,y.css)({marginTop:c(h?.25:.5),marginBottom:0,...l.bodySmall,color:s.text.secondary}),content:(0,y.css)({marginTop:c(2)})};return b.createElement("div",{className:i},b.createElement("div",{className:g.header},"section"===o?b.createElement("h3",{className:g.title},t):b.createElement("h6",{className:g.subtitle},t),r&&b.createElement(v.IconButton,{name:p,onClick:()=>d(!u),type:"button",size:"xl","aria-label":m})),n&&b.createElement("p",{className:g.descriptionText},n),u&&b.createElement("div",{className:g.content},e))},j=({children:e,...t})=>b.createElement(O,{...t,kind:"section"},e);function w(e){const{description:t,suffix:n,feature:r}=e,a=`Learn more about ${r}`,o=(0,v.useStyles2)(D);return b.createElement("span",{className:o.container},t,b.createElement("a",{"aria-label":a,href:`https://grafana.com/docs/grafana/next/datasources/${n}`,rel:"noreferrer",target:"_blank"},a))}const D=e=>({container:(0,y.css)({color:e.colors.text.secondary,a:(0,y.css)({color:e.colors.text.link,textDecoration:"underline",marginLeft:"5px","&:hover":{textDecoration:"none"}})})});var T=d(531);function C(e,t,n){void 0===t&&(t=0),void 0===n&&(n=[]);var r=function(e,t){void 0===t&&(t=0);var n=(0,b.useRef)(!1),r=(0,b.useRef)(),a=(0,b.useRef)(e),o=(0,b.useCallback)((function(){return n.current}),[]),i=(0,b.useCallback)((function(){n.current=!1,r.current&&clearTimeout(r.current),r.current=setTimeout((function(){n.current=!0,a.current()}),t)}),[t]),s=(0,b.useCallback)((function(){n.current=null,r.current&&clearTimeout(r.current)}),[]);return(0,b.useEffect)((function(){a.current=e}),[e]),(0,b.useEffect)((function(){return i(),s}),[t]),[o,s,i]}(e,t),a=r[0],o=r[1],i=r[2];return(0,b.useEffect)(i,n),[a,o]}const x=/^(-?\d+(?:\.\d+)?)(ms|[Mwdhmsy])$/,F=(e,t=x)=>!(e.match(t)||!e);function S(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function N(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}const I=e=>{const[t,n]=(0,b.useState)((()=>!!e.value&&F(e.value,e.validationRegex)));var r;C((()=>{n(F(e.value,e.validationRegex))}),500,[e.value]);const a={labelWidth:26,disabled:null!==(r=e.disabled)&&void 0!==r&&r,invalid:t,error:e.isInvalidError};return e.label&&(a.label=e.label,a.tooltip=e.tooltip||""),(0,f.jsx)(v.InlineField,N(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){S(e,t,n[t])}))}return e}({},a),{children:(0,f.jsx)(v.Input,{type:"text",placeholder:e.placeholder||"0",width:e.width||40,onChange:t=>{e.onChange(t.currentTarget.value)},value:e.value,"aria-label":e.ariaLabel||"interval input"})}))};function P(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){P(e,t,n[t])}))}return e}function k(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}const A=({values:e,onChange:t,id:n})=>{const r=(0,v.useStyles2)(R);return(0,f.jsx)("div",{className:r.wrapper,children:e.length?e.map(((a,o)=>(0,f.jsxs)("div",{className:r.pair,children:[(0,f.jsx)(v.SegmentInput,{id:`${n}-key-${o}`,placeholder:"Tag name",value:a.key,onChange:n=>{t(e.map(((e,t)=>t===o?k(E({},e),{key:String(n)}):e)))}}),(0,f.jsx)(v.InlineLabel,{"aria-label":"equals",className:r.operator,children:"as"}),(0,f.jsx)(v.SegmentInput,{id:`${n}-value-${o}`,placeholder:"New name (optional)",value:a.value||"",onChange:n=>{t(e.map(((e,t)=>t===o?k(E({},e),{value:String(n)}):e)))}}),(0,f.jsx)(v.ToolbarButton,{onClick:()=>t([...e.slice(0,o),...e.slice(o+1)]),className:(0,y.cx)(r.removeTag,"query-part"),"aria-label":"Remove tag",type:"button",icon:"times"}),o===e.length-1?(0,f.jsx)(v.ToolbarButton,{onClick:()=>t([...e,{key:"",value:""}]),className:"query-part","aria-label":"Add tag",type:"button",icon:"plus"}):null]},o))):(0,f.jsx)(v.ToolbarButton,{icon:"plus",onClick:()=>t([...e,{key:"",value:""}]),className:"query-part","aria-label":"Add tag",type:"button"})})},R=e=>({wrapper:(0,y.css)({display:"flex",flexDirection:"column",gap:`${e.spacing(.5)} 0`}),pair:(0,y.css)({display:"flex",justifyContent:"start",alignItems:"center"}),operator:(0,y.css)({color:e.v1.palette.orange,width:"auto"}),removeTag:(0,y.css)({marginRight:e.spacing(.5)})});function q(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function M(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){q(e,t,n[t])}))}return e}function B(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}function J({options:e,onOptionsChange:t}){const n=["loki","elasticsearch","grafana-splunk-datasource","grafana-opensearch-datasource","grafana-falconlogscale-datasource","googlecloud-logging-datasource","victoriametrics-logs-datasource"],r=(0,b.useMemo)((()=>function(e){var t;if(null==e?void 0:e.tracesToLogsV2)return e.tracesToLogsV2;if(!(null==e?void 0:e.tracesToLogs))return;const n={customQuery:!1};return n.datasourceUid=e.tracesToLogs.datasourceUid,n.tags=e.tracesToLogs.mapTagNamesEnabled?e.tracesToLogs.mappedTags:null===(t=e.tracesToLogs.tags)||void 0===t?void 0:t.map((e=>({key:e}))),n.filterByTraceID=e.tracesToLogs.filterByTraceID,n.filterBySpanID=e.tracesToLogs.filterBySpanID,n.spanStartTimeShift=e.tracesToLogs.spanStartTimeShift,n.spanEndTimeShift=e.tracesToLogs.spanEndTimeShift,n}(e.jsonData)||{customQuery:!1}),[e.jsonData]),{query:a="",tags:o,customQuery:i}=r,s=(0,b.useCallback)((n=>{t(B(M({},e),{jsonData:B(M({},e.jsonData),{tracesToLogsV2:M({},r,n),tracesToLogs:void 0})}))}),[t,e,r]);return(0,f.jsxs)("div",{className:(0,y.css)({width:"100%"}),children:[(0,f.jsx)(v.InlineFieldRow,{children:(0,f.jsx)(v.InlineField,{tooltip:"The logs data source the trace is going to navigate to",label:"Data source",labelWidth:26,children:(0,f.jsx)(T.DataSourcePicker,{inputId:"trace-to-logs-data-source-picker",filter:e=>n.includes(e.type),current:r.datasourceUid,noDefault:!0,width:40,onChange:e=>s({datasourceUid:e.uid}),onClear:()=>s({datasourceUid:void 0})})})}),(0,f.jsx)(v.InlineFieldRow,{children:(0,f.jsx)(I,{label:W("start"),tooltip:$("start","0"),value:r.spanStartTimeShift||"",onChange:e=>{s({spanStartTimeShift:e})},isInvalidError:G})}),(0,f.jsx)(v.InlineFieldRow,{children:(0,f.jsx)(I,{label:W("end"),tooltip:$("end","0"),value:r.spanEndTimeShift||"",onChange:e=>{s({spanEndTimeShift:e})},isInvalidError:G})}),(0,f.jsx)(v.InlineFieldRow,{children:(0,f.jsx)(v.InlineField,{tooltip:"Tags that will be used in the query. Default tags: 'cluster', 'hostname', 'namespace', 'pod', 'service.name', 'service.namespace'",label:"Tags",labelWidth:26,children:(0,f.jsx)(A,{values:null!=o?o:[],onChange:e=>s({tags:e})})})}),(0,f.jsx)(L,{disabled:i,type:"trace",id:"filterByTraceID",value:Boolean(r.filterByTraceID),onChange:e=>s({filterByTraceID:e})}),(0,f.jsx)(L,{disabled:i,type:"span",id:"filterBySpanID",value:Boolean(r.filterBySpanID),onChange:e=>s({filterBySpanID:e})}),(0,f.jsx)(v.InlineFieldRow,{children:(0,f.jsx)(v.InlineField,{tooltip:"Use a custom query with the possibility to interpolate variables from the trace or span",label:"Use custom query",labelWidth:26,children:(0,f.jsx)(v.InlineSwitch,{id:"customQuerySwitch",value:i,onChange:e=>s({customQuery:e.currentTarget.checked})})})}),i&&(0,f.jsx)(v.InlineField,{label:"Query",labelWidth:26,tooltip:"The query that will run when navigating from a trace to logs data source. Interpolate tags using the `$__tags` keyword",grow:!0,children:(0,f.jsx)(v.Input,{label:"Query",type:"text",allowFullScreen:!0,value:a,onChange:e=>s({query:e.currentTarget.value})})})]})}function L(e){return(0,f.jsx)(v.InlineFieldRow,{children:(0,f.jsx)(v.InlineField,{disabled:e.disabled,label:`Filter by ${e.type} ID`,labelWidth:26,grow:!0,tooltip:`Filters logs by ${e.type} ID, where the ${e.type} ID should be part of the log line`,children:(0,f.jsx)(v.InlineSwitch,{id:e.id,value:e.value,onChange:t=>e.onChange(t.currentTarget.checked)})})})}const W=e=>`Span ${e} time shift`,$=(e,t)=>`Shifts the ${e} time of the span. Default: ${t} (Time units can be used here, for example: 5s, -1m, 3h)`,G="Invalid time shift. See tooltip for examples.",_=({options:e,onOptionsChange:t})=>{let n=e.type;return n+="tempo"===e.type?"/configure-tempo-data-source/#trace-to-logs":"/#trace-to-logs",(0,f.jsx)(j,{title:"Trace to logs",description:(0,f.jsx)(w,{description:"Navigate from a trace span to the selected data source's logs.",suffix:n,feature:"trace to logs"}),isCollapsible:!0,isInitiallyOpen:!0,children:(0,f.jsx)(J,{options:e,onOptionsChange:t})})};function U(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function V(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){U(e,t,n[t])}))}return e}function Q(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}function z({options:e,onOptionsChange:t}){var n,r,a,o,i,s;const l=(0,v.useStyles2)(K);var c;return(0,f.jsxs)("div",{className:(0,y.css)({width:"100%"}),children:[(0,f.jsx)(v.InlineFieldRow,{className:l.row,children:(0,f.jsx)(v.InlineField,{tooltip:"The Prometheus data source the trace is going to navigate to",label:"Data source",labelWidth:26,children:(0,f.jsx)(T.DataSourcePicker,{inputId:"trace-to-metrics-data-source-picker",pluginId:"prometheus",current:null===(n=e.jsonData.tracesToMetrics)||void 0===n?void 0:n.datasourceUid,noDefault:!0,width:40,onChange:n=>(0,g.updateDatasourcePluginJsonDataOption)({onOptionsChange:t,options:e},"tracesToMetrics",Q(V({},e.jsonData.tracesToMetrics),{datasourceUid:n.uid})),onClear:()=>(0,g.updateDatasourcePluginJsonDataOption)({onOptionsChange:t,options:e},"tracesToMetrics",Q(V({},e.jsonData.tracesToMetrics),{datasourceUid:void 0}))})})}),(0,f.jsx)(v.InlineFieldRow,{children:(0,f.jsx)(I,{label:W("start"),tooltip:$("start","-2m"),value:(null===(r=e.jsonData.tracesToMetrics)||void 0===r?void 0:r.spanStartTimeShift)||"",onChange:n=>{(0,g.updateDatasourcePluginJsonDataOption)({onOptionsChange:t,options:e},"tracesToMetrics",Q(V({},e.jsonData.tracesToMetrics),{spanStartTimeShift:n}))},placeholder:"-2m",isInvalidError:G})}),(0,f.jsx)(v.InlineFieldRow,{children:(0,f.jsx)(I,{label:W("end"),tooltip:$("end","2m"),value:(null===(a=e.jsonData.tracesToMetrics)||void 0===a?void 0:a.spanEndTimeShift)||"",onChange:n=>{(0,g.updateDatasourcePluginJsonDataOption)({onOptionsChange:t,options:e},"tracesToMetrics",Q(V({},e.jsonData.tracesToMetrics),{spanEndTimeShift:n}))},placeholder:"2m",isInvalidError:G})}),(0,f.jsx)(v.InlineFieldRow,{children:(0,f.jsx)(v.InlineField,{tooltip:"Tags that will be used in the metrics query",label:"Tags",labelWidth:26,children:(0,f.jsx)(A,{values:null!==(c=null===(o=e.jsonData.tracesToMetrics)||void 0===o?void 0:o.tags)&&void 0!==c?c:[],onChange:n=>(0,g.updateDatasourcePluginJsonDataOption)({onOptionsChange:t,options:e},"tracesToMetrics",Q(V({},e.jsonData.tracesToMetrics),{tags:n}))})})}),null===(s=e.jsonData.tracesToMetrics)||void 0===s||null===(i=s.queries)||void 0===i?void 0:i.map(((n,r)=>(0,f.jsxs)("div",{className:l.queryRow,children:[(0,f.jsx)(v.InlineField,{label:"Link Label",labelWidth:26,tooltip:"Descriptive label for the linked query",children:(0,f.jsx)(v.Input,{label:"Link Label",type:"text",allowFullScreen:!0,value:n.name,width:40,onChange:n=>{var a,o;const i=(null!==(o=null===(a=e.jsonData.tracesToMetrics)||void 0===a?void 0:a.queries)&&void 0!==o?o:[]).map(((e,t)=>t===r?Q(V({},e),{name:n.currentTarget.value}):e));(0,g.updateDatasourcePluginJsonDataOption)({onOptionsChange:t,options:e},"tracesToMetrics",Q(V({},e.jsonData.tracesToMetrics),{queries:i}))}})}),(0,f.jsx)(v.InlineField,{label:"Query",labelWidth:10,tooltip:"The Prometheus query that will run when navigating from a trace to metrics. Interpolate tags using the `$__tags` keyword",grow:!0,children:(0,f.jsx)(v.Input,{label:"Query",type:"text",allowFullScreen:!0,value:n.query,onChange:n=>{var a,o;const i=(null!==(o=null===(a=e.jsonData.tracesToMetrics)||void 0===a?void 0:a.queries)&&void 0!==o?o:[]).map(((e,t)=>t===r?Q(V({},e),{query:n.currentTarget.value}):e));(0,g.updateDatasourcePluginJsonDataOption)({onOptionsChange:t,options:e},"tracesToMetrics",Q(V({},e.jsonData.tracesToMetrics),{queries:i}))}})}),(0,f.jsx)(v.Button,{variant:"destructive","aria-label":"Remove query",icon:"times",type:"button",onClick:()=>{var n;const a=null===(n=e.jsonData.tracesToMetrics)||void 0===n?void 0:n.queries.filter(((e,t)=>t!==r));(0,g.updateDatasourcePluginJsonDataOption)({onOptionsChange:t,options:e},"tracesToMetrics",Q(V({},e.jsonData.tracesToMetrics),{queries:a}))}})]},r))),(0,f.jsx)(v.Button,{variant:"secondary",title:"Add query",icon:"plus",type:"button",onClick:()=>{var n,r;(0,g.updateDatasourcePluginJsonDataOption)({onOptionsChange:t,options:e},"tracesToMetrics",Q(V({},e.jsonData.tracesToMetrics),{queries:[...null!==(r=null===(n=e.jsonData.tracesToMetrics)||void 0===n?void 0:n.queries)&&void 0!==r?r:[],{query:""}]}))},children:"Add query"})]})}const H=({options:e,onOptionsChange:t})=>{let n=e.type;return n+="tempo"===e.type?"/configure-tempo-data-source/#trace-to-metrics":"/#trace-to-metrics",(0,f.jsx)(j,{title:"Trace to metrics",description:(0,f.jsx)(w,{description:"Navigate from a trace span to the selected data source's metrics.",suffix:n,feature:"trace to metrics"}),isCollapsible:!0,isInitiallyOpen:!0,children:(0,f.jsx)(z,{options:e,onOptionsChange:t})})},K=e=>({infoText:{paddingBottom:e.spacing(2),color:e.colors.text.secondary},row:(0,y.css)({label:"row",alignItems:"baseline"}),queryRow:(0,y.css)({label:"queryRow",display:"flex",flexFlow:"wrap"})}),Z=({children:e,...t})=>b.createElement(O,{...t,kind:"sub-section"},e);function Y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function X(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}function ee({options:e,onOptionsChange:t}){var n;const r=(0,v.useStyles2)(ne);return(0,f.jsx)("div",{className:r.container,children:(0,f.jsx)(v.InlineFieldRow,{className:r.row,children:(0,f.jsx)(v.InlineField,{tooltip:"Displays the node graph above the trace view. Default: disabled",label:"Enable node graph",labelWidth:26,children:(0,f.jsx)(v.InlineSwitch,{id:"enableNodeGraph",value:null===(n=e.jsonData.nodeGraph)||void 0===n?void 0:n.enabled,onChange:n=>(0,g.updateDatasourcePluginJsonDataOption)({onOptionsChange:t,options:e},"nodeGraph",X(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Y(e,t,n[t])}))}return e}({},e.jsonData.nodeGraph),{enabled:n.currentTarget.checked}))})})})})}const te=({options:e,onOptionsChange:t})=>{let n=e.type;return n+="tempo"===e.type?"/configure-tempo-data-source/#node-graph":"/#node-graph",(0,f.jsx)(Z,{title:"Node graph",description:(0,f.jsx)(w,{description:"Show or hide the node graph visualization.",suffix:n,feature:"the node graph"}),children:(0,f.jsx)(ee,{options:e,onOptionsChange:t})})},ne=e=>({infoText:(0,y.css)({label:"infoText",paddingBottom:e.spacing(2),color:e.colors.text.secondary}),container:(0,y.css)({label:"container",width:"100%"}),row:(0,y.css)({label:"row",alignItems:"baseline"})});function re(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ae(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){re(e,t,n[t])}))}return e}function oe(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}const ie="None",se="Duration",le="Tag";function ce({options:e,onOptionsChange:t}){var n,r,a;const o=(0,v.useStyles2)(de),i=[ie,se,le].map(g.toOption);return(0,f.jsxs)("div",{className:(0,y.css)({width:"100%"}),children:[(0,f.jsx)(v.InlineFieldRow,{className:o.row,children:(0,f.jsx)(v.InlineField,{label:"Label",labelWidth:26,tooltip:"Default: duration",grow:!0,children:(0,f.jsx)(v.Select,{inputId:"label",options:i,value:(null===(n=e.jsonData.spanBar)||void 0===n?void 0:n.type)||"",onChange:n=>{var r;(0,g.updateDatasourcePluginJsonDataOption)({onOptionsChange:t,options:e},"spanBar",oe(ae({},e.jsonData.spanBar),{type:null!==(r=null==n?void 0:n.value)&&void 0!==r?r:""}))},placeholder:"Duration",isClearable:!0,"aria-label":"select-label-name",width:40})})}),(null===(r=e.jsonData.spanBar)||void 0===r?void 0:r.type)===le&&(0,f.jsx)(v.InlineFieldRow,{className:o.row,children:(0,f.jsx)(v.InlineField,{label:"Tag key",labelWidth:26,tooltip:"Tag key which will be used to get the tag value. A span's attributes and resources will be searched for the tag key",children:(0,f.jsx)(v.Input,{type:"text",placeholder:"Enter tag key",onChange:n=>(0,g.updateDatasourcePluginJsonDataOption)({onOptionsChange:t,options:e},"spanBar",oe(ae({},e.jsonData.spanBar),{tag:n.currentTarget.value})),value:(null===(a=e.jsonData.spanBar)||void 0===a?void 0:a.tag)||"",width:40})})})]})}const ue=({options:e,onOptionsChange:t})=>{let n=e.type;return n+="tempo"===e.type?"/configure-tempo-data-source/#span-bar":"/#span-bar",(0,f.jsx)(Z,{title:"Span bar",description:(0,f.jsx)(w,{description:"Add additional info next to the service and operation on a span bar row in the trace view.",suffix:n,feature:"the span bar"}),children:(0,f.jsx)(ce,{options:e,onOptionsChange:t})})},de=e=>({infoText:(0,y.css)({label:"infoText",paddingBottom:e.spacing(2),color:e.colors.text.secondary}),row:(0,y.css)({label:"row",alignItems:"baseline"})}),pe=({dataSourceName:e,docsLink:t,hasRequiredFields:n=!0,className:r})=>{const a=(0,v.useTheme2)(),o={container:(0,y.css)({p:{margin:0},"p + p":{marginTop:a.spacing(2)}}),text:(0,y.css)({...a.typography.body,color:a.colors.text.secondary,a:(0,y.css)({color:a.colors.text.link,textDecoration:"underline","&:hover":{textDecoration:"none"}})})};return b.createElement("div",{className:(0,y.cx)(o.container,r)},b.createElement("p",{className:o.text},"Before you can use the ",e," data source, you must configure it below or in the config file. For detailed instructions,"," ",b.createElement("a",{href:t,target:"_blank",rel:"noreferrer"},"view the documentation"),"."),n&&b.createElement("p",{className:o.text},b.createElement("i",null,"Fields marked with * are required")))},he=({config:e,onChange:t,description:n,urlPlaceholder:r,urlTooltip:a,urlLabel:o,className:i})=>{const s=void 0!==e.url&&/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/.test(e.url),l={container:(0,y.css)({maxWidth:578})};return b.createElement(b.Fragment,null,b.createElement(j,{title:"Connection",description:n,className:(0,y.cx)(l.container,i)},b.createElement(v.InlineField,{htmlFor:"connection-url",label:o||"URL",labelWidth:24,tooltip:a||b.createElement(b.Fragment,null,"Specify a complete HTTP URL",b.createElement("br",null),"(for example https://example.com:8080)"),grow:!0,disabled:e.readOnly,required:!0,invalid:!s&&!e.readOnly,error:s?"":"Please enter a valid URL",interactive:!0},b.createElement(v.Input,{id:"connection-url","aria-label":"Data source connection URL",onChange:n=>t({...e,url:n.currentTarget.value}),value:e.url||"",placeholder:r||"URL"}))))},me=()=>({inlineFieldNoMarginRight:(0,y.css)({marginRight:0}),inlineFieldWithSecret:(0,y.css)({'[class$="layoutChildrenWrapper"]:first-child':{flexGrow:1}})}),ge=({user:e,passwordConfigured:t,userLabel:n="User",userTooltip:r="The username of the data source account",userPlaceholder:a="User",passwordLabel:o="Password",passwordTooltip:i="The password of the data source account",passwordPlaceholder:s="Password",onUserChange:l,onPasswordChange:c,onPasswordReset:u,readOnly:d})=>{const p=me(),h={lastInlineField:(0,y.css)({marginBottom:0})};return b.createElement(b.Fragment,null,b.createElement(v.InlineField,{className:p.inlineFieldNoMarginRight,label:n,labelWidth:24,tooltip:r,required:!0,htmlFor:"basic-auth-user-input",interactive:!0,grow:!0,disabled:d},b.createElement(v.Input,{id:"basic-auth-user-input",placeholder:a,value:e,onChange:e=>l(e.currentTarget.value),required:!0})),b.createElement(v.InlineField,{className:(0,y.cx)(p.inlineFieldNoMarginRight,p.inlineFieldWithSecret,h.lastInlineField),label:o,labelWidth:24,tooltip:i,required:!0,htmlFor:"basic-auth-password-input",interactive:!0,grow:!0,disabled:d},b.createElement(v.SecretInput,{id:"basic-auth-password-input",isConfigured:t,onReset:d?()=>{}:u,placeholder:s,onChange:e=>c(e.currentTarget.value),required:!0})))};var fe=(e=>(e.NoAuth="NoAuth",e.BasicAuth="BasicAuth",e.OAuthForward="OAuthForward",e.CrossSiteCredentials="CrossSiteCredentials",e))(fe||{});const ye={[fe.BasicAuth]:{label:"Basic authentication",value:fe.BasicAuth,description:"Authenticate with your data source username and password"},[fe.CrossSiteCredentials]:{label:"Enable cross-site access control requests",value:fe.CrossSiteCredentials,description:"Allow cross-site Access-Control requests with your existing credentials and cookies. This enables the server to authenticate the user and perform authorized requests on their behalf on other domains."},[fe.OAuthForward]:{label:"Forward OAuth Identity",value:fe.OAuthForward,description:"Forward the OAuth access token (and if available: the OIDC ID token) of the user querying to the data source"},[fe.NoAuth]:{label:"No Authentication",value:fe.NoAuth,description:"Data source is available without authentication"}},be=({selectedMethod:e,mostCommonMethod:t,visibleMethods:n,defaultOptionsOverrides:r,customMethods:a,onAuthMethodSelect:o,basicAuth:i,readOnly:s})=>{var l,c,u,d;const[p,h]=(0,b.useState)(!1),{colors:m,spacing:g}=(0,v.useTheme2)(),f=(0,b.useMemo)((()=>{var e;return null!=n?n:[fe.BasicAuth,fe.OAuthForward,fe.NoAuth,...null!=(e=null==a?void 0:a.map((e=>e.id)))?e:[]]}),[a,n]),O=f.length>1,j=(0,b.useMemo)((()=>{var e;const n=null!=(e=null==a?void 0:a.reduce(((e,t)=>(e[t.id]={label:t.label,value:t.id,description:t.description},e)),{}))?e:{},o={};let i;for(i in ye)o[i]={...ye[i],...null==r?void 0:r[i]};const s={...n,...o};return f.filter((e=>Boolean(s[e]))).map((e=>{const n=s[e];return e===t&&O?{...n,label:`${n.label} (most common)`}:n}))}),[f,a,r,t,O]);let w=e;O?e===fe.NoAuth&&t&&!p&&(w=t):w=f[0];let D=null;w===fe.BasicAuth&&i?D=b.createElement(ge,{...i,readOnly:s}):w.startsWith("custom-")&&(D=null!=(c=null==(l=null==a?void 0:a.find((e=>e.id===w)))?void 0:l.component)?c:null);const T=O?"Authentication methods":null!=(u=j[0].label)?u:"",C=O?"Choose an authentication method to access the data source":null!=(d=j[0].description)?d:"",x={authMethods:(0,y.css)({marginTop:g(2.5),...O&&{padding:g(2),border:`1px solid ${m.border.weak}`}}),selectedMethodFields:(0,y.css)({marginTop:g(1.5)})};return b.createElement(Z,{title:T,description:C},b.createElement("div",{className:x.authMethods},O&&b.createElement(v.Field,{label:"Authentication method"},b.createElement(v.Select,{inputId:"auth-method-select",options:j,value:w,onChange:e=>{h(!0),o(e.value)},disabled:s})),D&&b.createElement("div",{className:x.selectedMethodFields},D)))},ve=({children:e,enabled:t,label:n,tooltipText:r,onToggle:a,readOnly:o})=>{const{colors:i,spacing:s}=(0,v.useTheme2)(),l={container:(0,y.css)({marginTop:3}),checkboxContainer:(0,y.css)({display:"flex",alignItems:"center"}),infoIcon:(0,y.css)({marginTop:-2,marginLeft:5,color:i.text.secondary}),content:(0,y.css)({margin:s(1,0,2,3)})};return b.createElement("div",{className:l.container},b.createElement("div",{className:l.checkboxContainer},b.createElement(v.Checkbox,{value:t,label:n,onChange:()=>a(!t),disabled:o}),b.createElement(v.Tooltip,{placement:"top",content:r,interactive:!0},b.createElement(v.Icon,{name:"info-circle",className:l.infoIcon,size:"sm"}))),t&&e&&b.createElement("div",{className:l.content},e))},Oe=({enabled:e,certificateConfigured:t,onToggle:n,onCertificateChange:r,onCertificateReset:a,tooltips:o,readOnly:i})=>{var s;const l=me();return b.createElement(ve,{enabled:e,label:"Add self-signed certificate",tooltipText:"Add your own Certificate Authority (CA) certificate on top of one generated by the certificate authorities for additional security measures",onToggle:e=>n(e),readOnly:i},b.createElement(v.InlineField,{label:"CA Certificate",labelWidth:24,tooltip:null!=(s=null==o?void 0:o.certificateLabel)?s:"Your self-signed certificate",required:!0,htmlFor:"self-signed-certificate-input",interactive:!0,grow:!0,className:(0,y.cx)(l.inlineFieldNoMarginRight,l.inlineFieldWithSecret),disabled:i},b.createElement(v.SecretTextArea,{id:"self-signed-certificate-input",isConfigured:t,onChange:e=>r(e.currentTarget.value),onReset:i?()=>{}:a,placeholder:"Begins with --- BEGIN CERTIFICATE ---",rows:6,required:!0})))},je=({enabled:e,serverName:t,clientCertificateConfigured:n,clientKeyConfigured:r,onToggle:a,onServerNameChange:o,onClientCertificateChange:i,onClientKeyChange:s,onClientCertificateReset:l,onClientKeyReset:c,tooltips:u,readOnly:d})=>{var p,h,m;const g=me();return b.createElement(ve,{enabled:e,label:"TLS Client Authentication",tooltipText:"Validate using TLS client authentication, in which the server authenticates the client",onToggle:e=>a(e),readOnly:d},b.createElement(v.InlineField,{label:"ServerName",labelWidth:24,tooltip:null!=(p=null==u?void 0:u.serverNameLabel)?p:"A Servername is used to verify the hostname on the returned certificate",required:!0,htmlFor:"client-auth-servername-input",interactive:!0,grow:!0,className:g.inlineFieldNoMarginRight,disabled:d},b.createElement(v.Input,{id:"client-auth-servername-input",placeholder:"domain.example.com",value:t,onChange:e=>o(e.currentTarget.value),required:!0})),b.createElement(v.InlineField,{label:"Client Certificate",labelWidth:24,tooltip:null!=(h=null==u?void 0:u.certificateLabel)?h:"The client certificate can be generated from a Certificate Authority or be self-signed",required:!0,htmlFor:"client-auth-client-certificate-input",interactive:!0,grow:!0,className:(0,y.cx)(g.inlineFieldNoMarginRight,g.inlineFieldWithSecret),disabled:d},b.createElement(v.SecretTextArea,{id:"client-auth-client-certificate-input",isConfigured:n,onChange:e=>i(e.currentTarget.value),onReset:d?()=>{}:l,placeholder:"Begins with --- BEGIN CERTIFICATE ---",rows:6,required:!0})),b.createElement(v.InlineField,{label:"Client Key",labelWidth:24,tooltip:null!=(m=null==u?void 0:u.keyLabel)?m:"The client key can be generated from a Certificate Authority or be self-signed",required:!0,htmlFor:"client-auth-client-key-input",interactive:!0,grow:!0,className:(0,y.cx)(g.inlineFieldNoMarginRight,g.inlineFieldWithSecret),disabled:d},b.createElement(v.SecretTextArea,{id:"client-auth-client-key-input",isConfigured:r,onChange:e=>s(e.currentTarget.value),onReset:d?()=>{}:c,placeholder:"Begins with --- RSA PRIVATE KEY CERTIFICATE ---",rows:6,required:!0})))},we=({enabled:e,onToggle:t,readOnly:n})=>b.createElement(ve,{enabled:e,label:"Skip TLS certificate validation",tooltipText:"Skipping TLS certificate validation is not recommended unless absolutely necessary or for testing",onToggle:e=>t(e),readOnly:n}),De=({selfSignedCertificate:e,TLSClientAuth:t,skipTLSVerification:n,readOnly:r})=>{const{spacing:a}=(0,v.useTheme2)(),o={container:(0,y.css)({marginTop:a(3)})};return b.createElement(Z,{className:o.container,title:"TLS settings",description:"Additional security measures that can be applied on top of authentication"},b.createElement(Oe,{...e,readOnly:r}),b.createElement(je,{...t,readOnly:r}),b.createElement(we,{...n,readOnly:r}))},Te=({header:e,onChange:t,onBlur:n,onDelete:r,readOnly:a})=>{const{spacing:o}=(0,v.useTheme2)(),i=me(),s={container:(0,y.css)({alignItems:"center"}),input:(0,y.css)({minWidth:"100%"}),headerNameField:(0,y.css)({width:"40%",marginRight:0,paddingRight:o(1)}),headerValueField:(0,y.css)({width:"45%",marginRight:0}),removeHeaderBtn:(0,y.css)({margin:"0 0 3px 10px"})};return b.createElement(b.Fragment,null,b.createElement(v.InlineFieldRow,{className:s.container},b.createElement(v.InlineField,{label:"Header",labelWidth:9,grow:!0,className:s.headerNameField,htmlFor:`custom-header-${e.id}-name-input`,disabled:a},b.createElement(v.Input,{id:`custom-header-${e.id}-name-input`,placeholder:"X-Custom-Header",value:e.name,width:12,onChange:n=>t({...e,name:n.currentTarget.value}),onBlur:n,className:s.input})),b.createElement(v.InlineField,{label:"Value",labelWidth:9,grow:!0,className:(0,y.cx)(i.inlineFieldWithSecret,s.headerValueField),htmlFor:`custom-header-${e.id}-value-input`,disabled:a},b.createElement(v.SecretInput,{id:`custom-header-${e.id}-value-input`,isConfigured:e.configured,placeholder:"Header value",value:e.value,width:12,onChange:n=>t({...e,value:n.currentTarget.value}),onReset:a?()=>{}:()=>t({...e,configured:!1,value:""}),onBlur:n,className:s.input})),b.createElement(v.IconButton,{name:"trash-alt",tooltip:"Remove header",tooltipPlacement:"top",className:s.removeHeaderBtn,onClick:r,type:"button",disabled:a})))},Ce=({headers:e,onChange:t,readOnly:n})=>{const{spacing:r}=(0,v.useTheme2)(),[a,o]=(0,b.useState)(e.map((e=>({...e,id:xe(),value:""}))));(0,b.useEffect)((()=>{o((t=>{let n=!1;const r=t.map((t=>{var r;const a=null==(r=e.find((e=>e.name===t.name)))?void 0:r.configured;return void 0!==a&&t.configured!==a?(n=!0,{...t,configured:a}):t}));return n?r:t}))}),[e]);const i=()=>{t(a.map((({name:e,value:t,configured:n})=>({name:e,value:t,configured:n}))))},s={container:(0,y.css)({marginTop:r(3)}),addHeaderButton:(0,y.css)({marginTop:r(1.5)})};return b.createElement("div",{className:s.container},b.createElement(Z,{title:"HTTP headers",description:"Pass along additional context and metadata about the request/response",isCollapsible:!0,isInitiallyOpen:a.length>0},b.createElement("div",null,a.map((e=>b.createElement(Te,{key:e.id,header:e,onChange:e=>((e,t)=>{o(a.map((n=>n.id===e?{...t}:n)))})(e.id,e),onDelete:()=>(e=>{const n=a.findIndex((t=>t.id===e));if(-1===n)return;const r=[...a];r.splice(n,1),o(r),t(r.map((({name:e,value:t,configured:n})=>({name:e,value:t,configured:n}))))})(e.id),onBlur:i,readOnly:n})))),b.createElement("div",{className:s.addHeaderButton},b.createElement(v.Button,{icon:"plus",variant:"secondary",fill:"outline",onClick:()=>{o([...a,{id:xe(),name:"",value:"",configured:!1}])},disabled:n},0===a.length?"Add header":"Add another header"))))};function xe(){return Math.random().toString(16).slice(2)}const Fe=({selectedMethod:e,mostCommonMethod:t,visibleMethods:n,defaultOptionsOverrides:r,customMethods:a,onAuthMethodSelect:o,basicAuth:i,TLS:s,customHeaders:l,readOnly:c=!1})=>{const u={container:(0,y.css)({maxWidth:578})};return b.createElement("div",{className:u.container},b.createElement(j,{title:"Authentication"},b.createElement(be,{selectedMethod:e,mostCommonMethod:t,customMethods:a,visibleMethods:n,defaultOptionsOverrides:r,onAuthMethodSelect:o,basicAuth:i,readOnly:c}),s&&b.createElement(De,{...s,readOnly:c}),l&&b.createElement(Ce,{...l,readOnly:c})))},Se="httpHeaderName",Ne="httpHeaderValue";function Ie({config:e,onChange:t}){return{selectedMethod:Pe(e),onAuthMethodSelect:Ee(e,t),basicAuth:ke(e,t),TLS:Ae(e,t),customHeaders:Re(e,t),readOnly:e.readOnly}}function Pe(e){return e.basicAuth?fe.BasicAuth:e.withCredentials?fe.CrossSiteCredentials:e.jsonData.oauthPassThru?fe.OAuthForward:fe.NoAuth}function Ee(e,t){return n=>{t({...e,basicAuth:n===fe.BasicAuth,withCredentials:n===fe.CrossSiteCredentials,jsonData:{...e.jsonData,oauthPassThru:n===fe.OAuthForward}})}}function ke(e,t){return{user:e.basicAuthUser,passwordConfigured:e.secureJsonFields.basicAuthPassword,onUserChange:n=>t({...e,basicAuthUser:n}),onPasswordChange:n=>t({...e,secureJsonData:{...e.secureJsonData,basicAuthPassword:n}}),onPasswordReset:()=>t({...e,secureJsonData:{...e.secureJsonData,basicAuthPassword:""},secureJsonFields:{...e.secureJsonFields,basicAuthPassword:!1}})}}function Ae(e,t){var n,r,a;return{selfSignedCertificate:{enabled:Boolean(e.jsonData.tlsAuthWithCACert),certificateConfigured:!!(null==(n=e.secureJsonFields)?void 0:n.tlsCACert),onToggle:n=>t(n?{...e,jsonData:{...e.jsonData,tlsAuthWithCACert:n}}:{...e,jsonData:{...e.jsonData,tlsAuthWithCACert:n},secureJsonData:{...e.secureJsonData,tlsCACert:""},secureJsonFields:{...e.secureJsonFields,tlsCACert:!1}}),onCertificateChange:n=>t({...e,secureJsonData:{...e.secureJsonData,tlsCACert:n}}),onCertificateReset:()=>t({...e,secureJsonData:{...e.secureJsonData,tlsCACert:""},secureJsonFields:{...e.secureJsonFields,tlsCACert:!1}})},TLSClientAuth:{enabled:e.jsonData.tlsAuth,serverName:e.jsonData.serverName,clientCertificateConfigured:!!(null==(r=e.secureJsonFields)?void 0:r.tlsClientCert),clientKeyConfigured:!!(null==(a=e.secureJsonFields)?void 0:a.tlsClientKey),onToggle:n=>t(n?{...e,jsonData:{...e.jsonData,tlsAuth:n}}:{...e,jsonData:{...e.jsonData,tlsAuth:n,serverName:""},secureJsonData:{...e.secureJsonData,tlsClientCert:"",tlsClientKey:""},secureJsonFields:{...e.secureJsonFields,tlsClientCert:!1,tlsClientKey:!1}}),onServerNameChange:n=>t({...e,jsonData:{...e.jsonData,serverName:n}}),onClientCertificateChange:n=>t({...e,secureJsonData:{...e.secureJsonData,tlsClientCert:n}}),onClientCertificateReset:()=>t({...e,secureJsonData:{...e.secureJsonData,tlsClientCert:""},secureJsonFields:{...e.secureJsonFields,tlsClientCert:!1}}),onClientKeyChange:n=>t({...e,secureJsonData:{...e.secureJsonData,tlsClientKey:n}}),onClientKeyReset:()=>t({...e,secureJsonData:{...e.secureJsonData,tlsClientKey:""},secureJsonFields:{...e.secureJsonFields,tlsClientKey:!1}})},skipTLSVerification:{enabled:e.jsonData.tlsSkipVerify,onToggle:n=>t({...e,jsonData:{...e.jsonData,tlsSkipVerify:n}})}}}function Re(e,t){return{headers:Object.keys(e.jsonData).filter((e=>e.startsWith(Se))).sort().map((t=>{var n;const r=t.slice(14);return{name:e.jsonData[t],configured:null!=(n=e.secureJsonFields[`${Ne}${r}`])&&n}})),onChange:n=>{const r=Object.fromEntries(Object.entries(e.jsonData).filter((([e])=>!e.startsWith(Se)))),a=Object.fromEntries(Object.entries(e.secureJsonData||{}).filter((([e])=>!e.startsWith(Ne)))),o=Object.fromEntries(Object.entries(e.secureJsonFields).filter((([e])=>!e.startsWith(Ne))));n.forEach(((e,t)=>{r[`${Se}${t+1}`]=e.name,e.configured?o[`${Ne}${t+1}`]=!0:a[`${Ne}${t+1}`]=e.value})),t({...e,jsonData:r,secureJsonData:a,secureJsonFields:o})}}}const qe=({config:e,onChange:t,className:n})=>{const r={container:(0,y.css)({maxWidth:578})};return b.createElement(Z,{title:"Advanced HTTP settings",className:(0,y.cx)(r.container,n)},b.createElement(v.InlineField,{htmlFor:"advanced-http-cookies",label:"Allowed cookies",labelWidth:24,tooltip:"Grafana proxy deletes forwarded cookies by default. Specify cookies by name that should be forwarded to the data source.",disabled:e.readOnly,grow:!0},b.createElement(v.TagsInput,{id:"advanced-http-cookies",placeholder:"New cookie (hit enter to add)",tags:e.jsonData.keepCookies,onChange:n=>{t({...e,jsonData:{...e.jsonData,keepCookies:n}})}})),b.createElement(v.InlineField,{htmlFor:"advanced-http-timeout",label:"Timeout",labelWidth:24,tooltip:"HTTP request timeout in seconds",disabled:e.readOnly,grow:!0},b.createElement(v.Input,{id:"advanced-http-timeout",type:"number",min:0,placeholder:"Timeout in seconds","aria-label":"Timeout in seconds",value:e.jsonData.timeout,onChange:n=>{t({...e,jsonData:{...e.jsonData,timeout:parseInt(n.currentTarget.value,10)}})}})))};function Me(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Be(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Me(e,t,n[t])}))}return e}const Je=e=>({container:(0,y.css)({marginBottom:e.spacing(2),maxWidth:"900px"})});var Le=d(241);var We=function(){return We=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},We.apply(this,arguments)};Object.create;Object.create;"function"==typeof SuppressedError&&SuppressedError;function $e(){var e=(0,b.useRef)(!1),t=(0,b.useCallback)((function(){return e.current}),[]);return(0,b.useEffect)((function(){return e.current=!0,function(){e.current=!1}}),[]),t}function Ge(e,t,n){void 0===t&&(t=[]),void 0===n&&(n={loading:!1});var r=(0,b.useRef)(0),a=$e(),o=(0,b.useState)(n),i=o[0],s=o[1],l=(0,b.useCallback)((function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var o=++r.current;return i.loading||s((function(e){return We(We({},e),{loading:!0})})),e.apply(void 0,t).then((function(e){return a()&&o===r.current&&s({value:e,loading:!1}),e}),(function(e){return a()&&o===r.current&&s({error:e,loading:!1}),e}))}),t);return[i,l]}const _e=function(e){(0,b.useEffect)(e,[])};const Ue=function(e){_e((function(){e()}))};const Ve={error:7e3,info:3e3,success:3e3,warning:5e3},Qe=e=>{const t=(n=(0,v.useTheme2)(),(0,y.css)({position:"absolute",zIndex:n.zIndex.portal,top:0,right:10}));var n;const[r,a]=(0,b.useState)(!1),[o,i]=(0,b.useState)();return(0,b.useEffect)((()=>()=>{o&&clearTimeout(o)}),[o]),(0,b.useEffect)((()=>{if(""!==e.text){a(!0);const t=setTimeout((()=>{a(!1)}),Ve[e.severity]);i(t)}}),[e.severity,e.text]),(0,f.jsx)(f.Fragment,{children:r&&(0,f.jsx)(v.Alert,{className:t,elevated:!0,onRemove:()=>a(!1),severity:e.severity,title:e.text})})};function ze(e,t,n,r,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,a)}function He(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){ze(o,r,a,i,s,"next",e)}function s(e){ze(o,r,a,i,s,"throw",e)}i(void 0)}))}}function Ke(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ze(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Ke(e,t,n[t])}))}return e}function Ye(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}const Xe=e=>({tracesCascader:(0,y.css)({label:"tracesCascader",marginRight:e.spacing(1)})});const et=[{label:"No traces found",value:"no_traces",isLeaf:!0}],tt={"[No traces in time range]":"__NO_TRACES__"};var nt=d(269),rt=d(59);function at(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ot(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){at(e,t,n[t])}))}return e}function it(e){const{nodes:t,edges:n}=function(e){const t=[],n=[],r=new g.DataFrameView(e),a=function(e){let t=0,n=1/0;for(let r=0;r<e.length;r++){const a=e.get(r);a.startTime<n&&(n=a.startTime),a.startTime+a.duration>t&&(t=a.startTime+a.duration)}return t-n}(r),o=lt((t=>{if(t>=e.length)return;const n=r.get(t);return{span:ot({},n),id:n.spanID,parentIds:n.parentSpanID?[n.parentSpanID]:[]}}));for(let e=0;e<r.length;e++){const s=r.get(e),l=st(o[s.spanID].children.map((e=>{const t=o[e].span;return[t.startTime,t.startTime+t.duration]}))),c=s.duration-l,u=ct(s.duration,a,c);var i;t.push({[g.NodeGraphDataFrameFieldNames.id]:s.spanID,[g.NodeGraphDataFrameFieldNames.title]:null!==(i=s.serviceName)&&void 0!==i?i:"",[g.NodeGraphDataFrameFieldNames.subTitle]:s.operationName,[g.NodeGraphDataFrameFieldNames.mainStat]:u.main,[g.NodeGraphDataFrameFieldNames.secondaryStat]:u.secondary,[g.NodeGraphDataFrameFieldNames.color]:c/a}),s.parentSpanID&&o[s.parentSpanID].span&&n.push({[g.NodeGraphDataFrameFieldNames.id]:s.parentSpanID+"--"+s.spanID,[g.NodeGraphDataFrameFieldNames.target]:s.spanID,[g.NodeGraphDataFrameFieldNames.source]:s.parentSpanID})}return{nodes:t,edges:n}}(e),[r,a]=dt();for(const e of t)r.add(e);for(const e of n)a.add(e);return[r,a]}function st(e){e.sort(((e,t)=>e[0]-t[0]));return e.reduce(((e,t)=>{if(!e.length)return[t];const n=e.slice(-1)[0],[r,a]=n,[o,i]=t;return i<a?e:o>a?[...e,t]:[...e.slice(0,-1),[r,i]]}),[]).reduce(((e,t)=>e+(t[1]-t[0])),0)}function lt(e){const t={};let n;for(let r=0;n=e(r),n;r++){t[n.id]?t[n.id].span=n.span:t[n.id]={span:n.span,children:[]};for(const e of n.parentIds)e&&(t[e]?t[e].children.push(n.id):t[e]={span:void 0,children:[n.id]})}return t}function ct(e,t,n){return{main:`${ut(e)}ms (${ut(e/t*100)}%)`,secondary:`${ut(n)}ms (${ut(n/e*100)}%)`}}function ut(e){return parseFloat(e.toFixed(2))}function dt(){return[new g.MutableDataFrame({fields:[{name:g.NodeGraphDataFrameFieldNames.id,type:g.FieldType.string},{name:g.NodeGraphDataFrameFieldNames.title,type:g.FieldType.string},{name:g.NodeGraphDataFrameFieldNames.subTitle,type:g.FieldType.string},{name:g.NodeGraphDataFrameFieldNames.mainStat,type:g.FieldType.string,config:{displayName:"Total time (% of trace)"}},{name:g.NodeGraphDataFrameFieldNames.secondaryStat,type:g.FieldType.string,config:{displayName:"Self time (% of total)"}},{name:g.NodeGraphDataFrameFieldNames.color,type:g.FieldType.number,config:{color:{mode:"continuous-GrYlRd"},displayName:"Self time / Trace duration"}}],meta:{preferredVisualisationType:"nodeGraph"}}),new g.MutableDataFrame({fields:[{name:g.NodeGraphDataFrameFieldNames.id,type:g.FieldType.string},{name:g.NodeGraphDataFrameFieldNames.target,type:g.FieldType.string},{name:g.NodeGraphDataFrameFieldNames.source,type:g.FieldType.string}],meta:{preferredVisualisationType:"nodeGraph"}})]}function pt(e){const{nodes:t,edges:n}=function(e){const t=[],n=[],r=function(e){let t=0,n=1/0;for(const r of e)r.timestamp<n&&(n=r.timestamp),r.timestamp+r.duration>t&&(t=r.timestamp+r.duration);return t-n}(e),a=lt((t=>{if(!(t>=e.length))return{span:e[t],id:e[t].id,parentIds:e[t].parentId?[e[t].parentId]:[]}}));for(const s of e){var o,i;const e=st(a[s.id].children.map((e=>{const t=a[e].span;return[t.timestamp,t.timestamp+t.duration]}))),l=s.duration-e,c=ct(s.duration/1e3,r/1e3,l/1e3);t.push({[g.NodeGraphDataFrameFieldNames.id]:s.id,[g.NodeGraphDataFrameFieldNames.title]:(null===(o=s.localEndpoint)||void 0===o?void 0:o.serviceName)||(null===(i=s.remoteEndpoint)||void 0===i?void 0:i.serviceName)||"unknown",[g.NodeGraphDataFrameFieldNames.subTitle]:s.name,[g.NodeGraphDataFrameFieldNames.mainStat]:c.main,[g.NodeGraphDataFrameFieldNames.secondaryStat]:c.secondary,[g.NodeGraphDataFrameFieldNames.color]:l/r}),s.parentId&&a[s.parentId].span&&n.push({[g.NodeGraphDataFrameFieldNames.id]:s.parentId+"--"+s.id,[g.NodeGraphDataFrameFieldNames.target]:s.id,[g.NodeGraphDataFrameFieldNames.source]:s.parentId})}return{nodes:t,edges:n}}(e),[r,a]=dt();for(const e of t)r.add(e);for(const e of n)a.add(e);return[r,a]}function ht(e){const t=e.map(mt),n=new g.MutableDataFrame({fields:[{name:"traceID",type:g.FieldType.string,values:[]},{name:"spanID",type:g.FieldType.string,values:[]},{name:"parentSpanID",type:g.FieldType.string,values:[]},{name:"operationName",type:g.FieldType.string,values:[]},{name:"serviceName",type:g.FieldType.string,values:[]},{name:"serviceTags",type:g.FieldType.other,values:[]},{name:"startTime",type:g.FieldType.number,values:[]},{name:"duration",type:g.FieldType.number,values:[]},{name:"logs",type:g.FieldType.other,values:[]},{name:"tags",type:g.FieldType.other,values:[]}],meta:{preferredVisualisationType:"trace",custom:{traceFormat:"zipkin"}}});for(const e of t)n.add(e);return n}function mt(e){var t,n,r,a;const o={traceID:e.traceId,spanID:e.id,parentSpanID:e.parentId,operationName:e.name,serviceName:(null===(t=e.localEndpoint)||void 0===t?void 0:t.serviceName)||(null===(n=e.remoteEndpoint)||void 0===n?void 0:n.serviceName)||"unknown",serviceTags:ft(e),startTime:e.timestamp/1e3,duration:e.duration/1e3,logs:null!==(a=null===(r=e.annotations)||void 0===r?void 0:r.map(gt))&&void 0!==a?a:[],tags:Object.keys(e.tags||{}).reduce(((t,n)=>"error"===n?(t.push({key:"error",value:!0}),t.push({key:"errorValue",value:e.tags.error}),t):(t.push({key:n,value:e.tags[n]}),t)),[])};var i,s;e.kind&&(o.tags=[{key:"kind",value:e.kind},...null!==(i=o.tags)&&void 0!==i?i:[]]);e.shared&&(o.tags=[{key:"shared",value:e.shared},...null!==(s=o.tags)&&void 0!==s?s:[]]);return o}function gt(e){return{timestamp:e.timestamp,fields:[{key:"annotation",value:e.value}]}}function ft(e){const t=e.localEndpoint||e.remoteEndpoint;return t?[yt("ipv4",t.ipv4),yt("ipv6",t.ipv6),yt("port",t.port),yt("endpointType",e.localEndpoint?"local":"remote")].filter((e=>Boolean(e))):[]}function yt(e,t){if(t)return{key:e,value:t}}function bt(e,t,n,r,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,a)}function vt(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){bt(o,r,a,i,s,"next",e)}function s(e){bt(o,r,a,i,s,"throw",e)}i(void 0)}))}}function Ot(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Ot(e,t,n[t])}))}return e}function wt(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}class Dt extends T.DataSourceWithBackend{query(e){const t=e.targets[0];if("upload"===t.queryType){if(!this.uploadedJson)return(0,nt.of)({data:[]});try{var n;const e=JSON.parse(this.uploadedJson);return(0,nt.of)(function(e,t=!1){let n=(null==e?void 0:e.data)?[ht(null==e?void 0:e.data)]:[];t&&n.push(...pt(null==e?void 0:e.data));return{data:n}}({data:e},null===(n=this.nodeGraph)||void 0===n?void 0:n.enabled))}catch(e){return(0,nt.of)({error:{message:"JSON is not valid Zipkin format"},data:[]})}}return t.query?super.query(e).pipe((0,rt.map)((e=>{var t;return(null===(t=this.nodeGraph)||void 0===t?void 0:t.enabled)?function(e){if(!e.data||0===e.data.length)return e;const t=(0,g.toDataFrame)(e.data[0]),n=[...e.data];return n.push(...it(t)),wt(jt({},e),{data:n})}(e):e}))):(0,nt.of)(Tt)}metadataRequest(e,t){return vt((function*(){return yield this.getResource(e,t)})).call(this)}testDatasource(){var e=this,t=()=>super.testDatasource;return vt((function*(){return yield t().call(e)}))()}getQueryDisplayText(e){return e.query}interpolateVariablesInQueries(e,t){return e&&0!==e.length?e.map((e=>jt(wt(jt({},e),{datasource:this.getRef()}),this.applyTemplateVariables(e,t)))):[]}applyTemplateVariables(e,t){const n=jt({},e);var r;return wt(jt({},n),{query:this.templateSrv.replace(null!==(r=e.query)&&void 0!==r?r:"",t)})}constructor(e,t=(0,T.getTemplateSrv)()){super(e),Ot(this,"templateSrv",void 0),Ot(this,"uploadedJson",void 0),Ot(this,"nodeGraph",void 0),Ot(this,"spanBar",void 0),this.templateSrv=t,this.uploadedJson=null,this.nodeGraph=e.jsonData.nodeGraph}}const Tt={data:[(0,g.createDataFrame)({fields:[{name:"trace",type:g.FieldType.trace,values:[]}],meta:{preferredVisualisationType:"trace",custom:{traceFormat:"zipkin"}}})]},Ct=new g.DataSourcePlugin(Dt).setQueryEditor((({query:e,onChange:t,onRunQuery:n,datasource:r})=>{const[a,o]=(0,b.useState)(!1),[i,s]=(0,b.useState)(""),l=function(e,t){const[n,r]=Ge((()=>He((function*(){try{const t=yield e.metadataRequest("services");return t?t.sort().map((e=>({label:e,value:e,isLeaf:!1}))):[]}catch(e){const n=`Failed to load spans from Zipkin: ${(e instanceof Error?e:"An unknown error occurred").toString()}`;throw t(n),e}}))()),[e]);return Ue((()=>{r()})),n}(r,s),c=(0,v.useTheme2)(),u=(0,v.useStyles2)(Xe),{onLoadOptions:d,allOptions:p}=function(e,t){const n=$e(),[r,a]=(0,b.useState)({}),[,o]=Ge((function(r){return He((function*(){try{const t=yield e.metadataRequest("spans",{serviceName:r});n()&&a((e=>{const n=(0,Le.fromPairs)(t.map((e=>[e,void 0])));return Ye(Ze({},e),{[r]:n})}))}catch(e){const n=`Failed to load spans from Zipkin: ${(e instanceof Error?e:"An unknown error occurred").toString()}`;throw t(n),e}}))()}),[e,r]),[,i]=Ge((function(r,o){return He((function*(){const i={serviceName:r,spanName:o};try{const t=yield e.metadataRequest("traces",i);if(n()){const e=t.length?(0,Le.fromPairs)(t.map((e=>{const t=e.find((e=>!e.parentId));return[`${t.name} [${Math.floor(t.duration/1e3)} ms]`,t.traceId]}))):tt;a((t=>{const n=t[r];return Ye(Ze({},t),{[r]:Ye(Ze({},n),{[o]:e})})}))}}catch(e){const n=`Failed to load spans from Zipkin: ${(e instanceof Error?e:"An unknown error occurred").toString()}`;throw t(n),e}}))()}),[e]),s=(0,b.useCallback)((e=>{const t=e[0].value;if(1===e.length)o(t);else if(2===e.length){const n=e[1].value;i(t,n)}}),[o,i]);return{onLoadOptions:s,allOptions:r}}(r,s),h=(0,b.useCallback)(((r,a)=>{if(3===a.length){const r=a[2].value;t(Ye(Ze({},e),{query:r})),n()}}),[t,n,e]);(0,b.useEffect)((()=>{e.queryType||t(Ye(Ze({},e),{queryType:"traceID"}))}),[e,t]);let m=function(e,t){return(0,b.useMemo)((()=>{let n=[];return e.value&&e.value.length?n=e.value.map((e=>Ye(Ze({},e),{children:t[e.value]&&Object.keys(t[e.value]).map((n=>({label:n,value:n,isLeaf:!1,children:t[e.value][n]&&Object.keys(t[e.value][n]).map((r=>({label:r,value:t[e.value][n][r]})))})))}))):e.value&&!e.value.length&&(n=et),n}),[e,t])}(l,p);return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(v.Modal,{title:"Upload trace",isOpen:a,onDismiss:()=>o(!1),children:(0,f.jsx)("div",{className:(0,y.css)({padding:c.spacing(2)}),children:(0,f.jsx)(v.FileDropzone,{options:{multiple:!1},onLoad:a=>{r.uploadedJson=a,t(Ye(Ze({},e),{queryType:"upload"})),o(!1),n()}})})}),(0,f.jsx)(v.InlineFieldRow,{children:(0,f.jsx)(v.InlineField,{label:"Query type",grow:!0,children:(0,f.jsxs)(v.Stack,{gap:1,alignItems:"center",justifyContent:"space-between",children:[(0,f.jsx)(v.RadioButtonGroup,{options:[{value:"traceID",label:"TraceID"}],value:e.queryType||"traceID",onChange:n=>t(Ye(Ze({},e),{queryType:n})),size:"md"}),(0,f.jsx)(v.Button,{variant:"secondary",size:"sm",onClick:()=>{o(!0)},children:"Import trace"})]})})}),"traceID"===e.queryType&&(0,f.jsxs)(v.InlineFieldRow,{children:[(0,f.jsx)(v.ButtonCascader,{options:m,onChange:h,loadData:d,variant:"secondary",buttonProps:{className:u.tracesCascader},children:"Traces"}),(0,f.jsx)("div",{className:"gf-form gf-form--grow flex-shrink-1 min-width-15",children:(0,f.jsx)(v.QueryField,{query:e.query,onChange:n=>{const r=Ye(Ze({},e),{query:n});t(r)},onRunQuery:n,placeholder:"Insert Trace ID (run with Shift+Enter)",portalOrigin:"zipkin"})})]}),i&&(0,f.jsx)(Qe,{text:i,severity:"error"})]})})).setConfigEditor((({options:e,onOptionsChange:t})=>{const n=(0,v.useStyles2)(Je);return(0,f.jsxs)("div",{className:n.container,children:[(0,f.jsx)(pe,{dataSourceName:"Zipkin",docsLink:"https://grafana.com/docs/grafana/latest/datasources/zipkin",hasRequiredFields:!1}),(0,f.jsx)(v.Divider,{spacing:4}),(0,f.jsx)(he,{config:e,onChange:t,urlPlaceholder:"http://localhost:9411"}),(0,f.jsx)(v.Divider,{spacing:4}),(0,f.jsx)(Fe,Be({},Ie({config:e,onChange:t}))),(0,f.jsx)(v.Divider,{spacing:4}),(0,f.jsx)(_,{options:e,onOptionsChange:t}),(0,f.jsx)(v.Divider,{spacing:4}),(0,f.jsx)(H,{options:e,onOptionsChange:t}),(0,f.jsx)(v.Divider,{spacing:4}),(0,f.jsx)(j,{title:"Additional settings",description:"Additional settings are optional settings that can be configured for more control over your data source.",isCollapsible:!0,isInitiallyOpen:!1,children:(0,f.jsxs)(v.Stack,{gap:5,direction:"column",children:[(0,f.jsx)(qe,{config:e,onChange:t}),T.config.secureSocksDSProxyEnabled&&(0,f.jsx)(v.SecureSocksProxySettings,{options:e,onOptionsChange:t}),(0,f.jsx)(te,{options:e,onOptionsChange:t}),(0,f.jsx)(ue,{options:e,onOptionsChange:t})]})})]})}));return p})())); //# sourceMappingURL=module.js.map
.
Edit
..
Edit
CHANGELOG.md
Edit
LICENSE
Edit
README.md
Edit
img
Edit
mocks
Edit
module.js
Edit
module.js.LICENSE.txt
Edit
module.js.map
Edit
plugin.json
Edit