Skip to content

Commit

Permalink
De-explorization show page
Browse files Browse the repository at this point in the history
  • Loading branch information
akhilkr128 committed Jun 2, 2023
1 parent c452d20 commit 352fb92
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
21 changes: 19 additions & 2 deletions app/controllers/infra_networking_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class InfraNetworkingController < ApplicationController
after_action :set_session_data

include Mixins::GenericSessionMixin
include Mixins::ExplorerPresenterMixin
# include Mixins::ExplorerPresenterMixin
include Mixins::FindRecord
include Mixins::CustomButtonDialogFormMixin
include Mixins::BreadcrumbsMixin
Expand Down Expand Up @@ -37,7 +37,11 @@ def tagging_explorer_controller?
end

def show_searchbar?
true
@record.nil? ? true : false
end

def display_back_button?
false
end

def tree_select
Expand Down Expand Up @@ -87,6 +91,10 @@ def load_or_clear_adv_search

def show
assert_privileges("infra_networking_view")
@center_toolbar = 'infra_networking'
@lastaction = "show"
@display = 'main'
@showtype = 'main'
@switch = @record = identify_record(params[:id], Switch)
end

Expand Down Expand Up @@ -125,6 +133,15 @@ def explorer
render :layout => "application"
end

def index
@lastaction = "index"

build_accordions_and_trees
@in_a_form = false

render :layout => "application"
end

def tagging
assert_privileges("infra_networking_tag")
tagging_edit('Switch', false)
Expand Down
7 changes: 6 additions & 1 deletion app/helpers/infra_networking_helper/textual_summary.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def textual_group_properties
end

def textual_group_relationships
TextualGroup.new(_("Relationships"), %i[hosts custom_button_events])
TextualGroup.new(_("Relationships"), %i[hosts custom_button_events lans])
end

def textual_group_smart_management
Expand All @@ -28,6 +28,11 @@ def textual_hosts
h
end

def textual_lans
portgroups = @record.lans.map(&:name)
{:label => _("Portgroup"), :icon => "pficon pficon-network", :value => portgroups.join(', ')}
end

def textual_custom_button_events
return nil unless User.current_user.super_admin_user? || User.current_user.admin?

Expand Down

0 comments on commit 352fb92

Please sign in to comment.