Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
2d1801e
Convert order service form
GilbertCherrie Sep 7, 2022
b01de42
Update
GilbertCherrie Sep 7, 2022
3017f73
Update
GilbertCherrie Sep 9, 2022
eb286a7
Update
GilbertCherrie Sep 13, 2022
3e085dd
Update
GilbertCherrie Oct 2, 2022
a9891f7
Fixed time picker submit
GilbertCherrie Oct 7, 2022
3f74d5d
update
GilbertCherrie Oct 12, 2022
8525f7b
Update
GilbertCherrie Oct 13, 2022
0454551
Fixed Various UI Issues Related to the Provider Dashboard Charts
DavidResende0 Aug 31, 2022
862f586
Associate disassociate floating ip
MelsHyrule Aug 24, 2022
77f49a1
Update moment-timezone
GilbertCherrie Sep 7, 2022
67ea3f5
generalize cloud network factories
nasark Sep 2, 2022
9f9d5c7
rspec-mocks 3.10.3 requires "with" to be explicit with hashes vs. kwargs
jrafanie Sep 8, 2022
647defa
Handle nil return from class_by_ems
jrafanie Sep 9, 2022
93d8bfa
added @record.id check to prevent undefined error
DavidResende0 Sep 9, 2022
9b16a51
Move application settings link upwards in sub menu
jeffibm Sep 9, 2022
6df078b
Fix dashboard widget legend items visibility
jeffibm Sep 9, 2022
221dda6
Deleted Reports Still Counting as Being Selected
DavidResende0 Sep 9, 2022
3646e44
Unknown error at physical storage validation:
OrGur1987 Sep 9, 2022
5f67601
Catalog summary convertion
jeffibm Jun 7, 2022
7b24d02
Update CODEOWNERS
Fryguy Sep 15, 2022
fe36008
Convert generic object definition button summary pages to react
GilbertCherrie Sep 16, 2022
df14cc5
added widget inside storage manager that shows distribution of fixed/…
galoiring Aug 29, 2022
8e4ccd0
Remove needless string interpolation
jrafanie Sep 20, 2022
1a4ffc8
Test ruby 2.7/3.0
jrafanie Sep 21, 2022
1aa3c35
Fixed No Route Matches Error in Services Requests
DavidResende0 Sep 19, 2022
38ece6a
Fix missing selected items during compare
jeffibm Sep 15, 2022
053ee38
added widget inside storage manager that shows distribution of fixed/…
galoiring Aug 29, 2022
6dbd8c9
Rewriting Tenant Manage Quotas Form to React
DavidResende0 Jul 18, 2022
80df377
fix tooltip for native console in infra provider
Sep 28, 2022
7a9bec8
use lowercase for Infrastructure Provider in open native console
Sep 29, 2022
1701f4c
Fix infrastructure hosts power menu selection
jeffibm Sep 30, 2022
20df38b
Convert catalog provision grid tables from HAML to React
jeffibm Sep 27, 2022
30928a9
Add Management Console to Infra VMs
agrare Sep 30, 2022
8df4344
Convert catalog summary request-info tabs to react
jeffibm Sep 22, 2022
c513d70
Treat our locale json files as binary in git
jrafanie Oct 5, 2022
6e7408b
Safe delete saved reports
MelsHyrule Oct 5, 2022
8e9a5f6
Add ssh_public_key option to provision dialogs
agrare Oct 5, 2022
bf251ce
Fix dshboard chart legend items in fullscreen
jeffibm Oct 6, 2022
1bd4a99
Add server Placement Group
Kuldip-Nanda Apr 5, 2022
7c4c11d
Update Placement Group "textual summary" specs
jaywcarman Oct 7, 2022
31d79a5
Use placement_group features to assert privileges
jaywcarman Oct 10, 2022
942c9a9
Fix reference to old placement_group_list feature
agrare Oct 11, 2022
1d54605
Fix compare selected items during compare by adding default selected …
jeffibm Oct 6, 2022
be5f38b
Fix VM textual summary for placement group
jaywcarman Oct 11, 2022
4a65ecd
updating to latest d3
MelsHyrule Oct 10, 2022
b20a461
timeline options
MelsHyrule Oct 14, 2022
8d65ebe
Revert "timeline options"
jeffibm Oct 14, 2022
ae16b42
timeline options
MelsHyrule Oct 12, 2022
1aac269
October 13 english translations
jrafanie Oct 13, 2022
6d274e0
Upgrade workflows to actions/checkout@v3
bdunne Oct 17, 2022
bc14a19
Fix google font references
jeffibm Oct 18, 2022
8e1e56c
Revert "timeline options"
MelsHyrule Oct 18, 2022
29dc271
Fix lifecycle provision of template
jeffibm Oct 6, 2022
d837fff
New vm resize ddf form created
alizapeikes Sep 16, 2022
a2d0531
Removed old code no longer being used with ddf
alizapeikes Sep 23, 2022
43948ec
vm resize test created and old test updated
alizapeikes Oct 6, 2022
22c0bff
miq_reqest reconfigure ui updated to work with ddf resize options
alizapeikes Oct 6, 2022
2352997
add validation to wwpn to be hexadecimal
Lauferin Oct 18, 2022
a340a18
switch placement group from text-field to pull down field - vm provis…
alizapeikes Oct 14, 2022
4e30434
updating terser
MelsHyrule Oct 19, 2022
97d040b
updating d3-color
MelsHyrule Oct 19, 2022
99c6771
Fixes Password Field so it is Correctly Rendered as a Text Area
DavidResende0 Oct 24, 2022
58ca39f
change name of variable according to proptypes definition
Lauferin Oct 27, 2022
205ace2
Fix container-dashboard's overview's breadcrumb link
jeffibm Oct 31, 2022
e847038
Always display the Provision instance action buttons at the bottom
jeffibm Oct 31, 2022
83d3ac2
added a host initiator group field to host initiator form, which enab…
OrGur1987 Oct 25, 2022
36bd84b
Capitalize Field Title in Host Initiator Form
DavidResende0 Oct 31, 2022
896c0b3
Timeline UI Conversion
MelsHyrule Oct 31, 2022
2551f73
Output from rake locale:po_to_json on master on Nov21
jrafanie Nov 1, 2022
37a6ed5
Catalog host grid HAML table conversion to react
jeffibm Oct 4, 2022
246b6bb
Catalog edit page tabs conversion from HAML to react
jeffibm Oct 3, 2022
288d62a
Datastore Form conversion from angular to react
jeffibm Sep 15, 2022
004b785
Removed unused angular retirement code
GilbertCherrie Nov 2, 2022
19e47dd
Convert order service form
GilbertCherrie Sep 7, 2022
03424ec
Update
GilbertCherrie Dec 30, 2022
59104f8
Update
GilbertCherrie May 23, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
app/javascript/oldjs/locale/*.json -text -diff
9 changes: 1 addition & 8 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,8 +1 @@
# trees
app/presenters/tree_node/ @skateman
app/presenters/tree_builder_* @skateman
# styling and images
app/assets/stylesheets/ @epwinchell
app/assets/images/ @epwinchell
# topology services
app/services/*topology_service.rb @skateman
* @ManageIQ/committers-ui
28 changes: 15 additions & 13 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
---
name: CI

on:
push:
pull_request:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'

- cron: 0 0 * * *
jobs:
ci:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version:
- '2.7'
- '3.0'
node-version:
- 14
test-suite:
Expand All @@ -24,7 +23,7 @@ jobs:
- spec:jest
- spec:routes
include:
- ruby-version: '2.6'
- ruby-version: '2.7'
node-version: 14
test-suite: spec
services:
Expand All @@ -34,36 +33,39 @@ jobs:
POSTGRESQL_USER: root
POSTGRESQL_PASSWORD: smartvm
POSTGRESQL_DATABASE: vmdb_test
options: --health-cmd pg_isready --health-interval 2s --health-timeout 5s --health-retries 5
options: "--health-cmd pg_isready --health-interval 2s --health-timeout 5s
--health-retries 5"
ports:
- 5432:5432
env:
TEST_SUITE: ${{ matrix.test-suite }}
TEST_SUITE: "${{ matrix.test-suite }}"
PGHOST: localhost
PGPASSWORD: smartvm
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
CC_TEST_REPORTER_ID: "${{ secrets.CC_TEST_REPORTER_ID }}"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up system
run: bin/before_install
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
ruby-version: "${{ matrix.ruby-version }}"
bundler-cache: true
timeout-minutes: 30
- name: Set up Node
if: ${{ matrix.test-suite == 'spec:compile' || matrix.test-suite == 'spec:javascript' || matrix.test-suite == 'spec:jest' }}
if: "${{ matrix.test-suite == 'spec:compile' || matrix.test-suite == 'spec:javascript'
|| matrix.test-suite == 'spec:jest' }}"
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
node-version: "${{ matrix.node-version }}"
cache: yarn
registry-url: https://npm.manageiq.org/
- name: Prepare tests
run: bin/setup
- name: Run tests
run: bundle exec rake
- name: Report code coverage
if: ${{ github.ref == 'refs/heads/master' && matrix.ruby-version == '2.7' && matrix.test-suite == 'spec' }}
if: "${{ github.ref == 'refs/heads/master' && matrix.ruby-version == '2.7' &&
matrix.test-suite == 'spec' }}"
continue-on-error: true
uses: paambaati/[email protected]
3 changes: 3 additions & 0 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1006,6 +1006,7 @@ def get_sort_col
def process_saved_reports(saved_reports, task)
success_count = 0
failure_count = 0
params[:miq_grid_checks] = params[:miq_grid_checks]&.split(",")
MiqReportResult.for_user(current_user).where(:id => saved_reports).order(MiqReportResult.arel_table[:name].lower).each do |rep|
rep.public_send(task) if rep.respond_to?(task) # Run the task
rescue StandardError
Expand All @@ -1019,6 +1020,7 @@ def process_saved_reports(saved_reports, task)
:target_class => "MiqReportResult",
:userid => current_userid
)
params[:miq_grid_checks]&.delete(rep[:id].to_s)
success_count += 1
else
add_flash(_("\"%{record}\": %{task} successfully initiated") % {:record => rep.name, :task => task})
Expand All @@ -1032,6 +1034,7 @@ def process_saved_reports(saved_reports, task)
add_flash(n_("Error during Saved Report delete from the %{product} Database",
"Error during Saved Reports delete from the %{product} Database", failure_count) % {:product => Vmdb::Appliance.PRODUCT_NAME})
end
params[:miq_grid_checks] || []
end

# Common timeprofiles button handler routines
Expand Down
62 changes: 56 additions & 6 deletions app/controllers/application_controller/compare.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ def create_compare_view

rpt = get_compare_report(@sb[:compare_db])
session[:miq_sections] = MiqCompare.sections(rpt)
selected_sections = session[:miq_sections]&.select { |_key, value| value[:checked] == true }
session[:selected_sections] = selected_sections ? selected_sections.keys.map(&:to_s) : []
ids = session[:miq_selected].collect(&:to_i)
@compare = MiqCompare.new({:ids => ids,
:include => session[:miq_sections]},
Expand Down Expand Up @@ -413,13 +415,11 @@ def sections_field_changed
end

def set_checked_sections
session[:selected_sections] = []
params[:all_checked]&.each do |a|
s = a.split(':')
if s.length > 1
session[:selected_sections].push(s[1])
end
selections = []
params[:all_checked]&.each do |item|
add_selections!(selection_names(item), selections)
end
session[:selected_sections] = update_selections(params[:id], selections, params[:check])
end

# Toggle exists/details view
Expand Down Expand Up @@ -1851,4 +1851,54 @@ def section_field_compare_values(view, section, field, base_val)
unset_same_flag unless fld.nil? || base_val == fld[:_value_]
end
end

def validate_name(name)
name&.starts_with?('xx-group')
end

# Method to get the selection names from :all_checked and :id params.
# individual selected item suggests that the variable name contains ':'
# else, the child_names are retrived from the selected_parent item.
def selection_names(name)
if validate_name(name)
count = name.scan(/xx-group/).count
count == 1 ? child_names(name) : [name.split(':')[1]]
end
end

# Method to get the child names of a selected parent item.
# session[:miq_sections] contains all tree names and the keys are filters using the selected group_name[1].
def child_names(name)
child_names = []
group_name = name.split('_')
if group_name[1]
child_sections = session[:miq_sections]&.select { |_key, value| value[:group] == group_name[1] }
if child_sections && child_sections.length > 1
child_names = child_sections.keys.map(&:to_s)
end
end
child_names
end

# Method to add or remove selections if an id is present.
def update_selections(param_id, selections, check)
if param_id
names = selection_names(CGI.unescape(param_id))
case check
when "true" then add_selections!(names, selections)
when "false" then remove_selections!(names, selections)
end
end
selections
end

# Method to add names to the selections.
def add_selections!(names, selections)
selections.replace(selections | names)
end

# Method to remove names to the selections.
def remove_selections!(names, selections)
selections.replace(selections - names)
end
end
2 changes: 2 additions & 0 deletions app/controllers/application_controller/timelines/options.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ def update_from_params(params)
self.levels = params[:tl_levels]&.map(&:to_sym) || group_levels
self.categories = {}
params.fetch(:tl_categories, []).each do |category_display_name|
next if category_display_name == "Other"

group_data = event_groups[events[category_display_name]]
category = {
:display_name => category_display_name,
Expand Down
3 changes: 3 additions & 0 deletions app/controllers/catalog_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -710,6 +710,9 @@ def svc_catalog_provision
ra, st, svc_catalog_provision_finish_submit_endpoint
)
@in_a_form = true
@dialog_locals = options[:dialog_locals]
# require 'byebug'
# byebug
replace_right_cell(:action => "dialog_provision", :dialog_locals => options[:dialog_locals])
else
# if catalog item has no dialog and provision button was pressed from list view
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/cloud_network_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def create
when "add"
options = form_params
ems = ExtManagementSystem.find(options[:ems_id])
if CloudNetwork.class_by_ems(ems).supports?(:create)
if CloudNetwork.class_by_ems(ems)&.supports?(:create)
options.delete(:ems_id)
task_id = ems.create_cloud_network_queue(session[:userid], options)
unless task_id.kind_of?(Integer)
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/container_dashboard_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def breadcrumbs_options
:breadcrumbs => [
{:title => _("Compute")},
{:title => _("Containers")},
{:title => _("Overview"), :url => controller_url},
{:title => _("Overview"), :url => "#{controller_url}/show"},
],
}
end
Expand Down
9 changes: 9 additions & 0 deletions app/controllers/ems_storage_dashboard_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ def aggregate_status_data
render :json => {:data => aggregate_status(params[:id])}
end

def aggregate_event_data
assert_privileges('ems_storage_show') # TODO: might be ems_event_show
render :json => {:data => aggregate_event(params[:id])}
end

private

def block_storage_heatmap_data(ems_id)
Expand All @@ -33,6 +38,10 @@ def aggregate_status(ems_id)
EmsStorageDashboardService.new(ems_id, self, EmsStorage).aggregate_status_data
end

def aggregate_event(ems_id)
EmsStorageDashboardService.new(ems_id, self, EmsStorage).aggregate_event_data
end

def get_session_data
@layout = "ems_storage_dashboard"
end
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/floating_ip_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def create
options = form_params
ems = ExtManagementSystem.find(options[:ems_id])

if FloatingIp.class_by_ems(ems).supports?(:create)
if FloatingIp.class_by_ems(ems)&.supports?(:create)
options.delete(:ems_id)
task_id = ems.create_floating_ip_queue(session[:userid], options)

Expand Down
1 change: 1 addition & 0 deletions app/controllers/generic_object_definition_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ def replace_right_cell
@explorer = false

node = x_node || params[:id]
@node_type = node.split('-').first

v_tb, c_tb = case node_type(node)
when :root then process_root_node(presenter)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,6 @@ def associate_floating_ip_form_fields
def associate_floating_ip_vm
assert_privileges("instance_associate_floating_ip")
@record = find_record_with_rbac(VmCloud, params[:id])
case params[:button]
when "cancel" then associate_handle_cancel_button
when "submit" then associate_handle_submit_button
end

if @sb[:explorer]
replace_right_cell
Expand All @@ -72,38 +68,6 @@ def associate_floating_ip_vm
end
end
end

def associate_handle_cancel_button
add_flash(_("Association of Floating IP with Instance \"%{name}\" was cancelled by the user") % {:name => @record.name})
@record = @sb[:action] = nil
end

def associate_handle_submit_button
if @record.supports?(:associate_floating_ip)
floating_ip = params[:floating_ip][:address]
begin
@record.associate_floating_ip_queue(session[:userid], floating_ip)
add_flash(_("Associating Floating IP %{address} with Instance \"%{name}\"") % {
:address => floating_ip,
:name => @record.name
})
rescue StandardError => ex
add_flash(_("Unable to associate Floating IP %{address} with Instance \"%{name}\": %{details}") % {
:address => floating_ip,
:name => @record.name,
:details => get_error_message_from_fog(ex.to_s)
}, :error)
end
else
add_flash(_("Unable to associate Floating IP with Instance \"%{name}\": %{details}") % {
:name => @record.name,
:details => @record.unsupported_reason(:associate_floating_ip)
}, :error)
end
params[:id] = @record.id.to_s # reset id in params for show
@record = nil
@sb[:action] = nil
end
end
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,63 +61,6 @@ def disassociate_floating_ip_form_fields
def disassociate_floating_ip_vm
assert_privileges("instance_disassociate_floating_ip")
@record = find_record_with_rbac(VmCloud, params[:id])

case params[:button]
when "cancel" then disassociate_handle_cancel_button
when "submit" then disassociate_handle_submit_button
end
end

private

def disassociate_handle_cancel_button
add_flash(_("Disassociation of Floating IP from Instance \"%{name}\" was cancelled by the user") % {:name => @record.name})
@record = @sb[:action] = nil
if @sb[:explorer]
replace_right_cell
else
flash_to_session
render :update do |page|
page << javascript_prologue
page.redirect_to(previous_breadcrumb_url)
end
end
end

def disassociate_handle_submit_button
if @record.supports?(:disassociate_floating_ip)
floating_ip = params[:floating_ip][:address]
begin
@record.disassociate_floating_ip_queue(session[:userid], floating_ip)
add_flash(_("Disassociating Floating IP %{address} from Instance \"%{name}\"") % {
:address => floating_ip,
:name => @record.name
})
rescue StandardError => ex
add_flash(_("Unable to disassociate Floating IP %{address} from Instance \"%{name}\": %{details}") % {
:address => floating_ip,
:name => @record.name,
:details => get_error_message_from_fog(ex.to_s)
}, :error)
end
else
add_flash(_("Unable to disassociate Floating IP from Instance \"%{name}\": %{details}") % {
:name => @record.name,
:details => @record.unsupported_reason(:disassociate_floating_ip)
}, :error)
end
params[:id] = @record.id.to_s # reset id in params for show
@record = nil
@sb[:action] = nil
if @sb[:explorer]
replace_right_cell
else
flash_to_session
render :update do |page|
page << javascript_prologue
page.redirect_to(previous_breadcrumb_url)
end
end
end
end
end
Expand Down
Loading