MCPcopy Create free account
hub / github.com/pgadmin-org/pgadmin4 / Processes

Function Processes

web/pgadmin/misc/bgprocess/static/js/Processes.jsx:156–302  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

154};
155
156export default function Processes() {
157
158 const pgAdmin = usePgAdmin();
159 const [tableData, setTableData] = React.useState([]);
160 const [selectedRows, setSelectedRows] = React.useState({});
161 const selectedRowIDs = useMemo(()=>Object.keys(selectedRows).filter((k)=>selectedRows[k]), [selectedRows]);
162
163 const onViewDetailsClick = useCallback((p)=>{
164 const panelTitle = gettext('Process Watcher - %s', p.type_desc);
165 const panelId = BROWSER_PANELS.PROCESS_DETAILS+''+p.id;
166 pgAdmin.Browser.docker.default_workspace.openDialog({
167 id: panelId,
168 title: panelTitle,
169 content: (
170 <ErrorBoundary>
171 <ProcessDetails
172 data={p}
173 />
174 </ErrorBoundary>
175 )
176 }, pgAdmin.Browser.stdW.md, pgAdmin.Browser.stdH.md);
177 }, []);
178
179
180 const columns = useMemo(()=>{
181 return [{
182 header: () => null,
183 enableSorting: false,
184 enableResizing: false,
185 enableFilters: false,
186 size: 35,
187 maxSize: 35,
188 minSize: 35,
189 id: 'btn-stop',
190 cell: CancelCell,
191 },
192 {
193 header: () => null,
194 enableSorting: false,
195 enableResizing: false,
196 enableFilters: false,
197 size: 35,
198 maxSize: 35,
199 minSize: 35,
200 id: 'btn-logs',
201 cell: getLogsCell(pgAdmin, onViewDetailsClick),
202 },
203 {
204 header: gettext('PID'),
205 accessorKey: 'utility_pid',
206 enableSorting: true,
207 enableResizing: false,
208 width: 70,
209 minWidth: 70,
210 enableFilters: true,
211 },
212 {
213 header: gettext('Type'),

Callers

nothing calls this directly

Calls 9

usePgAdminFunction · 0.90
gettextFunction · 0.85
getLogsCellFunction · 0.85
filterMethod · 0.80
openDialogMethod · 0.80
getValueMethod · 0.80
updateListFunction · 0.70
registerListenerMethod · 0.45
deregisterListenerMethod · 0.45

Tested by

no test coverage detected