DataSourceSettings.test.tsx.snap 11 KB

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