DataSourceSettingsPage.test.tsx.snap 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319
  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. <div
  155. className="gf-form-group"
  156. />
  157. <ButtonRow
  158. isReadOnly={false}
  159. onDelete={[Function]}
  160. onSubmit={[Function]}
  161. onTest={[Function]}
  162. />
  163. </form>
  164. </div>
  165. </PageContents>
  166. </Page>
  167. `;
  168. exports[`Render should render component 1`] = `
  169. <Page
  170. navModel={Object {}}
  171. >
  172. <PageContents
  173. isLoading={false}
  174. >
  175. <div>
  176. <form
  177. onSubmit={[Function]}
  178. >
  179. <BasicSettings
  180. dataSourceName="gdev-cloudwatch"
  181. isDefault={false}
  182. onDefaultChange={[Function]}
  183. onNameChange={[Function]}
  184. />
  185. <div
  186. className="gf-form-group"
  187. />
  188. <ButtonRow
  189. isReadOnly={false}
  190. onDelete={[Function]}
  191. onSubmit={[Function]}
  192. onTest={[Function]}
  193. />
  194. </form>
  195. </div>
  196. </PageContents>
  197. </Page>
  198. `;
  199. exports[`Render should render is ready only message 1`] = `
  200. <Page
  201. navModel={Object {}}
  202. >
  203. <PageContents
  204. isLoading={false}
  205. >
  206. <div>
  207. <form
  208. onSubmit={[Function]}
  209. >
  210. <div
  211. className="grafana-info-box span8"
  212. >
  213. This datasource was added by config and cannot be modified using the UI. Please contact your server admin to update this datasource.
  214. </div>
  215. <BasicSettings
  216. dataSourceName="gdev-cloudwatch"
  217. isDefault={false}
  218. onDefaultChange={[Function]}
  219. onNameChange={[Function]}
  220. />
  221. <PluginSettings
  222. dataSource={
  223. Object {
  224. "access": "",
  225. "basicAuth": false,
  226. "basicAuthPassword": "",
  227. "basicAuthUser": "",
  228. "database": "",
  229. "id": 13,
  230. "isDefault": false,
  231. "jsonData": Object {
  232. "authType": "credentials",
  233. "defaultRegion": "eu-west-2",
  234. },
  235. "name": "gdev-cloudwatch",
  236. "orgId": 1,
  237. "password": "",
  238. "readOnly": true,
  239. "type": "cloudwatch",
  240. "typeLogoUrl": "public/app/plugins/datasource/cloudwatch/img/amazon-web-services.png",
  241. "url": "",
  242. "user": "",
  243. "withCredentials": false,
  244. }
  245. }
  246. dataSourceMeta={
  247. Object {
  248. "baseUrl": "path/to/plugin",
  249. "defaultNavUrl": "some/url",
  250. "enabled": false,
  251. "hasUpdate": false,
  252. "id": "1",
  253. "info": Object {
  254. "author": Object {
  255. "name": "Grafana Labs",
  256. "url": "url/to/GrafanaLabs",
  257. },
  258. "description": "pretty decent plugin",
  259. "links": Array [
  260. Object {
  261. "name": "project",
  262. "url": "one link",
  263. },
  264. ],
  265. "logos": Object {
  266. "large": "large/logo",
  267. "small": "small/logo",
  268. },
  269. "screenshots": Array [
  270. Object {
  271. "path": "screenshot",
  272. },
  273. ],
  274. "updated": "2018-09-26",
  275. "version": "1",
  276. },
  277. "latestVersion": "1",
  278. "module": "path/to/module",
  279. "name": "pretty cool plugin 1",
  280. "pinned": false,
  281. "type": "panel",
  282. }
  283. }
  284. onModelChange={[Function]}
  285. plugin={
  286. DataSourcePlugin {
  287. "DataSourceClass": Object {},
  288. "components": Object {},
  289. }
  290. }
  291. />
  292. <div
  293. className="gf-form-group"
  294. />
  295. <ButtonRow
  296. isReadOnly={true}
  297. onDelete={[Function]}
  298. onSubmit={[Function]}
  299. onTest={[Function]}
  300. />
  301. </form>
  302. </div>
  303. </PageContents>
  304. </Page>
  305. `;
  306. exports[`Render should render loader 1`] = `
  307. <Page
  308. navModel={Object {}}
  309. >
  310. <PageContents
  311. isLoading={true}
  312. />
  313. </Page>
  314. `;