feat(ui) - support link

This commit is contained in:
Shekar Siri 2022-08-22 16:14:12 +02:00
commit cae30a1de9
4 changed files with 18 additions and 13 deletions

View file

@ -9,6 +9,7 @@ import (
"math/rand"
"net/http"
"openreplay/backend/internal/http/uuid"
"openreplay/backend/pkg/flakeid"
"strconv"
"time"
@ -134,7 +135,7 @@ func (e *Router) startSessionHandlerWeb(w http.ResponseWriter, r *http.Request)
UserUUID: userUUID,
SessionID: strconv.FormatUint(tokenData.ID, 10),
BeaconSizeLimit: e.cfg.BeaconSizeLimit,
StartTimestamp: e.services.Flaker.ExtractTimestamp(tokenData.ID),
StartTimestamp: int64(flakeid.ExtractTimestamp(tokenData.ID)),
})
}

View file

@ -90,13 +90,14 @@ const ONBOARDING_REDIRECT_PATH = routes.onboarding(OB_DEFAULT_TAB);
const jwt = state.get('jwt');
const changePassword = state.getIn(['user', 'account', 'changePassword']);
const userInfoLoading = state.getIn(['user', 'fetchUserInfoRequest', 'loading']);
const metaLoading = state.getIn(['customFields', 'fetchRequest', 'loading']);
return {
jwt,
siteId,
changePassword,
sites: state.getIn(['site', 'list']),
isLoggedIn: jwt !== null && !changePassword,
loading: siteId === null || userInfoLoading,
loading: siteId === null || userInfoLoading || metaLoading,
email: state.getIn(['user', 'account', 'email']),
account: state.getIn(['user', 'account']),
organisation: state.getIn(['user', 'account', 'name']),
@ -127,15 +128,12 @@ class Router extends React.Component {
}
}
fetchInitialData = () => {
Promise.all([
this.props.fetchUserInfo().then(() => {
this.props.fetchSiteList().then(() => {
const { mstore } = this.props;
mstore.initClient();
});
}),
]);
fetchInitialData = async () => {
await this.props.fetchUserInfo(),
await this.props.fetchSiteList()
const { mstore } = this.props;
mstore.initClient();
await this.props.fetchMetadata();
};
componentDidMount() {

View file

@ -57,7 +57,7 @@ const Header = (props) => {
Promise.all([
userStore.fetchLimits(),
notificationStore.fetchNotificationsCount(),
props.fetchMetadata(),
// props.fetchMetadata(),
]).then(() => {
userStore.updateKey('initialDataFetched', true);
});

View file

@ -3,6 +3,7 @@ import { useHistory } from 'react-router';
import { connect } from 'react-redux';
import { addFilterByKeyAndValue, addFilter } from 'Duck/search';
import { getFilterKeyTypeByKey, setQueryParamKeyFromFilterkey } from 'Types/filter/filterType';
import { filtersMap } from 'App/types/filter/newFilter';
interface Props {
appliedFilter: any;
@ -46,7 +47,12 @@ const SessionSearchQueryParamHandler = React.memo((props: Props) => {
if (filterKey) {
props.addFilterByKeyAndValue(filterKey, valueArr, operator, sourceOperator, sourceArr);
} else {
console.warn(`Filter key ${key} not found`);
const _filters: any = { ...filtersMap };
const _filter = _filters[key];
_filter.value = valueArr;
_filter.operator = operator;
_filter.source = sourceArr;
props.addFilter(_filter);
}
}
};