Skip to content

Commit

Permalink
Revert "Fix keyboard accessibility for EuiButtonEmpty components that…
Browse files Browse the repository at this point in the history
… act as links"

This reverts commit 95a0506.
  • Loading branch information
Mikep86 committed Dec 11, 2023
1 parent a7a8fc5 commit fb1a34b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ describe('TrainedModelHealthPopover', () => {

const fixButton = wrapper.find(EuiButtonEmpty).at(0);
expect(fixButton.prop('iconType')).toBe('wrench');
expect(fixButton.prop('href')).toBe('/app/ml/trained_models');
expect(fixButton.children().text()).toBe('Fix issue in Trained Models');
});
it('popover does not render fix button when model deployed', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { i18n } from '@kbn/i18n';

import { InferencePipeline, TrainedModelState } from '../../../../../../common/types/pipelines';
import { CANCEL_BUTTON_LABEL, DELETE_BUTTON_LABEL } from '../../../../shared/constants';
import { KibanaLogic } from '../../../../shared/kibana';
import { HttpLogic } from '../../../../shared/http';
import { ML_MANAGE_TRAINED_MODELS_PATH } from '../../../routes';
import { getMLType, getModelDisplayTitle } from '../../shared/ml_inference/utils';
import { IndexNameLogic } from '../index_name_logic';
Expand All @@ -38,7 +38,7 @@ import { MLModelTypeBadge } from './ml_model_type_badge';
import { PipelinesLogic } from './pipelines_logic';

export const TrainedModelHealthPopover: React.FC<InferencePipeline> = (pipeline) => {
const { navigateToUrl } = useValues(KibanaLogic);
const { http } = useValues(HttpLogic);
const { indexName } = useValues(IndexNameLogic);
const { ingestionMethod } = useValues(IndexViewLogic);

Expand Down Expand Up @@ -85,11 +85,7 @@ export const TrainedModelHealthPopover: React.FC<InferencePipeline> = (pipeline)
flush="both"
iconType="wrench"
color="text"
onClick={() => {
navigateToUrl(ML_MANAGE_TRAINED_MODELS_PATH, {
shouldNotCreateHref: true,
});
}}
href={http.basePath.prepend(ML_MANAGE_TRAINED_MODELS_PATH)}
>
{i18n.translate(
'xpack.enterpriseSearch.inferencePipelineCard.modelState.notDeployed.fixLink',
Expand All @@ -109,12 +105,9 @@ export const TrainedModelHealthPopover: React.FC<InferencePipeline> = (pipeline)
flush="both"
iconType="eye"
color="text"
onClick={() => {
navigateToUrl(
`/app/management/ingest/ingest_pipelines/?pipeline=${pipelineName}`,
{ shouldNotCreateHref: true }
);
}}
href={http.basePath.prepend(
`/app/management/ingest/ingest_pipelines/?pipeline=${pipelineName}`
)}
>
{i18n.translate('xpack.enterpriseSearch.inferencePipelineCard.action.view', {
defaultMessage: 'View in Stack Management',
Expand Down

0 comments on commit fb1a34b

Please sign in to comment.