forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from cjcenizal/painless-playground-ui-suggestions
Refine Painless Playground UI/UX
- Loading branch information
Showing
17 changed files
with
854 additions
and
405 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 0 additions & 28 deletions
28
x-pack/legacy/plugins/painless_playground/public/common/constants.ts
This file was deleted.
Oops, something went wrong.
63 changes: 63 additions & 0 deletions
63
x-pack/legacy/plugins/painless_playground/public/common/constants.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import React from 'react'; | ||
|
||
import { EuiText } from '@elastic/eui'; | ||
import { i18n } from '@kbn/i18n'; | ||
|
||
const defaultLabel = i18n.translate('xpack.painless_playground.contextDefaultLabel', { | ||
defaultMessage: 'Basic', | ||
}); | ||
|
||
const filterLabel = i18n.translate('xpack.painless_playground.contextFilterLabel', { | ||
defaultMessage: 'Filter', | ||
}); | ||
|
||
const scoreLabel = i18n.translate('xpack.painless_playground.contextScoreLabel', { | ||
defaultMessage: 'Score', | ||
}); | ||
|
||
export const painlessContextOptions = [ | ||
{ | ||
value: 'painless_test', | ||
inputDisplay: defaultLabel, | ||
dropdownDisplay: ( | ||
<> | ||
<strong>{defaultLabel}</strong> | ||
<EuiText size="s" color="subdued"> | ||
<p className="euiTextColor--subdued">The script result will be converted to a string</p> | ||
</EuiText> | ||
</> | ||
), | ||
}, | ||
{ | ||
value: 'filter', | ||
inputDisplay: filterLabel, | ||
dropdownDisplay: ( | ||
<> | ||
<strong>{filterLabel}</strong> | ||
<EuiText size="s" color="subdued"> | ||
<p className="euiTextColor--subdued">Use the context of a filter’s script query</p> | ||
</EuiText> | ||
</> | ||
), | ||
}, | ||
{ | ||
value: 'score', | ||
inputDisplay: scoreLabel, | ||
dropdownDisplay: ( | ||
<> | ||
<strong>{scoreLabel}</strong> | ||
<EuiText size="s" color="subdued"> | ||
<p className="euiTextColor--subdued"> | ||
Use the context of a cript_score function in function_score query | ||
</p> | ||
</EuiText> | ||
</> | ||
), | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 0 additions & 48 deletions
48
x-pack/legacy/plugins/painless_playground/public/components/output.tsx
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.