A log snippet component provides a way to display a log snippet or code along with a message.
Examples
Basic log snippet
The log snippet supports several variants configurable using variant
property for different scenarios. Each variant has an associated status icon and color similar to alert component.
Danger alert:Failure - check logs for details
apiVersion: helm.openshift.io/v1beta1/
kind: HelmChartRepository
metadata:
name: azure-sample-repo
spec:
connectionConfig:
url: https://raw.githubusercontent.com/Azure-Samples/helm-charts/master/docs
Props
LogSnippet
Name | Type | Default | Description |
---|---|---|---|
messagerequired | string | React.ReactNode | Message to appear above the log snippet | |
logSnippet | string | Log snippet or code to be displayed | |
ouiaId | string | number | "LogSnippet" | Custom OUIA ID |
variant | AlertVariant | AlertVariant.danger | Log snippet alert variant |