@aonic-ui/pipelines
v2.0.0
Published
The common library for all the components and utils related to Pipelines.
Downloads
6,712
Maintainers
Readme
@aonic-ui/pipelines
@aonic-pipelines UI component library provides a set of customizable and easy-to-use components for building modern web applications with React. It contains UI components, utilities and types which can be used in tekton based web console.
Getting Started
Installation
npm install @aonic-ui/pipelines
Usage
Basic
import { Output, usePipelineRunOutput } from '@aonic-ui/pipelines';
// Example usage of Output component
<Output
pipelineRunName="pipelineRunName"
pipelineRunStatus="Succeeded"
results={[{name: 'result-1',value: 'value'}]}/>
Using helper functions
import { Output, usePipelineRunOutput } from '@aonic-ui/pipelines';
const output = usePipelineRunOutput(
mockData.pipelineRun as PipelineRunKind,
mockData.taskRuns,
getLogs);
const getLogs = (podName, containerName): Promise<string> => {
// fetching the pod logs code goes here.
return Promise.resolve('logs...')
}
return (
<Output
results={output.results.data}
pipelineRunName="pipelineRunName"
pipelineRunStatus={output.status}
enterpriseContractPolicies={output.ec?.data}
acsImageScanResult={output.acsImageScan?.data}
acsImageCheckResults={output.acsImageCheck?.data}
acsDeploymentCheckResults={output.acsDeploymentCheck?.data}
/>
)