-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bccd99a
commit 3c08b9d
Showing
28 changed files
with
1,565 additions
and
334 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
NEXT_PUBLIC_KEYCLOAK_URL="https://console-keycloak.mycluster-us-east-107719-da779aef12eee96bd4161f4e402b70ec-0000.us-east.containers.appdomain.cloud/realms/demo" | ||
#NEXT_PUBLIC_KEYCLOAK_URL="https://console-keycloak.mycluster-us-east-107719-da779aef12eee96bd4161f4e402b70ec-0000.us-east.containers.appdomain.cloud/realms/demo" | ||
BACKEND_URL=https://console-api-eyefloaters-dev.mycluster-us-east-107719-da779aef12eee96bd4161f4e402b70ec-0000.us-east.containers.appdomain.cloud | ||
LOG_LEVEL="info" | ||
CONSOLE_MODE="read-write" | ||
CONSOLE_MODE="read-write" |
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,5 @@ | ||
<style> | ||
html, body, #storybook-root { | ||
height: 100%; | ||
} | ||
</style> |
This file was deleted.
Oops, something went wrong.
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,32 @@ | ||
import NextIntlProvider from "@/app/[locale]/NextIntlProvider"; | ||
import { Page } from "@patternfly/react-core"; | ||
import type { Preview } from "@storybook/react"; | ||
import "../app/globals.css"; | ||
import messages from "../messages/en.json"; | ||
|
||
const preview: Preview = { | ||
parameters: { | ||
nextjs: { | ||
appDirectory: true, | ||
}, | ||
actions: { argTypesRegex: "^on[A-Z].*" }, | ||
controls: { | ||
matchers: { | ||
color: /(background|color)$/i, | ||
date: /Date$/i, | ||
}, | ||
}, | ||
layout: "fullscreen", | ||
}, | ||
decorators: [ | ||
(Story) => ( | ||
<NextIntlProvider locale={"en"} messages={messages}> | ||
<Page> | ||
<Story /> | ||
</Page> | ||
</NextIntlProvider> | ||
), | ||
], | ||
}; | ||
|
||
export default preview; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
export const cpu = (namespace: string, cluster: string) => ` | ||
sum by (nodeId, __console_metric_name__) ( | ||
label_replace( | ||
label_replace( | ||
rate(container_cpu_usage_seconds_total{namespace="${namespace}",pod=~"${cluster}-.+-\\\\d+"}[1m]), | ||
"nodeId", | ||
"$1", | ||
"pod", | ||
".+-(\\\\d+)" | ||
), | ||
"__console_metric_name__", | ||
"cpu_usage_seconds", | ||
"", | ||
"" | ||
) | ||
) | ||
`; | ||
|
||
export const memory = (namespace: string, cluster: string) => ` | ||
sum by (nodeId, __console_metric_name__) ( | ||
label_replace( | ||
label_replace( | ||
container_memory_usage_bytes{namespace="${namespace}",pod=~"${cluster}-.+-\\\\d+"}, | ||
"nodeId", | ||
"$1", | ||
"pod", | ||
".+-(\\\\d+)" | ||
), | ||
"__console_metric_name__", | ||
"memory_usage_bytes", | ||
"", | ||
"" | ||
) | ||
) | ||
`; | ||
|
||
export const incomingByteRate = (namespace: string, cluster: string) => ` | ||
sum by (__console_metric_name__) ( | ||
label_replace( | ||
irate(kafka_server_brokertopicmetrics_bytesin_total{topic!="",namespace="${namespace}",pod=~"${cluster}-.+-\\\\d+",strimzi_io_kind="Kafka"}[5m]), | ||
"__console_metric_name__", | ||
"incoming_byte_rate", | ||
"", | ||
"" | ||
) | ||
) | ||
`; | ||
|
||
export const outgoingByteRate = (namespace: string, cluster: string) => ` | ||
sum by (__console_metric_name__) ( | ||
label_replace( | ||
irate(kafka_server_brokertopicmetrics_bytesout_total{topic!="",namespace="${namespace}",pod=~"${cluster}-.+-\\\\d+",strimzi_io_kind="Kafka"}[5m]), | ||
"__console_metric_name__", | ||
"outgoing_byte_rate", | ||
"", | ||
"" | ||
) | ||
) | ||
`; | ||
|
||
export const volumeCapacity = (namespace: string, cluster: string) => ` | ||
sum by (nodeId, __console_metric_name__) ( | ||
label_replace( | ||
label_replace( | ||
kubelet_volume_stats_capacity_bytes{namespace="${namespace}",persistentvolumeclaim=~"data(?:-\\\\d+)?-${cluster}-.+-\\\\d+"}, | ||
"nodeId", | ||
"$1", | ||
"persistentvolumeclaim", | ||
".+-(\\\\d+)" | ||
), | ||
"__console_metric_name__", | ||
"volume_stats_capacity_bytes", | ||
"", | ||
"" | ||
) | ||
) | ||
`; | ||
|
||
export const volumeUsed = (namespace: string, cluster: string) => ` | ||
sum by (nodeId, __console_metric_name__) ( | ||
label_replace( | ||
label_replace( | ||
kubelet_volume_stats_used_bytes{namespace="${namespace}",persistentvolumeclaim=~"data(?:-\\\\d+)?-${cluster}-.+-\\\\d+"}, | ||
"nodeId", | ||
"$1", | ||
"persistentvolumeclaim", | ||
".+-(\\\\d+)" | ||
), | ||
"__console_metric_name__", | ||
"volume_stats_used_bytes", | ||
"", | ||
"" | ||
) | ||
) | ||
`; |
Oops, something went wrong.