Skip to content

Commit 20cf31c

Browse files
author
Huaqiao Zhang
committed
feat: remove dead code and unused third party library
Signed-off-by: Huaqiao Zhang <huaqiaoz@vmware.com>
1 parent f1516cd commit 20cf31c

File tree

5 files changed

+5
-34
lines changed

5 files changed

+5
-34
lines changed

web/src/app/app-service/app-service-configurable/app-service-configurable.component.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ export class AppServiceConfigurableComponent implements OnInit {
9191

9292
this.selectedFunctionsName = writable.Pipeline.ExecutionOrder.split(',');
9393
Object.assign(this.availableFunctions, writable.Pipeline.Functions);
94-
// console.log(this.availableFunctions)
9594
})
9695
}
9796

@@ -101,7 +100,6 @@ export class AppServiceConfigurableComponent implements OnInit {
101100
}
102101

103102
submit() {
104-
// console.log(this.getFuncExecutionOrder())
105103
let writable = {} as Writable;
106104
let pipeline: any = {
107105
ExecutionOrder: this.getFuncExecutionOrder(),
@@ -117,10 +115,10 @@ export class AppServiceConfigurableComponent implements OnInit {
117115
writable.Pipeline = pipeline;
118116
writable.InsecureSecrets = this.insecureSecrets;
119117
writable.StoreAndForward = this.configWritable.StoreAndForward;
120-
// this.appSvc.deployToConsul({'Writable': writable}, this.appServiceKey).subscribe(()=>{
121-
// this.msgSvc.success('deploy configuration',`service: ${this.appServiceKey}`);
122-
// this.router.navigate(['../app-service-list'],{relativeTo: this.route})
123-
// })
118+
this.appSvc.deployToConsul({'Writable': writable}, this.appServiceKey).subscribe(()=>{
119+
this.msgSvc.success('deploy configuration',`service: ${this.appServiceKey}`);
120+
this.router.navigate(['../app-service-list'],{relativeTo: this.route})
121+
})
124122
}
125123

126124
removeSelectedFuncsAll() {

web/src/app/app-service/app-service-configurable/pipeline-function/pipeline-function.component.html

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,7 @@
4242
<div class="card-header font-weight-bold">
4343
<i class="fa fa-file-text mr-2 text-danger"></i>
4444
<span>Selected Pipeline Functions</span>
45-
<!-- <button *ngIf="selectedFunctionsName.length !== 0" class="btn btn-success btn-sm float-right" (click)="submit()"><i class="fa fa-save"></i> Submit</button> -->
4645
</div>
47-
<!-- <div class="card-header py-1" *ngIf="selectedFunctionsName.length !== 0 ">
48-
<button class="btn btn-danger btn-sm mr-2"><i class="fa fa-trash"></i> RemoveAll</button>
49-
<button class="btn btn-success btn-sm" (click)="submit()"><i class="fa fa-save"></i> Submit</button>
50-
</div> -->
5146
<div class="card-body">
5247
<div appDragHighlight class="card mb-3" (drop)="ondropFuncExecutionOrder($event)">
5348
<div class="card-header font-weight-bold text-nowrap text-truncate">
@@ -66,9 +61,7 @@
6661
</tbody>
6762
</table>
6863
<span *ngFor="let funcName of selectedFunctionsName">
69-
<!-- <span appDragHighlight role="button" (dragover)="dropzoneShow($event)" [class.d-none]="!dropzoneToggle" [class.d-inline]="dropzoneToggle" (dragleave)="dropzoneHide($event)" class="badge badge-secondary mx-2" style="width: 20px; border: 1px; border-style: dashed;">dada</span> -->
7064
<span draggable="true" role="button" id="{{funcExecOrderZoneIdentifier}}{{funcName}}" class="badge badge-secondary text-nowrap text-truncate mr-2" (dragstart)="ondragstartFuncExecutionOrder($event,funcName)">{{funcName}}</span>
71-
<!-- <span appDragHighlight role="button" (dragover)="dropzoneShow($event)" [class.d-none]="!dropzoneToggle" [class.d-inline]="dropzoneToggle" (dragleave)="dropzoneHide($event)" class="badge badge-secondary mx-2" style="width: 20px; border: 1px; border-style: dashed;">sss</span> -->
7265
</span>
7366
</div>
7467
</div>
@@ -248,7 +241,6 @@
248241
<app-device-profile-combo-list
249242
[selectedProfiles]="profileNames"
250243
(deviceProfileSelectedEvent)="onDeviceProfileSelectedEvent($event)"></app-device-profile-combo-list>
251-
<!-- <input type="text" class="form-control" name="ProfileNames" [(ngModel)]="availableFunctions.FilterByProfileName.Parameters.ProfileNames"> -->
252244
</div>
253245
</div>
254246
<div class="form-group row">

web/src/app/app-service/app-service-configurable/pipeline-function/pipeline-function.component.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ export class PipelineFunctionComponent implements OnInit, OnChanges {
5959
}
6060

6161
ngOnInit(): void {
62-
// console.log(this.availableFunctions)
6362
}
6463

6564
ngOnChanges() {
Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1 @@
1-
<!-- <div class="card">
2-
<div class="card-header">
3-
<ul class="nav nav-tabs card-header-tabs font-weight-bold">
4-
<li class="nav-item">
5-
<a class="nav-link " routerLink="./app-service-list" routerLinkActive="active">App Service List</a>
6-
</li>
7-
<li class="nav-item">
8-
<a class="nav-link disabled" routerLink="./app-service-configurable" routerLinkActive="active">App Service Configurable</a>
9-
<a class="nav-link" routerLink="./app-service-configurable" routerLinkActive="active">App Service Configurable</a>
10-
</li>
11-
</ul>
12-
</div>
13-
<div class="card-body">
14-
<router-outlet></router-outlet>
15-
</div>
16-
</div> -->
17-
181
<router-outlet></router-outlet>

web/src/app/app-service/app-service.module.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ import { AppServiceRoutingModule } from './app-service-routing.module';
66
import { AppServiceComponent } from './app-service.component';
77
import { AppServiceListComponent } from './app-service-list/app-service-list.component';
88
import { AppServiceConfigurableComponent } from './app-service-configurable/app-service-configurable.component';
9-
// import { AngularDraggableModule } from 'angular2-draggable';
10-
// import { AngularMultiSelectModule } from 'angular2-multiselect-dropdown';
9+
1110
import { DraggableDirective } from '../directives/draggable.directive';
1211
import { DragHighlightDirective } from '../directives/drag-highlight.directive';
1312
import { AddAppServiceComponent } from './add-app-service/add-app-service.component';

0 commit comments

Comments
 (0)