-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add UiSettings validation & Kibana default route redirection #59694
Changes from all commits
b20ecc7
7e46aef
5b55b83
19dae10
012a715
cc96364
269e34e
f2b2dea
39e7405
b736ada
b01a668
5518bd0
7a5a354
850d78c
a7d0100
8ec9103
b21efe2
cb40a2b
2f8f956
f17a82f
6b5f699
9856d0b
6e389a6
84e3e5a
c72b5cc
ed8a9a9
1036d77
075fe07
3b8ad0c
57c9aef
2ad3292
400a167
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [PublicUiSettingsParams](./kibana-plugin-core-public.publicuisettingsparams.md) | ||
|
||
## PublicUiSettingsParams type | ||
|
||
A sub-set of [UiSettingsParams](./kibana-plugin-core-public.uisettingsparams.md) exposed to the client-side. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export declare type PublicUiSettingsParams = Omit<UiSettingsParams, 'schema'>; | ||
``` |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [UiSettingsParams](./kibana-plugin-core-public.uisettingsparams.md) > [schema](./kibana-plugin-core-public.uisettingsparams.schema.md) | ||
|
||
## UiSettingsParams.schema property | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
schema: Type<T>; | ||
``` |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [PublicUiSettingsParams](./kibana-plugin-core-server.publicuisettingsparams.md) | ||
|
||
## PublicUiSettingsParams type | ||
|
||
A sub-set of [UiSettingsParams](./kibana-plugin-core-server.uisettingsparams.md) exposed to the client-side. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export declare type PublicUiSettingsParams = Omit<UiSettingsParams, 'schema'>; | ||
``` |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [UiSettingsParams](./kibana-plugin-core-server.uisettingsparams.md) > [schema](./kibana-plugin-core-server.uisettingsparams.schema.md) | ||
|
||
## UiSettingsParams.schema property | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
schema: Type<T>; | ||
``` |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -152,10 +152,14 @@ export class UiSettingsApi { | |
}, | ||
}); | ||
} catch (err) { | ||
if (err.response && err.response.status >= 300) { | ||
throw new Error(`Request failed with status code: ${err.response.status}`); | ||
if (err.response) { | ||
if (err.response.status === 400) { | ||
throw new Error(err.body.message); | ||
} | ||
if (err.response.status > 400) { | ||
throw new Error(`Request failed with status code: ${err.response.status}`); | ||
Comment on lines
+156
to
+160
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Probably related to the changes in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We really need typing for our errors so that we can evolve these 😢 |
||
} | ||
} | ||
|
||
throw err; | ||
} finally { | ||
this.loadingCount$.next(this.loadingCount$.getValue() - 1); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not introduced by this PR, but we may want to rename the exposed types to use the
UiSettings
prefix at some point. Outside of the scope of the PR though.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will create an issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added to #48925