Skip to content

Commit

Permalink
Add list view for relevant Service Catalogs and Bundles
Browse files Browse the repository at this point in the history
  • Loading branch information
Hilda Stastna committed Jul 3, 2019
1 parent cf09f53 commit 96fd535
Show file tree
Hide file tree
Showing 4 changed files with 121 additions and 0 deletions.
14 changes: 14 additions & 0 deletions app/controllers/ops_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions app/views/ops/show.html.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#main_div
= render :partial => 'layouts/gtl'
1 change: 1 addition & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
104 changes: 104 additions & 0 deletions product/views/Ops.yaml
Original file line number Diff line number Diff line change
@@ -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:

0 comments on commit 96fd535

Please sign in to comment.