mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-09-22 07:58:52 +03:00
console: fix error notification non json, auto height css (#354)
This commit is contained in:
parent
0a3f68a6eb
commit
d397d932d6
@ -7,6 +7,7 @@ import * as tooltip from './Tooltips';
|
||||
import 'react-toggle/style.css';
|
||||
import Spinner from '../Common/Spinner/Spinner';
|
||||
import { loadServerVersion, checkServerUpdates } from './Actions';
|
||||
import './NotificationOverrides.css';
|
||||
|
||||
const semver = require('semver');
|
||||
|
||||
|
3
console/src/components/Main/NotificationOverrides.css
Normal file
3
console/src/components/Main/NotificationOverrides.css
Normal file
@ -0,0 +1,3 @@
|
||||
.notifications-wrapper .notification {
|
||||
height: auto !important;
|
||||
}
|
@ -72,44 +72,44 @@ const showErrorNotification = (title, message, reqBody, error) => {
|
||||
level: 'error',
|
||||
title,
|
||||
message: modMessage,
|
||||
action: reqBody
|
||||
action: finalJson
|
||||
? {
|
||||
label: 'Details',
|
||||
callback: () => {
|
||||
dispatch(
|
||||
showNotification({
|
||||
level: 'error',
|
||||
title,
|
||||
message: modMessage,
|
||||
dismissible: 'button',
|
||||
children: [
|
||||
<div className={styles.aceBlock}>
|
||||
<i
|
||||
onClick={e => {
|
||||
e.preventDefault();
|
||||
expandClicked(finalJson);
|
||||
}}
|
||||
className={styles.aceBlockExpand + ' fa fa-expand'}
|
||||
/>
|
||||
<AceEditor
|
||||
readOnly
|
||||
showPrintMargin={false}
|
||||
mode="json"
|
||||
showGutter={false}
|
||||
theme="github"
|
||||
name="notification-response"
|
||||
value={JSON.stringify(finalJson, null, 4)}
|
||||
minLines={1}
|
||||
maxLines={15}
|
||||
width="100%"
|
||||
/>
|
||||
{refreshBtn}
|
||||
</div>,
|
||||
],
|
||||
})
|
||||
);
|
||||
},
|
||||
}
|
||||
label: 'Details',
|
||||
callback: () => {
|
||||
dispatch(
|
||||
showNotification({
|
||||
level: 'error',
|
||||
title,
|
||||
message: modMessage,
|
||||
dismissible: 'button',
|
||||
children: [
|
||||
<div className={styles.aceBlock}>
|
||||
<i
|
||||
onClick={e => {
|
||||
e.preventDefault();
|
||||
expandClicked(finalJson);
|
||||
}}
|
||||
className={styles.aceBlockExpand + ' fa fa-expand'}
|
||||
/>
|
||||
<AceEditor
|
||||
readOnly
|
||||
showPrintMargin={false}
|
||||
mode="json"
|
||||
showGutter={false}
|
||||
theme="github"
|
||||
name="notification-response"
|
||||
value={JSON.stringify(finalJson, null, 4)}
|
||||
minLines={1}
|
||||
maxLines={15}
|
||||
width="100%"
|
||||
/>
|
||||
{refreshBtn}
|
||||
</div>,
|
||||
],
|
||||
})
|
||||
);
|
||||
},
|
||||
}
|
||||
: null,
|
||||
})
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user