DataSourceSettings.test.tsx.snap 11 KB

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