diff options
author | 2020-09-23 11:40:09 +0200 | |
---|---|---|
committer | 2020-09-24 16:27:02 +0200 | |
commit | a4d84ebd1db8f9b881c33f5efefc4aa6c1fbf02f (patch) | |
tree | 0c011fa5dfe92e1bae95afac512cbd49e9d9e51e /cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/graph.generator.util.ts | |
parent | 2e80cc8a3e97b1e0979511c54aebd86bddfa7f35 (diff) |
adding save for topology template content
Issue-ID: CCSDK-2298
Signed-off-by: ShaabanEltanany <shaaban.eltanany.ext@orange.com>
Change-Id: I8333f84e1551bb49f016c25f1c98f8b0f15b7ed3
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') { |