Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
SigNoz
Commits
245050aa
Commit
245050aa
authored
4 years ago
by
Nidhi Tandon
Browse files
Options
Download
Email Patches
Plain Diff
fix(ServiceMap): multiple api calls of date picker
parent
55f7f56a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
frontend/src/modules/AppWrapper.tsx
+7
-1
frontend/src/modules/AppWrapper.tsx
frontend/src/modules/Servicemap/ServiceMap.tsx
+9
-5
frontend/src/modules/Servicemap/ServiceMap.tsx
with
16 additions
and
6 deletions
+16
-6
frontend/src/modules/AppWrapper.tsx
+
7
-
1
View file @
245050aa
...
...
@@ -34,7 +34,13 @@ const App = () => {
<
Route
path
=
{
ROUTES
.
SIGN_UP
}
exact
component
=
{
Signup
}
/>
<
Route
path
=
{
ROUTES
.
APPLICATION
}
exact
component
=
{
ServicesTable
}
/>
<
Route
path
=
{
ROUTES
.
SERVICE_METRICS
}
exact
component
=
{
ServiceMetrics
}
/>
<
Route
path
=
{
ROUTES
.
SERVICE_MAP
}
exact
component
=
{
ServiceMap
}
/>
<
Route
path
=
{
ROUTES
.
SERVICE_MAP
}
exact
render
=
{
(
props
)
=>
(
<
ServiceMap
{
...
props
}
componentPath
=
{
ROUTES
.
SERVICE_MAP
}
/>
)
}
/>
<
Route
path
=
{
ROUTES
.
TRACES
}
exact
component
=
{
TraceDetail
}
/>
<
Route
path
=
{
ROUTES
.
TRACE_GRAPH
}
exact
component
=
{
TraceGraph
}
/>
<
Route
path
=
{
ROUTES
.
SETTINGS
}
exact
component
=
{
SettingsPage
}
/>
...
...
This diff is collapsed.
Click to expand it.
frontend/src/modules/Servicemap/ServiceMap.tsx
+
9
-
5
View file @
245050aa
import
React
,
{
useEffect
,
useRef
,
useState
}
from
"
react
"
;
import
React
,
{
useEffect
,
useRef
}
from
"
react
"
;
import
{
connect
}
from
"
react-redux
"
;
import
{
RouteComponentProps
}
from
"
react-router-dom
"
;
import
{
RouteComponentProps
,
useLocation
}
from
"
react-router-dom
"
;
import
{
GlobalTime
,
serviceMapStore
,
...
...
@@ -36,6 +36,7 @@ interface ServiceMapProps extends RouteComponentProps<any> {
globalTime
:
GlobalTime
;
getServiceMapItems
:
Function
;
getDetailedServiceMapItems
:
Function
;
componentPath
:
string
;
}
interface
graphNode
{
id
:
string
;
...
...
@@ -53,16 +54,19 @@ export interface graphDataType {
const
ServiceMap
=
(
props
:
ServiceMapProps
)
=>
{
const
fgRef
=
useRef
();
const
location
=
useLocation
();
const
{
getDetailedServiceMapItems
,
getServiceMapItems
,
globalTime
,
serviceMap
,
componentPath
,
}
=
props
;
useEffect
(()
=>
{
getServiceMapItems
(
globalTime
);
getDetailedServiceMapItems
(
globalTime
);
if
(
location
.
pathname
===
componentPath
)
{
getServiceMapItems
(
globalTime
);
getDetailedServiceMapItems
(
globalTime
);
}
},
[
globalTime
]);
useEffect
(()
=>
{
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help