*Changed the content type to gzip in headers to support .gz files while editing VNF and NS descriptors.
Change-Id: Ic9137f8f08048f0c8c3bb2dd4fe498c1f6eaecaf
Signed-off-by: harshini.r <harshini.r@tataelxsi.co.in>
this.sharedService = this.injector.get(SharedService);
}
this.sharedService = this.injector.get(SharedService);
}
- /** Lifecyle Hooks the trigger before component is instantiate @public */
+ /** Lifecyle Hooks the trigger before component is instantiated @public */
public ngOnInit(): void {
this.headers = new HttpHeaders({
'Content-Type': 'application/json',
public ngOnInit(): void {
this.headers = new HttpHeaders({
'Content-Type': 'application/json',
this.updateFileContentType = 'package_content';
this.navigatePath = 'vnf';
this.fileTypes = [{ value: 'text/x-yaml', viewValue: 'yaml' }, { value: 'text/json', viewValue: 'json' }];
this.updateFileContentType = 'package_content';
this.navigatePath = 'vnf';
this.fileTypes = [{ value: 'text/x-yaml', viewValue: 'yaml' }, { value: 'text/json', viewValue: 'json' }];
- this.httpOptions = this.getHeadersWithContentAccept('application/zip', 'application/json');
+ this.httpOptions = this.getHeadersWithContentAccept('application/gzip', 'application/json');
this.getEditFileData();
} else if (this.pacakgeType === 'netslice') {
this.getUpdateURL = environment.NETWORKSLICETEMPLATE_URL;
this.getEditFileData();
} else if (this.pacakgeType === 'netslice') {
this.getUpdateURL = environment.NETWORKSLICETEMPLATE_URL;
this.pacakgeType = 'nsd';
this.navigatePath = 'ns';
this.fileTypes = [{ value: 'text/x-yaml', viewValue: 'yaml' }, { value: 'text/json', viewValue: 'json' }];
this.pacakgeType = 'nsd';
this.navigatePath = 'ns';
this.fileTypes = [{ value: 'text/x-yaml', viewValue: 'yaml' }, { value: 'text/json', viewValue: 'json' }];
- this.httpOptions = this.getHeadersWithContentAccept('application/zip', 'application/json');
+ this.httpOptions = this.getHeadersWithContentAccept('application/gzip', 'application/json');
this.getEditFileData();
}
}
this.getEditFileData();
}
}