Project

General

Profile

« Previous | Next » 

Revision 48972

Remove unnecessary functions for csv download in search services and components -- currently 'exportCSV.class.ts' file not used and will be deleted soon

View differences:

entityRegistriesTable.component.ts
9 9
import {SearchFields} from '../../utils/properties/searchFields';
10 10
import {SearchPageTableViewComponent } from '../searchUtils/searchPageTableView.component';
11 11
import {SearchUtilsClass } from '../searchUtils/searchUtils.class';
12
import {ExportCSVComponent} from '../../utils/exportCSV.class';
13 12

  
14 13
@Component({
15 14
    selector: 'search-entity-registries-table',
......
37 36
  public _location:Location;
38 37
  public searchFields:SearchFields = new SearchFields();
39 38
  public refineFields: string[] =  this.searchFields.ENTITY_REGISTRIES_FIELDS;
40

  
41
  /*public CSV: any = {  "columnNames":  [ "Title", "Type", "Coutries", "Compatibility" ],
42
                        "export":[]
43
                     };
44
  public CSVDownloaded = false;
45
  public resourcesQuery = "&query=((oaftype exact datasource) and(datasourcetypeuiid = other))";
46
  public csvParams: string;
47
  */
48 39
  public disableForms: boolean = false;
49 40

  
50 41
  @ViewChild (SearchPageTableViewComponent) searchPage : SearchPageTableViewComponent ;
......
74 65
      this.subResults.unsubscribe();
75 66
    }  }
76 67
    private _getResults(parameters:string,refine:boolean, page: number){
77
      //this.csvParams = parameters+this.resourcesQuery+"&type=datasources";
78

  
79 68
      var errorCodes:ErrorCodes = new ErrorCodes();
80 69
      this.searchUtils.status = errorCodes.LOADING;
81 70
      this.disableForms = true;
......
197 186
    }
198 187
    return filters;
199 188
    }
200

  
201

  
202
/*
203
      public downloadClicked($event) {
204
          if(!this.CSVDownloaded) {
205
              this.CSVDownloaded = false;
206

  
207
              var parameters = $event.value;
208

  
209
              //this.getResultsCSV(parameters, false, 1, 1000);
210

  
211
              this._searchDataprovidersService.searchEntityRegistriesCSV(parameters, this.searchPage.getRefineFieldsQuery(), 1, 1000).subscribe(
212
                  data => {
213
                        this.CSV.export = data;
214
                        ExportCSVComponent.downloadCSV(this.CSV, "etityRegistries.csv");
215

  
216
                        var errorCodes:ErrorCodes = new ErrorCodes();
217
                        this.searchUtils.status = errorCodes.DONE;
218
                  },
219
                  err => {
220
                      console.log(err);
221
                       //TODO check erros (service not available, bad request)
222
                      // if( ){
223
                      //   this.searchUtils.status = ErrorCodes.ERROR;
224
                      // }
225
                      var errorCodes:ErrorCodes = new ErrorCodes();
226
                      this.searchUtils.status = errorCodes.ERROR;
227
                  }
228
              );
229
          }
230
      }
231
*/
232 189
}

Also available in: Unified diff