func (pvs *PersistentVolumeStatus) Create(ctx context.Context, options Options) (*component.Summary, error) {
	if pvs.persistentVolume == nil {
		return nil, errors.New("Persistent Volume is nil")
	}
	pv := pvs.persistentVolume

	var sections component.SummarySections

	sections.AddText("Phase Status", string(pv.Status.Phase))

	claimLink, err := createBoundPersistentVolumeClaimLink(ctx, pv, options)
	if err != nil {
		return nil, err
	}

	sections = append(sections, component.SummarySection{
		Header:  "Claim",
		Content: claimLink,
	})

	summary := component.NewSummary("Status", sections...)
	return summary, nil
}
// Create the Status Summary component for a Persistent Volume
Create the Status Summary component for a Persistent Volume
// Create the Status Summary component for a Persistent Volume
func (pvs *PersistentVolumeStatus) Create(ctx context.Context, options Options) (*component.Summary, error) {
	if pvs.persistentVolume == nil {
		return nil, errors.New("Persistent Volume is nil")
	}
	pv := pvs.persistentVolume
	var sections component.SummarySections
	sections.AddText("Phase Status", string(pv.Status.Phase))
	claimLink, err := createBoundPersistentVolumeClaimLink(ctx, pv, options)
	if err != nil {
		return nil, err
	}
	sections = append(sections, component.SummarySection{
		Header:  "Claim",
		Content: claimLink,
	})
	summary := component.NewSummary("Status", sections...)
	return summary, nil
}
func ( pvs * PersistentVolumeStatus ) Create ( ctx context . Context , options Options ) ( * component . Summary , error ) { if pvs . persistentVolume == nil { return nil , errors . New ( " " ) } pv := pvs . persistentVolume var sections component . SummarySections sections . AddText ( " " , string ( pv . Status . Phase ) ) claimLink , err := createBoundPersistentVolumeClaimLink ( ctx , pv , options ) if err != nil { return nil , err } sections = append ( sections , component . SummarySection { Header : " " , Content : claimLink , } ) summary := component . NewSummary ( " " , sections ... ) return summary , nil }
Create the Status Summary component for a Persistent Volume
Create the Status Summary component for a Persistent Volume