X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=webapp%2Fsrc%2Fapp%2Fdevel%2Fdeploy%2Fdeploy.component.ts;fp=webapp%2Fsrc%2Fapp%2Fdevel%2Fdeploy%2Fdeploy.component.ts;h=0000000000000000000000000000000000000000;hb=ac9e80f7f32a1c04c171a4d208f0ab7d3a5ca154;hp=e51b7f2d5fc12730a3b57439a3760f5b28d528d2;hpb=1e0b1b4c1271e3668ec5ef1ba58cb84fe00f0f53;p=src%2Fxds%2Fxds-server.git diff --git a/webapp/src/app/devel/deploy/deploy.component.ts b/webapp/src/app/devel/deploy/deploy.component.ts deleted file mode 100644 index e51b7f2..0000000 --- a/webapp/src/app/devel/deploy/deploy.component.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { Component, OnInit, Input } from "@angular/core"; -import { Observable } from 'rxjs'; -import { FormControl, FormGroup, Validators, FormBuilder } from '@angular/forms'; - -import 'rxjs/add/operator/scan'; -import 'rxjs/add/operator/startWith'; - -import { XDSAgentService, IXDSDeploy } from "../../services/xdsagent.service"; -import { ConfigService, IConfig, IProject } from "../../services/config.service"; -import { AlertService, IAlert } from "../../services/alert.service"; -import { SdkService } from "../../services/sdk.service"; - -@Component({ - selector: 'panel-deploy', - moduleId: module.id, - templateUrl: './deploy.component.html', - styleUrls: ['./deploy.component.css'] -}) - -export class DeployComponent implements OnInit { - - @Input() curProject: IProject; - - deploying: boolean; - deployForm: FormGroup; - - constructor(private configSvr: ConfigService, - private xdsAgent: XDSAgentService, - private fb: FormBuilder, - private alert: AlertService, - ) { - this.deployForm = fb.group({ - boardIP: ["", Validators.nullValidator], - wgtFile: ["", Validators.nullValidator], - }); - } - - ngOnInit() { - this.deploying = false; - if (this.curProject && this.curProject.pathClient) { - this.deployForm.patchValue({ wgtFile: this.curProject.pathClient }); - } - } - - deploy() { - this.deploying = true; - - this.xdsAgent.deploy( - { - boardIP: this.deployForm.value.boardIP, - file: this.deployForm.value.wgtFile - } - ).subscribe(res => { - this.deploying = false; - }, err => { - this.deploying = false; - let msg = 'ERROR while deploying "' + this.deployForm.value.wgtFile + '"
'; - msg += err; - msg += '
'; - this.alert.error(msg); - }); - } -}