diff options
author | Lvbo163 <lv.bo163@zte.com.cn> | 2018-01-11 19:13:03 +0800 |
---|---|---|
committer | Lvbo163 <lv.bo163@zte.com.cn> | 2018-01-11 19:13:03 +0800 |
commit | f093dcdbc4012a64c11a293052afbc74d84c8c5a (patch) | |
tree | 519bfc5640253be40a25a1dde2f071a350331f9e /sdc-workflow-designer-ui/src/app/services/rest.service.ts | |
parent | 761b385b2a0a6dbec10717e6d94f1cd1e04bb2ef (diff) |
add backend service
add data access interfaces for template data
Issue-ID: SDC-905
Change-Id: Ie632b00dbc6ede01b0ee8a3c7abdbbc1f476f1e4
Signed-off-by: Lvbo163 <lv.bo163@zte.com.cn>
Diffstat (limited to 'sdc-workflow-designer-ui/src/app/services/rest.service.ts')
-rw-r--r-- | sdc-workflow-designer-ui/src/app/services/rest.service.ts | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/sdc-workflow-designer-ui/src/app/services/rest.service.ts b/sdc-workflow-designer-ui/src/app/services/rest.service.ts index a4489180..52bddfe3 100644 --- a/sdc-workflow-designer-ui/src/app/services/rest.service.ts +++ b/sdc-workflow-designer-ui/src/app/services/rest.service.ts @@ -39,22 +39,22 @@ export class RestService { // this.initSwaggerInfoByMSB();
}
- // public addRestConfig(): RestConfig {
- // let index = 0;
- // this.restConfigs.forEach(config => {
- // const currentId = parseInt(config.id);
- // if (currentId > index) {
- // index = currentId;
- // }
- // });
+ public addRestConfig(): RestConfig {
+ let index = 0;
+ this.restConfigs.forEach(config => {
+ const currentId = parseInt(config.id);
+ if (currentId > index) {
+ index = currentId;
+ }
+ });
- // index += 1;
+ index += 1;
- // const restConfig = new RestConfig(index.toString(), 'new Config', '', '', false);
- // this.restConfigs.push(restConfig);
+ const restConfig = new RestConfig(index.toString(), 'new Config', '', '', '');
+ this.restConfigs.push(restConfig);
- // return restConfig;
- // }
+ return restConfig;
+ }
// public initSwaggerInfo(restConfig: RestConfig) {
// if (restConfig.dynamic && restConfig.definition) {
@@ -125,7 +125,7 @@ export class RestService { // this service don't have sawgger file.
if ('/activiti-rest' !== serviceInfo.publish_url) {
const id = serviceInfo.serviceName + '.' + serviceInfo.version;
- restConfigs.push(new RestConfig(id, serviceInfo.serviceName, serviceInfo.version, serviceInfo.publish_url));
+ restConfigs.push(new RestConfig(id, serviceInfo.serviceName, serviceInfo.version, serviceInfo.publish_url, ''));
let swaggerUrl = '';
if (undefined !== serviceInfo.swagger_url && '' !== serviceInfo.swagger_url) {
swaggerUrl = serviceInfo.publish_url + '/' + serviceInfo.swagger_url;
|