-
Notifications
You must be signed in to change notification settings - Fork 916
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[frontend] Add page titles to Data pages
WIP - Adding Titles to pages WIP - Updating Titles WIP - Updating Titles for Functional Components only. Updated Titles. Some class component pages have not been updated. Revert "Updated Titles. Some class component pages have not been updated." This reverts commit babb1cd. Updated Titles. Some class component pages have not been updated. Resolving Merge Conflicts WIP - Converting class components to functional components WIP - pushing current updates. Fix merge issues Fix Roles.tsx to be able to compile Add latest version of Narratives.tsx Replace key 'FAB_REPLACED' with 'FAB_REPLACEMENT' Convert KillChainPhases to functional component Updated Sectors. Need to update SectorLine and SectorsLines. WIP - converting IngestionRss WIP - finished IngestionRSS conversion WIP WIP - Modified IngestionTaxiis WIP editing Connectors and Tasks. WIP - one more to convert WIP - modifying Streams.tsx and ImportContent.tsx. WIP Convert Connectors back to JSX functional component WIP - updated Streams Convert Stream to functional Finished Import Content Remove changes from PR 7753 Remove changes from PR 7753 (pt 2) Remove changes from PR 7753 (pt 3) Remove changes from PR 7753 (pt 4) Remove duplicate Data titles Remove duplicate Data titles (pt 3) Remove sectors.jsx Add translations Convert Sectors closer to original component
- Loading branch information
1 parent
bab94af
commit 5350e04
Showing
12 changed files
with
667 additions
and
700 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
84 changes: 38 additions & 46 deletions
84
opencti-platform/opencti-front/src/private/components/data/Connectors.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,50 @@ | ||
import React, { Component } from 'react'; | ||
import * as PropTypes from 'prop-types'; | ||
import { compose } from 'ramda'; | ||
import withStyles from '@mui/styles/withStyles'; | ||
import React from 'react'; | ||
import makeStyles from '@mui/styles/makeStyles'; | ||
import IngestionMenu from './IngestionMenu'; | ||
import inject18n from '../../../components/i18n'; | ||
import { useFormatter } from '../../../components/i18n'; | ||
import { QueryRenderer } from '../../../relay/environment'; | ||
import WorkersStatus, { workersStatusQuery } from './connectors/WorkersStatus'; | ||
import ConnectorsStatus, { connectorsStatusQuery } from './connectors/ConnectorsStatus'; | ||
import Loader from '../../../components/Loader'; | ||
import Loader, { LoaderVariant } from '../../../components/Loader'; | ||
import Breadcrumbs from '../../../components/Breadcrumbs'; | ||
import useConnectedDocumentModifier from '../../../utils/hooks/useConnectedDocumentModifier'; | ||
|
||
const styles = () => ({ | ||
const useStyles = makeStyles(() => ({ | ||
container: { | ||
margin: 0, | ||
padding: '0 200px 50px 0', | ||
}, | ||
}); | ||
})); | ||
|
||
class Connectors extends Component { | ||
render() { | ||
const { t, classes } = this.props; | ||
return ( | ||
<div className={classes.container}> | ||
<Breadcrumbs variant="list" elements={[{ label: t('Data') }, { label: t('Ingestion') }, { label: t('Connectors'), current: true }]} /> | ||
<IngestionMenu/> | ||
<QueryRenderer | ||
query={workersStatusQuery} | ||
render={({ props }) => { | ||
if (props) { | ||
return <WorkersStatus data={props} />; | ||
} | ||
return <div> </div>; | ||
}} | ||
/> | ||
<QueryRenderer | ||
query={connectorsStatusQuery} | ||
render={({ props }) => { | ||
if (props) { | ||
return <ConnectorsStatus data={props} />; | ||
} | ||
return <Loader />; | ||
}} | ||
/> | ||
</div> | ||
); | ||
} | ||
} | ||
|
||
Connectors.propTypes = { | ||
classes: PropTypes.object, | ||
t: PropTypes.func, | ||
connectorsStatus: PropTypes.array, | ||
const Connectors = () => { | ||
const classes = useStyles(); | ||
const { t_i18n } = useFormatter(); | ||
const { setTitle } = useConnectedDocumentModifier(); | ||
setTitle(t_i18n('Ingestion: Connectors | Data')); | ||
return ( | ||
<div className={classes.container}> | ||
<Breadcrumbs variant="list" elements={[{ label: t_i18n('Data') }, { label: t_i18n('Ingestion') }, { label: t_i18n('Connectors'), current: true }]} /> | ||
<IngestionMenu/> | ||
<QueryRenderer | ||
query={workersStatusQuery} | ||
render={({ props }) => { | ||
if (props) { | ||
return <WorkersStatus data={props} />; | ||
} | ||
return <Loader variant={LoaderVariant.container} />; | ||
}} | ||
/> | ||
<QueryRenderer | ||
query={connectorsStatusQuery} | ||
render={({ props }) => { | ||
if (props) { | ||
return <ConnectorsStatus data={props} />; | ||
} | ||
return <Loader variant={LoaderVariant.container} />; | ||
}} | ||
/> | ||
</div> | ||
); | ||
}; | ||
|
||
export default compose( | ||
inject18n, | ||
withStyles(styles, { withTheme: true }), | ||
)(Connectors); | ||
export default Connectors; |
Oops, something went wrong.