Fixed minor issues with dmp index and dmp compact listing

This commit is contained in:
George Kalampokis 2020-04-03 13:37:16 +03:00
parent 6e9b711e15
commit 194ae2ccf0
2 changed files with 14 additions and 10 deletions

View File

@ -212,15 +212,17 @@ public class Dmp implements ElasticEntity<Dmp> {
builder.field(MapKey.LASTVERSION.getName(), this.lastVersion);
builder.field(MapKey.LASTPUBLICVERSION.getName(), this.lastPublicVersion);
builder.field(MapKey.ISPUBLIC.getName(), this.isPublic);
builder.startArray(MapKey.DATASETS.getName());
this.datasets.forEach(dataset -> {
try {
dataset.toElasticEntity(builder);
} catch (IOException e) {
logger.error(e.getMessage(), e);
}
});
builder.endArray();
if (datasets != null) {
builder.startArray(MapKey.DATASETS.getName());
this.datasets.forEach(dataset -> {
try {
dataset.toElasticEntity(builder);
} catch (IOException e) {
logger.error(e.getMessage(), e);
}
});
builder.endArray();
}
builder.field(MapKey.GRANT.getName(), this.grant.toString());
builder.field(MapKey.GRANTSTATUS.getName(), this.grantStatus);
builder.endObject();

View File

@ -22,6 +22,8 @@ import { map, takeUntil } from 'rxjs/operators';
import { AuthService } from '@app/core/services/auth/auth.service';
import { isNullOrUndefined } from 'util';
import { DatasetService } from '@app/core/services/dataset/dataset.service';
import { DatasetProfileModel } from '@app/core/model/dataset/dataset-profile';
import { Observable } from 'rxjs';
@Component({
selector: 'app-dmp-criteria-component',
@ -173,7 +175,7 @@ export class DmpCriteriaComponent extends BaseCriteriaComponent implements OnIni
return this.userService.getCollaboratorsPaged(collaboratorsRequestItem).pipe(map(x => x.data));
}
filterDatasetTemplate(query: string) {
filterDatasetTemplate(query: string): Observable<any> {
const fields: Array<string> = new Array<string>();
fields.push('asc');
const datasetTemplateRequestItem: DataTableRequest<DatasetProfileCriteria> = new DataTableRequest(0, null, { fields: fields });