-
Notifications
You must be signed in to change notification settings - Fork 356
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
Read-only pages for browsing firmware repository #5619
Conversation
Hello @martinpovolny , would you have an idea why my _center.rb menu definitions would be ignored? |
c6e3001
to
6d6bacf
Compare
6d6bacf
to
02fbb1c
Compare
The dependant PR has been merged some time ago so the backend models (FirmwareRegistry, FirmwareBinary and FirmwareTarget) are all upstream yet. Kindly ask to accept this one as well. I've applied most of the UX comments we've discussed with @terezanovotna and @gtanzillo some time ago (sorry for the delay, was on my summer PTO for 2 weeks..), namely the firmware registry page is now enhanced to also contain the list of firmware binaries which makes for much better UX: Similarly the firmware binary page now contains a list of all connected firmware targets: Which basically means entire firmware registry thing is accessible in two clicks (which is great compared to 4 clicks we were doing before). @Hyperkid123 may I also ask for your review; kinda got used to your amazing response time lately :) We're in a hurry for this because after we merge this read-only thing I need to implement registry add/remove/refresh as well.. |
With this commit we add following pages to support firmware repository browsing: ``` - firmware registry list - firmware registry details + display firmware_binaries - firmware binary details + display firmware constraints - firmware contstraint details + display firmware binaries ``` Signed-off-by: Miha Pleško <[email protected]>
02fbb1c
to
94e69fe
Compare
Checked commit xlab-si@94e69fe with ruby 2.4.6, rubocop 0.69.0, haml-lint 0.20.0, and yamllint 1.10.0 app/presenters/menu/default_menu.rb
|
@martinpovolny @gtanzillo is there something we should further improve here? The feature freeze is coming |
Looking at the code, everything looks good 👍 :) (I haven't tried it yet) @miha-plesko Are you still having issues with the center toolbar, or is that fixed? |
Thanks @himdel . The center menu is still not rendering but I would rather do followup PR; I need to do it anyway to add "Add a new FirmwareRegistry" option. As far as it goes for testing it - maybe it would be easiest to have a call and I show you. Alternatively I can give you quick instructions on how to run firmware registry locally and how to manually add some rails models so that it starts working. |
OK, followup PR sounds good :) Maybe written instructions would be better if you don't mind, easier to reference later, |
FirmwareRegistry::RestApiDepot.find_or_create_by(:name => 'Firmware Registry X').tap do |registry|
registry.authentication = Authentication.create(:userid => 'user', :password => 'pass')
registry.endpoint = Endpoint.create(:url => 'http://my-registry/images/')
t1 = FirmwareTarget.find_or_create_by(:manufacturer => 'dell', :model => 'zx500-a')
t2 = FirmwareTarget.find_or_create_by(:manufacturer => 'dell', :model => 'zx500-b')
t3 = FirmwareTarget.find_or_create_by(:manufacturer => 'hp', :model => 'i25-33333')
registry.firmware_binaries.destroy_all
FirmwareBinary.create(:name => 'firmware-binary01.exe', :version => '2.3.4-a', :firmware_registry => registry, :firmware_targets => [t1, t2], :description => 'NIC UPDATE')
FirmwareBinary.create(:name => 'firmware-binary02.exe', :version => '2.3.5', :firmware_registry => registry, :firmware_targets => [t3], :description => 'BIOS UPDATE')
FirmwareBinary.create(:name => 'firmware-binary03.exe', :version => '3.2.1', :firmware_registry => registry, :firmware_targets => [t1, t3], :description => 'SOME UPDATE')
end @himdel this should insert enough data to have populated pages |
@himdel did you happen to click thru pages and managed to find anything strange? |
/cc @gtanzillo we need this before code freeze, kindly ask for your help. |
LGTM, I'm not seeing any icons at all, but I'm assuming this will be solved by a manageiq-decorators PR? |
@miha-plesko I notice the data didn't contain any constraints, can you share how to create those too please? :) |
@himdel as suggested by Adam those "constraints" were renamed to "targets" ie. FirmwareTarget. The data contains three of those, and binds them to firmware binaries. Do you have those "targets" visible? |
Ah, updating the PR description then. Confirming targets work too, both the nested targets list under binary, and the nested binaries list under target. |
With this commit we add following pages to support firmware repository browsing:
Firmware registry list
Firmware registry details
Display firmware_binaries
Firmware binary details
Display firmware targets
Firmware target details
Display firmware binaries
@miq-bot add_label enhancement
@miq-bot assign @martinpovolny