Skip to content

Commit e8ea604

Browse files
authored
Support the operation and expanding app in app resources tab. (#76)
1 parent a07c6ef commit e8ea604

7 files changed

Lines changed: 758 additions & 199 deletions

File tree

‎dashboard/src/App.tsx‎

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,20 @@ export default function App() {
9393
App Resources
9494
</Space>
9595
),
96-
children: <AppResources active={activeTab === '2'} />,
96+
children: (
97+
<AppResources
98+
active={activeTab === '2'}
99+
balancerEnabled={balancerEnabled}
100+
onRegister={
101+
balancerEnabled
102+
? (name) => {
103+
setRegisterKeyword(name)
104+
setActiveTab('5')
105+
}
106+
: undefined
107+
}
108+
/>
109+
),
97110
},
98111
{
99112
key: '3',

‎dashboard/src/api/types.ts‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,12 @@ export interface AppResourceEntry {
6666
app_id: string
6767
app_name: string
6868
pid: number
69+
pids?: number[] // all PIDs of the app; kill/suspend act on the whole set
6970
process_name: string
7071
cmdline: string
72+
status?: string // representative status; 'stopped' when any PID is suspended
73+
is_self?: boolean // any PID belongs to SmartTune itself — never signal
74+
balancer_candidate?: boolean // false for shells / self — hides "Add to balancer"
7175
cpu_usage: number // fraction of total CPU capacity (0-1)
7276
memory_mb: number // resident memory in MB
7377
io_read_rate: number // MB/s
@@ -83,9 +87,13 @@ export interface AppResourceStatsData {
8387

8488
export interface AppDiskIoEntry {
8589
pid: number
90+
pids?: number[] // all PIDs of the app; kill/suspend act on the whole set
8691
name: string
8792
app_name: string
8893
cmdline: string
94+
status?: string // representative status; 'stopped' when any PID is suspended
95+
is_self?: boolean // any PID belongs to SmartTune itself — never signal
96+
balancer_candidate?: boolean // false for shells / self — hides "Add to balancer"
8997
io_read_rate: number // MB/s
9098
io_write_rate: number // MB/s
9199
io_read_iops: number // ops/s

0 commit comments

Comments
 (0)