DataSourceSettings.test.tsx.snap 10 KB

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