import {browserHistory, RouteComponentProps} from 'react-router'; import {t} from 'sentry/locale'; import {Organization, Project} from 'sentry/types'; import {normalizeUrl} from 'sentry/utils/withDomainRequired'; import DeprecatedAsyncView from 'sentry/views/deprecatedAsyncView'; import SettingsPageHeader from 'sentry/views/settings/components/settingsPageHeader'; import PermissionAlert from 'sentry/views/settings/project/permissionAlert'; import {KeySettings} from 'sentry/views/settings/project/projectKeys/details/keySettings'; import KeyStats from 'sentry/views/settings/project/projectKeys/details/keyStats'; import {ProjectKey} from 'sentry/views/settings/project/projectKeys/types'; type Props = { organization: Organization; project: Project; } & RouteComponentProps< { keyId: string; projectId: string; }, {} >; type State = { data: ProjectKey; } & DeprecatedAsyncView['state']; export default class ProjectKeyDetails extends DeprecatedAsyncView { getTitle() { return t('Key Details'); } getEndpoints(): ReturnType { const {organization} = this.props; const {keyId, projectId} = this.props.params; return [['data', `/projects/${organization.slug}/${projectId}/keys/${keyId}/`]]; } handleRemove = () => { const {organization} = this.props; const {projectId} = this.props.params; browserHistory.push( normalizeUrl(`/settings/${organization.slug}/projects/${projectId}/keys/`) ); }; updateData = (data: ProjectKey) => { this.setState(state => { return {...state, data}; }); }; renderBody() { const {organization, project, params} = this.props; const {data} = this.state; return (
); } }