Skip to content

Commit e8a46b3

Browse files
committed
[ML] remove an extra copyright comment, add selectable messages
1 parent 06e4534 commit e8a46b3

File tree

2 files changed

+9
-6
lines changed
  • x-pack/plugins/ml/public/application

2 files changed

+9
-6
lines changed

x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/models_management/models_list.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,15 @@ export const ModelsList: FC = () => {
428428

429429
const selection: EuiTableSelectionType<ModelItem> | undefined = isSelectionAllowed
430430
? {
431+
selectableMessage: (selectable, item) => {
432+
return selectable
433+
? i18n.translate('xpack.ml.inference.modelsList.selectableMessage', {
434+
defaultMessage: 'Select a model',
435+
})
436+
: i18n.translate('xpack.ml.inference.modelsList.disableSelectableMessage', {
437+
defaultMessage: 'Model has associated pipelines',
438+
});
439+
},
431440
selectable: (item) => !item.pipelines,
432441
onSelectionChange: (selectedItems) => {
433442
setSelectedModels(selectedItems);

x-pack/plugins/ml/public/application/routing/routes/data_frame_analytics/models_list.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@
44
* you may not use this file except in compliance with the Elastic License.
55
*/
66

7-
/*
8-
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
9-
* or more contributor license agreements. Licensed under the Elastic License;
10-
* you may not use this file except in compliance with the Elastic License.
11-
*/
12-
137
import React, { FC } from 'react';
148
import { i18n } from '@kbn/i18n';
159

0 commit comments

Comments
 (0)