Skip to content

Commit

Permalink
Added Events tab for Nuage Network Provider
Browse files Browse the repository at this point in the history
  • Loading branch information
Vojko Rozic committed Sep 15, 2017
1 parent ff8407a commit b94dac0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
Expand Up @@ -394,6 +394,10 @@ ManageIQ.angular.app.controller('emsCommonFormController', ['$http', '$scope', '
if ($scope.emsCommonModel.emstype === 'openstack') {
$scope.emsCommonModel.tenant_mapping_enabled = false;
}
} else if ($scope.emsCommonModel.emstype === 'nuage_network') {
$scope.emsCommonModel.default_api_port = $scope.getDefaultApiPort($scope.emsCommonModel.emstype);
$scope.emsCommonModel.event_stream_selection = "amqp";
$scope.emsCommonModel.amqp_security_protocol = 'non-ssl';
} else if ($scope.emsCommonModel.emstype === 'scvmm') {
$scope.emsCommonModel.default_security_protocol = 'ssl';
} else if ($scope.emsCommonModel.emstype === 'rhevm') {
Expand Down
12 changes: 9 additions & 3 deletions app/views/layouts/angular/_multi_auth_credentials.html.haml
Expand Up @@ -7,6 +7,10 @@
= miq_tab_header('default', nil, {'ng-click' => "changeAuthTab('default')"}) do
%i{"error-on-tab" => "default", :style => "color:#cc0000"}
= _("Default")
- if %w(ems_network).include?(controller_name)
= miq_tab_header('amqp', nil, {'ng-click' => "changeAuthTab('amqp')"}) do
%i{"error-on-tab" => "amqp", :style => "color:#cc0000"}
= _("Events")
- if %w(ems_cloud ems_infra).include?(controller_name)
= miq_tab_header('metrics', nil, {'ng-click' => "changeAuthTab('metrics')"}) do
%i{"error-on-tab" => "metrics", :style => "color:#cc0000"}
Expand Down Expand Up @@ -141,7 +145,7 @@
%span{:style => "color:black"}
= _("Required. Used to gather Utilization data.")

- if %w(ems_cloud ems_infra).include?(params[:controller])
- if %w(ems_cloud ems_infra ems_network).include?(params[:controller])
= miq_tab_content('metrics', 'default') do
.form-group
.col-md-12{"ng-if" => "#{ng_model}" == "emsCommonModel" && "#{ng_model}.emstype == 'rhevm'"}
Expand Down Expand Up @@ -171,7 +175,7 @@
= _("Used to gather Capacity & Utilization metrics.")
= miq_tab_content('amqp', 'default') do
.form-group
.col-md-12{"ng-if" => "#{ng_model}" == "emsCommonModel" && "#{ng_model}.emstype == 'openstack' || #{ng_model}.emstype == 'openstack_infra' || #{ng_model}.emstype == 'vmware_cloud'"}
.col-md-12{"ng-if" => "#{ng_model}" == "emsCommonModel" && "#{ng_model}.emstype == 'nuage_network' || #{ng_model}.emstype == 'openstack' || #{ng_model}.emstype == 'openstack_infra' || #{ng_model}.emstype == 'vmware_cloud'"}
%label.radio-inline.control-label{"for" => "none_radio", "ng-show" => "#{ng_model}.emstype == 'vmware_cloud'"}
%input{:type => "radio",
:name => "event_stream_selection",
Expand Down Expand Up @@ -218,7 +222,7 @@
:prefix => "amqp",
:basic_info_needed => true}
.form-group
.col-md-12{"ng-if" => "#{ng_model}" == "emsCommonModel" && "#{ng_model}.emstype == 'openstack' || #{ng_model}.emstype == 'openstack_infra'"}
.col-md-12{"ng-if" => "#{ng_model}" == "emsCommonModel" && "#{ng_model}.emstype == 'nuage_network' || #{ng_model}.emstype == 'openstack' || #{ng_model}.emstype == 'openstack_infra'"}
%span{:style => "color:black"}
%div{"ng-if" => "emsCommonModel.event_stream_selection == 'amqp'"}
= _("Used to authenticate with OpenStack AMQP Messaging Bus for event handling. Configure AMQP if eventing is not enabled on Ceilometer.")
Expand Down Expand Up @@ -408,6 +412,8 @@
$('#auth_tabs').show();
%div{"ng-if" => "#{ng_model}.emstype == 'nuage_network'"}
:javascript
miq_tabs_show_hide("#amqp_tab", true);
miq_tabs_show_hide("#metrics_tab", false);
miq_tabs_init('#auth_tabs');
$('#auth_tabs').show();
%div{"ng-if" => "#{ng_model}.ems_controller == 'ems_container'"}
Expand Down

0 comments on commit b94dac0

Please sign in to comment.