diff --git a/app/controllers/ops_controller.rb b/app/controllers/ops_controller.rb index f408c9a71653..8e1a298f4b22 100644 --- a/app/controllers/ops_controller.rb +++ b/app/controllers/ops_controller.rb @@ -7,15 +7,29 @@ class OpsController < ApplicationController include OpsHelper::MyServer include Mixins::CustomButtonDialogFormMixin include Mixins::BreadcrumbsMixin + include Mixins::GenericShowMixin before_action :check_privileges before_action :get_session_data after_action :cleanup_action + def self.table_name + @table_name ||= 'ops' + end + def index redirect_to(:action => 'explorer') end + def show + @display = params[:display] if params[:display] + @record = Tenant.find_by(:id => params[:id]) + case @display + when 'service_templates' + nested_list(ServiceTemplate, :breadcrumb_title => _('Catalog Items and Bundles'), :named_scope => :with_tenant) + end + end + OPS_X_BUTTON_ALLOWED_ACTIONS = { 'collect_logs' => :logs_collect, 'collect_current_logs' => :collect_current_logs, diff --git a/app/views/ops/show.html.haml b/app/views/ops/show.html.haml new file mode 100644 index 000000000000..039604839f28 --- /dev/null +++ b/app/views/ops/show.html.haml @@ -0,0 +1,2 @@ +#main_div + = render :partial => 'layouts/gtl' diff --git a/config/routes.rb b/config/routes.rb index 7d4a4dc589c6..319c49dda8a4 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -2476,6 +2476,7 @@ log_protocol_changed pglogical_subscriptions_form_fields schedule_form_fields + show show_product_update tenant_quotas_form_fields tenant_form_fields diff --git a/product/views/Ops.yaml b/product/views/Ops.yaml new file mode 100644 index 000000000000..005099008795 --- /dev/null +++ b/product/views/Ops.yaml @@ -0,0 +1,104 @@ +# +# This is an MIQ Report configuration file +# Single value parameters are specified as: +# single_value_parm: value +# Multiple value parameters are specified as: +# multi_value_parm: +# - value 1 +# - value 2 +# + +# Report title +title: Catalog Items + +# Menu name +name: Catalog Items + +# Main DB table report is based on +db: ServiceTemplate + +# Columns to fetch from the main table +cols: +- name +- description +- type_display +- prov_type +- display +#- provision_cost +- created_at + +# Included tables (joined, has_one, has_many) and columns +include: + picture: + columns: + - id + service_template_catalog: + columns: + - name + tenant: + columns: + - name + +# Included tables and columns for query performance +include_for_find: + :picture: {} + +# Order of columns (from all tables) +col_order: +- name +- description +- tenant.name +- type_display +- prov_type +- display +- service_template_catalog.name +#- provision_cost +- created_at + +# Column titles, in order +headers: +- Name +- Description +- Tenant +- Type +- Item Type +- Display in Catalog +- Catalog +#- Cost +- Created On + +col_formats: +- +- +- +- :boolean_yes_no + +# Condition(s) string for the SQL query +conditions: + +# Order string for the SQL query +order: Ascending + +# Columns to sort the report on, in order +sortby: +- name + +# Group rows (y=yes,n=no,c=count) +group: n + +# Graph type +# Bar +# Column +# ColumnThreed +# ParallelThreedColumn +# Pie +# PieThreed +# StackedBar +# StackedColumn +# StackedThreedColumn + +graph: + +# Dimensions of graph (1 or 2) +# Note: specifying 2 for a single dimension graph may not return expected results +dims: