DataSourcesListPage.test.tsx.snap 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. // Jest Snapshot v1, https://goo.gl/fbAQLP
  2. exports[`Render should render action bar and datasources 1`] = `
  3. <div>
  4. <PageHeader
  5. model={Object {}}
  6. />
  7. <div
  8. className="page-container page-body"
  9. >
  10. <OrgActionBar
  11. key="action-bar"
  12. layoutMode="grid"
  13. linkButton={
  14. Object {
  15. "href": "datasources/new",
  16. "title": "Add data source",
  17. }
  18. }
  19. setLayoutMode={[Function]}
  20. setSearchQuery={[Function]}
  21. />
  22. <DataSourcesList
  23. dataSources={
  24. Array [
  25. Object {
  26. "access": "",
  27. "basicAuth": false,
  28. "database": "database-0",
  29. "id": 0,
  30. "isDefault": false,
  31. "jsonData": Object {
  32. "authType": "credentials",
  33. "defaultRegion": "eu-west-2",
  34. },
  35. "name": "dataSource-0",
  36. "orgId": 1,
  37. "password": "",
  38. "readOnly": false,
  39. "type": "cloudwatch",
  40. "typeLogoUrl": "public/app/plugins/datasource/cloudwatch/img/amazon-web-services.png",
  41. "url": "",
  42. "user": "",
  43. },
  44. Object {
  45. "access": "",
  46. "basicAuth": false,
  47. "database": "database-1",
  48. "id": 1,
  49. "isDefault": false,
  50. "jsonData": Object {
  51. "authType": "credentials",
  52. "defaultRegion": "eu-west-2",
  53. },
  54. "name": "dataSource-1",
  55. "orgId": 1,
  56. "password": "",
  57. "readOnly": false,
  58. "type": "cloudwatch",
  59. "typeLogoUrl": "public/app/plugins/datasource/cloudwatch/img/amazon-web-services.png",
  60. "url": "",
  61. "user": "",
  62. },
  63. Object {
  64. "access": "",
  65. "basicAuth": false,
  66. "database": "database-2",
  67. "id": 2,
  68. "isDefault": false,
  69. "jsonData": Object {
  70. "authType": "credentials",
  71. "defaultRegion": "eu-west-2",
  72. },
  73. "name": "dataSource-2",
  74. "orgId": 1,
  75. "password": "",
  76. "readOnly": false,
  77. "type": "cloudwatch",
  78. "typeLogoUrl": "public/app/plugins/datasource/cloudwatch/img/amazon-web-services.png",
  79. "url": "",
  80. "user": "",
  81. },
  82. Object {
  83. "access": "",
  84. "basicAuth": false,
  85. "database": "database-3",
  86. "id": 3,
  87. "isDefault": false,
  88. "jsonData": Object {
  89. "authType": "credentials",
  90. "defaultRegion": "eu-west-2",
  91. },
  92. "name": "dataSource-3",
  93. "orgId": 1,
  94. "password": "",
  95. "readOnly": false,
  96. "type": "cloudwatch",
  97. "typeLogoUrl": "public/app/plugins/datasource/cloudwatch/img/amazon-web-services.png",
  98. "url": "",
  99. "user": "",
  100. },
  101. Object {
  102. "access": "",
  103. "basicAuth": false,
  104. "database": "database-4",
  105. "id": 4,
  106. "isDefault": false,
  107. "jsonData": Object {
  108. "authType": "credentials",
  109. "defaultRegion": "eu-west-2",
  110. },
  111. "name": "dataSource-4",
  112. "orgId": 1,
  113. "password": "",
  114. "readOnly": false,
  115. "type": "cloudwatch",
  116. "typeLogoUrl": "public/app/plugins/datasource/cloudwatch/img/amazon-web-services.png",
  117. "url": "",
  118. "user": "",
  119. },
  120. Object {
  121. "access": "",
  122. "basicAuth": false,
  123. "database": "database-5",
  124. "id": 5,
  125. "isDefault": false,
  126. "jsonData": Object {
  127. "authType": "credentials",
  128. "defaultRegion": "eu-west-2",
  129. },
  130. "name": "dataSource-5",
  131. "orgId": 1,
  132. "password": "",
  133. "readOnly": false,
  134. "type": "cloudwatch",
  135. "typeLogoUrl": "public/app/plugins/datasource/cloudwatch/img/amazon-web-services.png",
  136. "url": "",
  137. "user": "",
  138. },
  139. ]
  140. }
  141. key="list"
  142. layoutMode="grid"
  143. />
  144. </div>
  145. </div>
  146. `;
  147. exports[`Render should render component 1`] = `
  148. <div>
  149. <PageHeader
  150. model={Object {}}
  151. />
  152. <div
  153. className="page-container page-body"
  154. >
  155. <EmptyListCTA
  156. model={
  157. Object {
  158. "buttonIcon": "gicon gicon-add-datasources",
  159. "buttonLink": "datasources/new",
  160. "buttonTitle": "Add data source",
  161. "proTip": "You can also define data sources through configuration files.",
  162. "proTipLink": "http://docs.grafana.org/administration/provisioning/#datasources?utm_source=grafana_ds_list",
  163. "proTipLinkTitle": "Learn more",
  164. "proTipTarget": "_blank",
  165. "title": "There are no data sources defined yet",
  166. }
  167. }
  168. />
  169. </div>
  170. </div>
  171. `;