Compare commits
2 Commits
27f295f17e
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c35b06e0bc | ||
|
|
be770ec763 |
@@ -27,6 +27,7 @@ type ProcessingUsage struct {
|
||||
*/
|
||||
type ProcessingResource struct {
|
||||
AbstractInstanciatedResource[*ProcessingInstance]
|
||||
IsEvent bool `json:"is_event,omitempty" bson:"is_event,omitempty"`
|
||||
Infrastructure enum.InfrastructureType `json:"infrastructure" bson:"infrastructure" default:"-1"` // Infrastructure is the infrastructure
|
||||
IsService bool `json:"is_service,omitempty" bson:"is_service,omitempty"` // IsService is a flag that indicates if the processing is a service
|
||||
Usage *ProcessingUsage `bson:"usage,omitempty" json:"usage,omitempty"` // Usage is the usage of the processing
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"os"
|
||||
"mime/multipart"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
@@ -69,10 +69,11 @@ func (d *Workflow) GetResources(dt tools.DataType) []resources.ResourceInterface
|
||||
return itf
|
||||
}
|
||||
|
||||
func (d *Workflow) ExtractFromPlantUML(plantUML *os.File, request *tools.APIRequest) (*Workflow, error) {
|
||||
func (d *Workflow) ExtractFromPlantUML(plantUML multipart.File, request *tools.APIRequest) (*Workflow, error) {
|
||||
if plantUML == nil {
|
||||
return d, errors.New("no file available to export")
|
||||
}
|
||||
|
||||
defer plantUML.Close()
|
||||
|
||||
d.Datas = []string{}
|
||||
@@ -486,7 +487,7 @@ func (wf *Workflow) Planify(start time.Time, end *time.Time, request *tools.APIR
|
||||
// is mapped to the list of its items (different appearance) in the graph
|
||||
// ex: if the same Minio storage is represented by several nodes in the graph, in [tools.STORAGE_RESSOURCE] its UUID will be mapped to
|
||||
// the list of GraphItem ID that correspond to the ID of each node
|
||||
func (w *Workflow) GetItemsByResources() (map[tools.DataType]map[string][]string) {
|
||||
func (w *Workflow) GetItemsByResources() map[tools.DataType]map[string][]string {
|
||||
res := make(map[tools.DataType]map[string][]string)
|
||||
dtMethodMap := map[tools.DataType]func() []graph.GraphItem{
|
||||
tools.STORAGE_RESOURCE: func() []graph.GraphItem { return w.GetGraphItems(w.Graph.IsStorage) },
|
||||
@@ -502,7 +503,7 @@ func (w *Workflow) GetItemsByResources() (map[tools.DataType]map[string][]string
|
||||
for _, i := range items {
|
||||
_, r := i.GetResource()
|
||||
rId := r.GetID()
|
||||
res[dt][rId] = append(res[dt][rId],i.ID)
|
||||
res[dt][rId] = append(res[dt][rId], i.ID)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ const (
|
||||
REMOVE NATSMethod = iota
|
||||
CREATE
|
||||
DISCOVERY
|
||||
WORKFLOW_EVENT
|
||||
)
|
||||
|
||||
// NameToMethod returns the NATSMethod enum value from a string
|
||||
|
||||
Reference in New Issue
Block a user