-
Notifications
You must be signed in to change notification settings - Fork 357
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Let Select Provision Template screen use GTL #4509
Conversation
6756adc
to
0450049
Compare
@himdel @karelhala please look at it :) |
0450049
to
2fd3d7f
Compare
@PanSpagetka Cannot apply the following label because they are not recognized: pending_core |
6499ea6
to
7e13606
Compare
@miq-bot add_label pending core |
7e13606
to
64f6e2c
Compare
I haven't tested this, pending core, but LGTM. As far as I know, this is the first time we need to select a line in gtl (other than checkboxes). |
%tbody | ||
- @vms.each do |row| | ||
- if row.respond_to?(:volume_template?) || row.respond_to?(:volume_snapshot_template?) | ||
= render :partial => "miq_request/pre_prov_volumes_snapshots", :locals => {:row => row} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@PanSpagetka these partials can be removed as well. This was their only usage
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Just don't include the pack if it's namaed *-common
.
@@ -7,3 +7,4 @@ | |||
:ajax_buttons => true, | |||
:continue_button => true, | |||
:noreset => true}) | |||
= javascript_pack_tag "manageiq-ui-classic/toolbar-actions-common" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If your pack is named *-common
you don't have to import it, it's imported automatically.
@miq-bot add_label blocker |
@PanSpagetka only a single template or Image is allowed to be selected on Pre-Provisioning screen, so i don't think we need Select All Checkbox on the screen and also need to make sure to enable/disable "Continue" button only when single item is selected. |
@PanSpagetka as this for a blocker issue, do you have an update on this PR. |
64f6e2c
to
fae1ec3
Compare
@miq-bot remove_label pending core |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ReferenceError: "provisioningListenToRx is not defined"
error after clicking the "Provision Instances" button
@PanSpagetka you probably need this for the JS specs to pass: diff --git a/spec/javascripts/support/jasmine.yml b/spec/javascripts/support/jasmine.yml
index 83de8be4d..86757641a 100644
--- a/spec/javascripts/support/jasmine.yml
+++ b/spec/javascripts/support/jasmine.yml
@@ -23,6 +23,7 @@ src_files:
- __spec__/helpers/toolbar.js
- packs/manageiq-ui-classic/application-common.js
- packs/manageiq-ui-classic/toolbar-actions-common.js
+- packs/manageiq-ui-classic/provisioning-actions-common.js
# stylesheets
# Not sure what's happening with ruby specs.. |
32e8d88
to
45dbec6
Compare
%w(auth_key_pair_cloud availability_zone cloud_tenant ems_cloud host_aggregate orchestration_stack vm_cloud).include?(request.parameters[:controller]) | ||
'ProvisionCloudTemplates.yaml' | ||
elsif request.parameters[:template_klass] == 'infra' || | ||
%w(ems_cluster ems_infra host resource_pool storage vm_infra) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing include?(something)
b6452da
to
b6a0e6f
Compare
Some comments on commits PanSpagetka/manageiq-ui-classic@0491563~...b6a0e6f spec/controllers/vm_cloud_controller_spec.rb
|
Checked commits PanSpagetka/manageiq-ui-classic@0491563~...b6a0e6f with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 **
|
%w(auth_key_pair_cloud availability_zone cloud_tenant ems_cloud host_aggregate orchestration_stack vm_cloud).include?(request.parameters[:controller]) | ||
'ProvisionCloudTemplates.yaml' | ||
elsif request.parameters[:template_klass] == 'infra' || | ||
%w(ems_cluster ems_infra host resource_pool storage vm_infra).include?(request.parameters[:controller]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one of these lines is badly indented, either 1067 or 1070 ;)
sendDataWithRx({ | ||
type: 'GTL_CLICKED', | ||
actionType: this.initObject.additionalOptions.custom_action.type, | ||
payload: { item: item, action: this.initObject.additionalOptions.custom_action }}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
eslint should complain here, should be
sendDataWithRx({
type: 'GTL_CLICKED',
actionType: this.initObject.additionalOptions.custom_action.type,
payload: {
item: item,
action: this.initObject.additionalOptions.custom_action,
},
});
EDIT: #5003
var selectedItem = _.find(this.gtlData.rows, {long_id: item.long_id}); | ||
selectedItem.selected = true; | ||
this.$window.sendDataWithRx({rowSelect: selectedItem}); | ||
ManageIQ.gridChecks = []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra space before []
EDIT: #5003
@@ -173,6 +173,22 @@ | |||
expect(response.status).to eq(200) | |||
end | |||
|
|||
it 'renders gtl when open pre provision screen' do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should probably have a similar test in vm_infra
Testing in UI:
Nested lists: auth_key_pair_cloud - redirects to ems_cluster - redirects to |
The different values for cloud: name, type, OS, platform, provider - always match cpu - there used to be a distinction between 0 and N/A, now it's 0 in both cases (but not sure how meaningful that distinction is in the first place) memory - the same as cpu, plus when it was not N/A, you'd get "0 bytes", not 0. disk size - N/A now looks as "" deprecated - was "false", "N/A" or "true", now it's "", "N/A" or "true" (so false becomes an empty string) snapshot - N/A becomes 0 tenant - N/A becomes "" I have no idea what the 0 vs "" vs N/A distinction really means (how is a template with 0 memory different from a template with N/A memory), and it doesn't seem documened, so maybe those differences don't matter. The one that does look like a bug is that "false" to "" change in deprecated, any chance that can be fixed? |
Another change is that sorting is now case-insensitive (so "CentOS Atomic" goes after "centos-6" now, and not before), but that matches all the other screens 👍 |
Ok, so with ManageIQ/manageiq#18237, I'm not seeing anything surprising anymore 👍 The memory format change seems inevitable, as I'm not aware of a way to sort by the field numerically but present in in a human-readable form with the current GTL implementation. We can probably fix that later if desired. (In the |
OK, looks like there are no more reasons to hold off merging :). |
Let Select Provision Template screen use GTL (cherry picked from commit 3b71ea1) https://bugzilla.redhat.com/show_bug.cgi?id=1610927
Hammer backport details:
|
When navigate to Compute -> Cloud -> Instances -> Provision with public images enabled, UI breaks down. It was caused by trying to load and display all Templates in single table. When rewritten using GTL, table is now paginated and lazy loading record for each page.
Links
https://bugzilla.redhat.com/show_bug.cgi?id=1610927
ManageIQ/manageiq#17884 & ManageIQ/manageiq#18217
Screenshot
New screenshot, without checkboxes
Steps for Testing/QA
You need to run bin/webpack in ui-classic directory
Try more provision screens, to be sure nothing is broken.
Backend PR needs to be merged first