Skip to content
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

Merged
merged 1 commit into from
Jul 16, 2019

Conversation

miha-plesko
Copy link
Contributor

@miha-plesko miha-plesko commented May 23, 2019

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

Firmware registry list

image

image

Firmware registry details

image

Display firmware_binaries

image

Firmware binary details

image

Display firmware targets

image

Firmware target details

image

Display firmware binaries

image

@miq-bot add_label enhancement
@miq-bot assign @martinpovolny

@miha-plesko
Copy link
Contributor Author

Hello @martinpovolny , would you have an idea why my _center.rb menu definitions would be ignored?

@miha-plesko miha-plesko changed the title [WIP] Read-only pages for browsing firmware repository Read-only pages for browsing firmware repository Jul 10, 2019
@miq-bot miq-bot removed the wip label Jul 10, 2019
@miha-plesko
Copy link
Contributor Author

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:

Capture

Similarly the firmware binary page now contains a list of all connected firmware targets:

Capture

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]>
@miq-bot
Copy link
Member

miq-bot commented Jul 12, 2019

Checked commit xlab-si@94e69fe with ruby 2.4.6, rubocop 0.69.0, haml-lint 0.20.0, and yamllint 1.10.0
13 files checked, 1 offense detected

app/presenters/menu/default_menu.rb

@miha-plesko
Copy link
Contributor Author

@martinpovolny @gtanzillo is there something we should further improve here? The feature freeze is coming

@himdel
Copy link
Contributor

himdel commented Jul 12, 2019

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?

@miha-plesko
Copy link
Contributor Author

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.

@himdel
Copy link
Contributor

himdel commented Jul 12, 2019

OK, followup PR sounds good :)

Maybe written instructions would be better if you don't mind, easier to reference later,
or if you have fake data to load...

@miha-plesko
Copy link
Contributor Author

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

@miha-plesko
Copy link
Contributor Author

@himdel did you happen to click thru pages and managed to find anything strange?

@miha-plesko
Copy link
Contributor Author

/cc @gtanzillo we need this before code freeze, kindly ask for your help.

@himdel
Copy link
Contributor

himdel commented Jul 16, 2019

LGTM,
GTL seems to work (no search, filters or toolbar),
detail screens do too (no toolbar),
clicktrough to individial firmwares and to nested list of firmwares both work (same),
"No Records Found" screens are also ok 👍

I'm not seeing any icons at all, but I'm assuming this will be solved by a manageiq-decorators PR?

@himdel himdel merged commit 6b6e004 into ManageIQ:master Jul 16, 2019
@himdel himdel added this to the Sprint 116 Ending Jul 22, 2019 milestone Jul 16, 2019
@himdel
Copy link
Contributor

himdel commented Jul 16, 2019

@miha-plesko I notice the data didn't contain any constraints, can you share how to create those too please? :)

@miha-plesko
Copy link
Contributor Author

@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?

@himdel
Copy link
Contributor

himdel commented Jul 16, 2019

Ah, updating the PR description then.

Confirming targets work too, both the nested targets list under binary, and the nested binaries list under target.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants