Bug #4571

Fix and improve views and their specs

Added by Igal Koshevoy almost 2 years ago. Updated over 1 year ago.

Status:Closed Start date:08/19/2010
Priority:Normal Due date:
Assignee:Igal Koshevoy % Done:

0%

Category:-
Target version:1.0.4
Keywords: Affected URL:
Branch:http://github.com/igal/puppet-dashboard/tree/bug-4571-fix_and_improve_views Affected Dashboard version:
Votes: 0

Description

I made a bunch of fixes and improvements to the views, am creating a ticket so I can check these in.

History

Updated by Igal Koshevoy almost 2 years ago

  • Status changed from Accepted to In Topic Branch Pending Review
  • Assignee changed from Igal Koshevoy to Nick Lewis
  • Branch set to http://github.com/igal/puppet-dashboard/tree/bug-4571-fix_and_improve_views

Nick: Can you please review these changes? Only the changes on the last commit are relevant. The rest is just merges building up the version I’m branching off of. In retrospect, it would have been better to make this into separate commits fixing things on specific branches.

[#4571] Fix and improve views.

* Fixed node/group/class listings to describe searches, e.g. 'Nodes matching "foo"'
* Fixed node/group/class listings to include pagination only if needed.
* Fixed node/group/class listings to show messages when no matches were found.
* Extracted #describe_search_if_present helper to eliminate redundant code.
* Extracted #describe_no_matches_of helper to eliminate redundant code.
* Fixed unwanted wrapping of dates on report listings.
* Improved report listings to add "s" to specify values with seconds.
* Improved graphs by making the interval bold for clarity.
* Fixed release notes styling of bullets to so that they're indented properly.

Updated by Nick Lewis almost 2 years ago

  • Assignee changed from Nick Lewis to Igal Koshevoy

+1, with a few notes. It’s a little more conforming to use <strong> over <b>, but not especially important. Also, nodes/show and node_groups/show use the new describe_no_matches_of method inconsistently, with some uses passing in a string eg. “No classes”, and others passing in eg. :classes. I believe the results are the same? So that should probably be standardized.

Updated by Igal Koshevoy almost 2 years ago

  • Assignee changed from Igal Koshevoy to Nick Lewis

Nick,

I’ve pushed a new version of this branch. Please review it.

Because this is for r1.0.4, it’s a higher priority than the r1.0.5 work, but lower than the blank YAML document investigation in #4578.

Notable changes: 1. Replaced HTML “b” tags with “strong”. 2. Made methods displaying “no matches” messages and their docs clearer. 3. Renamed all incorrectly-named views and specs. 4. Rewrote many existing view specs so they’d be useful. 5. Added specs for pretty much all the views. These aren’t great view specs, but they’re valuable in that they catch rendering exceptions and will provide a place to add further descriptions.

Given the large size of this diff, you may want to use something like “git-meld” (http://gist.github.com/541915) to help review the code.

I apologize for dumping so many changes into this, but these views and the lack of specs was driving me crazy and making me depend too heavily on manual validations to catch rendering exceptions.

Thanks!

Updated by Igal Koshevoy over 1 year ago

  • Subject changed from Fix and improve views to Fix and improve views and their specs

Updated by Nick Lewis over 1 year ago

  • Assignee changed from Nick Lewis to Igal Koshevoy

Looks good, but it’s probably a good idea to make sure those probably-unused files really aren’t being used, and just remove them entirely.

Updated by Igal Koshevoy over 1 year ago

Nick:

Looks good

Thanks, I’ve merged the branch into pu and next.

it’s probably a good idea to make sure those probably-unused files really aren’t being used, and just remove them entirely.

I’ve created low-priority ticket #4609 “Unused application files should be removed” to do that.

Updated by Igal Koshevoy over 1 year ago

  • Status changed from In Topic Branch Pending Review to Closed

Ooops, forgot to close this. It’s already been merged into next.

Also available in: Atom PDF