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

MySQL integers gets returned as strings in JSON data response #375

Closed
Steffan-Ravn opened this issue Jan 11, 2016 · 3 comments
Closed

MySQL integers gets returned as strings in JSON data response #375

Steffan-Ravn opened this issue Jan 11, 2016 · 3 comments
Labels

Comments

@Steffan-Ravn
Copy link
Contributor

In my environment I am experiencing a strange behavior; under the client-view in the Storage-tab it showed that ALL drives where encrypted and that ALL drives where internal - which is certainly not the case, so I started digging into the code.

I seems that when assets/js/munkireport.storageplot.js receive the JSON data response from the MySQL database, all of the values are returned as strings in my case, and as obj.CoreStorageEncrypted and obj.Internal (among others) expect an integer, these values get set to true always.

I haven't experienced this in my initial test-setup and it seems that nobody else has reported this behavior, but as I've followed the setup-guide, and to my knowledge I haven't configured anything differently, that could cause these symptoms - I can't seem to find a way to fix this problem.

I am currently running:
MunkiReport version 2.6.1.1487 on a Ubuntu 14.04.3 Server with PHP 5.5.9, MySQL Server 5.5.44 and Apache 2.4.7.

I'm accessing the web interface via Safari 9.0.1 or Firefox 42.0.

If you need anymore information, please tell me.

Thanks in advantage.

Sincerely
Steffan Ravn Edwardsen

@bochoven bochoven added the bug label Jan 11, 2016
@bochoven
Copy link
Contributor

Not sure why this happens, but to mitigate this, we need to add type conversion before outputting to JSON

bochoven added a commit that referenced this issue Jan 15, 2016
Partial fix, I think we need to fix this serverside as well
@bochoven
Copy link
Contributor

Could you check if this change 9dfb38c fixes your issue? It's a client side fix.

@Steffan-Ravn
Copy link
Contributor Author

Hi Arjen,

That actually seems to solve the problem - tested in both Safari and Firefox. Thanks!

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

No branches or pull requests

2 participants