diff options
author | KAPIL SINGAL <ks220y@att.com> | 2020-09-24 15:18:10 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-09-24 15:18:10 +0000 |
commit | 2b0442d1d2e721c4bf762bb2a3e75bc7606f9fcf (patch) | |
tree | 5a75e5187a70048a8897f893e1c26a812c912539 /cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/graph.generator.util.ts | |
parent | a9de78841e84867f1b5065205760060bdc5307ec (diff) | |
parent | a4d84ebd1db8f9b881c33f5efefc4aa6c1fbf02f (diff) |
Merge "adding save for topology template content"
Diffstat (limited to 'cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/graph.generator.util.ts')
-rw-r--r-- | cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/graph.generator.util.ts | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/graph.generator.util.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/graph.generator.util.ts index 8e1d88907..226f54399 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/graph.generator.util.ts +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/graph.generator.util.ts @@ -18,10 +18,9 @@ See the License for the specific language governing permissions and limitations under the License. ============LICENSE_END============================================ */ -import { TopologyTemplate } from './model/designer.topologyTemplate.model'; -import { Injectable } from '@angular/core'; -import { GraphUtil } from './graph.util'; -import { NodeTemplate } from './model/desinger.nodeTemplate.model'; +import {TopologyTemplate} from './model/designer.topologyTemplate.model'; +import {Injectable} from '@angular/core'; +import {GraphUtil} from './graph.util'; @Injectable({ providedIn: 'root' @@ -31,6 +30,10 @@ export class GraphGenerator { constructor(private graphUtil: GraphUtil) { } + clear(boardGraph: joint.dia.Graph) { + boardGraph.clear(); + } + /** * loops over workflows * create action element @@ -79,7 +82,7 @@ export class GraphGenerator { // create action element const actionElement = - this.graphUtil.createCustomActionWithName(workFlowName, boardGraph); + this.graphUtil.createCustomActionWithName(workFlowName, boardGraph); // create board function elements const workflow = topologyTempalte.workflows[workFlowName].steps; @@ -91,7 +94,7 @@ export class GraphGenerator { this.graphUtil.dropFunctionOverActionRelativeToParent( actionElement, - stepName , functionType, boardGraph); + stepName, functionType, boardGraph); // TODO handle dg-generic case (multi-step in the same action) if (functionType === 'dg-generic') { |