1 |
- {"version":3,"file":"AdminSettings.d6cdf85a90dde8c79c6e.js","mappings":"mNAuDA,MAIA,GAAeA,EAAAA,EAAAA,UAJUC,IAAD,CACtBC,UAAUC,EAAAA,EAAAA,GAAYF,EAAMG,SAAU,sBAGxC,EA3CA,YAA4C,IAArB,SAAEF,GAAmB,EAC1C,MAAM,QAAEG,EAASC,MAAOC,IAAaC,EAAAA,EAAAA,IACnC,KAAMC,EAAAA,EAAAA,iBAAgBC,IAAI,wBAC1B,IAGF,OACE,SAAC,IAAD,CAAMR,SAAUA,EAAhB,UACE,UAAC,aAAD,CAAeS,UAAWN,EAA1B,WACE,gBAAKO,UAAU,yBAAyBC,MAAO,CAAEC,OAAQ,iBAAzD,qKAKCP,IACC,kBAAOK,UAAU,eAAjB,UACE,2BACGG,OAAOC,QAAQT,GAAUU,KAAI,CAAC,EAAgCC,KAAjC,IAAEC,EAAaC,GAAf,SAC5B,UAAC,WAAD,YACE,2BACE,eAAIR,UAAU,yBAAd,SAAwCO,IAD1C,OAEE,sBAEDJ,OAAOC,QAAQI,GAAiBH,KAAI,CAAC,EAA6BI,KAA9B,IAAEC,EAAaC,GAAf,SACnC,2BACE,eAAIV,MAAO,CAAEW,YAAa,QAA1B,SAAqCF,KACrC,eAAIT,MAAO,CAAEY,WAAY,gBAAzB,SAA4CF,MAFpC,YAAWF,UANH,WAAUH","sources":["webpack://grafana/./public/app/features/admin/AdminSettings.tsx"],"sourcesContent":["import React from 'react';\nimport { connect } from 'react-redux';\nimport { useAsync } from 'react-use';\n\nimport { NavModel } from '@grafana/data';\nimport { getBackendSrv } from '@grafana/runtime';\nimport Page from 'app/core/components/Page/Page';\nimport { getNavModel } from 'app/core/selectors/navModel';\nimport { StoreState } from 'app/types';\n\ntype Settings = { [key: string]: { [key: string]: string } };\n\ninterface Props {\n navModel: NavModel;\n}\n\nfunction AdminSettings({ navModel }: Props) {\n const { loading, value: settings } = useAsync(\n () => getBackendSrv().get('/api/admin/settings') as Promise<Settings>,\n []\n );\n\n return (\n <Page navModel={navModel}>\n <Page.Contents isLoading={loading}>\n <div className=\"grafana-info-box span8\" style={{ margin: '20px 0 25px 0' }}>\n These system settings are defined in grafana.ini or custom.ini (or overridden in ENV variables). To change\n these you currently need to restart Grafana.\n </div>\n\n {settings && (\n <table className=\"filter-table\">\n <tbody>\n {Object.entries(settings).map(([sectionName, sectionSettings], i) => (\n <React.Fragment key={`section-${i}`}>\n <tr>\n <td className=\"admin-settings-section\">{sectionName}</td>\n <td />\n </tr>\n {Object.entries(sectionSettings).map(([settingName, settingValue], j) => (\n <tr key={`property-${j}`}>\n <td style={{ paddingLeft: '25px' }}>{settingName}</td>\n <td style={{ whiteSpace: 'break-spaces' }}>{settingValue}</td>\n </tr>\n ))}\n </React.Fragment>\n ))}\n </tbody>\n </table>\n )}\n </Page.Contents>\n </Page>\n );\n}\n\nconst mapStateToProps = (state: StoreState) => ({\n navModel: getNavModel(state.navIndex, 'server-settings'),\n});\n\nexport default connect(mapStateToProps)(AdminSettings);\n"],"names":["connect","state","navModel","getNavModel","navIndex","loading","value","settings","useAsync","getBackendSrv","get","isLoading","className","style","margin","Object","entries","map","i","sectionName","sectionSettings","j","settingName","settingValue","paddingLeft","whiteSpace"],"sourceRoot":""}
|