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

Printer paper tray status and error states #9859

Merged
merged 6 commits into from Mar 7, 2019

Conversation

Projects
None yet
2 participants
@sjtarik
Copy link
Contributor

commented Feb 21, 2019

DO NOT DELETE THIS TEXT

Please note

Please read this information carefully. You can run ./scripts/pre-commit.php to check your code before submitting.

Testers

If you would like to test this pull request then please run: ./scripts/github-apply <pr_id>, i.e ./scripts/github-apply 5926
After you are done testing, you can remove the changes with ./scripts/github-remove. If there are schema changes, you can ask on discord how to revert.

@murrant

This comment has been minimized.

Copy link
Member

commented Feb 22, 2019

Looks pretty good overall @sjtarik

Can we try to add test data for these?

@label-actions

This comment has been minimized.

Copy link

commented Feb 22, 2019

Please add test data so we can ensure your change is not broken in the future.

Read the docs to find out how: https://docs.librenms.org/Developing/os/Test-Units

d_echo($tray_oids);
foreach ($tray_oids as $index => $data) {
$last_index = substr($index, strrpos($index, '.') + 1);
$type = 'jetpapertray';

This comment has been minimized.

Copy link
@murrant

murrant Mar 2, 2019

Member

Can probably drop jet here and just go papertray (jetdirect above is for legacy reasons)

@murrant

This comment has been minimized.

Copy link
Member

commented Mar 2, 2019

Polling code looks nice, but I think it might be nice to have separate boxes for them in the webui. You could split them out using the type field.

murrant added some commits Mar 2, 2019

@murrant

This comment has been minimized.

Copy link
Member

commented Mar 5, 2019

I modified this to capture type data and display it a bit nicer in the webui:

image

@murrant murrant force-pushed the sjtarik:papertray branch from 6544792 to 91f075d Mar 5, 2019

@sjtarik

This comment has been minimized.

Copy link
Contributor Author

commented Mar 5, 2019

that looks great @murrant. printer support needed some love and now it gets a lot of it :) great progress.

@murrant murrant changed the title adding paper tray status and error states Printer paper tray status and error states Mar 6, 2019

@murrant

murrant approved these changes Mar 7, 2019

@murrant murrant merged commit e3e3de1 into librenms:master Mar 7, 2019

5 of 6 checks passed

codeclimate 7 issues to fix
Details
Inspection Summary
Details
Node: analysis
Details
Travis CI - Pull Request Build Passed
Details
WIP Ready for review
Details
license/cla Contributor License Agreement is signed.
Details

@murrant murrant removed the Device 🖥 label Apr 1, 2019

funzoneq added a commit to funzoneq/librenms that referenced this pull request Apr 30, 2019

Printer paper tray status and error states (librenms#9859)
* adding paper tray status and error states

* adding paper tray test data

* Create jetdirect_papertray.json

* Store printer supply type

* Update json data

* fix style
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.