kibana/x-pack/packages/index-management
Saikat Sarkar 19b0543fd9
[Semantic Text UI] Add toast, modal and banner for deployment status (#180246)
In this PR, we added the following items.

- Add a toast for letting the user know that the underlying model is
being deployed
- Start the deployment of trained model if the model deployment has not
been started
- Add a modal to display the current status of trained model deployment
- Show a link to the model management page.
- Create a inference endpoint for default inference_ids if they are
missing
- Display a badge for inference_endpoint
- Show warning if mappingsDefinition is null


Please be aware that currently, we won't be able to save the mapping
using the 'Save mappings' button because the 'semantic_text'
functionality doesn't support 'inference_id'. However, there is ongoing
parallel work in a GitHub
[branch](https://github.com/elastic/elasticsearch/tree/feature/semantic-text)
to enable 'inference_id' in 'semantic_text' for Elasticsearch.

### How to test the changes locally
- Download the elasticsearch changes from GitHub
[branch](https://github.com/elastic/elasticsearch/tree/feature/semantic-text)
- Run the elasticsearch: `./gradlew :run -Drun.license_type=trial`
- Download the changes of this PR in local kibana and do the following
steps
+ Set isSemanticTextEnabled = true in this
[location](https://github.com/elastic/kibana/pull/180246/files#diff-92f4739f8a4a6917951a1b6e1af21a96d54313eaa2b5ce4c0e0553dd2ee11fcaL80)
    +  Run `yarn start`
-  Create an index named 'books' using the following command:

<details>
<summary>Click to expand</summary>

```
PUT books
{
  "mappings": {
    "dynamic_templates": [],
    "properties": {
      "date_published": {
        "type": "date"
      },
      "price": {
        "type": "float"
      },
      "title": {
        "type": "text"
      },
      "attributes": {
        "type": "nested",
        "properties": {
          "authors": {
            "type": "nested",
            "properties": {
              "author_name": {
                "type": "text"
              },
              "author_birthdate": {
                "type": "date"
              }
              // Add more author attributes as needed
            }
          },
          "genres": {
            "type": "nested",
            "properties": {
              "genre_name": {
                "type": "keyword"
              },
              "genre_description": {
                "type": "text"
              }
              // Add more genre attributes as needed
            }
          }
        }
      }
    }
  }
}
```

</details>

- Follow the steps mentioned in this video: 


f1ef71e3-8adf-4bcd-837c-754929fe6f1c

### Screenshots

![Screenshot 2024-04-12 at 9 52
02 AM](ebdec41e-23ee-4622-aed9-aa7ad5b091b8)
![Screenshot 2024-04-12 at 9 52
14 AM](1bec637e-9fe3-4add-b7d6-55fb687f2ce0)
![Screenshot 2024-04-12 at 9 52
29 AM](8c362d25-6d71-4504-ba80-e1b9914dd701)
![Screenshot 2024-04-12 at 9 53
07 AM](b3a0b148-4b3f-4679-bf99-c27bfa27d1fd)
![Screenshot 2024-04-12 at 9 53
46 AM](29e93d39-e84f-4d6f-b3f4-0bfd1405b24d)
![Screenshot 2024-04-12 at 9 54
05 AM](243b87e1-89d3-440d-8848-e30d03c0262f)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Sander Philipse <sander.philipse@elastic.co>
2024-04-25 12:20:53 -07:00
..
src [ML] Support adding inference_id in a flyout (#180330) 2024-04-21 21:20:28 -04:00
index.ts
jest.config.js
kibana.jsonc
package.json
README.md
tsconfig.json [Semantic Text UI] Add toast, modal and banner for deployment status (#180246) 2024-04-25 12:20:53 -07:00

@kbn/index-management

Contains types and functions used and exported by the index management plugin. Primarily used to avoid cyclical dependencies.