Merge pull request #235 from openreplay/dev

v1.3.6 fixes
This commit is contained in:
Mehdi Osman 2021-12-05 19:43:54 +01:00 committed by GitHub
commit e2f925e66f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 24 additions and 20 deletions

View file

@ -1,7 +1,7 @@
import json
from chalicelib.utils import pg_client, helper, dev
from chalicelib.core import sourcemaps, sessions
from chalicelib.utils import pg_client, helper, dev
from chalicelib.utils.TimeUTC import TimeUTC
from chalicelib.utils.metrics_helper import __get_step_size
@ -39,7 +39,10 @@ def get_batch(error_ids):
FROM error_family;""",
{"error_ids": tuple(error_ids)})
cur.execute(query=query)
return helper.list_to_camel_case(cur.fetchall())
errors = cur.fetchall()
for e in errors:
e["stacktrace_parsed_at"] = TimeUTC.datetime_to_timestamp(e["stacktrace_parsed_at"])
return helper.list_to_camel_case(errors)
def __flatten_sort_key_count_version(data, merge_nested=False):

View file

@ -47,7 +47,7 @@ def login():
stack_integrations=True, version=True)
c["smtp"] = helper.has_smtp()
c["iceServers"] = assist.get_ice_servers()
c = {**c, **license.get_status(tenant_id)}
return {
'jwt': r.pop('jwt'),
'data': {

View file

@ -1,9 +1,9 @@
import json
from chalicelib.utils import pg_client, helper
from chalicelib.utils import ch_client
from chalicelib.core import sourcemaps, sessions
from chalicelib.core import dashboard
from chalicelib.core import sourcemaps, sessions
from chalicelib.utils import ch_client
from chalicelib.utils import pg_client, helper
from chalicelib.utils.TimeUTC import TimeUTC
@ -40,7 +40,10 @@ def get_batch(error_ids):
FROM error_family;""",
{"error_ids": tuple(error_ids)})
cur.execute(query=query)
return helper.list_to_camel_case(cur.fetchall())
errors = cur.fetchall()
for e in errors:
e["stacktrace_parsed_at"] = TimeUTC.datetime_to_timestamp(e["stacktrace_parsed_at"])
return helper.list_to_camel_case(errors)
def __flatten_sort_key_count_version(data, merge_nested=False):

View file

@ -86,15 +86,11 @@ class Router extends React.Component {
}
componentDidUpdate(prevProps) {
if (prevProps.email !== this.props.email) {
this.onLoginLogout();
if (prevProps.email !== this.props.email && !this.props.email) {
this.props.fetchTenants();
}
}
onLoginLogout() {
const { email, account, organisation } = this.props;
}
render() {
const { isLoggedIn, jwt, siteId, sites, loading, changePassword, location, existingTenant, onboarding } = this.props;
const siteIdList = sites.map(({ id }) => id).toJS();

View file

@ -31,6 +31,14 @@ function Roles(props: Props) {
props.fetchList()
}, [])
useEffect(() => {
if (removeErrors && removeErrors.size > 0) {
removeErrors.forEach(e => {
toast.error(e)
})
}
}, [removeErrors])
const closeModal = () => {
setShowmModal(false)
setTimeout(() => {
@ -48,13 +56,7 @@ function Roles(props: Props) {
header: 'Roles',
confirmation: `Are you sure you want to remove this role?`
})) {
deleteRole(role.roleId).then(() => {
if (removeErrors && removeErrors.size > 0) {
removeErrors.forEach(e => {
toast.error(e)
})
}
})
deleteRole(role.roleId)
}
}