Project

General

Profile

« Previous | Next » 

Revision 62388

refactor. fix getDatasourceClasses and corresponding dropdown. fix issn fields

View differences:

register-existing-datasource.component.ts
165 165

  
166 166
  addInterfaceToList(intrf?: RepositoryInterface) {
167 167
    const curIndex = this.dataForInterfaceComp.length;
168
    const curRepoInfo = { id: this.repo.id, datasourceType: this.repo.datasourceType,
169
      datasourceClass: this.repo.eoscDatasourceType, registeredBy: this.repo.registeredBy };
168
    const curRepoInfo = { id: this.repo.id, datasourceType: this.repo.eoscDatasourceType,
169
      datasourceClass: this.repo.eoscDatasourceType, registeredBy: this.repo.registeredby };
170 170
    if (intrf) {
171 171
      this.dataForInterfaceComp.push([true, curIndex, curRepoInfo, intrf]);
172 172
    } else {
......
221 221
        this.dataForInterfaceComp.push([
222 222
          true, i,
223 223
          { id: this.repo.id,
224
            datasourceType: this.repo.datasourceType,
224
            datasourceType: this.repo.eoscDatasourceType,
225 225
            datasourceClass: this.repo.eoscDatasourceType,
226
            registeredBy: this.repo.registeredBy
226
            registeredBy: this.repo.registeredby
227 227
          },
228 228
          this.repoInterfaces[i]
229 229
        ]);
......
232 232
      this.dataForInterfaceComp.push([
233 233
        true, 0,
234 234
        { id: this.repo.id,
235
          datasourceType: this.repo.datasourceType,
235
          datasourceType: this.repo.eoscDatasourceType,
236 236
          datasourceClass: this.repo.eoscDatasourceType,
237
          registeredBy: this.repo.registeredBy
237
          registeredBy: this.repo.registeredby
238 238
        }
239 239
      ]);
240 240
    }
......
328 328
      this.loadingMessage = 'Saving changes';
329 329
      this.errorMessage = '';
330 330
      console.log('reg this.repo', this.repo);
331
      this.repoService.addRepository( this.repo.datasourceType, this.repo).subscribe( //this.repo.collectedFrom
331
      this.repoService.addRepository( this.repo.eoscDatasourceType, this.repo).subscribe( //this.repo.collectedfrom
332 332
        response => {
333
          console.log(`addRepository responded: ${response.id}, ${response.registeredBy}`);
333
          console.log(`addRepository responded: ${response.id}, ${response.registeredby}`);
334 334
          this.repo = response;
335 335
        },
336 336
        error => {
......
353 353
          if (intrf.id) {
354 354
            let req;
355 355
            if (this.interfacesToDelete.some(id => id === intrf.id)) {
356
              req = this.repoService.deleteInterface(intrf.id, this.repo.registeredBy);
356
              req = this.repoService.deleteInterface(intrf.id, this.repo.registeredby);
357 357
            } else {
358 358
              // console.log('comments', intrf.comments);
359
              req = this.repoService.updateInterface(this.repo.id, this.repo.registeredBy, intrf.comments, intrf);
359
              req = this.repoService.updateInterface(this.repo.id, this.repo.registeredby, intrf.comments, intrf);
360 360
            }
361 361
            return req;
362 362
          } else {
363 363
            // console.log('comments', intrf.comments);
364
            return this.repoService.addInterface(this.repo.datasourceType, this.repo.id, this.repo.registeredBy, intrf.comments, intrf);
364
            return this.repoService.addInterface(this.repo.eoscDatasourceType, this.repo.id, this.repo.registeredby, intrf.comments, intrf);
365 365
          }
366 366
        })
367 367
      ).subscribe(

Also available in: Unified diff