katello 4.11.1 → 4.12.0.rc2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of katello might be problematic. Click here for more details.

Files changed (311) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/katello/common/katello.global.js +1 -1
  3. data/app/assets/javascripts/katello/locale/bn/katello.js +76 -85
  4. data/app/assets/javascripts/katello/locale/bn_IN/katello.js +76 -85
  5. data/app/assets/javascripts/katello/locale/ca/katello.js +80 -86
  6. data/app/assets/javascripts/katello/locale/cs/katello.js +79 -85
  7. data/app/assets/javascripts/katello/locale/cs_CZ/katello.js +91 -88
  8. data/app/assets/javascripts/katello/locale/de/katello.js +97 -94
  9. data/app/assets/javascripts/katello/locale/de_AT/katello.js +76 -85
  10. data/app/assets/javascripts/katello/locale/de_DE/katello.js +76 -85
  11. data/app/assets/javascripts/katello/locale/el/katello.js +86 -86
  12. data/app/assets/javascripts/katello/locale/en/katello.js +76 -85
  13. data/app/assets/javascripts/katello/locale/en_GB/katello.js +88 -85
  14. data/app/assets/javascripts/katello/locale/en_US/katello.js +76 -85
  15. data/app/assets/javascripts/katello/locale/es/katello.js +94 -94
  16. data/app/assets/javascripts/katello/locale/et_EE/katello.js +76 -85
  17. data/app/assets/javascripts/katello/locale/fr/katello.js +97 -94
  18. data/app/assets/javascripts/katello/locale/gl/katello.js +80 -86
  19. data/app/assets/javascripts/katello/locale/gu/katello.js +76 -85
  20. data/app/assets/javascripts/katello/locale/he_IL/katello.js +76 -85
  21. data/app/assets/javascripts/katello/locale/hi/katello.js +76 -85
  22. data/app/assets/javascripts/katello/locale/id/katello.js +76 -85
  23. data/app/assets/javascripts/katello/locale/it/katello.js +89 -86
  24. data/app/assets/javascripts/katello/locale/ja/katello.js +97 -94
  25. data/app/assets/javascripts/katello/locale/ka/katello.js +92 -92
  26. data/app/assets/javascripts/katello/locale/kn/katello.js +76 -85
  27. data/app/assets/javascripts/katello/locale/ko/katello.js +91 -94
  28. data/app/assets/javascripts/katello/locale/locale/katello.js +1051 -1048
  29. data/app/assets/javascripts/katello/locale/ml_IN/katello.js +76 -85
  30. data/app/assets/javascripts/katello/locale/mr/katello.js +76 -85
  31. data/app/assets/javascripts/katello/locale/nl_NL/katello.js +76 -85
  32. data/app/assets/javascripts/katello/locale/or/katello.js +76 -85
  33. data/app/assets/javascripts/katello/locale/pa/katello.js +76 -85
  34. data/app/assets/javascripts/katello/locale/pl/katello.js +76 -85
  35. data/app/assets/javascripts/katello/locale/pl_PL/katello.js +76 -85
  36. data/app/assets/javascripts/katello/locale/pt/katello.js +76 -85
  37. data/app/assets/javascripts/katello/locale/pt_BR/katello.js +94 -94
  38. data/app/assets/javascripts/katello/locale/ro/katello.js +76 -85
  39. data/app/assets/javascripts/katello/locale/ro_RO/katello.js +76 -85
  40. data/app/assets/javascripts/katello/locale/ru/katello.js +91 -94
  41. data/app/assets/javascripts/katello/locale/sl/katello.js +76 -85
  42. data/app/assets/javascripts/katello/locale/sv_SE/katello.js +80 -86
  43. data/app/assets/javascripts/katello/locale/ta/katello.js +76 -85
  44. data/app/assets/javascripts/katello/locale/ta_IN/katello.js +76 -85
  45. data/app/assets/javascripts/katello/locale/te/katello.js +76 -85
  46. data/app/assets/javascripts/katello/locale/tr/katello.js +76 -85
  47. data/app/assets/javascripts/katello/locale/vi/katello.js +76 -85
  48. data/app/assets/javascripts/katello/locale/vi_VN/katello.js +76 -85
  49. data/app/assets/javascripts/katello/locale/zh/katello.js +76 -85
  50. data/app/assets/javascripts/katello/locale/zh_CN/katello.js +97 -94
  51. data/app/assets/javascripts/katello/locale/zh_TW/katello.js +91 -94
  52. data/app/assets/javascripts/katello/sync_management/index.js +0 -1
  53. data/app/assets/javascripts/katello/sync_management/sync_management.js +365 -308
  54. data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +1 -0
  55. data/app/controllers/katello/api/v2/content_views_controller.rb +1 -1
  56. data/app/controllers/katello/api/v2/debs_controller.rb +4 -0
  57. data/app/controllers/katello/api/v2/host_debs_controller.rb +13 -1
  58. data/app/controllers/katello/api/v2/host_subscriptions_controller.rb +13 -0
  59. data/app/controllers/katello/api/v2/organizations_controller.rb +1 -3
  60. data/app/controllers/katello/api/v2/repositories_controller.rb +2 -8
  61. data/app/controllers/katello/concerns/api/v2/registration_commands_controller_extensions.rb +0 -1
  62. data/app/controllers/katello/concerns/hosts_controller_extensions.rb +7 -3
  63. data/app/controllers/katello/concerns/organizations_controller_extensions.rb +1 -17
  64. data/app/helpers/katello/concerns/dashboard_helper_extensions.rb +0 -20
  65. data/app/lib/actions/katello/capsule_content/sync.rb +1 -1
  66. data/app/lib/actions/katello/content_view/promote.rb +1 -1
  67. data/app/lib/actions/katello/content_view/publish.rb +4 -4
  68. data/app/lib/actions/katello/content_view_version/auto_create_products.rb +4 -4
  69. data/app/lib/actions/katello/content_view_version/auto_create_redhat_repositories.rb +5 -5
  70. data/app/lib/actions/katello/content_view_version/auto_create_repositories.rb +5 -5
  71. data/app/lib/actions/katello/content_view_version/import.rb +14 -13
  72. data/app/lib/actions/katello/content_view_version/import_library.rb +4 -4
  73. data/app/lib/actions/katello/content_view_version/import_repository.rb +3 -3
  74. data/app/lib/actions/katello/content_view_version/reset_content_view_repositories_from_metadata.rb +2 -2
  75. data/app/lib/actions/katello/host/hypervisors_update.rb +0 -1
  76. data/app/lib/actions/katello/organization/manifest_delete.rb +1 -1
  77. data/app/lib/actions/katello/organization/manifest_refresh.rb +16 -16
  78. data/app/lib/actions/katello/repository/sync.rb +3 -5
  79. data/app/lib/actions/pulp3/orchestration/content_view_version/export.rb +20 -15
  80. data/app/lib/actions/pulp3/orchestration/content_view_version/export_library.rb +17 -14
  81. data/app/lib/actions/pulp3/orchestration/content_view_version/import.rb +11 -11
  82. data/app/lib/actions/pulp3/orchestration/repository/upload_content.rb +18 -13
  83. data/app/lib/actions/pulp3/repository/import_upload.rb +13 -5
  84. data/app/lib/actions/pulp3/repository/save_artifact.rb +23 -12
  85. data/app/lib/katello/api/v2/error_handling.rb +1 -1
  86. data/app/lib/katello/lazy_accessor.rb +6 -6
  87. data/app/lib/katello/resources/candlepin/owner.rb +2 -2
  88. data/app/mailers/katello/errata_mailer.rb +3 -3
  89. data/app/models/katello/concerns/host_managed_extensions.rb +74 -94
  90. data/app/models/katello/concerns/hostgroup_extensions.rb +9 -2
  91. data/app/models/katello/concerns/organization_extensions.rb +1 -1
  92. data/app/models/katello/concerns/pulp_database_unit.rb +1 -1
  93. data/app/models/katello/concerns/subscription_facet_host_extensions.rb +0 -27
  94. data/app/models/katello/content_view.rb +34 -47
  95. data/app/models/katello/content_view_version.rb +2 -0
  96. data/app/models/katello/deb.rb +8 -0
  97. data/app/models/katello/host/content_facet.rb +19 -14
  98. data/app/models/katello/host/subscription_facet.rb +0 -19
  99. data/app/models/katello/host_tracer.rb +9 -5
  100. data/app/models/katello/installed_deb.rb +13 -0
  101. data/app/models/katello/repository.rb +7 -2
  102. data/app/models/katello/trace_status.rb +6 -2
  103. data/app/overrides/add_organization_attributes.rb +0 -18
  104. data/app/presenters/katello/host_deb_presenter.rb +23 -0
  105. data/app/services/katello/candlepin/consumer.rb +0 -4
  106. data/app/services/katello/candlepin/event_handler.rb +6 -25
  107. data/app/services/katello/candlepin/message_handler.rb +1 -21
  108. data/app/services/katello/host/profiles_uploader.rb +17 -6
  109. data/app/services/katello/host_status_manager.rb +0 -22
  110. data/app/services/katello/organization_creator.rb +2 -2
  111. data/app/services/katello/pulp3/api/apt.rb +1 -1
  112. data/app/services/katello/pulp3/content_view_version/export.rb +2 -2
  113. data/app/services/katello/pulp3/content_view_version/metadata_generator.rb +1 -0
  114. data/app/services/katello/pulp3/content_view_version/metadata_map.rb +3 -0
  115. data/app/services/katello/pulp3/repository/apt.rb +16 -6
  116. data/app/services/katello/registration_manager.rb +1 -13
  117. data/app/views/katello/api/v2/content_views/base.json.rabl +0 -1
  118. data/app/views/katello/api/v2/content_views/show.json.rabl +1 -0
  119. data/app/views/katello/api/v2/host_debs/base.json.rabl +2 -0
  120. data/app/views/katello/api/v2/hosts/base.json.rabl +9 -0
  121. data/app/views/katello/api/v2/subscription_facet/base_with_root.json.rabl +0 -3
  122. data/app/views/katello/api/v2/subscription_facet/show.json.rabl +3 -0
  123. data/app/views/katello/sync_management/index.html.erb +14 -13
  124. data/app/views/overrides/activation_keys/_host_environment_select.html.erb +20 -16
  125. data/app/views/overrides/activation_keys/_host_synced_content_select.html.erb +7 -5
  126. data/app/views/overrides/organizations/_edit_override.html.erb +0 -12
  127. data/db/migrate/20131014225132_add_users_fields.rb +0 -1
  128. data/db/migrate/20150603045418_remove_user_fields.rb +0 -2
  129. data/db/migrate/20160404132250_remove_katello_from_notification_name.rb +4 -22
  130. data/db/migrate/20160505181337_rename_katello_settings.rb +2 -2
  131. data/db/migrate/20200818192230_update_system_purpose_status.rb +9 -3
  132. data/db/migrate/20240111032511_add_index_to_host_installed_packages.rb +16 -0
  133. data/db/migrate/20240123120109_remove_pulp_export_destination_setting.rb +9 -0
  134. data/db/migrate/20240207191223_remove_entitlement_mode_host_statuses.rb +30 -0
  135. data/db/seeds.d/111-upgrade_tasks.rb +2 -1
  136. data/engines/bastion/app/assets/javascripts/bastion/bastion.js +0 -2
  137. data/engines/bastion/app/views/bastion/layouts/assets.html.erb +6 -2
  138. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-repository-sets.controller.js +3 -1
  139. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-associations-content-hosts.html +2 -6
  140. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-details.html +0 -1
  141. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/bastion-katello-bootstrap.js +45 -29
  142. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts-helper.service.js +0 -10
  143. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-details.controller.js +0 -1
  144. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-info.html +2 -21
  145. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-subscriptions.html +0 -5
  146. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/content-hosts.html +0 -7
  147. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/views/erratum-content-hosts.html +2 -2
  148. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/views/host-collection-add-hosts.html +2 -2
  149. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/views/host-collection-hosts-list.html +2 -2
  150. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/bastion_katello.pot +5 -5
  151. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html +9 -1
  152. data/engines/bastion_katello/lib/bastion_katello/engine.rb +0 -6
  153. data/lib/katello/engine.rb +0 -3
  154. data/lib/katello/plugin.rb +3 -12
  155. data/lib/katello/tasks/rubocop.rake +0 -9
  156. data/lib/katello/tasks/unify_hosts.rake +0 -1
  157. data/lib/katello/tasks/upgrades/4.12/update_content_access_modes.rake +35 -0
  158. data/lib/katello/version.rb +1 -1
  159. data/locale/action_names.rb +12 -6
  160. data/locale/bn/katello.po +19 -28
  161. data/locale/bn_IN/katello.po +19 -28
  162. data/locale/ca/LC_MESSAGES/katello.mo +0 -0
  163. data/locale/ca/katello.po +20 -29
  164. data/locale/cs/katello.po +19 -29
  165. data/locale/cs_CZ/LC_MESSAGES/katello.mo +0 -0
  166. data/locale/cs_CZ/katello.po +20 -29
  167. data/locale/de/LC_MESSAGES/katello.mo +0 -0
  168. data/locale/de/katello.po +20 -29
  169. data/locale/de_AT/katello.po +19 -28
  170. data/locale/de_DE/katello.po +19 -28
  171. data/locale/el/LC_MESSAGES/katello.mo +0 -0
  172. data/locale/el/katello.po +20 -29
  173. data/locale/en/katello.po +19 -28
  174. data/locale/en_GB/LC_MESSAGES/katello.mo +0 -0
  175. data/locale/en_GB/katello.po +19 -28
  176. data/locale/en_US/katello.po +19 -28
  177. data/locale/es/LC_MESSAGES/katello.mo +0 -0
  178. data/locale/es/katello.po +20 -29
  179. data/locale/et_EE/katello.po +19 -28
  180. data/locale/fr/LC_MESSAGES/katello.mo +0 -0
  181. data/locale/fr/katello.po +20 -29
  182. data/locale/gl/LC_MESSAGES/katello.mo +0 -0
  183. data/locale/gl/katello.po +20 -29
  184. data/locale/gu/katello.po +19 -28
  185. data/locale/he_IL/katello.po +19 -28
  186. data/locale/hi/katello.po +19 -28
  187. data/locale/id/katello.po +19 -28
  188. data/locale/it/LC_MESSAGES/katello.mo +0 -0
  189. data/locale/it/katello.po +20 -29
  190. data/locale/ja/LC_MESSAGES/katello.mo +0 -0
  191. data/locale/ja/katello.po +20 -29
  192. data/locale/ka/LC_MESSAGES/katello.mo +0 -0
  193. data/locale/ka/katello.po +20 -29
  194. data/locale/katello.pot +363 -348
  195. data/locale/kn/katello.po +19 -28
  196. data/locale/ko/LC_MESSAGES/katello.mo +0 -0
  197. data/locale/ko/katello.po +20 -29
  198. data/locale/ml_IN/katello.po +19 -28
  199. data/locale/mr/katello.po +19 -28
  200. data/locale/nl_NL/katello.po +19 -28
  201. data/locale/or/katello.po +19 -28
  202. data/locale/pa/katello.po +19 -28
  203. data/locale/pl/katello.po +19 -28
  204. data/locale/pl_PL/katello.po +19 -28
  205. data/locale/pt/katello.po +19 -28
  206. data/locale/pt_BR/LC_MESSAGES/katello.mo +0 -0
  207. data/locale/pt_BR/katello.po +20 -29
  208. data/locale/ro/katello.po +19 -28
  209. data/locale/ro_RO/katello.po +19 -28
  210. data/locale/ru/LC_MESSAGES/katello.mo +0 -0
  211. data/locale/ru/katello.po +20 -29
  212. data/locale/sl/katello.po +19 -28
  213. data/locale/sv_SE/LC_MESSAGES/katello.mo +0 -0
  214. data/locale/sv_SE/katello.po +20 -29
  215. data/locale/ta/katello.po +19 -28
  216. data/locale/ta_IN/katello.po +19 -28
  217. data/locale/te/katello.po +19 -28
  218. data/locale/tr/katello.po +19 -28
  219. data/locale/vi/katello.po +19 -28
  220. data/locale/vi_VN/katello.po +19 -28
  221. data/locale/zh/katello.po +19 -28
  222. data/locale/zh_CN/LC_MESSAGES/katello.mo +0 -0
  223. data/locale/zh_CN/katello.po +20 -29
  224. data/locale/zh_TW/LC_MESSAGES/katello.mo +0 -0
  225. data/locale/zh_TW/katello.po +20 -29
  226. data/package.json +0 -1
  227. data/webpack/components/extensions/HostDetails/Tabs/ContentTab/SecondaryTabsRoutes.js +4 -0
  228. data/webpack/components/extensions/HostDetails/Tabs/ContentTab/constants.js +4 -1
  229. data/webpack/components/extensions/HostDetails/Tabs/DebsTab/DebInstallModal.js +250 -0
  230. data/webpack/components/extensions/HostDetails/Tabs/DebsTab/DebInstallModal.scss +3 -0
  231. data/webpack/components/extensions/HostDetails/Tabs/DebsTab/DebsTab.js +585 -0
  232. data/webpack/components/extensions/HostDetails/Tabs/DebsTab/DebsTab.scss +12 -0
  233. data/webpack/components/extensions/HostDetails/Tabs/DebsTab/HostDebsActions.js +13 -0
  234. data/webpack/components/extensions/HostDetails/Tabs/DebsTab/HostDebsConstants.js +13 -0
  235. data/webpack/components/extensions/HostDetails/Tabs/DebsTab/HostDebsSelectors.js +16 -0
  236. data/webpack/components/extensions/HostDetails/Tabs/DebsTab/InstallableDebsActions.js +17 -0
  237. data/webpack/components/extensions/HostDetails/Tabs/DebsTab/InstallableDebsConstants.js +3 -0
  238. data/webpack/components/extensions/HostDetails/Tabs/DebsTab/InstallableDebsSelectors.js +16 -0
  239. data/webpack/components/extensions/HostDetails/Tabs/ModuleStreamsTab/ModuleStreamsTab.js +1 -8
  240. data/webpack/components/extensions/HostDetails/Tabs/PackagesTab/PackagesTab.js +2 -0
  241. data/webpack/components/extensions/HostDetails/Tabs/RepositorySetsTab/RepositorySetsActions.js +2 -0
  242. data/webpack/components/extensions/HostDetails/Tabs/RepositorySetsTab/RepositorySetsTab.js +6 -19
  243. data/webpack/components/extensions/HostDetails/Tabs/TracesTab/TracesTab.js +13 -5
  244. data/webpack/components/extensions/HostDetails/Tabs/__tests__/debs.fixtures.json +31 -0
  245. data/webpack/components/extensions/HostDetails/Tabs/__tests__/debsInstallModal.test.js +226 -0
  246. data/webpack/components/extensions/HostDetails/Tabs/__tests__/debsTab.test.js +420 -0
  247. data/webpack/components/extensions/HostDetails/Tabs/__tests__/installableDebs.fixtures.json +63 -0
  248. data/webpack/components/extensions/HostDetails/Tabs/__tests__/repositorySetsTab.test.js +34 -5
  249. data/webpack/components/extensions/HostDetails/Tabs/__tests__/traces.fixtures.json +11 -1
  250. data/webpack/components/extensions/HostDetails/Tabs/__tests__/tracesTab.test.js +63 -3
  251. data/webpack/scenes/ContentViews/ContentViewsConstants.js +3 -0
  252. data/webpack/scenes/ContentViews/Delete/__tests__/affectedHosts.fixtures.json +0 -13
  253. data/webpack/scenes/ContentViews/Details/ContentViewDetailActions.js +23 -1
  254. data/webpack/scenes/ContentViews/Details/ContentViewDetailSelectors.js +19 -1
  255. data/webpack/scenes/ContentViews/Details/Versions/BulkDelete/__tests__/hosts.fixtures.json +0 -13
  256. data/webpack/scenes/ContentViews/Details/Versions/Compare/CVVersionCompareConfig.js +37 -3
  257. data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersionContent.js +10 -2
  258. data/webpack/scenes/ContentViews/Details/Versions/Delete/__tests__/cvAffectedHosts.fixture.json +0 -13
  259. data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionDetailConfig.js +31 -5
  260. data/webpack/scenes/Organizations/OrganizationSelectors.js +0 -3
  261. data/webpack/scenes/Subscriptions/Manifest/index.js +1 -4
  262. data/webpack/scenes/Subscriptions/SubscriptionsPage.js +3 -25
  263. data/webpack/scenes/Subscriptions/SubscriptionsSelectors.js +0 -3
  264. data/webpack/scenes/Subscriptions/__tests__/SubscriptionsSelectors.test.js +0 -3
  265. data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsPage.test.js.snap +0 -22
  266. data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsSelectors.test.js.snap +0 -3
  267. data/webpack/scenes/Subscriptions/index.js +1 -2
  268. metadata +48 -195
  269. data/app/controllers/katello/concerns/content_facet_hosts_controller_extensions.rb +0 -22
  270. data/app/models/katello/concerns/widget_extensions.rb +0 -23
  271. data/app/models/katello/purpose_addons_status.rb +0 -28
  272. data/app/models/katello/purpose_role_status.rb +0 -28
  273. data/app/models/katello/purpose_sla_status.rb +0 -28
  274. data/app/models/katello/purpose_status.rb +0 -71
  275. data/app/models/katello/purpose_usage_status.rb +0 -28
  276. data/app/models/katello/subscription_status.rb +0 -71
  277. data/app/services/katello/candlepin/system_purpose.rb +0 -49
  278. data/app/views/dashboard/_subscription_status_widget.html.erb +0 -37
  279. data/app/views/dashboard/_subscription_widget.html.erb +0 -85
  280. data/app/views/overrides/organizations/_index_header_override.html.erb +0 -3
  281. data/app/views/overrides/organizations/_index_row_override.html.erb +0 -3
  282. data/app/views/overrides/organizations/_step_1_override.html.erb +0 -10
  283. data/config/locales/README +0 -10
  284. data/config/locales/bn.yml +0 -182
  285. data/config/locales/compare_upstream.sh +0 -21
  286. data/config/locales/cs.yml +0 -211
  287. data/config/locales/de.yml +0 -203
  288. data/config/locales/en.yml +0 -205
  289. data/config/locales/es.yml +0 -199
  290. data/config/locales/fr.yml +0 -222
  291. data/config/locales/gu.yml +0 -181
  292. data/config/locales/hi.yml +0 -199
  293. data/config/locales/it.yml +0 -205
  294. data/config/locales/ja.yml +0 -197
  295. data/config/locales/kn.yml +0 -199
  296. data/config/locales/ko.yml +0 -197
  297. data/config/locales/mr.yml +0 -178
  298. data/config/locales/or.yml +0 -181
  299. data/config/locales/pa.yml +0 -181
  300. data/config/locales/pt-BR.yml +0 -207
  301. data/config/locales/pt.yml +0 -207
  302. data/config/locales/ru.yml +0 -257
  303. data/config/locales/ta.yml +0 -181
  304. data/config/locales/te.yml +0 -181
  305. data/config/locales/update.sh +0 -14
  306. data/config/locales/zh-CN.yml +0 -199
  307. data/config/locales/zh-TW.yml +0 -199
  308. data/engines/bastion/app/assets/javascripts/bastion/bastion-bootstrap.js +0 -17
  309. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/content-access-mode-banner.directive.js +0 -22
  310. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/views/content-access-mode-banner.html +0 -10
  311. data/webpack/scenes/Subscriptions/Manifest/SimpleContentAccess.js +0 -96
@@ -1,343 +1,400 @@
1
- $(document).ready(function() {
2
- // Setup initial state
1
+ KT.content = (function () {
2
+ var draw_syncing = function (repo_id, progress, task_id) {
3
+ var element = $("#repo-" + repo_id).find(".result"),
4
+ cancelButton = $("<a/>").attr("class", "cancel_sync").text(katelloI18n.cancel),
5
+ progressBar = $("<a/>").attr("class", "progress").text(" ");
3
6
 
4
- var ids = [];
5
- $.each(KT.repo_status, function(repo_id, status){
6
- if (status.is_running) {
7
- ids.push(repo_id);
8
- KT.content.draw_syncing(repo_id, status.progress.progress, status.sync_id);
7
+ if (task_id !== undefined) {
8
+ progressBar.attr("href", tfm.tools.foremanUrl("/foreman_tasks/tasks/" + task_id));
9
9
  }
10
- });
11
- KT.content.reset_products(KT.repo_status);
12
- KT.content_actions.addSyncing(ids);
13
10
 
14
- $('#select_all').click(KT.content.select_all);
15
- $('#select_none').click(KT.content.select_none);
16
- $('#collapse_all').click(KT.content.collapse_all);
17
- $('#expand_all').click(KT.content.expand_all);
11
+ progress = progress ? progress : 0;
12
+ progressBar.progressbar({
13
+ value: progress,
14
+ });
15
+ element.find(".result-info").html("");
16
+ element.find(".result-info").append(progressBar);
17
+ element.find(".info-tipsy").addClass("hidden");
18
18
 
19
- KT.content.showAll();
20
- KT.content.select_repo();
19
+ if (KT.permissions.syncable) {
20
+ element.find(".result-info").append(cancelButton);
21
+ }
22
+ },
23
+ updateRepo = function (
24
+ repo_id,
25
+ starttime,
26
+ duration,
27
+ progress,
28
+ display_size,
29
+ packages,
30
+ size,
31
+ task_id
32
+ ) {
33
+ var repo = $("#repo-" + repo_id);
34
+ update_item(repo, starttime, duration, progress, display_size, packages, size, task_id);
35
+ },
36
+ finishRepo = function (repo_id, state, duration, raw_state, error_details, task_id) {
37
+ var element = $("#repo-" + repo_id);
38
+ var messages = [];
39
+ var url = tfm.tools.foremanUrl("/foreman_tasks/tasks/" + task_id);
40
+ state = '<a href="' + url + '">' + state + "</a>";
41
+ element.find(".result .result-info").html(state);
42
+ fadeUpdate(element.find(".duration"), duration);
21
43
 
22
- $("#products_table").delegate(".cancel_sync", "click", function(){
23
- var repo_id = $(this).parents("tr").attr("data-id");
24
- KT.content_actions.cancelSync(repo_id, $(this));
25
- });
44
+ if (raw_state === "error") {
45
+ element.find(".result .info-tipsy").removeClass("hidden");
26
46
 
27
- $('#sync_product_form').bind("ajax:success",
28
- function(evt, data, status, xhr){
29
- var ids = [];
30
- $.each(data, function(index, item){
31
- ids.push(item.id);
32
- KT.content.draw_syncing(item.id, 0, undefined);
33
- KT.content.updateProduct(item.product_id, false, 0);
34
- });
35
- KT.content_actions.addSyncing(ids);
36
- })
37
- .bind("ajax:beforeSend",
38
- function(evt, data, status, xhr) {
39
- if ($("input[name='repoids[]']:checked").length === 0) {
40
- return false;
41
- }
42
- });
47
+ KT.utils.forEach(error_details["messages"], function (message) {
48
+ messages.push("<li>" + message + "</li>");
49
+ });
43
50
 
44
- $("#sync_toggle").change(function(){
45
- var img = "<img src='" + KT.common.spinner_path() + "'>";
46
- $("#sync_toggle_cont").append(img);
47
- if ($(this).is(":checked")){
48
- KT.content.showOnlySyncing();
49
- }
50
- else {
51
- KT.content.showAll();
52
- }
53
- $("#sync_toggle_cont").find("img").remove();
54
- });
51
+ element.find(".result .info-tipsy ul").html(messages.join(""));
52
+ }
53
+ },
54
+ update_item = function (
55
+ element,
56
+ starttime,
57
+ duration,
58
+ progress,
59
+ display_size,
60
+ packages,
61
+ size,
62
+ task_id
63
+ ) {
64
+ var pg = element.find(".progress"),
65
+ value = pg.find(".ui-progressbar-value");
55
66
 
56
- $.each($("input[name='repoids[]']"), function(index, checkbox) {
57
- $(checkbox).click(KT.content.select_repo);
58
- });
67
+ starttime = starttime === null ? katelloI18n.no_start_time : starttime;
59
68
 
60
- });
69
+ if (task_id !== undefined) {
70
+ pg.attr("href", tfm.tools.foremanUrl("/foreman_tasks/tasks/" + task_id));
71
+ }
61
72
 
62
- KT.content_actions = (function(){
63
- var syncing = [],
64
- updater,
65
- getOrg = function() {
66
- return $('#organization_id').val();
73
+ fadeUpdate(element.find(".start_time"), starttime);
74
+ // clear duration during active sync
75
+ fadeUpdate(element.find(".duration"), "");
76
+ fadeUpdate(element.find(".size"), display_size);
77
+ element.find(".size").data("size", size);
78
+ element
79
+ .find(".info-tipsy")
80
+ .attr("href", tfm.tools.foremanUrl("/foreman_tasks/tasks/" + task_id));
81
+ progress = progress === 100 ? 99 : progress;
82
+ value.show();
83
+ value.animate({ width: progress }, { queue: false, duration: "slow", easing: "easeInSine" });
67
84
  },
68
- addSyncing = function(repo_ids){
69
- if (repo_ids.length === 0){
70
- return;
71
- }
72
- //nothing in the list before adding and updater already exists
73
- var start = syncing.length === 0 && updater;
74
- $.each(repo_ids, function(index, id){
75
- syncing.push(id + "");
76
- });
77
- if (!updater){
78
- startUpdater();
79
- }
80
- else if (start){
81
- updater.restart();
85
+ updateProduct = function (prod_id, done, percent, size) {
86
+ var product_element = $("#product-" + prod_id),
87
+ element = product_element.find(".result"),
88
+ oldpg = element.find(".progress");
89
+
90
+ if (size) {
91
+ size = KT.utils.reduce(
92
+ $("table")
93
+ .find("[data-product_id=" + prod_id + "]")
94
+ .find(".size"),
95
+ function (memo, num) {
96
+ return $(num).data("size") + memo;
97
+ },
98
+ 0
99
+ );
100
+ fadeUpdate(product_element.find(".size"), KT.common.to_human_readable_bytes(size));
101
+ } else if (done) {
102
+ element.html("");
103
+ } else {
104
+ if (oldpg.length === 0) {
105
+ element.html($("<div/>").attr("class", "progress").text(" "));
106
+ element.find(".progress").progressbar({ value: 0 });
107
+ } else {
108
+ var value = oldpg.find(".ui-progressbar-value");
109
+ percent = percent === 100 ? 99 : percent;
110
+ value.animate(
111
+ { width: percent },
112
+ { queue: false, duration: "slow", easing: "easeInSine" }
113
+ );
82
114
  }
83
- },
84
- removeSyncing = function(repo_id){
85
- syncing.splice($.inArray(repo_id + "", syncing), 1);
86
- if (syncing.length === 0 && updater){
87
- updater.stop();
88
115
  }
89
116
  },
90
- getSyncing = function(){
91
- return syncing;
117
+ fadeUpdate = function (element, text) {
118
+ //element.fadeOut('fast').text(text);
119
+ //element.fadeIn('fast');
120
+ element.text(text);
92
121
  },
93
- cancelSync = function(repo_id){
94
- var button = $("#repo-" + repo_id).find(".result .cancel_sync");
95
-
96
- if( !$(button).hasClass('disabled') ){
97
- button.addClass('disabled');
98
-
99
- $.ajax({
100
- type: 'DELETE',
101
- url: tfm.tools.foremanUrl('/katello/sync_management/' + repo_id + '?organization_id=' + getOrg()),
102
- dataType: 'json',
103
- success: function(data) {
104
- },
105
- error: function(data) {
106
- button.removeClass('disabled');
107
- }
108
- });
122
+ select_all = function () {
123
+ $("#products_table").find("input[type=checkbox]").prop("checked", true);
124
+ KT.content.select_repo();
125
+ },
126
+ select_none = function () {
127
+ $("#products_table").find("input[type=checkbox]").removeAttr("checked");
128
+ KT.content.select_repo();
129
+ },
130
+ select_repo = function () {
131
+ if ($("input[name='repoids[]']:checked").length > 0) {
132
+ $("#sync_button").removeClass("disabled");
133
+ } else {
134
+ $("#sync_button").addClass("disabled");
135
+ }
136
+ },
137
+ reset_products = function (status_set) {
138
+ var products = {};
139
+ $.each(status_set, function (index, item) {
140
+ var pid = item.product_id;
141
+ if (products[pid] === undefined) {
142
+ products[pid] = [];
143
+ }
144
+ if (item.is_running) {
145
+ products[pid].push(item.progress.progress);
109
146
  }
147
+ });
148
+ $.each(products, function (prod_id, percentages) {
149
+ var total = 0;
150
+ $.each(percentages, function (i, val) {
151
+ total += val;
152
+ });
153
+ updateProduct(prod_id, percentages.length === 0, total / percentages.length);
154
+ });
110
155
  },
111
- startUpdater = function(){
112
- if (syncing.length ===0){
113
- return;
156
+ showOnlySyncing = function () {
157
+ $("#products_table").find("tbody").find("tr").hide();
158
+ $.each(KT.content_actions.getSyncing(), function (index, repoid) {
159
+ var repo = $("#repo-" + repoid);
160
+ showChain(repo);
161
+ });
162
+ },
163
+ showChain = function (element) {
164
+ element.show().addClass("expanded").removeClass("collapsed");
165
+ $.each(element.attr("class").split(" "), function (index, claz) {
166
+ if (claz.indexOf("child-of-") === 0) {
167
+ var found = claz.split("child-of-")[1];
168
+ showChain($("#" + found));
114
169
  }
115
- var url = tfm.tools.foremanUrl('/katello/sync_management/sync_status');
116
- updater = $.PeriodicalUpdater(url, {
117
- data: function(){return {repoids:getSyncing(), organization_id:getOrg()}},
118
- method: 'get',
119
- type: 'json',
120
- global: false
121
- },
122
- function(data,success) {
123
- if (success === "notmodified") {
124
- return;
125
- }
126
- $.each(data, function(index, repo){
127
- // Only stop when we reach 100% and the finish_time is done sometimes they are not both complete
128
- if (!repo.is_running && (repo.raw_state !== 'waiting')) {
129
- removeSyncing(repo.id);
130
- KT.content.updateRepo(repo.id, repo.start_time, repo.duration, repo.progress.progress, repo.display_size, repo.packages, repo.size, repo.sync_id);
131
- KT.content.finishRepo(repo.id, repo.state, repo.duration, repo.raw_state, repo.error_details, repo.sync_id);
132
- KT.content.updateProduct(repo.product_id, false, false, true);
133
- }
134
- else {
135
- KT.content.updateRepo( repo.id,
136
- repo.start_time,
137
- repo.duration,
138
- repo.progress.progress,
139
- repo.display_size,
140
- repo.packages,
141
- repo.size,
142
- repo.sync_id);
143
- }
144
- });
145
- KT.content.reset_products(data);
146
- },
147
- function(){
148
- updater.stop();
149
- }
150
- );
170
+ });
171
+ },
172
+ showAll = function () {
173
+ var rows = $("#products_table")
174
+ .find("tbody")
175
+ .find("tr")
176
+ .show()
177
+ .removeClass("expanded")
178
+ .addClass("collapsed");
151
179
 
180
+ $("#products_table").treeTable({
181
+ clickableNodeNames: true,
182
+ indent: 15,
183
+ });
184
+ },
185
+ expand_all = function () {
186
+ var sync_toggle = $("#sync_toggle");
187
+ if ($(sync_toggle).is(":checked")) {
188
+ $(sync_toggle).removeAttr("checked");
189
+ KT.content.showAll();
190
+ }
191
+ $("#products_table")
192
+ .find("tr")
193
+ .removeClass("collapsed")
194
+ .addClass("expanded")
195
+ .each(function () {
196
+ $(this).expand();
197
+ });
198
+ },
199
+ collapse_all = function () {
200
+ $("#products_table")
201
+ .find("tr")
202
+ .removeClass("expanded")
203
+ .addClass("collapsed")
204
+ .each(function () {
205
+ $(this).collapse();
206
+ });
152
207
  };
153
208
 
154
- return {
155
- cancelSync: cancelSync,
156
- addSyncing: addSyncing,
157
- startUpdater: startUpdater,
158
- getSyncing: function(){return syncing}
159
- };
209
+ return {
210
+ updateProduct: updateProduct,
211
+ updateRepo: updateRepo,
212
+ finishRepo: finishRepo,
213
+ select_all: select_all,
214
+ select_none: select_none,
215
+ select_repo: select_repo,
216
+ draw_syncing: draw_syncing,
217
+ reset_products: reset_products,
218
+ showOnlySyncing: showOnlySyncing,
219
+ showAll: showAll,
220
+ expand_all: expand_all,
221
+ collapse_all: collapse_all,
222
+ };
160
223
  })();
224
+ // Setup initial state
161
225
 
162
- KT.content = (function(){
163
-
164
- var draw_syncing = function(repo_id, progress, task_id){
165
- var element = $("#repo-" + repo_id).find(".result"),
166
- cancelButton = $('<a/>').attr("class", "cancel_sync").text(katelloI18n.cancel),
167
- progressBar = $('<a/>').attr('class', 'progress').text(" ");
168
-
169
- if(task_id !== undefined) {
170
- progressBar.attr('href', tfm.tools.foremanUrl('/foreman_tasks/tasks/' + task_id));
171
- }
226
+ KT.content_actions = (function () {
227
+ var syncing = [],
228
+ updater,
229
+ getOrg = function () {
230
+ return $("#organization_id").val();
231
+ },
232
+ addSyncing = function (repo_ids) {
233
+ if (repo_ids.length === 0) {
234
+ return;
235
+ }
236
+ //nothing in the list before adding and updater already exists
237
+ var start = syncing.length === 0 && updater;
238
+ $.each(repo_ids, function (index, id) {
239
+ syncing.push(id + "");
240
+ });
241
+ if (!updater) {
242
+ startUpdater();
243
+ } else if (start) {
244
+ updater.restart();
245
+ }
246
+ },
247
+ removeSyncing = function (repo_id) {
248
+ syncing.splice($.inArray(repo_id + "", syncing), 1);
249
+ if (syncing.length === 0 && updater) {
250
+ updater.stop();
251
+ }
252
+ },
253
+ getSyncing = function () {
254
+ return syncing;
255
+ },
256
+ cancelSync = function (repo_id) {
257
+ var button = $("#repo-" + repo_id).find(".result .cancel_sync");
172
258
 
173
- progress = progress ? progress : 0;
174
- progressBar.progressbar({
175
- value: progress
176
- });
177
- element.find('.result-info').html("");
178
- element.find('.result-info').append(progressBar);
179
- element.find('.info-tipsy').addClass('hidden');
259
+ if (!$(button).hasClass("disabled")) {
260
+ button.addClass("disabled");
180
261
 
181
- if( KT.permissions.syncable ){
182
- element.find('.result-info').append(cancelButton);
183
- }
262
+ $.ajax({
263
+ type: "DELETE",
264
+ url: tfm.tools.foremanUrl(
265
+ "/katello/sync_management/" + repo_id + "?organization_id=" + getOrg()
266
+ ),
267
+ dataType: "json",
268
+ success: function (data) {},
269
+ error: function (data) {
270
+ button.removeClass("disabled");
271
+ },
272
+ });
273
+ }
274
+ },
275
+ startUpdater = function () {
276
+ if (syncing.length === 0) {
277
+ return;
278
+ }
279
+ var url = tfm.tools.foremanUrl("/katello/sync_management/sync_status");
280
+ updater = $.PeriodicalUpdater(
281
+ url,
282
+ {
283
+ data: function () {
284
+ return { repoids: getSyncing(), organization_id: getOrg() };
285
+ },
286
+ method: "get",
287
+ type: "json",
288
+ global: false,
184
289
  },
185
- updateRepo = function(repo_id, starttime, duration, progress, display_size, packages, size, task_id){
186
- var repo = $("#repo-" + repo_id);
187
- update_item(repo, starttime, duration, progress, display_size, packages, size, task_id);
290
+ function (data, success) {
291
+ if (success === "notmodified") {
292
+ return;
293
+ }
294
+ $.each(data, function (index, repo) {
295
+ // Only stop when we reach 100% and the finish_time is done sometimes they are not both complete
296
+ if (!repo.is_running && repo.raw_state !== "waiting") {
297
+ removeSyncing(repo.id);
298
+ KT.content.updateRepo(
299
+ repo.id,
300
+ repo.start_time,
301
+ repo.duration,
302
+ repo.progress.progress,
303
+ repo.display_size,
304
+ repo.packages,
305
+ repo.size,
306
+ repo.sync_id
307
+ );
308
+ KT.content.finishRepo(
309
+ repo.id,
310
+ repo.state,
311
+ repo.duration,
312
+ repo.raw_state,
313
+ repo.error_details,
314
+ repo.sync_id
315
+ );
316
+ KT.content.updateProduct(repo.product_id, false, false, true);
317
+ } else {
318
+ KT.content.updateRepo(
319
+ repo.id,
320
+ repo.start_time,
321
+ repo.duration,
322
+ repo.progress.progress,
323
+ repo.display_size,
324
+ repo.packages,
325
+ repo.size,
326
+ repo.sync_id
327
+ );
328
+ }
329
+ });
330
+ KT.content.reset_products(data);
188
331
  },
189
- finishRepo = function(repo_id, state, duration, raw_state, error_details, task_id){
190
- var element = $("#repo-" + repo_id);
191
- var messages = [];
192
- var url = tfm.tools.foremanUrl('/foreman_tasks/tasks/' + task_id);
193
- state = '<a href="' + url + '">' + state + '</a>';
194
- element.find(".result .result-info").html(state);
195
- fadeUpdate(element.find(".duration"), duration);
196
-
197
- if (raw_state === 'error') {
198
- element.find('.result .info-tipsy').removeClass('hidden');
332
+ function () {
333
+ updater.stop();
334
+ }
335
+ );
336
+ };
199
337
 
200
- KT.utils.forEach(error_details['messages'], function (message) {
201
- messages.push('<li>' + message + '</li>');
202
- });
338
+ return {
339
+ cancelSync: cancelSync,
340
+ addSyncing: addSyncing,
341
+ startUpdater: startUpdater,
342
+ getSyncing: function () {
343
+ return syncing;
344
+ },
345
+ };
346
+ })();
203
347
 
204
- element.find('.result .info-tipsy ul').html(messages.join(''));
205
- }
206
- },
207
- update_item = function(element, starttime, duration, progress, display_size, packages, size, task_id) {
208
- var pg = element.find(".progress"),
209
- value = pg.find(".ui-progressbar-value");
348
+ var ids = [];
349
+ $.each(KT.repo_status, function (repo_id, status) {
350
+ if (status.is_running) {
351
+ ids.push(repo_id);
352
+ KT.content.draw_syncing(repo_id, status.progress.progress, status.sync_id);
353
+ }
354
+ });
355
+ KT.content.reset_products(KT.repo_status);
356
+ KT.content_actions.addSyncing(ids);
210
357
 
211
- starttime = starttime === null ? katelloI18n.no_start_time : starttime;
358
+ $("#select_all").click(KT.content.select_all);
359
+ $("#select_none").click(KT.content.select_none);
360
+ $("#collapse_all").click(KT.content.collapse_all);
361
+ $("#expand_all").click(KT.content.expand_all);
212
362
 
213
- if(task_id !== undefined) {
214
- pg.attr('href', tfm.tools.foremanUrl('/foreman_tasks/tasks/' + task_id));
215
- }
363
+ KT.content.showAll();
364
+ KT.content.select_repo();
216
365
 
217
- fadeUpdate(element.find(".start_time"), starttime);
218
- // clear duration during active sync
219
- fadeUpdate(element.find(".duration"), '');
220
- fadeUpdate(element.find(".size"), display_size);
221
- element.find('.size').data('size', size);
222
- element.find('.info-tipsy').attr('href', tfm.tools.foremanUrl('/foreman_tasks/tasks/' + task_id));
223
- progress = progress === 100 ? 99 : progress;
224
- value.show();
225
- value.animate({'width': progress },{ queue:false,
226
- duration:"slow", easing:"easeInSine" });
227
- },
228
- updateProduct = function (prod_id, done, percent, size) {
229
- var product_element = $("#product-" + prod_id),
230
- element = product_element.find(".result"),
231
- oldpg = element.find('.progress');
366
+ $("#products_table").delegate(".cancel_sync", "click", function () {
367
+ var repo_id = $(this).parents("tr").attr("data-id");
368
+ KT.content_actions.cancelSync(repo_id, $(this));
369
+ });
232
370
 
233
- if( size ){
234
- size = KT.utils.reduce($('table').find("[data-product_id=" + prod_id + "]").find('.size'), function(memo, num){ return $(num).data('size') + memo;}, 0);
235
- fadeUpdate(product_element.find('.size'), KT.common.to_human_readable_bytes(size));
236
- } else if(done){
237
- element.html("");
238
- }
239
- else{
240
- if (oldpg.length === 0){
241
- element.html($('<div/>').attr('class', 'progress').text(" "));
242
- element.find(".progress").progressbar({value: 0});
243
- }
244
- else {
245
- var value = oldpg.find(".ui-progressbar-value");
246
- percent = percent === 100 ? 99 : percent;
247
- value.animate({'width': percent },{ queue:false,
248
- duration:"slow", easing:"easeInSine" });
249
- }
250
- }
251
- },
252
- fadeUpdate = function(element, text) {
253
- //element.fadeOut('fast').text(text);
254
- //element.fadeIn('fast');
255
- element.text(text);
256
- },
257
- select_all = function(){
258
- $("#products_table").find("input[type=checkbox]").prop('checked',true);
259
- KT.content.select_repo();
260
- },
261
- select_none = function(){
262
- $("#products_table").find("input[type=checkbox]").removeAttr('checked');
263
- KT.content.select_repo();
264
- },
265
- select_repo = function(){
266
- if($("input[name='repoids[]']:checked").length > 0) {
267
- $("#sync_button").removeClass("disabled");
268
- } else {
269
- $("#sync_button").addClass("disabled");
270
- }
271
- },
272
- reset_products = function(status_set){
273
- var products = {};
274
- $.each(status_set, function(index, item){
275
- var pid = item.product_id;
276
- if(products[pid] === undefined){
277
- products[pid] = [];
278
- }
279
- if (item.is_running){
280
- products[pid].push(item.progress.progress);
281
- }
282
- });
283
- $.each(products, function(prod_id, percentages){
284
- var total = 0;
285
- $.each(percentages, function(i, val){total += val;});
286
- updateProduct(prod_id, percentages.length === 0, total/percentages.length);
287
- });
288
- },
289
- showOnlySyncing = function(){
290
- $("#products_table").find("tbody").find("tr").hide();
291
- $.each(KT.content_actions.getSyncing(), function(index, repoid){
292
- var repo = $("#repo-" + repoid);
293
- showChain(repo);
294
- });
295
- },
296
- showChain = function(element){
297
- element.show().addClass("expanded").removeClass("collapsed");
298
- $.each(element.attr("class").split(" "), function(index, claz){
299
- if (claz.indexOf("child-of-") === 0){
300
- var found = claz.split("child-of-")[1];
301
- showChain($("#" + found));
302
- }
303
- });
304
- },
305
- showAll = function(){
306
- var rows = $("#products_table").find("tbody").find("tr").show().removeClass("expanded").addClass("collapsed");
371
+ $("#sync_product_form")
372
+ .bind("ajax:success", function (evt, data, status, xhr) {
373
+ var ids = [];
374
+ $.each(data, function (index, item) {
375
+ ids.push(item.id);
376
+ KT.content.draw_syncing(item.id, 0, undefined);
377
+ KT.content.updateProduct(item.product_id, false, 0);
378
+ });
379
+ KT.content_actions.addSyncing(ids);
380
+ })
381
+ .bind("ajax:beforeSend", function (evt, data, status, xhr) {
382
+ if ($("input[name='repoids[]']:checked").length === 0) {
383
+ return false;
384
+ }
385
+ });
307
386
 
308
- $("#products_table").treeTable({
309
- clickableNodeNames: true,
310
- indent: 15
311
- });
312
- },
313
- expand_all = function() {
314
- var sync_toggle = $("#sync_toggle");
315
- if($(sync_toggle).is(":checked")) {
316
- $(sync_toggle).removeAttr("checked");
317
- KT.content.showAll();
318
- }
319
- $("#products_table").find("tr").removeClass("collapsed").addClass("expanded").each(function(){
320
- $(this).expand();
321
- });
322
- },
323
- collapse_all = function() {
324
- $("#products_table").find("tr").removeClass("expanded").addClass("collapsed").each(function(){
325
- $(this).collapse();
326
- });
327
- };
387
+ $("#sync_toggle").change(function () {
388
+ var img = "<img src='" + KT.common.spinner_path() + "'>";
389
+ $("#sync_toggle_cont").append(img);
390
+ if ($(this).is(":checked")) {
391
+ KT.content.showOnlySyncing();
392
+ } else {
393
+ KT.content.showAll();
394
+ }
395
+ $("#sync_toggle_cont").find("img").remove();
396
+ });
328
397
 
329
- return {
330
- updateProduct: updateProduct,
331
- updateRepo: updateRepo,
332
- finishRepo: finishRepo,
333
- select_all : select_all,
334
- select_none: select_none,
335
- select_repo: select_repo,
336
- draw_syncing: draw_syncing,
337
- reset_products: reset_products,
338
- showOnlySyncing: showOnlySyncing,
339
- showAll: showAll,
340
- expand_all: expand_all,
341
- collapse_all: collapse_all
342
- };
343
- })();
398
+ $.each($("input[name='repoids[]']"), function (index, checkbox) {
399
+ $(checkbox).click(KT.content.select_repo);
400
+ });