Skip to content

Commit 988f0b7

Browse files
Fixed formating issue
1 parent 68cd5d8 commit 988f0b7

File tree

1 file changed

+16
-13
lines changed

1 file changed

+16
-13
lines changed

src/gprofiler/frontend/src/components/console/ProfilingStatusPage.jsx

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { Box, Button, duration, Typography } from '@mui/material';
22
import TextField from '@mui/material/TextField';
3-
import React, { useEffect, useState, useCallback } from 'react';
4-
import { useHistory, useLocation } from 'react-router-dom';
53
import queryString from 'query-string';
4+
import React, { useCallback, useEffect, useState } from 'react';
5+
import { useHistory, useLocation } from 'react-router-dom';
66

77
import { formatDate, TIME_FORMATS } from '../../utils/datetimesUtils';
88
import MuiTable from '../common/dataDisplay/table/MuiTable';
@@ -65,22 +65,25 @@ const ProfilingStatusPage = () => {
6565
}, [location.search]);
6666

6767
// Update URL when filter changes
68-
const updateURL = useCallback((serviceName) => {
69-
const searchParams = queryString.parse(location.search);
70-
if (serviceName && serviceName.length >= 3) {
71-
searchParams.service = serviceName;
72-
} else {
73-
delete searchParams.service;
74-
}
75-
history.push({ search: queryString.stringify(searchParams) });
76-
}, [location.search, history]);
68+
const updateURL = useCallback(
69+
(serviceName) => {
70+
const searchParams = queryString.parse(location.search);
71+
if (serviceName && serviceName.length >= 3) {
72+
searchParams.service = serviceName;
73+
} else {
74+
delete searchParams.service;
75+
}
76+
history.push({ search: queryString.stringify(searchParams) });
77+
},
78+
[location.search, history]
79+
);
7780

7881
const fetchProfilingStatus = useCallback((serviceName = null) => {
7982
setLoading(true);
80-
const url = serviceName
83+
const url = serviceName
8184
? `/api/metrics/profiling/host_status?service_name=${encodeURIComponent(serviceName)}`
8285
: '/api/metrics/profiling/host_status';
83-
86+
8487
fetch(url)
8588
.then((res) => res.json())
8689
.then((data) => {

0 commit comments

Comments
 (0)