UNPKG

@grafana/ui

Version:
46 lines (41 loc) 2.02 kB
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); var jsxRuntime = require('react/jsx-runtime'); var i18n = require('@grafana/i18n'); var Switch = require('../Switch/Switch.cjs'); var InlineField = require('../Forms/InlineField.cjs'); var Box = require('../Layout/Box/Box.cjs'); var Stack = require('../Layout/Stack/Stack.cjs'); "use strict"; function SecureSocksProxySettings({ options, onOptionsChange }) { var _a; return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [ /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "page-heading", children: /* @__PURE__ */ jsxRuntime.jsx(i18n.Trans, { i18nKey: "grafana-ui.data-source-settings.secure-socks-heading", children: "Secure Socks Proxy" }) }), /* @__PURE__ */ jsxRuntime.jsx(Box.Box, { marginBottom: 5, children: /* @__PURE__ */ jsxRuntime.jsx(Stack.Stack, { direction: "row", alignItems: "flex-start", wrap: true, children: /* @__PURE__ */ jsxRuntime.jsx(Box.Box, { position: "relative", marginBottom: 0.5, children: /* @__PURE__ */ jsxRuntime.jsx(Stack.Stack, { direction: "row", alignItems: "flex-start", children: /* @__PURE__ */ jsxRuntime.jsx( InlineField.InlineField, { labelWidth: 26, label: i18n.t("grafana-ui.data-source-settings.secure-socks-label", "Enabled"), tooltip: i18n.t( "grafana-ui.data-source-settings.secure-socks-tooltip", "Connect to this datasource via the secure socks proxy." ), children: /* @__PURE__ */ jsxRuntime.jsx( Switch.InlineSwitch, { value: (_a = options.jsonData.enableSecureSocksProxy) != null ? _a : false, onChange: (event) => onOptionsChange({ ...options, jsonData: { ...options.jsonData, enableSecureSocksProxy: event.currentTarget.checked } }) } ) } ) }) }) }) }) ] }); } exports.SecureSocksProxySettings = SecureSocksProxySettings; //# sourceMappingURL=SecureSocksProxySettings.cjs.map