mirror of
https://github.com/kunkunsh/kunkun-ext-neohtop.git
synced 2025-04-11 17:29:45 +00:00
Merge branch 'main' into hbina-optional-PID
This commit is contained in:
commit
bd4e2b4f02
2
.github/workflows/build-check.yml
vendored
2
.github/workflows/build-check.yml
vendored
@ -11,7 +11,7 @@ env:
|
|||||||
RUSTUP_MAX_RETRIES: 10
|
RUSTUP_MAX_RETRIES: 10
|
||||||
RUST_BACKTRACE: 1
|
RUST_BACKTRACE: 1
|
||||||
RUSTC_WRAPPER: sccache
|
RUSTC_WRAPPER: sccache
|
||||||
CARGO_BUILD_JOBS: ${{ runtime.numCPU }}
|
CARGO_BUILD_JOBS: 2
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
@ -22,6 +22,12 @@
|
|||||||
- 💻 CPU and Memory usage tracking
|
- 💻 CPU and Memory usage tracking
|
||||||
- 🎨 Beautiful, modern UI with dark/light themes
|
- 🎨 Beautiful, modern UI with dark/light themes
|
||||||
- 🔍 Process search and filtering
|
- 🔍 Process search and filtering
|
||||||
|
|
||||||
|
Search for processes by name, command, or PID. Search for multiple things at once by separating them with commas. For
|
||||||
|
example, `arm, x86` will return processes having `arm` or `x86` as a substring of the name or command. You can use
|
||||||
|
regular expressions too. For example, `d$` will return a list of daemons (which tend to end in the letter `d`), while
|
||||||
|
`(\w+)\.\w+` will return a list of processes with reverse domain name notation, such as `com.docker.vmnetd`.
|
||||||
|
|
||||||
- 📌 Pin important processes
|
- 📌 Pin important processes
|
||||||
- 🛠 Process management (kill processes)
|
- 🛠 Process management (kill processes)
|
||||||
- 🎯 Sort by any column
|
- 🎯 Sort by any column
|
||||||
|
@ -60,11 +60,22 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
$: filteredProcesses = processes.filter((process) => {
|
$: filteredProcesses = processes.filter((process) => {
|
||||||
const matchesSearch = searchTerm
|
let matchesSearch = searchTerm.length === 0;
|
||||||
? process.name.toLowerCase().includes(searchTerm.toLowerCase()) ||
|
searchTerm
|
||||||
process.command.toLowerCase().includes(searchTerm.toLowerCase()) ||
|
.split(",")
|
||||||
process.pid.toString().includes(searchTerm)
|
.map((term) => term.trim())
|
||||||
: true;
|
.forEach((term) => {
|
||||||
|
const nameSubstringMatch = process.name
|
||||||
|
.toLowerCase()
|
||||||
|
.includes(term.toLowerCase());
|
||||||
|
const nameRegexMatch = new RegExp(term, "i").test(process.name);
|
||||||
|
const commandMatch = process.command
|
||||||
|
.toLowerCase()
|
||||||
|
.includes(term.toLowerCase());
|
||||||
|
const pidMatch = process.pid.toString().includes(term);
|
||||||
|
matchesSearch ||=
|
||||||
|
nameSubstringMatch || nameRegexMatch || commandMatch || pidMatch;
|
||||||
|
});
|
||||||
|
|
||||||
const matchesStatus =
|
const matchesStatus =
|
||||||
statusFilter === "all" ? true : process.status === statusFilter;
|
statusFilter === "all" ? true : process.status === statusFilter;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user