DataSourceSettingsPage.test.tsx.snap 12 KB

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