Skip to content

Commit

Permalink
[api/client] Enhance display of observables and indicators
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel Hassine committed Dec 21, 2019
1 parent 4d240a6 commit 9729615
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { ShieldSearch } from 'mdi-material-ui';
import inject18n from '../../../../components/i18n';
import ItemConfidenceLevel from '../../../../components/ItemConfidenceLevel';
import StixRelationPopover from '../../common/stix_relations/StixRelationPopover';
import ItemPatternType from '../../../../components/ItemPatternType';

const styles = (theme) => ({
item: {
Expand Down Expand Up @@ -44,7 +45,6 @@ const styles = (theme) => ({
class EntityIndicatorLineComponent extends Component {
render() {
const {
t,
nsd,
classes,
dataColumns,
Expand All @@ -69,9 +69,12 @@ class EntityIndicatorLineComponent extends Component {
<div>
<div
className={classes.bodyItem}
style={{ width: dataColumns.main_observable_type.width }}
style={{ width: dataColumns.pattern_type.width }}
>
{t(`observable_${node.to.main_observable_type.toLowerCase()}`)}
<ItemPatternType
variant="inList"
label={node.to.pattern_type}
/>
</div>
<div
className={classes.bodyItem}
Expand Down Expand Up @@ -148,6 +151,7 @@ const EntityIndicatorLineFragment = createFragmentContainer(
id
name
main_observable_type
pattern_type
description
valid_from
valid_until
Expand Down Expand Up @@ -178,7 +182,7 @@ class EntityIndicatorLineDummyComponent extends Component {
<div>
<div
className={classes.bodyItem}
style={{ width: dataColumns.main_observable_type.width }}
style={{ width: dataColumns.pattern_type.width }}
>
<div className="fakeItem" style={{ width: '80%' }} />
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class EntityIndicators extends Component {
const { sortBy, orderAsc } = this.state;
const { entityLink } = this.props;
const dataColumns = {
main_observable_type: {
pattern_type: {
label: 'Type',
width: '10%',
isSortable: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,10 @@ const IndicatorLineFragment = createFragmentContainer(IndicatorLineComponent, {
id
name
main_observable_type
pattern_type
valid_from
valid_until
score
pattern_type
markingDefinitions {
edges {
node {
Expand Down

0 comments on commit 9729615

Please sign in to comment.