light modification
This commit is contained in:
@@ -14,6 +14,26 @@ type Graph struct {
|
||||
Links []GraphLink `bson:"links" json:"links" default:"{}" validate:"required"` // Links is the list of links between elements in the graph
|
||||
}
|
||||
|
||||
func (wf *Graph) IsProcessing(item GraphItem) bool {
|
||||
return item.Processing != nil
|
||||
}
|
||||
|
||||
func (wf *Graph) IsCompute(item GraphItem) bool {
|
||||
return item.Compute != nil
|
||||
}
|
||||
|
||||
func (wf *Graph) IsData(item GraphItem) bool {
|
||||
return item.Data != nil
|
||||
}
|
||||
|
||||
func (wf *Graph) IsStorage(item GraphItem) bool {
|
||||
return item.Storage != nil
|
||||
}
|
||||
|
||||
func (wf *Graph) IsWorkflow(item GraphItem) bool {
|
||||
return item.Workflow != nil
|
||||
}
|
||||
|
||||
func (g *Graph) GetAverageTimeRelatedToProcessingActivity(start time.Time, processings []*resources.ProcessingResource, resource resources.ResourceInterface,
|
||||
f func(GraphItem) resources.ResourceInterface, request *tools.APIRequest) (float64, float64) {
|
||||
nearestStart := float64(10000000000)
|
||||
|
Reference in New Issue
Block a user