DataSourceSettingsPage.test.tsx.snap 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438
  1. // Jest Snapshot v1, https://goo.gl/fbAQLP
  2. exports[`Render should render alpha info text 1`] = `
  3. <Page
  4. navModel={Object {}}
  5. >
  6. <PageContents
  7. isLoading={false}
  8. >
  9. <div>
  10. <form
  11. onSubmit={[Function]}
  12. >
  13. <PluginStateinfo
  14. state="alpha"
  15. />
  16. <BasicSettings
  17. dataSourceName="gdev-cloudwatch"
  18. isDefault={false}
  19. onDefaultChange={[Function]}
  20. onNameChange={[Function]}
  21. />
  22. <PluginSettings
  23. dataSource={
  24. Object {
  25. "access": "",
  26. "basicAuth": false,
  27. "basicAuthPassword": "",
  28. "basicAuthUser": "",
  29. "database": "",
  30. "id": 13,
  31. "isDefault": false,
  32. "jsonData": Object {
  33. "authType": "credentials",
  34. "defaultRegion": "eu-west-2",
  35. },
  36. "name": "gdev-cloudwatch",
  37. "orgId": 1,
  38. "password": "",
  39. "readOnly": false,
  40. "type": "cloudwatch",
  41. "typeLogoUrl": "public/app/plugins/datasource/cloudwatch/img/amazon-web-services.png",
  42. "url": "",
  43. "user": "",
  44. "withCredentials": false,
  45. }
  46. }
  47. dataSourceMeta={
  48. Object {
  49. "baseUrl": "path/to/plugin",
  50. "defaultNavUrl": "some/url",
  51. "enabled": false,
  52. "hasUpdate": false,
  53. "id": "1",
  54. "info": Object {
  55. "author": Object {
  56. "name": "Grafana Labs",
  57. "url": "url/to/GrafanaLabs",
  58. },
  59. "description": "pretty decent plugin",
  60. "links": Array [
  61. Object {
  62. "name": "project",
  63. "url": "one link",
  64. },
  65. ],
  66. "logos": Object {
  67. "large": "large/logo",
  68. "small": "small/logo",
  69. },
  70. "screenshots": Array [
  71. Object {
  72. "path": "screenshot",
  73. },
  74. ],
  75. "updated": "2018-09-26",
  76. "version": "1",
  77. },
  78. "latestVersion": "1",
  79. "module": "path/to/module",
  80. "name": "pretty cool plugin 1",
  81. "pinned": false,
  82. "state": "alpha",
  83. "type": "panel",
  84. }
  85. }
  86. onModelChange={[Function]}
  87. plugin={
  88. DataSourcePlugin {
  89. "DataSourceClass": Object {},
  90. "components": Object {},
  91. }
  92. }
  93. />
  94. <div
  95. className="gf-form-group"
  96. />
  97. <ButtonRow
  98. isReadOnly={false}
  99. onDelete={[Function]}
  100. onSubmit={[Function]}
  101. onTest={[Function]}
  102. />
  103. </form>
  104. </div>
  105. </PageContents>
  106. </Page>
  107. `;
  108. exports[`Render should render beta info text 1`] = `
  109. <Page
  110. navModel={Object {}}
  111. >
  112. <PageContents
  113. isLoading={false}
  114. >
  115. <div>
  116. <form
  117. onSubmit={[Function]}
  118. >
  119. <PluginStateinfo
  120. state="beta"
  121. />
  122. <BasicSettings
  123. dataSourceName="gdev-cloudwatch"
  124. isDefault={false}
  125. onDefaultChange={[Function]}
  126. onNameChange={[Function]}
  127. />
  128. <PluginSettings
  129. dataSource={
  130. Object {
  131. "access": "",
  132. "basicAuth": false,
  133. "basicAuthPassword": "",
  134. "basicAuthUser": "",
  135. "database": "",
  136. "id": 13,
  137. "isDefault": false,
  138. "jsonData": Object {
  139. "authType": "credentials",
  140. "defaultRegion": "eu-west-2",
  141. },
  142. "name": "gdev-cloudwatch",
  143. "orgId": 1,
  144. "password": "",
  145. "readOnly": false,
  146. "type": "cloudwatch",
  147. "typeLogoUrl": "public/app/plugins/datasource/cloudwatch/img/amazon-web-services.png",
  148. "url": "",
  149. "user": "",
  150. "withCredentials": false,
  151. }
  152. }
  153. dataSourceMeta={
  154. Object {
  155. "baseUrl": "path/to/plugin",
  156. "defaultNavUrl": "some/url",
  157. "enabled": false,
  158. "hasUpdate": false,
  159. "id": "1",
  160. "info": Object {
  161. "author": Object {
  162. "name": "Grafana Labs",
  163. "url": "url/to/GrafanaLabs",
  164. },
  165. "description": "pretty decent plugin",
  166. "links": Array [
  167. Object {
  168. "name": "project",
  169. "url": "one link",
  170. },
  171. ],
  172. "logos": Object {
  173. "large": "large/logo",
  174. "small": "small/logo",
  175. },
  176. "screenshots": Array [
  177. Object {
  178. "path": "screenshot",
  179. },
  180. ],
  181. "updated": "2018-09-26",
  182. "version": "1",
  183. },
  184. "latestVersion": "1",
  185. "module": "path/to/module",
  186. "name": "pretty cool plugin 1",
  187. "pinned": false,
  188. "state": "beta",
  189. "type": "panel",
  190. }
  191. }
  192. onModelChange={[Function]}
  193. plugin={
  194. DataSourcePlugin {
  195. "DataSourceClass": Object {},
  196. "components": Object {},
  197. }
  198. }
  199. />
  200. <div
  201. className="gf-form-group"
  202. />
  203. <ButtonRow
  204. isReadOnly={false}
  205. onDelete={[Function]}
  206. onSubmit={[Function]}
  207. onTest={[Function]}
  208. />
  209. </form>
  210. </div>
  211. </PageContents>
  212. </Page>
  213. `;
  214. exports[`Render should render component 1`] = `
  215. <Page
  216. navModel={Object {}}
  217. >
  218. <PageContents
  219. isLoading={false}
  220. >
  221. <div>
  222. <form
  223. onSubmit={[Function]}
  224. >
  225. <PluginStateinfo />
  226. <BasicSettings
  227. dataSourceName="gdev-cloudwatch"
  228. isDefault={false}
  229. onDefaultChange={[Function]}
  230. onNameChange={[Function]}
  231. />
  232. <PluginSettings
  233. dataSource={
  234. Object {
  235. "access": "",
  236. "basicAuth": false,
  237. "basicAuthPassword": "",
  238. "basicAuthUser": "",
  239. "database": "",
  240. "id": 13,
  241. "isDefault": false,
  242. "jsonData": Object {
  243. "authType": "credentials",
  244. "defaultRegion": "eu-west-2",
  245. },
  246. "name": "gdev-cloudwatch",
  247. "orgId": 1,
  248. "password": "",
  249. "readOnly": false,
  250. "type": "cloudwatch",
  251. "typeLogoUrl": "public/app/plugins/datasource/cloudwatch/img/amazon-web-services.png",
  252. "url": "",
  253. "user": "",
  254. "withCredentials": false,
  255. }
  256. }
  257. dataSourceMeta={
  258. Object {
  259. "baseUrl": "path/to/plugin",
  260. "defaultNavUrl": "some/url",
  261. "enabled": false,
  262. "hasUpdate": false,
  263. "id": "1",
  264. "info": Object {
  265. "author": Object {
  266. "name": "Grafana Labs",
  267. "url": "url/to/GrafanaLabs",
  268. },
  269. "description": "pretty decent plugin",
  270. "links": Array [
  271. Object {
  272. "name": "project",
  273. "url": "one link",
  274. },
  275. ],
  276. "logos": Object {
  277. "large": "large/logo",
  278. "small": "small/logo",
  279. },
  280. "screenshots": Array [
  281. Object {
  282. "path": "screenshot",
  283. },
  284. ],
  285. "updated": "2018-09-26",
  286. "version": "1",
  287. },
  288. "latestVersion": "1",
  289. "module": "path/to/module",
  290. "name": "pretty cool plugin 1",
  291. "pinned": false,
  292. "type": "panel",
  293. }
  294. }
  295. onModelChange={[Function]}
  296. plugin={
  297. DataSourcePlugin {
  298. "DataSourceClass": Object {},
  299. "components": Object {},
  300. }
  301. }
  302. />
  303. <div
  304. className="gf-form-group"
  305. />
  306. <ButtonRow
  307. isReadOnly={false}
  308. onDelete={[Function]}
  309. onSubmit={[Function]}
  310. onTest={[Function]}
  311. />
  312. </form>
  313. </div>
  314. </PageContents>
  315. </Page>
  316. `;
  317. exports[`Render should render is ready only message 1`] = `
  318. <Page
  319. navModel={Object {}}
  320. >
  321. <PageContents
  322. isLoading={false}
  323. >
  324. <div>
  325. <form
  326. onSubmit={[Function]}
  327. >
  328. <div
  329. className="grafana-info-box span8"
  330. >
  331. This datasource was added by config and cannot be modified using the UI. Please contact your server admin to update this datasource.
  332. </div>
  333. <PluginStateinfo />
  334. <BasicSettings
  335. dataSourceName="gdev-cloudwatch"
  336. isDefault={false}
  337. onDefaultChange={[Function]}
  338. onNameChange={[Function]}
  339. />
  340. <PluginSettings
  341. dataSource={
  342. Object {
  343. "access": "",
  344. "basicAuth": false,
  345. "basicAuthPassword": "",
  346. "basicAuthUser": "",
  347. "database": "",
  348. "id": 13,
  349. "isDefault": false,
  350. "jsonData": Object {
  351. "authType": "credentials",
  352. "defaultRegion": "eu-west-2",
  353. },
  354. "name": "gdev-cloudwatch",
  355. "orgId": 1,
  356. "password": "",
  357. "readOnly": true,
  358. "type": "cloudwatch",
  359. "typeLogoUrl": "public/app/plugins/datasource/cloudwatch/img/amazon-web-services.png",
  360. "url": "",
  361. "user": "",
  362. "withCredentials": false,
  363. }
  364. }
  365. dataSourceMeta={
  366. Object {
  367. "baseUrl": "path/to/plugin",
  368. "defaultNavUrl": "some/url",
  369. "enabled": false,
  370. "hasUpdate": false,
  371. "id": "1",
  372. "info": Object {
  373. "author": Object {
  374. "name": "Grafana Labs",
  375. "url": "url/to/GrafanaLabs",
  376. },
  377. "description": "pretty decent plugin",
  378. "links": Array [
  379. Object {
  380. "name": "project",
  381. "url": "one link",
  382. },
  383. ],
  384. "logos": Object {
  385. "large": "large/logo",
  386. "small": "small/logo",
  387. },
  388. "screenshots": Array [
  389. Object {
  390. "path": "screenshot",
  391. },
  392. ],
  393. "updated": "2018-09-26",
  394. "version": "1",
  395. },
  396. "latestVersion": "1",
  397. "module": "path/to/module",
  398. "name": "pretty cool plugin 1",
  399. "pinned": false,
  400. "type": "panel",
  401. }
  402. }
  403. onModelChange={[Function]}
  404. plugin={
  405. DataSourcePlugin {
  406. "DataSourceClass": Object {},
  407. "components": Object {},
  408. }
  409. }
  410. />
  411. <div
  412. className="gf-form-group"
  413. />
  414. <ButtonRow
  415. isReadOnly={true}
  416. onDelete={[Function]}
  417. onSubmit={[Function]}
  418. onTest={[Function]}
  419. />
  420. </form>
  421. </div>
  422. </PageContents>
  423. </Page>
  424. `;
  425. exports[`Render should render loader 1`] = `
  426. <Page
  427. navModel={Object {}}
  428. >
  429. <PageContents
  430. isLoading={true}
  431. />
  432. </Page>
  433. `;