aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYuanHu <yuan.hu1@zte.com.cn>2018-03-27 15:25:07 +0800
committerYuanHu <yuan.hu1@zte.com.cn>2018-03-27 15:25:07 +0800
commit3036f633a343e6c74563e209420002d4784f888f (patch)
tree88520694a64ebc2bf4a848837755d3e66536d7f6
parent3f0f14e9d95265ddf4231e06320c81ae83a7093d (diff)
Add Util Methods
Add Util Methods Issue-ID: SDC-1130,SDC-1131 Change-Id: I37f8e484c1d4268a26e918597d7799fafe13db88 Signed-off-by: YuanHu <yuan.hu1@zte.com.cn>
-rw-r--r--sdc-workflow-designer-ui/src/app/util/workflow-util.ts15
1 files changed, 14 insertions, 1 deletions
diff --git a/sdc-workflow-designer-ui/src/app/util/workflow-util.ts b/sdc-workflow-designer-ui/src/app/util/workflow-util.ts
index fae54b48..802cba9f 100644
--- a/sdc-workflow-designer-ui/src/app/util/workflow-util.ts
+++ b/sdc-workflow-designer-ui/src/app/util/workflow-util.ts
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2017 ZTE Corporation.
+ * Copyright (c) 2017-2018 ZTE Corporation.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* and the Apache License 2.0 which both accompany this distribution,
@@ -27,4 +27,17 @@ export class WorkflowUtil {
}
}
}
+
+ public static GetIconFullPath(iconName: string): string {
+ if (iconName && '' != iconName) {
+ if (-1 == iconName.indexOf('.')) {
+ return 'assets/images/' + iconName + '.svg';
+ } else {
+ return 'assets/images/' + iconName;
+ }
+ } else {
+ return 'assets/images/default.svg';
+ }
+ }
+
}