DataSourceSettingsPage.test.tsx.snap 12 KB

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