Skip to content

Commit

Permalink
[SecuritySolution] disable edit and create from rules breadcrumb (#10…
Browse files Browse the repository at this point in the history
…5412)

* disable edit and create from rules breadcrumb

* remove href for create /rule breadcrumb

* fix lint error
  • Loading branch information
angorayc authored Jul 14, 2021
1 parent 604b424 commit b2a6a9d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,7 @@ describe('Navigation Breadcrumbs', () => {
},
{
text: 'Create',
href:
"securitySolution/rules/create?sourcerer=()&timerange=(global:(linkTo:!(timeline),timerange:(from:'2019-05-16T23:10:43.696Z',fromStr:now-24h,kind:relative,to:'2019-05-17T23:10:43.697Z',toStr:now)),timeline:(linkTo:!(global),timerange:(from:'2019-05-16T23:10:43.696Z',fromStr:now-24h,kind:relative,to:'2019-05-17T23:10:43.697Z',toStr:now)))",
href: '',
},
]);
});
Expand Down Expand Up @@ -382,7 +381,7 @@ describe('Navigation Breadcrumbs', () => {
},
{
text: 'Edit',
href: `securitySolution/rules/id/${mockDetailName}/edit?sourcerer=()&timerange=(global:(linkTo:!(timeline),timerange:(from:'2019-05-16T23:10:43.696Z',fromStr:now-24h,kind:relative,to:'2019-05-17T23:10:43.697Z',toStr:now)),timeline:(linkTo:!(global),timerange:(from:'2019-05-16T23:10:43.696Z',fromStr:now-24h,kind:relative,to:'2019-05-17T23:10:43.697Z',toStr:now)))`,
href: '',
},
]);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ import { ChromeBreadcrumb } from '../../../../../../../../src/core/public';
import {
getRulesUrl,
getRuleDetailsUrl,
getCreateRuleUrl,
getEditRuleUrl,
} from '../../../../common/components/link_to/redirect_to_detection_engine';
import * as i18nRules from './translations';
import { RouteSpyState } from '../../../../common/utils/route/types';
Expand Down Expand Up @@ -79,10 +77,7 @@ export const getBreadcrumbs = (
...breadcrumb,
{
text: i18nRules.ADD_PAGE_TITLE,
href: getUrlForApp(APP_ID, {
deepLinkId: SecurityPageName.rules,
path: getCreateRuleUrl(!isEmpty(search[0]) ? search[0] : ''),
}),
href: '',
},
];
}
Expand All @@ -92,10 +87,7 @@ export const getBreadcrumbs = (
...breadcrumb,
{
text: i18nRules.EDIT_PAGE_TITLE,
href: getUrlForApp(APP_ID, {
deepLinkId: SecurityPageName.rules,
path: getEditRuleUrl(params.detailName, !isEmpty(search[0]) ? search[0] : ''),
}),
href: '',
},
];
}
Expand Down

0 comments on commit b2a6a9d

Please sign in to comment.