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. <div
  14. className="grafana-info-box"
  15. >
  16. This plugin is marked as being in alpha state, which means it is in early development phase and updates will include breaking changes.
  17. </div>
  18. <BasicSettings
  19. dataSourceName="gdev-cloudwatch"
  20. isDefault={false}
  21. onDefaultChange={[Function]}
  22. onNameChange={[Function]}
  23. />
  24. <PluginSettings
  25. dataSource={
  26. Object {
  27. "access": "",
  28. "basicAuth": false,
  29. "basicAuthPassword": "",
  30. "basicAuthUser": "",
  31. "database": "",
  32. "id": 13,
  33. "isDefault": false,
  34. "jsonData": Object {
  35. "authType": "credentials",
  36. "defaultRegion": "eu-west-2",
  37. },
  38. "name": "gdev-cloudwatch",
  39. "orgId": 1,
  40. "password": "",
  41. "readOnly": false,
  42. "type": "cloudwatch",
  43. "typeLogoUrl": "public/app/plugins/datasource/cloudwatch/img/amazon-web-services.png",
  44. "url": "",
  45. "user": "",
  46. "withCredentials": false,
  47. }
  48. }
  49. dataSourceMeta={
  50. Object {
  51. "defaultNavUrl": "some/url",
  52. "enabled": false,
  53. "hasUpdate": false,
  54. "id": "1",
  55. "info": Object {
  56. "author": Object {
  57. "name": "Grafana Labs",
  58. "url": "url/to/GrafanaLabs",
  59. },
  60. "description": "pretty decent plugin",
  61. "links": Array [
  62. Object {
  63. "name": "project",
  64. "url": "one link",
  65. },
  66. ],
  67. "logos": Object {
  68. "large": "large/logo",
  69. "small": "small/logo",
  70. },
  71. "screenshots": Array [
  72. Object {
  73. "path": "screenshot",
  74. },
  75. ],
  76. "updated": "2018-09-26",
  77. "version": "1",
  78. },
  79. "latestVersion": "1",
  80. "module": Object {},
  81. "name": "pretty cool plugin 1",
  82. "pinned": false,
  83. "state": "alpha",
  84. "type": "",
  85. }
  86. }
  87. onModelChange={[Function]}
  88. />
  89. <div
  90. className="gf-form-group"
  91. />
  92. <ButtonRow
  93. isReadOnly={false}
  94. onDelete={[Function]}
  95. onSubmit={[Function]}
  96. onTest={[Function]}
  97. />
  98. </form>
  99. </div>
  100. </PageContents>
  101. </Page>
  102. `;
  103. exports[`Render should render beta info text 1`] = `
  104. <Page
  105. navModel={Object {}}
  106. >
  107. <PageContents
  108. isLoading={false}
  109. >
  110. <div>
  111. <form
  112. onSubmit={[Function]}
  113. >
  114. <div
  115. className="grafana-info-box"
  116. >
  117. 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.
  118. </div>
  119. <BasicSettings
  120. dataSourceName="gdev-cloudwatch"
  121. isDefault={false}
  122. onDefaultChange={[Function]}
  123. onNameChange={[Function]}
  124. />
  125. <PluginSettings
  126. dataSource={
  127. Object {
  128. "access": "",
  129. "basicAuth": false,
  130. "basicAuthPassword": "",
  131. "basicAuthUser": "",
  132. "database": "",
  133. "id": 13,
  134. "isDefault": false,
  135. "jsonData": Object {
  136. "authType": "credentials",
  137. "defaultRegion": "eu-west-2",
  138. },
  139. "name": "gdev-cloudwatch",
  140. "orgId": 1,
  141. "password": "",
  142. "readOnly": false,
  143. "type": "cloudwatch",
  144. "typeLogoUrl": "public/app/plugins/datasource/cloudwatch/img/amazon-web-services.png",
  145. "url": "",
  146. "user": "",
  147. "withCredentials": false,
  148. }
  149. }
  150. dataSourceMeta={
  151. Object {
  152. "defaultNavUrl": "some/url",
  153. "enabled": false,
  154. "hasUpdate": false,
  155. "id": "1",
  156. "info": Object {
  157. "author": Object {
  158. "name": "Grafana Labs",
  159. "url": "url/to/GrafanaLabs",
  160. },
  161. "description": "pretty decent plugin",
  162. "links": Array [
  163. Object {
  164. "name": "project",
  165. "url": "one link",
  166. },
  167. ],
  168. "logos": Object {
  169. "large": "large/logo",
  170. "small": "small/logo",
  171. },
  172. "screenshots": Array [
  173. Object {
  174. "path": "screenshot",
  175. },
  176. ],
  177. "updated": "2018-09-26",
  178. "version": "1",
  179. },
  180. "latestVersion": "1",
  181. "module": Object {},
  182. "name": "pretty cool plugin 1",
  183. "pinned": false,
  184. "state": "beta",
  185. "type": "",
  186. }
  187. }
  188. onModelChange={[Function]}
  189. />
  190. <div
  191. className="gf-form-group"
  192. />
  193. <ButtonRow
  194. isReadOnly={false}
  195. onDelete={[Function]}
  196. onSubmit={[Function]}
  197. onTest={[Function]}
  198. />
  199. </form>
  200. </div>
  201. </PageContents>
  202. </Page>
  203. `;
  204. exports[`Render should render component 1`] = `
  205. <Page
  206. navModel={Object {}}
  207. >
  208. <PageContents
  209. isLoading={false}
  210. >
  211. <div>
  212. <form
  213. onSubmit={[Function]}
  214. >
  215. <BasicSettings
  216. dataSourceName="gdev-cloudwatch"
  217. isDefault={false}
  218. onDefaultChange={[Function]}
  219. onNameChange={[Function]}
  220. />
  221. <PluginSettings
  222. dataSource={
  223. Object {
  224. "access": "",
  225. "basicAuth": false,
  226. "basicAuthPassword": "",
  227. "basicAuthUser": "",
  228. "database": "",
  229. "id": 13,
  230. "isDefault": false,
  231. "jsonData": Object {
  232. "authType": "credentials",
  233. "defaultRegion": "eu-west-2",
  234. },
  235. "name": "gdev-cloudwatch",
  236. "orgId": 1,
  237. "password": "",
  238. "readOnly": false,
  239. "type": "cloudwatch",
  240. "typeLogoUrl": "public/app/plugins/datasource/cloudwatch/img/amazon-web-services.png",
  241. "url": "",
  242. "user": "",
  243. "withCredentials": false,
  244. }
  245. }
  246. dataSourceMeta={
  247. Object {
  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": Object {},
  278. "name": "pretty cool plugin 1",
  279. "pinned": false,
  280. "state": "",
  281. "type": "",
  282. }
  283. }
  284. onModelChange={[Function]}
  285. />
  286. <div
  287. className="gf-form-group"
  288. />
  289. <ButtonRow
  290. isReadOnly={false}
  291. onDelete={[Function]}
  292. onSubmit={[Function]}
  293. onTest={[Function]}
  294. />
  295. </form>
  296. </div>
  297. </PageContents>
  298. </Page>
  299. `;
  300. exports[`Render should render is ready only message 1`] = `
  301. <Page
  302. navModel={Object {}}
  303. >
  304. <PageContents
  305. isLoading={false}
  306. >
  307. <div>
  308. <form
  309. onSubmit={[Function]}
  310. >
  311. <div
  312. className="grafana-info-box span8"
  313. >
  314. This datasource was added by config and cannot be modified using the UI. Please contact your server admin to update this datasource.
  315. </div>
  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. "defaultNavUrl": "some/url",
  350. "enabled": false,
  351. "hasUpdate": false,
  352. "id": "1",
  353. "info": Object {
  354. "author": Object {
  355. "name": "Grafana Labs",
  356. "url": "url/to/GrafanaLabs",
  357. },
  358. "description": "pretty decent plugin",
  359. "links": Array [
  360. Object {
  361. "name": "project",
  362. "url": "one link",
  363. },
  364. ],
  365. "logos": Object {
  366. "large": "large/logo",
  367. "small": "small/logo",
  368. },
  369. "screenshots": Array [
  370. Object {
  371. "path": "screenshot",
  372. },
  373. ],
  374. "updated": "2018-09-26",
  375. "version": "1",
  376. },
  377. "latestVersion": "1",
  378. "module": Object {},
  379. "name": "pretty cool plugin 1",
  380. "pinned": false,
  381. "state": "",
  382. "type": "",
  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. `;