-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
luci-app-olsr-viz: migrate to JavaScript-based implementation #6480
luci-app-olsr-viz: migrate to JavaScript-based implementation #6480
Conversation
applications/luci-app-olsr-viz/root/usr/share/rpcd/acl.d/luci-app-olsr-viz-unauthenticated.json
Outdated
Show resolved
Hide resolved
applications/luci-app-olsr-viz/htdocs/luci-static/resources/view/olsr-viz/olsr-viz-view.js
Outdated
Show resolved
Hide resolved
applications/luci-app-olsr-viz/htdocs/luci-static/resources/view/olsr-viz/olsr-viz-view.js
Outdated
Show resolved
Hide resolved
86c2144
to
d0ca899
Compare
applications/luci-app-olsr-viz/htdocs/luci-static/resources/view/olsr-viz/olsr-viz-view.js
Outdated
Show resolved
Hide resolved
applications/luci-app-olsr-viz/htdocs/luci-static/resources/view/olsr-viz/olsr-viz-view.js
Outdated
Show resolved
Hide resolved
applications/luci-app-olsr-viz/htdocs/luci-static/resources/view/olsr-viz/olsr-viz-view.js
Outdated
Show resolved
Hide resolved
applications/luci-app-olsr-viz/htdocs/luci-static/resources/view/olsr-viz/olsr-viz-view.js
Outdated
Show resolved
Hide resolved
applications/luci-app-olsr-viz/htdocs/luci-static/resources/view/olsr-viz/olsr-viz-view.js
Outdated
Show resolved
Hide resolved
applications/luci-app-olsr-viz/htdocs/luci-static/resources/view/olsr-viz/olsr-viz-view.js
Outdated
Show resolved
Hide resolved
applications/luci-app-olsr-viz/htdocs/luci-static/resources/view/olsr-viz/olsr-viz-view.js
Outdated
Show resolved
Hide resolved
applications/luci-app-olsr-viz/htdocs/luci-static/resources/view/olsr-viz/olsr-viz-view.js
Outdated
Show resolved
Hide resolved
applications/luci-app-olsr-viz/htdocs/luci-static/resources/view/olsr-viz/olsr-viz-view.js
Outdated
Show resolved
Hide resolved
var debugSpan = E('span', { 'id': 'debug', 'style': 'visibility:hidden;' }); | ||
|
||
var vizDiv = E('div', { 'id': 'RSIFrame', 'name': 'RSIFrame', 'style': 'border:0px; width:0px; height:0px; visibility:hidden;' }); | ||
var vizScript = E('script', { 'type': 'text/javascript' }, 'viz_setup("RSIFrame", "main","nodes", "edges");viz_update();'); |
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.
I suggest to modify viz_setup()
to take the target div directly instead of a div name. Then simply replace this delayed script instantiation with a synchronous call to viz_setup(vizDiv, "main", "nodes", "edges"); viz_update();
and the vizDiv
instantiation with var vizDiv = E('div', { 'id': 'RSIFrame', 'name': 'RSIFrame', 'style': 'border:0px; width:0px; height:0px; visibility:hidden;' }, viz_res);
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.
I fixed the issues & also modified script file for directly using divs & inputs instead of getting them by id. and I implemented callingviz_setup(vizDiv, "main", "nodes", "edges"); viz_update();
synchronously.
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.
And I will test it for some time more.
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.
I tested it & fixed all the issues. Thanks for the review.
d0ca899
to
2f42757
Compare
Signed-off-by: Ayushman Tripathi <[email protected]> luci-app-olsr-viz: migrate to js Signed-off-by: Ayushman Tripathi <[email protected]> luci-app-olsr-viz: migrate to js Signed-off-by: Ayushman Tripathi <[email protected]> luci-app-olsr-viz: migrate to js Signed-off-by: Ayushman Tripathi <[email protected]> luci-app-olsr-viz: migrate to js Signed-off-by: Ayushman Tripathi <[email protected]> luci-app-olsr-viz: migrate to js Signed-off-by: Ayushman Tripathi <[email protected]> luci-app-olsr-viz: migrate to js Signed-off-by: Ayushman Tripathi <[email protected]> luci-app-olsr-viz: migrate to js Signed-off-by: Ayushman Tripathi <[email protected]> luci-app-olsr-viz: migrate to js luci-app-olsr-viz: migrate to js Signed-off-by: Ayushman Tripathi <[email protected]> luci-app-olsr-viz: migrate to js luci-app-olsr-viz: migrate to js fix tag Signed-off-by: Ayushman Tripathi <[email protected]> luci-app-olsr-viz: migrate to js luci-app-olsr-viz: migrate to js fix var name Signed-off-by: Ayushman Tripathi <[email protected]> luci-app-olsr-viz: migrate to js luci-app-olsr-viz: migrate to js use load for script & fix bugs Signed-off-by: Ayushman Tripathi <[email protected]> luci-app-olsr-viz: migrate to js luci-app-olsr-viz: migrate to js fix script Signed-off-by: Ayushman Tripathi <[email protected]> luci-app-olsr-viz: migrate to js luci-app-olsr-viz: migrate to js fix bugs Signed-off-by: Ayushman Tripathi <[email protected]> luci-app-olsr-viz: migrate to js luci-app-olsr-viz: migrate to js fix view Signed-off-by: Ayushman Tripathi <[email protected]> luci-app-olsr-viz: migrate to js fix script Signed-off-by: Ayushman Tripathi <[email protected]> luci-app-olsr-viz: migrate to js fix view luci-app-olsr-viz: migrate to js luci-app-olsr-viz: migrate to js fix script Signed-off-by: Ayushman Tripathi <[email protected]> luci-app-olsr-viz: migrate to js
2f42757
to
00cfca1
Compare
my $0.02 - I like this. |
@jow- this migrated app looks good to me |
Merged, thanks! |
Hi! I've completed the migration of luci-app-olsr-viz to JavaScript. All the features are functioning just like they did in the old Lua app.
And in the old app, there was an issue of HTTP 413 Content Too Large after running it twice, which resulted in a blank page because the app was saving 130 Cookies at a time as it was saving all the nodes in cookies. I tested it on many routers and was able to reproduce the issue every time.
So, I removed the saving of the nodes in the cookies, as it was making the app unusable.
Now everything is working normally, and I've fixed the error.