DataSourceSettingsPage.test.tsx.snap 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414
  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. />
  88. <div
  89. className="gf-form-group"
  90. />
  91. <ButtonRow
  92. isReadOnly={false}
  93. onDelete={[Function]}
  94. onSubmit={[Function]}
  95. onTest={[Function]}
  96. />
  97. </form>
  98. </div>
  99. </PageContents>
  100. </Page>
  101. `;
  102. exports[`Render should render beta info text 1`] = `
  103. <Page
  104. navModel={Object {}}
  105. >
  106. <PageContents
  107. isLoading={false}
  108. >
  109. <div>
  110. <form
  111. onSubmit={[Function]}
  112. >
  113. <PluginStateinfo
  114. state="beta"
  115. />
  116. <BasicSettings
  117. dataSourceName="gdev-cloudwatch"
  118. isDefault={false}
  119. onDefaultChange={[Function]}
  120. onNameChange={[Function]}
  121. />
  122. <PluginSettings
  123. dataSource={
  124. Object {
  125. "access": "",
  126. "basicAuth": false,
  127. "basicAuthPassword": "",
  128. "basicAuthUser": "",
  129. "database": "",
  130. "id": 13,
  131. "isDefault": false,
  132. "jsonData": Object {
  133. "authType": "credentials",
  134. "defaultRegion": "eu-west-2",
  135. },
  136. "name": "gdev-cloudwatch",
  137. "orgId": 1,
  138. "password": "",
  139. "readOnly": false,
  140. "type": "cloudwatch",
  141. "typeLogoUrl": "public/app/plugins/datasource/cloudwatch/img/amazon-web-services.png",
  142. "url": "",
  143. "user": "",
  144. "withCredentials": false,
  145. }
  146. }
  147. dataSourceMeta={
  148. Object {
  149. "baseUrl": "path/to/plugin",
  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. Object {
  162. "name": "project",
  163. "url": "one link",
  164. },
  165. ],
  166. "logos": Object {
  167. "large": "large/logo",
  168. "small": "small/logo",
  169. },
  170. "screenshots": Array [
  171. Object {
  172. "path": "screenshot",
  173. },
  174. ],
  175. "updated": "2018-09-26",
  176. "version": "1",
  177. },
  178. "latestVersion": "1",
  179. "module": "path/to/module",
  180. "name": "pretty cool plugin 1",
  181. "pinned": false,
  182. "state": "beta",
  183. "type": "panel",
  184. }
  185. }
  186. onModelChange={[Function]}
  187. />
  188. <div
  189. className="gf-form-group"
  190. />
  191. <ButtonRow
  192. isReadOnly={false}
  193. onDelete={[Function]}
  194. onSubmit={[Function]}
  195. onTest={[Function]}
  196. />
  197. </form>
  198. </div>
  199. </PageContents>
  200. </Page>
  201. `;
  202. exports[`Render should render component 1`] = `
  203. <Page
  204. navModel={Object {}}
  205. >
  206. <PageContents
  207. isLoading={false}
  208. >
  209. <div>
  210. <form
  211. onSubmit={[Function]}
  212. >
  213. <PluginStateinfo />
  214. <BasicSettings
  215. dataSourceName="gdev-cloudwatch"
  216. isDefault={false}
  217. onDefaultChange={[Function]}
  218. onNameChange={[Function]}
  219. />
  220. <PluginSettings
  221. dataSource={
  222. Object {
  223. "access": "",
  224. "basicAuth": false,
  225. "basicAuthPassword": "",
  226. "basicAuthUser": "",
  227. "database": "",
  228. "id": 13,
  229. "isDefault": false,
  230. "jsonData": Object {
  231. "authType": "credentials",
  232. "defaultRegion": "eu-west-2",
  233. },
  234. "name": "gdev-cloudwatch",
  235. "orgId": 1,
  236. "password": "",
  237. "readOnly": false,
  238. "type": "cloudwatch",
  239. "typeLogoUrl": "public/app/plugins/datasource/cloudwatch/img/amazon-web-services.png",
  240. "url": "",
  241. "user": "",
  242. "withCredentials": false,
  243. }
  244. }
  245. dataSourceMeta={
  246. Object {
  247. "baseUrl": "path/to/plugin",
  248. "defaultNavUrl": "some/url",
  249. "enabled": false,
  250. "hasUpdate": false,
  251. "id": "1",
  252. "info": Object {
  253. "author": Object {
  254. "name": "Grafana Labs",
  255. "url": "url/to/GrafanaLabs",
  256. },
  257. "description": "pretty decent plugin",
  258. "links": Array [
  259. Object {
  260. "name": "project",
  261. "url": "one link",
  262. },
  263. ],
  264. "logos": Object {
  265. "large": "large/logo",
  266. "small": "small/logo",
  267. },
  268. "screenshots": Array [
  269. Object {
  270. "path": "screenshot",
  271. },
  272. ],
  273. "updated": "2018-09-26",
  274. "version": "1",
  275. },
  276. "latestVersion": "1",
  277. "module": "path/to/module",
  278. "name": "pretty cool plugin 1",
  279. "pinned": false,
  280. "type": "panel",
  281. }
  282. }
  283. onModelChange={[Function]}
  284. />
  285. <div
  286. className="gf-form-group"
  287. />
  288. <ButtonRow
  289. isReadOnly={false}
  290. onDelete={[Function]}
  291. onSubmit={[Function]}
  292. onTest={[Function]}
  293. />
  294. </form>
  295. </div>
  296. </PageContents>
  297. </Page>
  298. `;
  299. exports[`Render should render is ready only message 1`] = `
  300. <Page
  301. navModel={Object {}}
  302. >
  303. <PageContents
  304. isLoading={false}
  305. >
  306. <div>
  307. <form
  308. onSubmit={[Function]}
  309. >
  310. <div
  311. className="grafana-info-box span8"
  312. >
  313. This datasource was added by config and cannot be modified using the UI. Please contact your server admin to update this datasource.
  314. </div>
  315. <PluginStateinfo />
  316. <BasicSettings
  317. dataSourceName="gdev-cloudwatch"
  318. isDefault={false}
  319. onDefaultChange={[Function]}
  320. onNameChange={[Function]}
  321. />
  322. <PluginSettings
  323. dataSource={
  324. Object {
  325. "access": "",
  326. "basicAuth": false,
  327. "basicAuthPassword": "",
  328. "basicAuthUser": "",
  329. "database": "",
  330. "id": 13,
  331. "isDefault": false,
  332. "jsonData": Object {
  333. "authType": "credentials",
  334. "defaultRegion": "eu-west-2",
  335. },
  336. "name": "gdev-cloudwatch",
  337. "orgId": 1,
  338. "password": "",
  339. "readOnly": true,
  340. "type": "cloudwatch",
  341. "typeLogoUrl": "public/app/plugins/datasource/cloudwatch/img/amazon-web-services.png",
  342. "url": "",
  343. "user": "",
  344. "withCredentials": false,
  345. }
  346. }
  347. dataSourceMeta={
  348. Object {
  349. "baseUrl": "path/to/plugin",
  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": "path/to/module",
  380. "name": "pretty cool plugin 1",
  381. "pinned": false,
  382. "type": "panel",
  383. }
  384. }
  385. onModelChange={[Function]}
  386. />
  387. <div
  388. className="gf-form-group"
  389. />
  390. <ButtonRow
  391. isReadOnly={true}
  392. onDelete={[Function]}
  393. onSubmit={[Function]}
  394. onTest={[Function]}
  395. />
  396. </form>
  397. </div>
  398. </PageContents>
  399. </Page>
  400. `;
  401. exports[`Render should render loader 1`] = `
  402. <Page
  403. navModel={Object {}}
  404. >
  405. <PageContents
  406. isLoading={true}
  407. />
  408. </Page>
  409. `;