+ // formData.append('file',this.uploadForm.get('yamlfile').value);
+ // formData.append('sss',this.deployForm.get('sampleone').value);
+ // formData.append('ssa',this.deployForm.get('sampletwo').value);
+ // formData.append('ssb',this.deployForm.get('samplethree').value);
+ // formData.append('ssc',this.deployForm.get('samplefour').value);
+ formData.append('deployfile',this.deployForm.get('deployyamlfile').value);
+ // formData.append('sample',this.formBuilder.)
+ debugger;
+ // this.deployData.deployFile = formData.get('yamlfile');
+ // this.deployData.deployFile = formData.get('deployyamlfile');
+ this.deployData.deployFile = this.deployForm.value.deployyamlfile;
+ console.log("deploydata...");
+ console.log(this.deployData);
+ console.log("formData....");
+ console.log(formData);
+ // formData.append('file', this.fileData);
+ // this.deployData.deployFile = formData.get('yamlfile')
+ console.log(this.deployForm.value);
+ debugger;
+ this.serviceobj.postDeploymentPackage(formData)
+ .subscribe(data => {
+ console.log(data);
+ this.showSuccess();
+ // console.log(data);
+ }
+ ,error => console.log(error)
+ );
+ // this.http.post('url/to/your/api', formData)
+ // .subscribe(res => {
+ // console.log(res);
+ // alert('SUCCESS !!');
+ // })
+ // this.showSuccess();
+ }
+
+ showSuccess() {
+ this.toastService.show('Application ( csar ) package uploaded Successfully', { classname: 'bg-success text-light', delay: 10000 });
+ }
+
+ deploySuccess() {
+ this.deployParam = true;
+ this.serviceobj.postDeployRequest(this.deployParam,this.nodeDetails)
+ .subscribe(data => {
+ console.log(data);
+ this.toastService.show('ELIOT IOT Application / Yaml deployed Successfully', { classname: 'bg-success text-light', delay: 10000 });
+ }
+ ,error => console.log(error)
+ );
+
+
+ }
+
+ getNodes() {
+ this.serviceobj.getNodesArray()
+ .subscribe(data => {
+ debugger;
+ console.log(data);
+ data.nodesArray.forEach(
+ nodeData => {
+ debugger;
+ this.nodes.push(nodeData.value);
+
+ });
+
+ // this.sessionArr.forEach(data => {
+ // if (data.month == m) {
+ // this.january.push(data);
+ // this.historyDataSource = new MatTableDataSource(this.january);
+ // }
+ // })
+
+ console.log(this.nodesArray);
+ debugger;
+ // this.nodewise = data;
+ // this.nodesArray = this.nodewise.nodesArray;
+ },
+ error => console.log(error));
+ }
+
+ addNodeDetails() {
+ this.nodeDetails.deployNodeLabel = this.nodeLabelMentioned;
+ debugger;
+ this.nodeDetails.deployNodeName = this.nodeSelected;
+ }