summaryrefslogtreecommitdiff
path: root/ui.c
AgeCommit message (Collapse)AuthorFilesLines
2017-01-25flowtop: Add tab control to switch between tablesVadim Kochan1-2/+95
Add ui_tab API to create ui tab control to switch between different ui tables which may contain different aggregated info per unique pid/port/proto/dst/src. Meanwhile there is only 1 ui tab entry for flows table. Added some missing cds_list_{next,prev,last}_entry functions into urcu-list-compat.h header. Signed-off-by: Vadim Kochan <vadim4j@gmail.com> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2017-01-17list: Remove cds_list_* wrappersTobias Klauser1-7/+6
Use the cds_list_* types and macros directly instead of redefining them. This makes it clear that we're not using the Linux kernel implementation of list_head but the one from urcu. Also make sure _LGPL_SOURCE is defined everywhere the urcu functionality is used, such that we get the statically linkable version with reduced overhead. Reference: https://lwn.net/Articles/573424/#qq2answer Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2016-09-15ui: Rename ui_table_row_print -> ui_table_row_col_setVadim Kochan1-1/+1
Really ui_table_row_print(x) no more prints anything, it just sets column value in a row. Signed-off-by: Vadim Kochan <vadim4j@gmail.com> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2016-09-15flowtop: Add horizontal scrolling over flows tableVadim Kochan1-8/+17
Add left/right scrolling for flows list table to make possible see all the columns with a smaller display size. Handle 'Left' & 'Right' keypress to scroll left or right. Signed-off-by: Vadim Kochan <vadim4j@gmail.com> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2016-09-15flowtop: Render table row via raw ncurses bufferVadim Kochan1-14/+69
Render each column to the ncurses raw buffer first, this buffer contains ncurses {char:attr} elements which will be printed to the screen after ui_table_row_show() will be called (at the end of columns rendering by flowtop). The reason of this change is to have easy way to make horizontal scrolling over this buffer. Approach is used from the 'htop' tool. Signed-off-by: Vadim Kochan <vadim4j@gmail.com> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2016-04-22ui: Print empty rows when clearing tableVadim Kochan1-0/+12
Fill table with empty rows while clearing. It will allow to get rid of clear() & refresh() each time before print the flows list. Signed-off-by: Vadim Kochan <vadim4j@gmail.com> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2016-04-22ui: Implement UI table for flows printingVadim Kochan1-0/+141
Add new module ui.c which is responsible to render different kinds of UI widgets - tables, etc. Implemented generic API for print table-like list of elements. This table API might be used for print flows in curses or text mode. Signed-off-by: Vadim Kochan <vadim4j@gmail.com> [tk: change bug_on(true) to bug(), whitespace fix] Signed-off-by: Tobias Klauser <tklauser@distanz.ch>