Compare commits
2 Commits
27f295f17e
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c35b06e0bc | ||
|
|
be770ec763 |
@@ -27,6 +27,7 @@ type ProcessingUsage struct {
|
|||||||
*/
|
*/
|
||||||
type ProcessingResource struct {
|
type ProcessingResource struct {
|
||||||
AbstractInstanciatedResource[*ProcessingInstance]
|
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
|
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
|
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
|
Usage *ProcessingUsage `bson:"usage,omitempty" json:"usage,omitempty"` // Usage is the usage of the processing
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"mime/multipart"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@@ -69,10 +69,11 @@ func (d *Workflow) GetResources(dt tools.DataType) []resources.ResourceInterface
|
|||||||
return itf
|
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 {
|
if plantUML == nil {
|
||||||
return d, errors.New("no file available to export")
|
return d, errors.New("no file available to export")
|
||||||
}
|
}
|
||||||
|
|
||||||
defer plantUML.Close()
|
defer plantUML.Close()
|
||||||
|
|
||||||
d.Datas = []string{}
|
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
|
// 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
|
// 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
|
// 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)
|
res := make(map[tools.DataType]map[string][]string)
|
||||||
dtMethodMap := map[tools.DataType]func() []graph.GraphItem{
|
dtMethodMap := map[tools.DataType]func() []graph.GraphItem{
|
||||||
tools.STORAGE_RESOURCE: func() []graph.GraphItem { return w.GetGraphItems(w.Graph.IsStorage) },
|
tools.STORAGE_RESOURCE: func() []graph.GraphItem { return w.GetGraphItems(w.Graph.IsStorage) },
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ const (
|
|||||||
REMOVE NATSMethod = iota
|
REMOVE NATSMethod = iota
|
||||||
CREATE
|
CREATE
|
||||||
DISCOVERY
|
DISCOVERY
|
||||||
|
WORKFLOW_EVENT
|
||||||
)
|
)
|
||||||
|
|
||||||
// NameToMethod returns the NATSMethod enum value from a string
|
// NameToMethod returns the NATSMethod enum value from a string
|
||||||
|
|||||||
Reference in New Issue
Block a user