-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[Console] Improve UX around handling multiple requests #132494
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
Changes from 15 commits
32db185
df0b1e2
a63deb5
0bf0c1a
215eb44
ad63eaf
ed198f8
962da8f
5a0d907
574bf1d
f56ec79
da63f46
d352a85
0e72f31
15d683e
3aa0043
c7b4f64
eaaee4b
371ce42
18e0e7e
30cce66
ad57319
2f9b9bc
0f33fd6
4996043
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| /* | ||
| * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
| * or more contributor license agreements. Licensed under the Elastic License | ||
| * 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
| * in compliance with, at your election, the Elastic License 2.0 or the Server | ||
| * Side Public License, v 1. | ||
| */ | ||
|
|
||
| import ace from 'brace'; | ||
| import 'brace/mode/json'; | ||
| import { addXJsonToRules } from '@kbn/ace'; | ||
|
|
||
| const JsonHighlightRules = ace.acequire('ace/mode/json_highlight_rules').JsonHighlightRules; | ||
mibragimov marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| export class OutputJsonHighlightRules extends JsonHighlightRules { | ||
| constructor() { | ||
| super(); | ||
| this.$rules = {}; | ||
| addXJsonToRules(this, 'start'); | ||
| this.$rules.start.unshift( | ||
| { | ||
| token: 'warning', | ||
| regex: '#!.*$', | ||
| }, | ||
| { | ||
| token: 'comment', | ||
| regex: /#(.*?)(?=\d+\s(?:[\sA-Za-z]+)|$)/, | ||
| }, | ||
| { | ||
| token(value: string) { | ||
mibragimov marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| const regExpMatchArray = value.match(/\d+/); | ||
| if (regExpMatchArray) { | ||
| const status = parseInt(regExpMatchArray[0], 10); | ||
| if (status <= 199) { | ||
| return 'badge.badge-default'; | ||
| } | ||
| if (status <= 299) { | ||
| return 'badge.badge-success'; | ||
| } | ||
| if (status <= 399) { | ||
| return 'badge.badge-primary'; | ||
| } | ||
| if (status <= 499) { | ||
| return 'badge.badge-warning'; | ||
| } | ||
| return 'badge.badge-danger'; | ||
| } | ||
| }, | ||
| regex: /(\d+\s[\sA-Za-z]+$)/, | ||
| } | ||
| ); | ||
|
|
||
| if (this instanceof OutputJsonHighlightRules) { | ||
| this.normalizeRules(); | ||
| } | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -33,6 +33,47 @@ | |||
| .conApp__output { | ||||
| display: flex; | ||||
| flex: 1 1 1px; | ||||
|
|
||||
| .ace_badge { | ||||
| font-size: 12px; | ||||
mibragimov marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||
| font-weight: 500; | ||||
mibragimov marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||
| line-height: 18px; | ||||
mibragimov marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||
| padding: 0 8px; | ||||
mibragimov marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||
| display: inline-block; | ||||
| text-decoration: none; | ||||
| border-radius: 3px; | ||||
mibragimov marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||
| border: solid 1px transparent; | ||||
|
||||
| white-space: nowrap; | ||||
| vertical-align: middle; | ||||
| cursor: default; | ||||
| max-width: 100%; | ||||
| text-align: left; | ||||
mibragimov marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||
| text-align: left; |
Uh oh!
There was an error while loading. Please reload this page.