added svcapi ui and camunda code
[it/otf.git] / otf-frontend / client / src / app / shared / services / scheduling.service.ts
diff --git a/otf-frontend/client/src/app/shared/services/scheduling.service.ts b/otf-frontend/client/src/app/shared/services/scheduling.service.ts
new file mode 100644 (file)
index 0000000..b492ea6
--- /dev/null
@@ -0,0 +1,58 @@
+/*  Copyright (c) 2019 AT&T Intellectual Property.                             #\r
+#                                                                              #\r
+#   Licensed under the Apache License, Version 2.0 (the "License");            #\r
+#   you may not use this file except in compliance with the License.           #\r
+#   You may obtain a copy of the License at                                    #\r
+#                                                                              #\r
+#       http://www.apache.org/licenses/LICENSE-2.0                             #\r
+#                                                                              #\r
+#   Unless required by applicable law or agreed to in writing, software        #\r
+#   distributed under the License is distributed on an "AS IS" BASIS,          #\r
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #\r
+#   See the License for the specific language governing permissions and        #\r
+#   limitations under the License.                                             #\r
+##############################################################################*/\r
+\r
+\r
+import { HttpClient, HttpHeaders } from "@angular/common/http";\r
+import { AppGlobals } from "../../app.global";\r
+import { ParamsService } from "./params.service";\r
+import { Observable } from "rxjs";\r
+import { Injectable } from "@angular/core";\r
+import { ModelService } from './model.service';\r
+import { CookieService } from "ngx-cookie-service";\r
+import { TestInstanceService } from "./test-instance.service";\r
+import { MatDialog } from "@angular/material";\r
+import { TestDefinitionService } from "./test-definition.service";\r
+import { ExecuteService } from "./execute.service";\r
+import { FeathersService } from "./feathers.service";\r
+\r
+@Injectable({\r
+  providedIn: 'root'\r
+})\r
+\r
+export class SchedulingService extends ModelService {\r
+\r
+  constructor(http: HttpClient, Params: ParamsService, cookie: CookieService, feathers: FeathersService, private td: TestDefinitionService, private instance: TestInstanceService, private execute: ExecuteService, private dialog: MatDialog) {\r
+    super('jobs', http, Params, cookie, feathers);  \r
+  }\r
+\r
+  // create(data, params?): Observable<Object> {\r
+  //   return new Observable((observer) => {\r
+  //     this.instance.get(data.testInstanceId, { $select: ['testData'] }).subscribe(result => {\r
+  //       if(result){\r
+  //         super.create(data).subscribe(\r
+  //           res => {\r
+  //             observer.next(res);\r
+  //           },\r
+  //           err => {\r
+  //             observer.error(err);\r
+  //           }\r
+  //         )\r
+  //       }        \r
+  //     });\r
+  //   });\r
+  // }\r
+\r
+\r
+}
\ No newline at end of file