adding inputs output struct based on argo naming for now
This commit is contained in:
		@@ -52,8 +52,13 @@ func (w *Workflow) GetPricedItem(f func(item graph.GraphItem) bool, request *too
 | 
			
		||||
	return list_datas
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (w *Workflow) GetByRelatedProcessing(processingID string, g func(item graph.GraphItem) bool) []resources.ResourceInterface {
 | 
			
		||||
	storages := []resources.ResourceInterface{}
 | 
			
		||||
type Related struct {
 | 
			
		||||
	Nodes []resources.ResourceInterface
 | 
			
		||||
	Links []graph.GraphLink
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (w *Workflow) GetByRelatedProcessing(processingID string, g func(item graph.GraphItem) bool) map[string]Related {
 | 
			
		||||
	related := map[string]Related{}
 | 
			
		||||
	for _, link := range w.Graph.Links {
 | 
			
		||||
		nodeID := link.Destination.ID
 | 
			
		||||
		var node resources.ResourceInterface
 | 
			
		||||
@@ -67,10 +72,16 @@ func (w *Workflow) GetByRelatedProcessing(processingID string, g func(item graph
 | 
			
		||||
			_, node = item.GetResource()               // we are looking for the storage as destination
 | 
			
		||||
		}
 | 
			
		||||
		if processingID == nodeID && node != nil { // if the storage is linked to the processing
 | 
			
		||||
			storages = append(storages, node)
 | 
			
		||||
			if _, ok := related[processingID]; !ok {
 | 
			
		||||
				related[processingID] = Related{}
 | 
			
		||||
			}
 | 
			
		||||
			rel := related[processingID]
 | 
			
		||||
			rel.Nodes = append(rel.Nodes, node)
 | 
			
		||||
			rel.Links = append(rel.Links, link)
 | 
			
		||||
			related[processingID] = rel
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	return storages
 | 
			
		||||
	return related
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (ao *Workflow) VerifyAuth(request *tools.APIRequest) bool {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user