DataSourceSettingsPage.test.tsx.snap 12 KB

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