From a9900823f9e9a3e1af49b9944e2d3ab14456313d Mon Sep 17 00:00:00 2001 From: Walden Raines Date: Fri, 28 Feb 2014 10:08:11 -0500 Subject: [PATCH] Remove code that has been replaced by bastion/v2 APIs. Delete several old and unused UI controllers, views, javascript files, styles, and tests as well as removing unused functionality from remaining bastion-only UI controllers. --- .../katello/activation_keys/index.js | 1 - .../katello/organizations/default_info.js | 216 ----- .../organizations/download_certificate.js | 20 - .../katello/organizations/index.js | 15 - .../katello/organizations/organization.js | 68 -- .../organizations/organization_edit.js | 46 - .../katello/products/product_edit.js | 76 -- .../subscriptions/headpin.sparkline.js | 6 - .../katello/subscriptions/index.js | 17 - .../katello/subscriptions/subscription.js | 126 --- .../katello/system_events/index.js | 15 - .../katello/system_events/system_events.js | 181 ---- .../katello/system_groups/index.js | 19 - .../katello/system_groups/package_actions.js | 316 ------- .../system_groups/system_group_events.js | 23 - .../katello/system_groups/system_groups.js | 445 ---------- .../system_groups/system_groups_pane.js | 141 --- .../katello/system_packages/index.js | 16 - .../system_packages/packages_filtertable.js | 63 -- .../system_packages/system_packages.js | 767 ----------------- .../katello/systems/custom_info.js | 1 + .../javascripts/katello/systems/index.js | 28 - .../javascripts/katello/systems/packages.js | 34 - .../katello/systems/system_edit.js | 67 -- .../katello/systems/system_errata.js | 313 ------- .../katello/systems/system_products.js | 113 --- .../katello/systems/system_subscriptions.js | 71 -- .../javascripts/katello/systems/systems.js | 793 ----------------- app/assets/javascripts/katello/users/index.js | 16 - app/assets/javascripts/katello/users/user.js | 102 --- .../javascripts/katello/users/user_methods.js | 111 --- app/assets/stylesheets/katello/katello.scss | 3 - app/assets/stylesheets/katello/orgs.scss | 60 -- .../stylesheets/katello/subscriptions.scss | 30 - app/assets/stylesheets/katello/systems.scss | 349 -------- app/controllers/katello/errata_controller.rb | 75 -- .../katello/organizations_controller.rb | 245 +----- .../katello/products_controller.rb | 118 +-- .../katello/puppet_modules_controller.rb | 68 -- .../katello/subscriptions_controller.rb | 288 +------ .../katello/system_errata_controller.rb | 109 --- .../katello/system_events_controller.rb | 110 --- .../katello/system_group_errata_controller.rb | 106 --- .../katello/system_group_events_controller.rb | 123 --- .../system_group_packages_controller.rb | 215 ----- .../katello/system_groups_controller.rb | 258 +----- .../katello/system_packages_controller.rb | 201 ----- app/controllers/katello/systems_controller.rb | 810 +----------------- .../katello/user_sessions_controller.rb | 41 - .../katello/environments/_edit.html.haml | 40 - app/views/katello/environments/_new.html.haml | 26 - .../katello/environments/_products.html.haml | 4 - app/views/katello/errata/_packages.html.haml | 30 - .../katello/errata/_short_details.html.haml | 44 - app/views/katello/errata/_show.html.haml | 85 -- .../organizations/_default_info.html.haml | 43 - .../_download_debug_certificate.html.haml | 14 - .../katello/organizations/_edit.html.haml | 87 -- .../organizations/_environments.html.haml | 2 - .../katello/organizations/_events.html.haml | 29 - .../katello/organizations/_footer.html.haml | 15 - .../katello/organizations/_new.html.haml | 39 - .../organizations/_post_delete.js.haml | 3 - .../katello/organizations/index.html.haml | 14 - app/views/katello/products/_edit.html.haml | 38 - app/views/katello/products/_new.html.haml | 27 - .../katello/puppet_modules/_show.html.haml | 88 -- .../katello/repositories/_edit.html.haml | 64 -- app/views/katello/repositories/_new.html.haml | 60 -- .../subscriptions/_consumers.html.haml | 53 -- .../katello/subscriptions/_edit.html.haml | 119 --- .../subscriptions/_edit_manifest.html.haml | 59 -- .../katello/subscriptions/_history.html.haml | 32 - .../subscriptions/_history_items.html.haml | 33 - .../_list_subscription.html.haml | 3 - .../_list_subscription_show.html.haml | 21 - .../_list_subscriptions.html.haml | 1 - .../katello/subscriptions/_new.html.haml | 134 --- .../katello/subscriptions/_products.html.haml | 52 -- ..._subscriptions_tupane_header_nav.html.haml | 5 - ...scriptions_tupane_header_new_nav.html.haml | 2 - .../katello/subscriptions/index.html.haml | 4 - .../subscriptions/index_nutupane.html.haml | 15 - .../katello/system_events/_details.html.haml | 34 - .../system_events/_event_items.html.haml | 27 - .../katello/system_events/_events.html.haml | 36 - .../system_events/_more_events.html.haml | 3 - .../katello/system_groups/_edit.html.haml | 52 -- .../system_groups/_edit_systems.html.haml | 32 - .../system_groups/_list_group.html.haml | 4 - .../system_groups/_list_groups.html.haml | 1 - .../katello/system_groups/_new.html.haml | 50 -- .../system_groups/_system_item.html.haml | 16 - .../katello/system_groups/_systems.html.haml | 67 -- .../system_groups/_tupane_header.html.haml | 15 - .../system_groups/errata/_index.html.haml | 72 -- .../system_groups/events/_index.html.haml | 33 - .../system_groups/events/_items.html.haml | 29 - .../events/_more_items.html.haml | 3 - .../system_groups/events/_show.html.haml | 29 - .../events/_system_items.html.haml | 27 - .../system_groups/events/_systems.html.haml | 15 - .../katello/system_groups/index.html.haml | 22 - .../system_groups/packages/_index.html.haml | 70 -- .../system_groups/packages/_items.html.haml | 30 - .../system_groups/packages/_status.html.haml | 5 - .../system_packages/_package_items.html.haml | 43 - .../system_packages/_packages.html.haml | 132 --- app/views/katello/systems/_actions.html.haml | 96 --- app/views/katello/systems/_edit.html.haml | 229 ----- .../systems/_edit_custom_info.html.haml | 10 - app/views/katello/systems/_facts.html.haml | 33 - .../katello/systems/_hypervisor.html.haml | 7 - .../katello/systems/_list_system.html.haml | 2 - .../systems/_list_system_show.html.haml | 25 - .../katello/systems/_list_systems.html.haml | 1 - .../katello/systems/_more_products.html.haml | 9 - app/views/katello/systems/_new.html.haml | 20 - app/views/katello/systems/_products.html.haml | 23 - app/views/katello/systems/_subs.html.haml | 144 ---- .../katello/systems/_subs_update.js.haml | 1 - .../systems/_subscription_details.html.haml | 23 - .../katello/systems/_subscriptions.html.haml | 28 - .../systems/_system_group_items.html.haml | 7 - .../katello/systems/_system_groups.html.haml | 26 - .../_system_tupane_header_nav.html.haml | 10 - .../katello/systems/errata/_index.html.haml | 62 -- .../katello/systems/errata/_items.html.haml | 21 - app/views/katello/systems/index.html.haml | 46 - .../katello/systems/new_nutupane.html.haml | 52 -- .../katello/systems/show_nutupane.html.haml | 199 ----- config/routes.rb | 118 +-- lib/katello/tasks/test.rake | 3 - .../organizations_controller_spec.rb | 298 ------- spec/controllers/products_controller_spec.rb | 112 --- .../subscriptions_controller_data.rb | 548 ------------ .../subscriptions_controller_spec.rb | 83 -- .../system_errata_controller_spec.rb | 111 --- .../system_events_controller_spec.rb | 75 -- .../system_group_errata_controller_spec.rb | 109 --- .../system_group_events_controller_spec.rb | 122 --- .../system_group_packages_controller_spec.rb | 266 ------ .../system_groups_controller_spec.rb | 332 ------- .../system_packages_controller_spec.rb | 278 ------ .../api/v2/repository_sets_controller_test.rb | 121 --- .../subscriptions_controller_test.rb | 37 + test/controllers/systems_controller_test.rb | 60 -- 147 files changed, 57 insertions(+), 13257 deletions(-) delete mode 100644 app/assets/javascripts/katello/organizations/default_info.js delete mode 100644 app/assets/javascripts/katello/organizations/download_certificate.js delete mode 100644 app/assets/javascripts/katello/organizations/index.js delete mode 100644 app/assets/javascripts/katello/organizations/organization.js delete mode 100644 app/assets/javascripts/katello/organizations/organization_edit.js delete mode 100644 app/assets/javascripts/katello/products/product_edit.js delete mode 100644 app/assets/javascripts/katello/subscriptions/headpin.sparkline.js delete mode 100644 app/assets/javascripts/katello/subscriptions/index.js delete mode 100644 app/assets/javascripts/katello/subscriptions/subscription.js delete mode 100644 app/assets/javascripts/katello/system_events/index.js delete mode 100644 app/assets/javascripts/katello/system_events/system_events.js delete mode 100644 app/assets/javascripts/katello/system_groups/index.js delete mode 100644 app/assets/javascripts/katello/system_groups/package_actions.js delete mode 100644 app/assets/javascripts/katello/system_groups/system_group_events.js delete mode 100644 app/assets/javascripts/katello/system_groups/system_groups.js delete mode 100644 app/assets/javascripts/katello/system_groups/system_groups_pane.js delete mode 100644 app/assets/javascripts/katello/system_packages/index.js delete mode 100644 app/assets/javascripts/katello/system_packages/packages_filtertable.js delete mode 100644 app/assets/javascripts/katello/system_packages/system_packages.js delete mode 100644 app/assets/javascripts/katello/systems/index.js delete mode 100644 app/assets/javascripts/katello/systems/packages.js delete mode 100644 app/assets/javascripts/katello/systems/system_edit.js delete mode 100644 app/assets/javascripts/katello/systems/system_errata.js delete mode 100644 app/assets/javascripts/katello/systems/system_products.js delete mode 100644 app/assets/javascripts/katello/systems/system_subscriptions.js delete mode 100644 app/assets/javascripts/katello/systems/systems.js delete mode 100644 app/assets/javascripts/katello/users/index.js delete mode 100644 app/assets/javascripts/katello/users/user.js delete mode 100644 app/assets/javascripts/katello/users/user_methods.js delete mode 100644 app/assets/stylesheets/katello/orgs.scss delete mode 100644 app/assets/stylesheets/katello/subscriptions.scss delete mode 100644 app/assets/stylesheets/katello/systems.scss delete mode 100644 app/controllers/katello/errata_controller.rb delete mode 100644 app/controllers/katello/puppet_modules_controller.rb delete mode 100644 app/controllers/katello/system_errata_controller.rb delete mode 100644 app/controllers/katello/system_events_controller.rb delete mode 100644 app/controllers/katello/system_group_errata_controller.rb delete mode 100644 app/controllers/katello/system_group_events_controller.rb delete mode 100644 app/controllers/katello/system_group_packages_controller.rb delete mode 100644 app/controllers/katello/system_packages_controller.rb delete mode 100644 app/controllers/katello/user_sessions_controller.rb delete mode 100644 app/views/katello/environments/_edit.html.haml delete mode 100644 app/views/katello/environments/_new.html.haml delete mode 100644 app/views/katello/environments/_products.html.haml delete mode 100644 app/views/katello/errata/_packages.html.haml delete mode 100644 app/views/katello/errata/_short_details.html.haml delete mode 100644 app/views/katello/errata/_show.html.haml delete mode 100644 app/views/katello/organizations/_default_info.html.haml delete mode 100644 app/views/katello/organizations/_download_debug_certificate.html.haml delete mode 100644 app/views/katello/organizations/_edit.html.haml delete mode 100644 app/views/katello/organizations/_environments.html.haml delete mode 100644 app/views/katello/organizations/_events.html.haml delete mode 100644 app/views/katello/organizations/_footer.html.haml delete mode 100644 app/views/katello/organizations/_new.html.haml delete mode 100644 app/views/katello/organizations/_post_delete.js.haml delete mode 100644 app/views/katello/organizations/index.html.haml delete mode 100644 app/views/katello/products/_edit.html.haml delete mode 100644 app/views/katello/products/_new.html.haml delete mode 100644 app/views/katello/puppet_modules/_show.html.haml delete mode 100644 app/views/katello/repositories/_edit.html.haml delete mode 100644 app/views/katello/repositories/_new.html.haml delete mode 100644 app/views/katello/subscriptions/_consumers.html.haml delete mode 100644 app/views/katello/subscriptions/_edit.html.haml delete mode 100644 app/views/katello/subscriptions/_edit_manifest.html.haml delete mode 100644 app/views/katello/subscriptions/_history.html.haml delete mode 100644 app/views/katello/subscriptions/_history_items.html.haml delete mode 100644 app/views/katello/subscriptions/_list_subscription.html.haml delete mode 100644 app/views/katello/subscriptions/_list_subscription_show.html.haml delete mode 100644 app/views/katello/subscriptions/_list_subscriptions.html.haml delete mode 100644 app/views/katello/subscriptions/_new.html.haml delete mode 100644 app/views/katello/subscriptions/_products.html.haml delete mode 100644 app/views/katello/subscriptions/_subscriptions_tupane_header_nav.html.haml delete mode 100644 app/views/katello/subscriptions/_subscriptions_tupane_header_new_nav.html.haml delete mode 100644 app/views/katello/subscriptions/index.html.haml delete mode 100644 app/views/katello/subscriptions/index_nutupane.html.haml delete mode 100644 app/views/katello/system_events/_details.html.haml delete mode 100644 app/views/katello/system_events/_event_items.html.haml delete mode 100644 app/views/katello/system_events/_events.html.haml delete mode 100644 app/views/katello/system_events/_more_events.html.haml delete mode 100644 app/views/katello/system_groups/_edit.html.haml delete mode 100644 app/views/katello/system_groups/_edit_systems.html.haml delete mode 100644 app/views/katello/system_groups/_list_group.html.haml delete mode 100644 app/views/katello/system_groups/_list_groups.html.haml delete mode 100644 app/views/katello/system_groups/_new.html.haml delete mode 100644 app/views/katello/system_groups/_system_item.html.haml delete mode 100644 app/views/katello/system_groups/_systems.html.haml delete mode 100644 app/views/katello/system_groups/_tupane_header.html.haml delete mode 100644 app/views/katello/system_groups/errata/_index.html.haml delete mode 100644 app/views/katello/system_groups/events/_index.html.haml delete mode 100644 app/views/katello/system_groups/events/_items.html.haml delete mode 100644 app/views/katello/system_groups/events/_more_items.html.haml delete mode 100644 app/views/katello/system_groups/events/_show.html.haml delete mode 100644 app/views/katello/system_groups/events/_system_items.html.haml delete mode 100644 app/views/katello/system_groups/events/_systems.html.haml delete mode 100644 app/views/katello/system_groups/index.html.haml delete mode 100644 app/views/katello/system_groups/packages/_index.html.haml delete mode 100644 app/views/katello/system_groups/packages/_items.html.haml delete mode 100644 app/views/katello/system_groups/packages/_status.html.haml delete mode 100644 app/views/katello/system_packages/_package_items.html.haml delete mode 100644 app/views/katello/system_packages/_packages.html.haml delete mode 100644 app/views/katello/systems/_actions.html.haml delete mode 100644 app/views/katello/systems/_edit.html.haml delete mode 100644 app/views/katello/systems/_edit_custom_info.html.haml delete mode 100644 app/views/katello/systems/_facts.html.haml delete mode 100644 app/views/katello/systems/_hypervisor.html.haml delete mode 100644 app/views/katello/systems/_list_system.html.haml delete mode 100644 app/views/katello/systems/_list_system_show.html.haml delete mode 100644 app/views/katello/systems/_list_systems.html.haml delete mode 100644 app/views/katello/systems/_more_products.html.haml delete mode 100644 app/views/katello/systems/_new.html.haml delete mode 100644 app/views/katello/systems/_products.html.haml delete mode 100644 app/views/katello/systems/_subs.html.haml delete mode 100644 app/views/katello/systems/_subs_update.js.haml delete mode 100644 app/views/katello/systems/_subscription_details.html.haml delete mode 100644 app/views/katello/systems/_subscriptions.html.haml delete mode 100644 app/views/katello/systems/_system_group_items.html.haml delete mode 100644 app/views/katello/systems/_system_groups.html.haml delete mode 100644 app/views/katello/systems/_system_tupane_header_nav.html.haml delete mode 100644 app/views/katello/systems/errata/_index.html.haml delete mode 100644 app/views/katello/systems/errata/_items.html.haml delete mode 100644 app/views/katello/systems/index.html.haml delete mode 100644 app/views/katello/systems/new_nutupane.html.haml delete mode 100644 app/views/katello/systems/show_nutupane.html.haml delete mode 100644 spec/controllers/organizations_controller_spec.rb delete mode 100644 spec/controllers/subscriptions_controller_data.rb delete mode 100644 spec/controllers/subscriptions_controller_spec.rb delete mode 100644 spec/controllers/system_errata_controller_spec.rb delete mode 100644 spec/controllers/system_events_controller_spec.rb delete mode 100644 spec/controllers/system_group_errata_controller_spec.rb delete mode 100644 spec/controllers/system_group_events_controller_spec.rb delete mode 100644 spec/controllers/system_group_packages_controller_spec.rb delete mode 100644 spec/controllers/system_packages_controller_spec.rb delete mode 100644 test/controllers/api/v2/repository_sets_controller_test.rb create mode 100644 test/controllers/subscriptions_controller_test.rb delete mode 100644 test/controllers/systems_controller_test.rb diff --git a/app/assets/javascripts/katello/activation_keys/index.js b/app/assets/javascripts/katello/activation_keys/index.js index 7a0b0e1ddcb..4ad03b98ec7 100644 --- a/app/assets/javascripts/katello/activation_keys/index.js +++ b/app/assets/javascripts/katello/activation_keys/index.js @@ -14,4 +14,3 @@ //= require "alchemy/jquery/plugins/jquery.multiselect" //= require "alchemy/jquery/plugins/jquery.multiselect.filter" //= require "katello/activation_keys/activation_key" -//= require "katello/system_groups/system_groups_pane" diff --git a/app/assets/javascripts/katello/organizations/default_info.js b/app/assets/javascripts/katello/organizations/default_info.js deleted file mode 100644 index 563ad7e5a55..00000000000 --- a/app/assets/javascripts/katello/organizations/default_info.js +++ /dev/null @@ -1,216 +0,0 @@ -/** - Copyright 2013 Red Hat, Inc. - - This software is licensed to you under the GNU General Public - License as published by the Free Software Foundation; either version - 2 of the License (GPLv2) or (at your option) any later version. - There is NO WARRANTY for this software, express or implied, - including the implied warranties of MERCHANTABILITY, - NON-INFRINGEMENT, or FITNESS FOR A PARTICULAR PURPOSE. You should - have received a copy of GPLv2 along with this software; if not, see - http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. -*/ - -var KT = (KT === undefined) ? {} : KT; - -KT.default_info = (function() { - - var task_status_updater; - - var start_updater = function(task_uuid) { - allow_default_info_manipulation(false); - $("#apply_default_info_button").addClass("processing"); - var timeout = 6000; - - if (task_status_updater !== undefined) { - task_status_updater.stop(); - } - - task_status_updater = $.PeriodicalUpdater( - KT.routes.api_task_path(task_uuid), - { - method : 'get', - type : 'json', - cache : false, - global : false, - minTimeout: timeout, - maxTimeout: timeout - }, - updateStatus - ); - }; - - var async_panel_refresh = function (){ - if ($("#apply_default_info_button").length > 0) { - if (task_status_updater !== undefined) { - task_status_updater.stop(); - } - var state = $("#apply_default_info_button").data("taskstate"); - if (state === "waiting" || state === "running") { - start_updater($("#apply_default_info_button").data("taskuuid")); - } - } - }; - - var updateStatus = function(data, success, xhr, handle) { - if (data !== "") { // "" means nothing has changed since the last poll - var state = data['state']; - if (state !== "waiting" && state !== "running") { - $("#apply_default_info_button").removeClass("processing"); - allow_default_info_manipulation(true); - task_status_updater.stop(); - if (data['result'].length > 0) { - notices.displayNotice("success", window.JSON.stringify({ "notices": [i18n.default_info_apply_success] })); - } - } - } - }; - - var check_for_apply_button_enable = function() { - if ($("#default_info_table tr").length > 1) { - $("#apply_default_info_button").removeAttr("disabled"); - } else { - $("#apply_default_info_button").attr("disabled", "true"); - } - }; - - var allow_default_info_manipulation = function(allow) { - if (allow === true) { - $("#new_default_info_keyname").removeAttr("disabled"); - check_for_empty($("#new_default_info_keyname")); - $(".remove_default_info_button").removeAttr("disabled"); - check_for_apply_button_enable(); - } else { - $("#apply_default_info_button").attr("disabled", "true"); - $("#new_default_info_keyname").attr("disabled", "true"); - $("#add_default_info_button").attr("disabled", "true"); - $(".remove_default_info_button").attr("disabled", "true"); - } - }; - - var check_for_empty = function($textfield) { - if ($textfield.val().length > 0 ) { - $('#add_default_info_button').removeAttr("disabled"); - } else { - $('#add_default_info_button').attr("disabled", "true"); - } - }; - - var apply_default_info = function($button) { - $.ajax({ - url : $button.data('url'), - type : $button.data('method'), - success: function(data) { - start_updater(data['task']['uuid']); - }, - error : function(data) { - notices.displayNotice("error", window.JSON.stringify({ "notices": [i18n.default_info_apply_error] })); - } - }); - }; - - var add_default_info = function($button) { - var keyname = $("#new_default_info_keyname").val(); - - $.ajax({ - url : $button.data("url"), - type : $button.data("method"), - dataType: 'json', - data : { "keyname" : keyname }, - success : function(data) { - add_default_info_row(data); - notices.displayNotice("success", window.JSON.stringify({ "notices": [i18n.default_info_create_success] })); - }, - error : function(data) { - message = KT.utils.escape($.parseJSON(data.responseText)["displayMessage"]); - notices.displayNotice("error", window.JSON.stringify({ "notices": [message] })); - } - }); - }; - - var remove_default_info = function($button) { - $.ajax({ - url : $button.data("url"), - type : $button.data("method"), - success: function(data) { - remove_default_info_row($button.data("id")); - notices.displayNotice("success", window.JSON.stringify({ "notices": [i18n.default_info_delete_success] })); - } - }); - }; - - var remove_default_info_row = function(data_id) { - $("tr[data-id='" + data_id + "']").remove(); - check_for_apply_button_enable(); - }; - - var add_default_info_row = function(data) { - var keyname = data["keyname"]; - var _keyname = escape(keyname); - - var informable_type = data["informable_type"]; - var org = data["organization"]; - var destroy_path = KT.routes.api_organization_destroy_default_info_path(org["name"], informable_type, _keyname); - - var new_row = $('', { - 'class': 'multiline primary_color', - 'data-id': 'default_info_' + _keyname, - 'html': $('', { - 'class': 'ra', - 'html': $('