diff --git a/.gitignore b/.gitignore index ce6fd1b9..76d18d38 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ npm-debug.log *.temp *.DS_Store +.tern-project diff --git a/console/src/components/Services/Data/Metadata/ClearAccessKey.js b/console/src/components/Services/Data/Metadata/ClearAccessKey.js new file mode 100644 index 00000000..4767063a --- /dev/null +++ b/console/src/components/Services/Data/Metadata/ClearAccessKey.js @@ -0,0 +1,52 @@ +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; +import { clearAccessKeyState } from '../../../AppState'; +import globals from '../../../../Globals'; + +import { + showSuccessNotification, + showErrorNotification, +} from '../Notification'; + +class ClearAccessKey extends Component { + constructor() { + super(); + this.state = {}; + this.state.isClearing = false; + } + render() { + const styles = require('../PageContainer/PageContainer.scss'); + const metaDataStyles = require('./Metadata.scss'); + return ( +
+ +
+ ); + } +} + +ClearAccessKey.propTypes = { + dispatch: PropTypes.func.isRequired, + dataHeaders: PropTypes.object.isRequired, +}; + +export default ClearAccessKey; diff --git a/console/src/components/Services/Data/Metadata/Metadata.js b/console/src/components/Services/Data/Metadata/Metadata.js index 91169392..0a60f69b 100644 --- a/console/src/components/Services/Data/Metadata/Metadata.js +++ b/console/src/components/Services/Data/Metadata/Metadata.js @@ -5,6 +5,7 @@ import Helmet from 'react-helmet'; import ExportMetadata from './ExportMetadata'; import ImportMetadata from './ImportMetadata'; import ReloadMetadata from './ReloadMetadata'; +import ClearAccessKey from './ClearAccessKey'; const semver = require('semver'); @@ -92,6 +93,21 @@ class Metadata extends Component {
, +
+

Clear access key (logout)

+
+ The console caches the access key (HASURA_GRAPHQL_ACCESS_KEY) + in the browser. You can clear this cache to force a prompt for + the access key when the console is accessed next using this + browser. +
+
, +
+ +
, ] : null}