summaryrefslogtreecommitdiffstats
path: root/src/canvas/widgets/process_table.rs
AgeCommit message (Collapse)Author
2023-06-04refactor: change canvas macOS check to compile-time (#1184)Clement Tsang
2023-05-31deps: bump ratatui to 0.21.0 (#1178)Clement Tsang
2023-05-28refactor: remove typed builder from App struct (#1176)Clement Tsang
Another one on the chopping block. This also moves out the app widget logic to a separate struct.
2022-12-31bug: fix search scrolling with wider Unicode characters. (#938)Clement Tsang
This should help make search scrolling more reliable larger Unicode characters like CJK/flag characters.
2022-12-27bug: fix dot marker setting not being considered (#934)Clement Tsang
* bug: fixes marker settings being ignored while rendering time charts * appease clippy
2022-11-20other: some cleanup in proc widget (#903)Clement Tsang
2022-11-10refactor: run cargo +nightly fmt with group_imports (#885)Clement Tsang
* refactor: add some disabled unstable fmt options * run cargo +nightly fmt with group_imports * separate out the cfg-specific imports for clarity
2022-11-02refactor: move data passing for table to another step (#863)Clement Tsang
* refactor: remove redundant scroll direction enum This was made redundant from the table refactor. * add some todos/docs * refactor: temp hack to pass in data on process
2022-10-12refactor: tables V2 (#749)Clement Tsang
* refactor: move to new data table implementation * more work towards refactor * move disk and temp over, fix longstanding bug with disk and temp if removing the last value and selected * work towards porting over CPU work towards porting over CPU fix typo partially port over cpu, fix some potentially inefficient concat_string calls more work towards cpu widget migration some refactoring * sortable data sortable data more refactoring some sort refactoring more refactoringgggg column refactoring renaming and reorganizing more refactoring regarding column logic add sort arrows again * move over sort menu * port over process port over process precommit temp temp two, remember to squash work fix broken ltr calculation and CPU hiding add back row styling temp fix a bunch of issues, get proc working more fixes around click fix frozen issues * fix dd process killing * revert some of the persistent config changes from #257 * fix colouring for trees * fix missing entries in tree * keep columns if there is no data * add and remove tests * Fix ellipsis
2022-06-03refactoring: Move around components and state (#746)Clement Tsang
A small refactor to move some state/component files around in terms of file structure and code location. Should have no effect on logic.
2022-05-16bug: fix a variety of bugsClementTsang
Bugs squashed: - Incorrect column sizing for flex cases - Case where the sort menu bounds were still existing despite being hidden - Proc widget not actually taking into account the calculated row widths in some cases during data conversion.
2022-05-15refactor: simplify partial ordering fn, clean up codeClementTsang
2022-05-15other: delete redundant code, run clippy and fmtClementTsang
2022-05-15refactor: more work towards unifying process codeClementTsang
A bunch of work towards also refactoring how the process widget gathers and converts data.
2022-05-15refactor: begin migration of process widgetClementTsang
2022-04-29Merge pull request #710 from ClementTsang/consolidate_component_drawingClement Tsang
Cleans up some drawing code and unifies all time graph drawing.
2022-04-28bug: fix choosing an out of list bounds selecting the last entry (#717)Clement Tsang
This is a simple bug fix that changes the behaviour of a scroll select (and column select) to only update if the updated position is _within_ the bounds of the list (0 to the max index, inclusive). Prior to this, all the implementations but the disk implementation would just bound the change. This was both inconsistent with the disk scroll state, but also jarring since this meant a user could click on seemingly empty space but it would somehow click on the very last entry. This change also unifies the scroll calculation function between all the scroll select functions. Ideally we get rid of the intermediary functions but that might require more refactoring than I want for this fairly simple bug fix. The column select scroll calculation was also changed to fit this behaviour, but it does not use the same logic as the other scroll states. What could be done in the future is a generic implementation for direction (or maybe just "increment vs. decrement") to share it all.
2022-04-28refactor: remove trait usage in component drawingClementTsang
When I was newer to Rust, I got the weird impression that you couldn't add functionality to a struct outside of the defining file without using a trait. That's obviously not true, so it's high time I got rid of it and just made it part of the impl of the class itself, rather than declaring a trait and then exporting/importing it.
2022-03-27refactor: remove some simple as-casts (#697)Clement Tsang
Remove some simple as casts that are easy to change to .into(), or easy to check.
2021-12-30Replace statics with consts where possibleMateusz Mikuła
2021-12-28Fix Clippy warnings (#647)Mateusz Mikuła
2021-07-31other: Add RISC-V to unofficially supported targets (#565)Clement Tsang
Adds CI actions and documentation for RISC-V.
2021-02-28feature: User info in proc widget for Unix-based systems (#425)Clement Tsang
Adds users into the process widget (for Unix-based systems). This shows only in non-grouped modes, similar to state. Search is also supported. In addition, a quick fix to prevent users from being in grouped mode when they tried to enter tree mode while grouped.
2021-02-19deps: Update various deps as per 2021-02-19 (#420)Clement Tsang
Major update is tui-rs from 0.13 to 0.14. This change allows us to update our tables to make them look nicer!
2021-02-18bug: fix inconsistent spacing with grouped vs non-grouped in the process ↵Clement Tsang
widget (#416) Fixes grouped mode having different spacing than non-grouped mode.
2021-02-18feature: Add mouse support to sorting columns (#413)Clement Tsang
Adds mouse support for sorting columns within the process widget. You can now click on the column header to sort (or invert the sort).
2021-02-16feature: Add ctrl-w and ctrl-h support in the search (#409)Clement Tsang
Ctrl-w deletes one word backwards from the current cursor location. Ctrl-h is just an alias for backspace.
2020-12-10bug: Fix missing states in processes (#345)Clement Tsang
Fixes another change breaking states from showing in processes.
2020-11-28feature: Add scroll indicator to keep track of table position in widgets. (#333)Clement Tsang
Adds the option to enable an "out of" indicator for scrollable table widgets (using --show_table_scroll_position).
2020-11-22other: Switch to once_cell (#324)Clement Tsang
Switch from lazy_static to once_cell.
2020-11-18feature: Add collapsible tree entries (#304)Clement Tsang
Adds collapsible trees to the tree mode for processes. These can be toggled via the + or - keys and the mouse by clicking on a selected entry.
2020-11-15feature: default colour schemes (#296)Clement Tsang
Adds some default colour choices to choose from.
2020-10-17refactor: Remove redundant as_ref() calls (#268)Clement Tsang
Minor refactor to remove redundant `as_ref()` calls.
2020-09-26refactor: tui-rs 0.11.0 refactor (#253)Clement Tsang
Refactors tui-rs usage to the new 0.11.0 release. This release also fixes the highlighting bug from #249, and now, expanding a widget no longer overrides the widget title colour. This commit also introduces #255, but that seems to be easy to bandaid so hopefully it will get fixed soon?
2020-09-22feature: Beginnings of in-app config (#231)Clement Tsang
Initial refactorings and additions to support in-app config. - Refactor our current options logic to support in-app configs. That is, we can write to a config file with our changes now. - The default action when creating a new config file is to leave it blank. (TBD and for now, not sure on this one) - Previously, we would set everything in a config file on startup; now we need to read from the config TOML struct whenever. - `C` keybind is now occupied for configs. - `no_write` option to never write to a config file.
2020-09-09refactor: rename data harvesting fns to what archs/oses they support (#229)Clement Tsang
Just a simple rename.
2020-09-09refactor: rewrite column algorithm (#227)Clement Tsang
Update how we position and generate column widths to look less terrible. This also adds truncation w/ ellipsis to the columns, and for processes, the state will automatically shrink to a short form (just a character) if there isn't enough space.
2020-09-06feature: Adds tree view (#223)Clement Tsang
Adds a tree process view to bottom. Currently uses a pretty jank method of column width setting, should get fixed in #225.
2020-08-29feature: Add mouse click support for moving between widgets (#208)Clement Tsang
Adds mouse support to the application, to move between widgets and click on elements. List of things to added: - Click to move between widgets - Click to move between widgets in basic mode - Click on widget entries - Ability to disable mouse if you don't like it, I guess
2020-08-25bug: fix grouping being broken after refactor (#201)0.4.6Clement Tsang
Fixes grouping not working properly after some refactoring done in 0.4.6.
2020-08-17feature: Add appox. total mem as an option for processes and basic memClement Tsang
Adds a way to display the memory value as a column in the processes widget and the basic memory widget, rather than just the percentage.
2020-08-16bug: Fix bug w/ parsing `/proc/{pid}/stats` Clement Tsang
Fixes a bug caused by incorrectly reading the `/proc/{pid}/stats` file. Due to splitting by whitespace, the string parsing was read incorrectly if the process also contained spaces.
2020-08-16refactor: Revert tui upgrade to 0.10Clement Tsang
Reverts tui upgrade, there are some bugs and issues - namely, issues with rendering text. We can revert this commit when those bugs are dealt with (should be fine after 0.10.1, tested building from the repo).
2020-08-15feature: Allow sorting by any columnClement Tsang
This feature allows any column to be sortable. This also adds: - Inverting sort for current column with `I` - Invoking a sort widget with `s` or `F6`. Close with same key or esc. And: - A bugfix in regards the basic menu and battery widget - A lot of refactoring
2020-08-12change: Refactor dd drawing codeClementTsang
This also slightly improves how we generate the widths/heights to be less... terrible. Note this is not done, unfortunately. This requires tui-rs' wrapped paragraph height PR to land and release so I can properly calculate the height offsets. See https://github.com/fdehau/tui-rs/pull/349 for details.
2020-08-11deps: Update dependencies, drop MSRVClement Tsang
Update dependencies to most recent versions if applicable. Refactor to deal with breaking changes. Drop MSRV due to dependency issues, just support stable and later.
2020-08-07feature: add full command to process widgetClement Tsang
This PR adds the ability to toggle between the process name and process path. Currently, this uses `P` as the modifier key. Currently, the longer command names are dealt with by forcefully changing the width of the columns, but this can be handled in a more graceful manner IMO.
2020-05-19feature: add back states to unmerged processesClement Tsang
2020-05-18refactor: reduce unchecked type conversions to usizeClement Tsang
2020-05-09change: hide table gap if widget height is smallClement Tsang