Skip to content

Commit

Permalink
implement api to deliver a particular event (close #371) (#373)
Browse files Browse the repository at this point in the history
  • Loading branch information
tirumaraiselvan authored and shahidhk committed Sep 7, 2018
1 parent 2814e87 commit e905535
Show file tree
Hide file tree
Showing 25 changed files with 1,166 additions and 86 deletions.
55 changes: 25 additions & 30 deletions console/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions console/package.json
Expand Up @@ -67,6 +67,7 @@
"less": "^3.7.1",
"lru-memoize": "^1.0.0",
"map-props": "^1.0.0",
"match-sorter": "^2.3.0",
"multireducer": "^1.0.2",
"piping": "^0.3.0",
"prettier": "^1.13.0",
Expand Down
1 change: 1 addition & 0 deletions console/src/components/Main/Main.js
Expand Up @@ -56,6 +56,7 @@ class Main extends React.Component {
}
} catch (e) {
console.error(e);
this.setState({ showEvents: true });
}
});
});
Expand Down
18 changes: 9 additions & 9 deletions console/src/components/Services/Data/Metadata/Metadata.js
Expand Up @@ -82,17 +82,17 @@ class Metadata extends Component {

{this.state.showMetadata
? [
<div key="meta_data_1" className={metaDataStyles.intro_note}>
<h4>Reload metadata</h4>
<div className={metaDataStyles.content_width}>
<div key="meta_data_1" className={metaDataStyles.intro_note}>
<h4>Reload metadata</h4>
<div className={metaDataStyles.content_width}>
Refresh Hasura metadata, typically required if you have
changed the underlying postgres.
</div>
</div>,
<div key="meta_data_2">
<ReloadMetadata {...this.props} />
</div>,
]
</div>
</div>,
<div key="meta_data_2">
<ReloadMetadata {...this.props} />
</div>,
]
: null}
</div>
);
Expand Down
28 changes: 25 additions & 3 deletions console/src/components/Services/EventTrigger/Add/AddTrigger.js
@@ -1,6 +1,8 @@
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import Helmet from 'react-helmet';
import * as tooltip from './Tooltips';
import OverlayTrigger from 'react-bootstrap/lib/OverlayTrigger';

import {
setTriggerName,
Expand Down Expand Up @@ -207,6 +209,12 @@ class AddTrigger extends Component {
>
<h4 className={styles.subheading_text}>
Trigger Name &nbsp; &nbsp;
<OverlayTrigger
placement="right"
overlay={tooltip.triggerNameDescription}
>
<i className="fa fa-question-circle" aria-hidden="true" />
</OverlayTrigger>{' '}
</h4>
<input
type="text"
Expand All @@ -222,6 +230,12 @@ class AddTrigger extends Component {
<hr />
<h4 className={styles.subheading_text}>
Schema/Table &nbsp; &nbsp;
<OverlayTrigger
placement="right"
overlay={tooltip.postgresDescription}
>
<i className="fa fa-question-circle" aria-hidden="true" />
</OverlayTrigger>{' '}
</h4>
<select
onChange={updateTableList}
Expand Down Expand Up @@ -272,7 +286,15 @@ class AddTrigger extends Component {
styles.add_mar_bottom + ' ' + styles.selectOperations
}
>
<h4 className={styles.subheading_text}>Operations</h4>
<h4 className={styles.subheading_text}>
Operations &nbsp; &nbsp;
<OverlayTrigger
placement="right"
overlay={tooltip.operationsDescription}
>
<i className="fa fa-question-circle" aria-hidden="true" />
</OverlayTrigger>{' '}
</h4>
<div className={styles.display_inline}>
<label>
<input
Expand Down Expand Up @@ -443,7 +465,7 @@ class AddTrigger extends Component {
styles.add_mar_right + ' ' + styles.retryLabel
}
>
Number of retries
Number of retries (default: 0)
</label>
<input
onChange={e => {
Expand All @@ -465,7 +487,7 @@ class AddTrigger extends Component {
styles.add_mar_right + ' ' + styles.retryLabel
}
>
Retry Interval in seconds
Retry Interval in seconds (default: 10)
</label>
<input
onChange={e => {
Expand Down
20 changes: 20 additions & 0 deletions console/src/components/Services/EventTrigger/Add/Tooltips.js
@@ -0,0 +1,20 @@
import React from 'react';
import Tooltip from 'react-bootstrap/lib/Tooltip';

export const triggerNameDescription = (
<Tooltip id="tooltip-trigger-name-description">
Trigger name can be alphanumeric and can contain underscores
</Tooltip>
);

export const operationsDescription = (
<Tooltip id="tooltip-operations-description">
Listen to these operations on the table
</Tooltip>
);

export const postgresDescription = (
<Tooltip id="tooltip-postgres-description">
Select the postgres schema and table
</Tooltip>
);

0 comments on commit e905535

Please sign in to comment.