Skip to content

Commit

Permalink
Convert my settings tabs to react
Browse files Browse the repository at this point in the history
  • Loading branch information
GilbertCherrie committed Nov 21, 2023
1 parent fc17035 commit 3dc47fd
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 31 deletions.
4 changes: 1 addition & 3 deletions app/controllers/configuration_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def title
end

def index
show_timeprofiles
# show_timeprofiles
assert_privileges('my_settings_view')
@breadcrumbs = []
active_tab = nil
Expand Down Expand Up @@ -72,8 +72,6 @@ def edit

# New tab was pressed
def change_tab
# require 'byebug'
# byebug
assert_privileges('my_settings_admin')
set_tab_vars(params['uib-tab'])
@tabform = "ui_" + params['uib-tab'] if params['uib-tab'] != "5"
Expand Down
26 changes: 0 additions & 26 deletions app/helpers/configuration_helper.rb

This file was deleted.

1 change: 0 additions & 1 deletion app/javascript/components/miq-custom-tab/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ const MiqCustomTab = ({ containerId, tabLabels, type }) => {
{ type: 'CATALOG_EDIT' },
{ type: 'CATALOG_REQUEST_INFO', url: `/miq_request/prov_field_changed?tab_id=${name}&edit_mode=true` },
{ type: 'UTILIZATION' },
{ type: 'SETTINGS' },
];

const configuration = (name) => tabConfigurations(name).find((item) => item.type === type);
Expand Down
1 change: 0 additions & 1 deletion app/views/layouts/_tabs.html.haml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
- if @tabs
#custom-tabs-wrapper.miq_custom_tab_wrapper
- if @path.present?
= @current_tab
= react('CustomURLTabs', {:tabs => @tabs, :path => @path, :currentTab => @current_tab, :checkForChanges => @check_for_changes})
- else
%ul{'role' => 'tablist', :class => "nav nav-tabs #{@layout == 'dashboard' ? 'nav-tabs-pf' : nil}"}
Expand Down

0 comments on commit 3dc47fd

Please sign in to comment.