Update Billing UI #3194

Merged
merged 4 commits into from Mar 9, 2016

Projects

None yet

4 participants

@richardlawley
Contributor

This PR updates the UI of the billing section to more closely match the rest of the system, and cleans up a lot of the code:

  • Removed commented out code, presumably from before obs fork
  • Updated UI to use panels and bootstrap table classes
  • Refactored Add/Edit bill to use common code
  • Changed Add Bill to be a modal
  • Hidden Add/Edit/Delete functions to non-admin user (partly addresses #3175)
  • Temporarily disabled search bar (non-functional, as reported in #1675)

This change is UI only, it does not depend on my other pending billing change.

Screenshots of new pages below:

image

image

image

image

richardlawley added some commits Mar 7, 2016
@richardlawley richardlawley Update Billing UI to match rest of app 9f136c0
@richardlawley richardlawley Update History Page to match bd640eb
@richardlawley richardlawley Remove Edit link if not admin
fca4834
@Rosiak
Contributor
Rosiak commented Mar 8, 2016

👍
Nice work!

@laf laf added WebUI Billing labels Mar 8, 2016
@laf
Member
laf commented Mar 8, 2016

Wow! Nice work @richardlawley :)

Few things if you don't mind:

  1. I know the functions existed before in the html files but would you mind moving them to the relevant includes file (includes/common.inc.php for functions for both cli and web or html/includes/functions.inc.php for just web ones).
  2. Would also be good to move any JS functions and code to html/js/librenms.js where possible.
  3. If possible on adding a new bill, can you direct people to /bill/bill_id=1/view=edit/ so they can go and add the ports needed.

Looks ace :)

@richardlawley
Contributor
  1. The functions I introduced don't work standalone, they needed context
    from the page and therefore weren't really suitable for moving to the
    central files.
  2. Only a single bit of js was introduced and that was also page-specific
    (launching the modal when adding a bill from a port page)
  3. This was already included, I just forgot to mention it in the notes.

On Tue, 8 Mar 2016, 22:04 Neil Lathwood, notifications@github.com wrote:

Wow! Nice work @richardlawley https://github.com/richardlawley :)

Few things if you don't mind:

I know the functions existed before in the html files but would you
mind moving them to the relevant includes file (includes/common.inc.php for
functions for both cli and web or html/includes/functions.inc.php for just
web ones).
2.

Would also be good to move any JS functions and code to
html/js/librenms.js where possible.
3.

If possible on adding a new bill, can you direct people to
/bill/bill_id=1/view=edit/ so they can go and add the ports needed.

Looks ace :)


Reply to this email directly or view it on GitHub
#3194 (comment).

@laf
Member
laf commented Mar 8, 2016
  1. Maybe but it would be nice to keep things organised (yes a lot isn't but we inherited that :)
  2. np
  3. When I tested on mine I got redirected to the actual bill page rather than the edit page.
@richardlawley richardlawley Redirect to edit page afer add bill
9724298
@richardlawley
Contributor

*1. I'd agree if any were functions intended to be reused on another page. They're not - they're all analogous to private functions.

*3. My mistake - previously you were left at the bills index, I knew I'd improved things but forgot the edit view bit. Corrected by the latest commit.

@laf
Member
laf commented Mar 9, 2016

For 1 I think we'll need to disagree :) It's much better to centralise the code but it's certainly not a show stopped.

@laf laf merged commit 3983705 into librenms:master Mar 9, 2016

3 checks passed

Auto-Deploy Build finished. No test results found.
Details
Scrutinizer No new issues
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@richardlawley richardlawley deleted the richardlawley:update-billing-ui branch Mar 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment