commit
e2f925e66f
5 changed files with 24 additions and 20 deletions
|
|
@ -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):
|
||||
|
|
|
|||
|
|
@ -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': {
|
||||
|
|
|
|||
|
|
@ -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):
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue