I am developing a tool that discovers network services enabled on host and writes short summary on them like this:
init,1
└── login,1560 --
└── bash,1629
└── nc,12137 -lup 50505
{
:net => [
[0] "*:50505 IPv4 UDP "
],
:fds => [
[0] "/root (cwd)",
[1] "/",
[2] "/bin/nc.traditional",
[3] "/xochikit/ld_poison.so (stat: No such file or directory)",
[4] "/dev/tty2",
[5] "*:50505"
]
}
It proved to be very nice formatted and useful for quick discovery thanks to colors provided by the awesome_print gem. However, its output is just a text. One issue is that if I want to share it, I lose colors. I'd also like to fold and unfold parts of objects, quickly jump to specific processes and what not? Adding comments, for example. Thus I want something web-based.
What is the best approach to implement features like these? I haven't worked with web interfaces before and I don't have much experience with Ruby.
Update:
Maybe I didn't write my willings clear enough.
I think I want something that behaves like Chromium's chrome://chrome/settings/ (or better, of course). Is there maybe an erb template or manual showing how to implement that? I thought this is a thing needed often enough.
