Skip to content

Commit

Permalink
Merge branch 'main' into dt-studio-chart-kpi
Browse files Browse the repository at this point in the history
  • Loading branch information
dthyresson authored May 11, 2023
2 parents ef2e63d + 8564995 commit 6c4c78d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion packages/api-server/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const startServer = ({
socket,
fastify,
}: HttpServerParams) => {
const host = process.env.NODE_ENV === 'production' ? '0.0.0.0' : '::'
const host = 'localhost'
const serverPort = socket ? parseInt(socket) : port

fastify.listen({ port: serverPort, host })
Expand Down
6 changes: 6 additions & 0 deletions packages/core/config/webpack.development.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@ const getProxyConfig = () => {
/** @type {import('webpack').Configuration} */
const baseConfig = merge(webpackConfig('development'), {
devServer: {
// `runtimeErrors` became true by default in webpack-dev-server v4.15.0 and interferes with <FormError />.
client: {
overlay: {
runtimeErrors: false,
},
},
// https://webpack.js.org/configuration/dev-server/
// note: docs not yet updated for webpack-dev-server v4
devMiddleware: {
Expand Down
20 changes: 8 additions & 12 deletions packages/studio/frontend/src/Components/SearchFilterBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,18 @@ import { useLocation } from 'react-router-dom'
import { SearchFilterContext } from '../Context/SearchFilterContextProvider'

export default function SearchFilterBar() {
const location = useLocation()
const [searchFilters, dispatcher] = useContext(SearchFilterContext)

const location = useLocation()
const [filterValue, setFilterValue] = useState(
location.pathname.startsWith('/explorer/span')
? searchFilters.spansFilter
: searchFilters.tracesFilter
)
const relevantFilters = location.pathname.startsWith('/explorer/span')
? searchFilters.spansFilter
: searchFilters.tracesFilter

const [filterValue, setFilterValue] = useState(relevantFilters)

useEffect(() => {
setFilterValue(
location.pathname.startsWith('/explorer/span')
? searchFilters.spansFilter
: searchFilters.tracesFilter
)
}, [location])
setFilterValue(relevantFilters)
}, [location, relevantFilters])

const updateSearchFilter = () => {
if (location.pathname.startsWith('/explorer/span')) {
Expand Down

0 comments on commit 6c4c78d

Please sign in to comment.