DataSourceSettings.test.tsx.snap 11 KB

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