Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Add physical server controller. - app/controllers/physical_server_controller.rb - Implement show_list view and basic toolbar - Implements show view for specific physical server
- Loading branch information
1 parent
5f643d8
commit c0f9dbe
Showing
6 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
class PhysicalServerController < ApplicationController | ||
include Mixins::GenericListMixin | ||
include Mixins::GenericShowMixin | ||
|
||
before_action :check_privileges | ||
before_action :session_data | ||
after_action :cleanup_action | ||
after_action :set_session_data | ||
|
||
def self.table_name | ||
@table_name ||= "physical_servers" | ||
end | ||
|
||
def session_data | ||
@title = _("Physical Servers") | ||
@layout = "physical_server" | ||
@lastaction = session[:physical_server_lastaction] | ||
end | ||
|
||
def set_session_data | ||
session[:layout] = @layout | ||
session[:physical_server_lastaction] = @lastaction | ||
end | ||
|
||
def show_list | ||
# Disable the cache to prevent a caching problem that occurs when | ||
# pressing the browser's back arrow button to return to the show_list | ||
# page while on the Physical Server's show page. Disabling the cache | ||
# causes the page and its session variables to actually be reloaded. | ||
disable_client_cache | ||
|
||
process_show_list | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
= render :partial => "layouts/flash_msg" | ||
.row | ||
.col-md-12.col-lg-6 | ||
TODO: add groups |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#main_div | ||
- arr = %w(physical_server physical_servers) | ||
- if arr.include?(@display) && @showtype != "compare" | ||
= render(:partial => "layouts/gtl", :locals => {:action_url => "show/#{@ph_server.id}"}) | ||
- else | ||
= render(:partial => @showtype) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#main_div | ||
= render :partial => 'layouts/gtl' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters