Removes and refactors endpoints from DMPs
This commit is contained in:
parent
339f65f499
commit
d5740a560c
|
@ -100,13 +100,6 @@ public class DMPs extends BaseController {
|
|||
return ResponseEntity.status(HttpStatus.OK).body(new ResponseItem<DMP>().status(ApiMessageCode.NO_MESSAGE));
|
||||
}
|
||||
|
||||
@RequestMapping(method = RequestMethod.POST, value = {"/get"}, consumes = "application/json", produces = "application/json")
|
||||
public @ResponseBody
|
||||
ResponseEntity<ResponseItem<List<DataManagementPlan>>> getWithCriteria(@RequestBody DataManagementPlanCriteriaRequest dataManagementPlanCriteria, Principal principal) throws InstantiationException, IllegalAccessException {
|
||||
List<DataManagementPlan> dataTable = this.dataManagementPlanManager.getWithCriteria(this.getApiContext().getOperationsContext().getDatabaseRepository().getDmpDao(), dataManagementPlanCriteria, principal);
|
||||
return ResponseEntity.status(HttpStatus.OK).body(new ResponseItem<List<DataManagementPlan>>().status(ApiMessageCode.NO_MESSAGE).payload(dataTable));
|
||||
}
|
||||
|
||||
@Transactional
|
||||
@RequestMapping(method = RequestMethod.DELETE, value = {"{id}"}, consumes = "application/json", produces = "application/json")
|
||||
public @ResponseBody
|
||||
|
|
|
@ -62,10 +62,6 @@ export class DmpService {
|
|||
return this.http.post<any>(this.actionUrl + 'dynamic', requestItem, { headers: this.headers });
|
||||
}
|
||||
|
||||
get(requestItem: RequestItem<DmpCriteria>): Observable<DmpListingModel[]> {
|
||||
return this.http.post<DmpListingModel[]>(this.actionUrl + 'get', requestItem, { headers: this.headers });
|
||||
}
|
||||
|
||||
public downloadXML(id: string): Observable<HttpResponse<Blob>> {
|
||||
return this.httpClient.get(this.actionUrl + 'getXml/' + id, { responseType: 'blob', observe: 'response' });
|
||||
}
|
||||
|
|
|
@ -26,6 +26,7 @@ import { DatasetDescriptionFormEditorModel } from '../../misc/dataset-descriptio
|
|||
import { DatasetWizardEditorModel } from './dataset-wizard-editor.model';
|
||||
import { SnackBarNotificationLevel, UiNotificationService } from '../../../core/services/notification/ui-notification-service';
|
||||
import { ConfirmationDialogComponent } from '../../../library/confirmation-dialog/confirmation-dialog.component';
|
||||
import { DataTableRequest } from '../../../core/model/data-table/data-table-request';
|
||||
|
||||
@Component({
|
||||
selector: 'app-dataset-wizard-component',
|
||||
|
@ -207,15 +208,17 @@ export class DatasetWizardComponent extends BaseComponent implements OnInit, IBr
|
|||
.pipe(takeUntil(this._destroyed))
|
||||
.subscribe((params: Params) => {
|
||||
const itemId = params['id'];
|
||||
if (itemId != null) { setTimeout(()=> this.stepper.selectedIndex = 2); }
|
||||
if (itemId != null) { setTimeout(() => this.stepper.selectedIndex = 2); }
|
||||
});
|
||||
}
|
||||
|
||||
searchDmp(query: string): Observable<DmpListingModel[]> {
|
||||
const dmpRequestItem: RequestItem<DmpCriteria> = new RequestItem();
|
||||
dmpRequestItem.criteria = new DmpCriteria();
|
||||
dmpRequestItem.criteria.like = query;
|
||||
return this.dmpService.get(dmpRequestItem);
|
||||
const fields: Array<string> = new Array<string>();
|
||||
fields.push('asc');
|
||||
const dmpDataTableRequest: DataTableRequest<DmpCriteria> = new DataTableRequest(0, null, { fields: fields });
|
||||
dmpDataTableRequest.criteria = new DmpCriteria();
|
||||
dmpDataTableRequest.criteria.like = query;
|
||||
return this.dmpService.getPaged(dmpDataTableRequest).map(x => x.data);
|
||||
}
|
||||
|
||||
loadDatasetProfiles() {
|
||||
|
@ -236,7 +239,7 @@ export class DatasetWizardComponent extends BaseComponent implements OnInit, IBr
|
|||
}
|
||||
|
||||
getDefinition() {
|
||||
if (this.formGroup.invalid) { setTimeout(()=> this.stepper.selectedIndex = 0); return; }
|
||||
if (this.formGroup.invalid) { setTimeout(() => this.stepper.selectedIndex = 0); return; }
|
||||
if (this.isNew) {
|
||||
this.datasetWizardService.getDefinition(this.formGroup.get('profile').value)
|
||||
.pipe(takeUntil(this._destroyed))
|
||||
|
|
Loading…
Reference in New Issue