Skip to content

Commit

Permalink
Add translations
Browse files Browse the repository at this point in the history
  • Loading branch information
crespocarlos committed Sep 19, 2023
1 parent f1ac18b commit 5deb129
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@
* 2.0.
*/

import { i18n } from '@kbn/i18n';
import { FormulaValueConfig } from '@kbn/lens-embeddable-utils';

export const nodeCpuCapacity: FormulaValueConfig = {
label: 'Capacity',
label: i18n.translate('xpack.infra.assetDetails.formulas.kubernetes.capacity', {
defaultMessage: 'Capacity',
}),
value: 'max(kubernetes.node.cpu.allocatable.cores) * 1000000000',
format: {
id: 'number',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@
* 2.0.
*/

import { i18n } from '@kbn/i18n';
import { FormulaValueConfig } from '@kbn/lens-embeddable-utils';

export const nodeCpuUsed: FormulaValueConfig = {
label: 'Used',
label: i18n.translate('xpack.infra.assetDetails.formulas.kubernetes.used', {
defaultMessage: 'Used',
}),
value: 'average(kubernetes.node.cpu.usage.nanocores)',
format: {
id: 'number',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@
* 2.0.
*/

import { i18n } from '@kbn/i18n';
import { FormulaValueConfig } from '@kbn/lens-embeddable-utils';

export const nodeDiskCapacity: FormulaValueConfig = {
label: 'Capacity',
label: i18n.translate('xpack.infra.assetDetails.formulas.kubernetes.capacity', {
defaultMessage: 'Capacity',
}),
value: 'max(kubernetes.node.fs.capacity.bytes)',
format: {
id: 'bytes',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@
* 2.0.
*/

import { i18n } from '@kbn/i18n';
import { FormulaValueConfig } from '@kbn/lens-embeddable-utils';

export const nodeDiskUsed: FormulaValueConfig = {
label: 'Used',
label: i18n.translate('xpack.infra.assetDetails.formulas.kubernetes.used', {
defaultMessage: 'Used',
}),
value: 'average(kubernetes.node.fs.used.bytes)',
format: {
id: 'bytes',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@
* 2.0.
*/

import { i18n } from '@kbn/i18n';
import { FormulaValueConfig } from '@kbn/lens-embeddable-utils';

export const nodeMemoryCapacity: FormulaValueConfig = {
label: 'Capacity',
label: i18n.translate('xpack.infra.assetDetails.formulas.kubernetes.capacity', {
defaultMessage: 'Capacity',
}),
value: 'max(kubernetes.node.memory.allocatable.bytes)',
format: {
id: 'bytes',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@
* 2.0.
*/

import { i18n } from '@kbn/i18n';
import { FormulaValueConfig } from '@kbn/lens-embeddable-utils';

export const nodeMemoryUsed: FormulaValueConfig = {
label: 'Used',
label: i18n.translate('xpack.infra.assetDetails.formulas.kubernetes.used', {
defaultMessage: 'Used',
}),
value: 'average(kubernetes.node.memory.usage.bytes)',
format: {
id: 'bytes',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@
* 2.0.
*/

import { i18n } from '@kbn/i18n';
import { FormulaValueConfig } from '@kbn/lens-embeddable-utils';

export const nodePodCapacity: FormulaValueConfig = {
label: 'Capacity',
label: i18n.translate('xpack.infra.assetDetails.formulas.kubernetes.capacity', {
defaultMessage: 'Capacity',
}),
value:
"last_value(kubernetes.node.pod.allocatable.total, kql='kubernetes.node.pod.allocatable.total: *')",
format: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@
* 2.0.
*/

import { i18n } from '@kbn/i18n';
import { FormulaValueConfig } from '@kbn/lens-embeddable-utils';

export const nodePodUsed: FormulaValueConfig = {
label: 'Used',
label: i18n.translate('xpack.infra.assetDetails.formulas.kubernetes.used', {
defaultMessage: 'Used',
}),
value: 'unique_count(kubernetes.pod.uid)',
format: {
id: 'number',
Expand Down

0 comments on commit 5deb129

Please sign in to comment.