Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions api/pipelines/pipelines.swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,9 @@
"items": {
"$ref": "#/definitions/v1Condition"
}
},
"suspended": {
"type": "boolean"
}
}
}
Expand Down
1 change: 1 addition & 0 deletions api/pipelines/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ message WorkloadStatus {
string version = 3;
string lastAppliedRevision = 4;
repeated Condition conditions = 5;
bool suspended = 6;
}

message PipelineTargetStatus {
Expand Down
117 changes: 63 additions & 54 deletions pkg/api/pipelines/types.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pkg/pipelines/server/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ func getWorkloadStatus(obj *unstructured.Unstructured) (*pb.WorkloadStatus, erro
ws.Name = hr.Name
ws.Version = hr.Spec.Chart.Spec.Version
ws.LastAppliedRevision = hr.Status.LastAppliedRevision
ws.Suspended = hr.Spec.Suspend
ws.Conditions = []*pb.Condition{}
for _, c := range hr.Status.Conditions {
ws.Conditions = append(ws.Conditions, &pb.Condition{
Expand Down
1 change: 1 addition & 0 deletions ui-cra/src/api/pipelines/types.pb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export type WorkloadStatus = {
version?: string
lastAppliedRevision?: string
conditions?: Condition[]
suspended?: boolean
}

export type PipelineTargetStatus = {
Expand Down
24 changes: 22 additions & 2 deletions ui-cra/src/components/Pipelines/PipelineDetails/WorkloadStatus.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
import { Flex, KubeStatusIndicator } from '@weaveworks/weave-gitops';
import {
Flex,
Icon,
IconType,
KubeStatusIndicator,
} from '@weaveworks/weave-gitops';
import styled from 'styled-components';
import { WorkloadStatus as WorkloadStatusType } from '../../../api/pipelines/types.pb';

Expand All @@ -12,7 +17,18 @@ function WorkloadStatus({ className, workload }: Props) {
<div className={className}>
<Flex align>
<div style={{ marginRight: 4 }}>
<KubeStatusIndicator short conditions={workload?.conditions || []} />
{workload?.suspended ? (
<Icon
size="small"
type={IconType.SuspendedIcon}
color="suspended"
/>
) : (
<KubeStatusIndicator
short
conditions={workload?.conditions || []}
/>
)}
</div>
<div>{workload?.name}</div>
</Flex>
Expand All @@ -27,4 +43,8 @@ export default styled(WorkloadStatus).attrs({ className: 'WorkloadStatus' })`
${KubeStatusIndicator} span {
display: none;
}

${Icon} img {
width: 16px;
}
`;
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,10 @@ exports[`PipelineDetails snapshots renders 1`] = `
display: none;
}

.c20 .c8 img {
width: 16px;
}

.c12 {
font-size: 20px;
margin-bottom: 12px;
Expand Down