Discussion:
Make js/inplace-edit.js callable from other js ?
Wang Jian
2014-05-06 14:37:35 UTC
Permalink
Hi,

I have written a plugin for massive/quick operations on servers, such as

* edit server comments for usage (memcache, dns, etc)
* filter servers according to hardware configuration, comment
* select multiple servers and open page of another system such as nagios,
ganglia
* select multiple servers and mark as faulty/offline/repairing etc
* quickly get usage graph (ganglia graph) by hovering
* quickly get short logs, repairing status/logs (from other systems), etc,
by hovering

We don't need to leave current page, by heavily using javascript and ajax.
But for one thing, I meet a problem: editing comment with
js/inplace-edit.js.

We split servers into groups, and let the plugin display one group at a
time. When changing to another group, the plugin remove table rows and
refill table with ajax response (some <tr> rows).
At this stage, the js/inplace-edit.js 's initialization code should be run
again but can not.

Currently, I copy js/inplace-edit.js into my plugin's js to use it.

My suggestion is making js/inplace-edit.js more friendly for dynamic
content manipulation.

BTW: the jquery and jquery-ui in racktables are rather old.

Regards
Michał Sochoń
2014-05-06 17:45:17 UTC
Permalink
Feel free to contribue to github, then :)
Post by Wang Jian
Hi,
I have written a plugin for massive/quick operations on servers, such as
* edit server comments for usage (memcache, dns, etc)
* filter servers according to hardware configuration, comment
* select multiple servers and open page of another system such as nagios,
ganglia
* select multiple servers and mark as faulty/offline/repairing etc
* quickly get usage graph (ganglia graph) by hovering
* quickly get short logs, repairing status/logs (from other systems), etc,
by hovering
We don't need to leave current page, by heavily using javascript and ajax.
But for one thing, I meet a problem: editing comment with
js/inplace-edit.js.
We split servers into groups, and let the plugin display one group at a
time. When changing to another group, the plugin remove table rows and
refill table with ajax response (some <tr> rows).
At this stage, the js/inplace-edit.js 's initialization code should be run
again but can not.
Currently, I copy js/inplace-edit.js into my plugin's js to use it.
My suggestion is making js/inplace-edit.js more friendly for dynamic
content manipulation.
BTW: the jquery and jquery-ui in racktables are rather old.
Regards
--
Michal Sochoń
alias _KaszpiR_ kaszpir-***@public.gmane.org
IRC: _KaszpiR_ @ freenode.net
Wang Jian
2014-05-11 04:21:48 UTC
Permalink
Please review my patch

https://github.com/lark/racktables/commit/ec52868b9cb7a842e1e53fba8329b22d419b3b17

@ https://github.com/lark/racktables/ devops
Post by Michał Sochoń
Feel free to contribue to github, then :)
Post by Wang Jian
Hi,
I have written a plugin for massive/quick operations on servers, such as
* edit server comments for usage (memcache, dns, etc)
* filter servers according to hardware configuration, comment
* select multiple servers and open page of another system such as nagios,
ganglia
* select multiple servers and mark as faulty/offline/repairing etc
* quickly get usage graph (ganglia graph) by hovering
* quickly get short logs, repairing status/logs (from other systems),
etc, by hovering
We don't need to leave current page, by heavily using javascript and
ajax. But for one thing, I meet a problem: editing comment with
js/inplace-edit.js.
We split servers into groups, and let the plugin display one group at a
time. When changing to another group, the plugin remove table rows and
refill table with ajax response (some <tr> rows).
At this stage, the js/inplace-edit.js 's initialization code should be
run again but can not.
Currently, I copy js/inplace-edit.js into my plugin's js to use it.
My suggestion is making js/inplace-edit.js more friendly for dynamic
content manipulation.
BTW: the jquery and jquery-ui in racktables are rather old.
Regards
--
Michal Sochoń
Loading...