mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-09-20 15:09:02 +03:00
console: show remote shema / event trigger intro sections always (#4044)
This commit is contained in:
parent
fd6535b861
commit
84c6b00c84
@ -102,3 +102,4 @@
|
||||
- console: add design system base components (#3866)
|
||||
- docs: add docs for redeliver_event API
|
||||
- option to reload remote schemas in 'reload_metadata' API (fix #3792, #4117)
|
||||
- console: show remote schema / event trigger intro sections always (#4044)
|
||||
|
@ -23,7 +23,7 @@ class EventTrigger extends Component {
|
||||
}
|
||||
|
||||
render() {
|
||||
const { dispatch, listingTrigger, readOnlyMode } = this.props;
|
||||
const { dispatch, readOnlyMode } = this.props;
|
||||
|
||||
const styles = require('../../../Common/Layout/LeftSubSidebar/LeftSubSidebar.scss');
|
||||
|
||||
@ -32,24 +32,6 @@ class EventTrigger extends Component {
|
||||
affected_rows
|
||||
}
|
||||
}`;
|
||||
const showIntroSection = !listingTrigger.length;
|
||||
const getIntroSection = () => {
|
||||
if (!showIntroSection) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<div>
|
||||
<TopicDescription
|
||||
title="What are Event Triggers?"
|
||||
imgUrl={`${globals.assetsPath}/common/img/event-trigger.png`}
|
||||
imgAlt="Event Triggers"
|
||||
description="Hasura can be used to create event triggers on tables. An Event Trigger atomically captures events (insert, update, delete) on a specified table and then reliably calls a webhook that can carry out any custom logic."
|
||||
/>
|
||||
<hr className={styles.clear_fix} />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
const getAddBtn = () => {
|
||||
if (readOnlyMode) {
|
||||
@ -96,7 +78,13 @@ class EventTrigger extends Component {
|
||||
</div>
|
||||
<hr />
|
||||
|
||||
{getIntroSection()}
|
||||
<TopicDescription
|
||||
title="What are Event Triggers?"
|
||||
imgUrl={`${globals.assetsPath}/common/img/event-trigger.png`}
|
||||
imgAlt="Event Triggers"
|
||||
description="Hasura can be used to create event triggers on tables. An Event Trigger atomically captures events (insert, update, delete) on a specified table and then reliably calls a webhook that can carry out any custom logic."
|
||||
/>
|
||||
<hr className={styles.clear_fix} />
|
||||
|
||||
<TryItOut
|
||||
service="eventTrigger"
|
||||
@ -108,7 +96,7 @@ class EventTrigger extends Component {
|
||||
MicrosoftAzureLink="https://github.com/hasura/graphql-engine/tree/master/community/boilerplates/event-triggers/azure-functions/nodejs"
|
||||
awsLink="https://github.com/hasura/graphql-engine/tree/master/community/boilerplates/event-triggers/aws-lambda/nodejs8"
|
||||
adMoreLink="https://github.com/hasura/graphql-engine/tree/master/community/boilerplates/event-triggers/"
|
||||
isAvailable={showIntroSection}
|
||||
isAvailable
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -12,25 +12,7 @@ class RemoteSchema extends React.Component {
|
||||
render() {
|
||||
const styles = require('../RemoteSchema.scss');
|
||||
|
||||
const { dispatch, readOnlyMode, remoteSchemaList } = this.props;
|
||||
const showIntroSection = !remoteSchemaList.remoteSchemas.length;
|
||||
const getIntroSection = () => {
|
||||
if (!showIntroSection) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<div>
|
||||
<TopicDescription
|
||||
title="What are Remote Schemas?"
|
||||
imgUrl={`${globals.assetsPath}/common/img/remote_schema.png`}
|
||||
imgAlt="Remote Schema"
|
||||
description="Remote schemas are external GraphQL services which can be merged with Hasura to provide a unified GraphQL API. Think of it like automated schema stitching. All you need to do is build a GraphQL service and then provide its HTTP endpoint to Hasura. Your GraphQL service can be written in any language or framework."
|
||||
/>
|
||||
<hr className={styles.clear_fix} />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
const { dispatch, readOnlyMode } = this.props;
|
||||
|
||||
const getAddBtn = () => {
|
||||
if (readOnlyMode) {
|
||||
@ -70,7 +52,13 @@ class RemoteSchema extends React.Component {
|
||||
</div>
|
||||
<hr />
|
||||
|
||||
{getIntroSection()}
|
||||
<TopicDescription
|
||||
title="What are Remote Schemas?"
|
||||
imgUrl={`${globals.assetsPath}/common/img/remote_schema.png`}
|
||||
imgAlt="Remote Schema"
|
||||
description="Remote schemas are external GraphQL services which can be merged with Hasura to provide a unified GraphQL API. Think of it like automated schema stitching. All you need to do is build a GraphQL service and then provide its HTTP endpoint to Hasura. Your GraphQL service can be written in any language or framework."
|
||||
/>
|
||||
<hr className={styles.clear_fix} />
|
||||
|
||||
<TryItOut
|
||||
service="remoteSchema"
|
||||
@ -82,7 +70,7 @@ class RemoteSchema extends React.Component {
|
||||
MicrosoftAzureLink="https://github.com/hasura/graphql-engine/tree/master/community/boilerplates/remote-schemas/azure-functions/nodejs"
|
||||
awsLink="https://github.com/hasura/graphql-engine/tree/master/community/boilerplates/remote-schemas/aws-lambda/nodejs"
|
||||
adMoreLink="https://github.com/hasura/graphql-engine/tree/master/community/boilerplates/remote-schemas/"
|
||||
isAvailable={showIntroSection}
|
||||
isAvailable
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user