-
Notifications
You must be signed in to change notification settings - Fork 898
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12205 from moolitayer/datawarehouse
Adding Datawarehouse management
- Loading branch information
Showing
48 changed files
with
1,011 additions
and
12 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
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,47 @@ | ||
class EmsDatawarehouseController < ApplicationController | ||
include EmsCommon | ||
include Mixins::EmsCommonAngular | ||
|
||
before_action :check_privileges | ||
before_action :get_session_data | ||
after_action :cleanup_action | ||
after_action :set_session_data | ||
|
||
def self.model | ||
ManageIQ::Providers::DatawarehouseManager | ||
end | ||
|
||
def self.table_name | ||
@table_name ||= "ems_datawarehouse" | ||
end | ||
|
||
def index | ||
redirect_to :action => 'show_list' | ||
end | ||
|
||
def show_link(ems, options = {}) | ||
ems_datawarehouse_path(ems.id, options) | ||
end | ||
|
||
def ems_path(*args) | ||
ems_datawarehouse_path(*args) | ||
end | ||
|
||
def listicon_image(item, _view) | ||
item.decorate.try(:listicon_image) | ||
end | ||
|
||
def new_ems_path | ||
new_ems_datawarehouse_path | ||
end | ||
|
||
def restful? | ||
true | ||
end | ||
|
||
def ems_datawarehouse_form_fields | ||
ems_form_fields | ||
end | ||
|
||
menu_section :dwh | ||
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
80 changes: 80 additions & 0 deletions
80
app/helpers/application_helper/toolbar/ems_datawarehouse_center.rb
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,80 @@ | ||
class ApplicationHelper::Toolbar::EmsDatawarehouseCenter < ApplicationHelper::Toolbar::Basic | ||
button_group('ems_datawarehouse_vmdb', [ | ||
select( | ||
:ems_datawarehouse_vmdb_choice, | ||
'fa fa-cog fa-lg', | ||
t = N_('Configuration'), | ||
t, | ||
:items => [ | ||
button( | ||
:ems_datawarehouse_refresh, | ||
'fa fa-refresh fa-lg', | ||
N_('Refresh items and relationships related to this Datawarehouse Provider'), | ||
N_('Refresh items and relationships'), | ||
:confirm => N_("Refresh items and relationships related to this Datawarehouse Provider?")), | ||
separator, | ||
button( | ||
:ems_datawarehouse_edit, | ||
'pficon pficon-edit fa-lg', | ||
t = N_('Edit this Datawarehouse Provider'), | ||
t), | ||
button( | ||
:ems_datawarehouse_delete, | ||
'pficon pficon-delete fa-lg', | ||
t = N_('Remove this Datawarehouse Provider'), | ||
t, | ||
:url_parms => "&refresh=y", | ||
:confirm => N_("Warning: This Datawarehouse Provider and ALL" \ | ||
" of its components will be permanently removed!")), | ||
] | ||
), | ||
]) | ||
button_group('ems_datawarehouse_monitoring', [ | ||
select( | ||
:ems_datawarehouser_monitoring_choice, | ||
'product product-monitoring fa-lg', | ||
t = N_('Monitoring'), | ||
t, | ||
:items => [ | ||
button( | ||
:ems_datawarehouse_timeline, | ||
'product product-timeline fa-lg', | ||
N_('Show Timelines for this Datawarehouse Provider'), | ||
N_('Timelines'), | ||
:url_parms => "?display=timeline"), | ||
] | ||
), | ||
]) | ||
button_group('ems_datawarehouse_policy', [ | ||
select( | ||
:ems_datawarehouse_policy_choice, | ||
'fa fa-shield fa-lg', | ||
t = N_('Policy'), | ||
t, | ||
:items => [ | ||
button( | ||
:ems_datawarehouse_tag, | ||
'pficon pficon-edit fa-lg', | ||
N_('Edit Tags for this Datawarehouse Provider'), | ||
N_('Edit Tags')), | ||
] | ||
), | ||
]) | ||
button_group('ems_datawarehouse_authentication', [ | ||
select( | ||
:ems_datawarehouse_authentication_choice, | ||
'fa fa-lock fa-lg', | ||
t = N_('Authentication'), | ||
t, | ||
:items => [ | ||
button( | ||
:ems_datawarehouse_recheck_auth_status, | ||
'fa fa-search fa-lg', | ||
N_("Re-check Authentication Status for this #{ui_lookup(:table=>'ems_datawarehouse')}"), | ||
N_('Re-check Authentication Status'), | ||
:klass => ApplicationHelper::Button::GenericFeatureButton, | ||
:options => {:feature => :authentication_status}), | ||
] | ||
), | ||
]) | ||
end |
86 changes: 86 additions & 0 deletions
86
app/helpers/application_helper/toolbar/ems_datawarehouses_center.rb
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,86 @@ | ||
class ApplicationHelper::Toolbar::EmsDatawarehousesCenter < ApplicationHelper::Toolbar::Basic | ||
button_group('ems_datawarehouse_vmdb', [ | ||
select( | ||
:ems_datawarehouse_vmdb_choice, | ||
'fa fa-cog fa-lg', | ||
t = N_('Configuration'), | ||
t, | ||
:items => [ | ||
button( | ||
:ems_datawarehouse_refresh, | ||
'icon fa fa-refresh fa-lg', | ||
N_('Refresh Items and Relationships for these Datawarehouse Providers'), | ||
N_('Refresh Items and Relationships'), | ||
:confirm => N_("Refresh Items and Relationships related to these Datawarehouse Providers?"), | ||
:enabled => false, | ||
:url_parms => "main_div", | ||
:onwhen => "1+"), | ||
separator, | ||
button( | ||
:ems_datawarehouse_new, | ||
'pficon pficon-add-circle-o fa-lg', | ||
t = N_('Add a New Datawarehouse Provider'), | ||
t, | ||
:url => "/new"), | ||
button( | ||
:ems_datawarehouse_edit, | ||
'pficon pficon-edit fa-lg', | ||
N_('Select a single Datawarehouse Providers to edit'), | ||
N_('Edit Selected Datawarehouse Providers'), | ||
:url_parms => "main_div", | ||
:enabled => false, | ||
:onwhen => "1"), | ||
button( | ||
:ems_datawarehouse_delete, | ||
'pficon pficon-delete fa-lg', | ||
N_('Remove selected Datawarehouse Providers'), | ||
N_('Remove Datawarehouse Providers'), | ||
:url_parms => "main_div", | ||
:confirm => N_("Warning: The selected Datawarehouse Providers and ALL " \ | ||
"of their components will be permanently removed!"), | ||
:enabled => false, | ||
:onwhen => "1+"), | ||
] | ||
), | ||
]) | ||
button_group('ems_datawarehouse_policy', [ | ||
select( | ||
:ems_datawarehouse_policy_choice, | ||
'fa fa-shield fa-lg', | ||
t = N_('Policy'), | ||
t, | ||
:enabled => false, | ||
:onwhen => "1+", | ||
:items => [ | ||
button( | ||
:ems_datawarehouse_tag, | ||
'pficon pficon-edit fa-lg', | ||
N_('Edit Tags for these Datawarehouse Providers'), | ||
N_('Edit Tags'), | ||
:url_parms => "main_div", | ||
:enabled => false, | ||
:onwhen => "1+"), | ||
] | ||
), | ||
]) | ||
button_group('ems_datawarehouse_authentication', [ | ||
select( | ||
:ems_datawarehouse_authentication_choice, | ||
'fa fa-lock fa-lg', | ||
t = N_('Authentication'), | ||
t, | ||
:enabled => false, | ||
:onwhen => "1+", | ||
:items => [ | ||
button( | ||
:ems_datawarehouse_recheck_auth_status, | ||
'fa fa-search fa-lg', | ||
N_('Re-check Authentication Status for the selected Datawarehouse Providers'), | ||
N_('Re-check Authentication Status'), | ||
:url_parms => "main_div", | ||
:enabled => false, | ||
:onwhen => "1+"), | ||
] | ||
), | ||
]) | ||
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,15 @@ | ||
module DatawarehouseSummaryHelper | ||
include TextualMixins::TextualName | ||
|
||
def textual_ems | ||
textual_link(@record.ext_management_system) | ||
end | ||
|
||
def textual_nativeid | ||
@record.nativeid | ||
end | ||
|
||
def textual_group_smart_management | ||
%i(tags) | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module EmsDatawarehouseHelper | ||
include DatawarehouseSummaryHelper | ||
include_concern 'TextualSummary' | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
module EmsDatawarehouseHelper::TextualSummary | ||
include TextualMixins::TextualRefreshStatus | ||
# | ||
# Groups | ||
# | ||
|
||
def textual_group_properties | ||
%i(name type hostname port) | ||
end | ||
|
||
def textual_group_relationships | ||
# Order of items should be from parent to child | ||
[] | ||
end | ||
|
||
def textual_group_status | ||
%i(refresh_status) | ||
end | ||
|
||
def textual_group_smart_management | ||
%i(tags) | ||
end | ||
|
||
# | ||
# Items | ||
# | ||
|
||
def textual_name | ||
@ems.name | ||
end | ||
|
||
def textual_type | ||
@ems.emstype_description | ||
end | ||
|
||
def textual_hostname | ||
@ems.hostname | ||
end | ||
|
||
def textual_port | ||
@ems.supports_port? ? @ems.port : nil | ||
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
Oops, something went wrong.