Skip to content

Commit

Permalink
Merge pull request #12970 from mansam/update-image-view-to-differenti…
Browse files Browse the repository at this point in the history
…ate-between-snapshots-and-non-snapshots

Update Cloud Image View to Differentiate Between Snapshots and Non-Snapshots
  • Loading branch information
blomquisg authored Mar 15, 2017
2 parents 5745d62 + ba7d4d1 commit 8f29231
Show file tree
Hide file tree
Showing 2 changed files with 109 additions and 97 deletions.
8 changes: 8 additions & 0 deletions app/models/manageiq/providers/cloud_manager/template.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
class ManageIQ::Providers::CloudManager::Template < ::MiqTemplate
default_value_for :cloud, true

def image?
genealogy_parent.nil?
end

def snapshot?
!genealogy_parent.nil?
end

def self.eligible_for_provisioning
super.where(:type => %w(ManageIQ::Providers::Amazon::CloudManager::Template
ManageIQ::Providers::Openstack::CloudManager::Template
Expand Down
198 changes: 101 additions & 97 deletions product/views/ManageIQ_Providers_CloudManager_Template.yaml
Original file line number Diff line number Diff line change
@@ -1,97 +1,101 @@
#
# 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: Images

# Menu name
name: Images

# Main DB table report is based on
db: TemplateCloud

# Columns to fetch from the main table
cols:
- name
- last_compliance_status
- allocated_disk_storage
- last_scan_on
- region_description

# Included tables (joined, has_one, has_many) and columns
include:
ext_management_system:
columns:
- name
hardware:
columns:
- bitness
- virtualization_type
- root_device_type

# Included tables and columns for query performance
include_for_find:
:compliances: {}
:operating_system: {}
:tags: {}

# Order of columns (from all tables)
col_order:
- name
- ext_management_system.name
- last_compliance_status
- allocated_disk_storage
- hardware.bitness
- hardware.virtualization_type
- hardware.root_device_type
- last_scan_on
- region_description

# Column titles, in order
headers:
- Name
- Provider
- Compliant
- Allocated Size
- Architecture
- Virtualization Type
- Root Device Type
- Last Analysis Time
- Region

# 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:
#
# 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: Images

# Menu name
name: Images

# Main DB table report is based on
db: TemplateCloud

# Columns to fetch from the main table
cols:
- name
- last_compliance_status
- allocated_disk_storage
- last_scan_on
- region_description
- image?

# Included tables (joined, has_one, has_many) and columns
include:
ext_management_system:
columns:
- name
hardware:
columns:
- bitness
- virtualization_type
- root_device_type

# Included tables and columns for query performance
include_for_find:
:compliances: {}
:operating_system: {}
:hardware: {}
:tags: {}

# Order of columns (from all tables)
col_order:
- name
- ext_management_system.name
- image?
- last_compliance_status
- allocated_disk_storage
- hardware.bitness
- hardware.virtualization_type
- hardware.root_device_type
- last_scan_on
- region_description

# Column titles, in order
headers:
- Name
- Provider
- Type
- Compliant
- Allocated Size
- Architecture
- Virtualization Type
- Root Device Type
- Last Analysis Time
- Region

# 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 8f29231

Please sign in to comment.