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
VRP: implement NAC data polling #9592
Conversation
@PipoCanaja you have some upstream commits showing up here. You will need to rebase to remove them. |
6c6a941
to
789b1fd
Compare
Yes, git is just magic to me, sometimes ... |
html/pages/device/nac.inc.php
Outdated
"time_interval": function (column, row) { | ||
var value = row[column.id]; | ||
if (value > 59) { | ||
var date = new Date(null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you could probably use moment.js here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. Will check that.
The migration needs to be converted for this PR https://laravel.com/docs/5.4/migrations |
f756739
to
7d588f6
Compare
a46a203
to
8bb2c85
Compare
@murrant Here is the result with moment.duration(xxxxx).humanized(). The value is clearly less precise, what do you think ? |
@PipoCanaja I figured you would do something like this: function formatDuration(seconds) {
var duration = moment.duration(seconds, 's');
var years = duration.years(),
months = duration.months(),
days = duration.days(),
hrs = duration.hours(),
mins = duration.minutes(),
secs = duration.seconds();
var output = '';
if (years) {
output += years + 'y ';
}
if (months) {
output += months + 'm ';
} else {
if (days) {
output += days + 'd ';
} else {
output += hrs + ':' + mins + ':' + secs;
}
}
return output.trim();
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@PipoCanaja merging this, looks good. Feel free to send another PR if you aren't happy with the JS time.
Hello
Here is an implementation for Huawei VRP devices pushing into the existing fields, and also adding time_elapsed and the vlan ID.
We should keep this in WIP for the moment.
DO NOT DELETE THIS TEXT
Please note
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.