Skip to content
Snippets Groups Projects
Commit 11d33f57 authored by Steve Reis's avatar Steve Reis
Browse files

Add new dummy connector

parent ee2d14d3
No related branches found
No related tags found
No related merge requests found
...@@ -47,33 +47,11 @@ export default class DataShieldService implements IEngineService { ...@@ -47,33 +47,11 @@ export default class DataShieldService implements IEngineService {
} }
getDomains(): Domain[] { getDomains(): Domain[] {
return [ throw new Error('Method not implemented.');
{
id: 'Dummy',
label: 'Dummy',
datasets: [{ id: 'DummyDataSet' }],
groups: [
{
id: 'DummyGroup',
variables: ['DummyVar'],
groups: [],
},
],
rootGroup: { id: 'DummyGroup', variables: [], groups: [] },
variables: [{ id: 'DummyVar', type: 'string' }],
},
];
} }
getActiveUser(): string { getActiveUser(): string {
const dummyUser = { throw new Error('Method not implemented.');
username: 'anonymous',
subjectId: 'anonymousId',
fullname: 'anonymous',
email: 'anonymous@anonymous.com',
agreeNDA: true,
};
return JSON.stringify(dummyUser);
} }
editActiveUser(): Observable<string> { editActiveUser(): Observable<string> {
...@@ -101,10 +79,10 @@ export default class DataShieldService implements IEngineService { ...@@ -101,10 +79,10 @@ export default class DataShieldService implements IEngineService {
} }
getExperiments(): string { getExperiments(): string {
return '[]'; throw new Error('Method not implemented.');
} }
getAlgorithmsREST(): string { getAlgorithmsREST(): string {
return '[]'; throw new Error('Method not implemented.');
} }
} }
import { Observable } from 'rxjs';
import { IEngineService } from 'src/engine/engine.interfaces';
import { Domain } from 'src/engine/models/domain.model';
import { ExperimentCreateInput } from 'src/engine/models/experiment/input/experiment-create.input';
import {
Experiment,
PartialExperiment,
} from 'src/engine/models/experiment/experiment.model';
import { ListExperiments } from 'src/engine/models/experiment/list-experiments.model';
import { ExperimentEditInput } from 'src/engine/models/experiment/input/experiment-edit.input';
import { Algorithm } from 'src/engine/models/experiment/algorithm.model';
export default class LocalService implements IEngineService {
getAlgorithms(): Algorithm[] | Promise<Algorithm[]> {
throw new Error('Method not implemented.');
}
createExperiment(
data: ExperimentCreateInput,
isTransient: boolean,
): Experiment | Promise<Experiment> {
throw new Error('Method not implemented.');
}
listExperiments(
page: number,
name: string,
): ListExperiments | Promise<ListExperiments> {
throw new Error('Method not implemented.');
}
getExperiment(uuid: string): Experiment | Promise<Experiment> {
throw new Error('Method not implemented.');
}
removeExperiment(
uuid: string,
): PartialExperiment | Promise<PartialExperiment> {
throw new Error('Method not implemented.');
}
editExperient(
uuid: string,
expriment: ExperimentEditInput,
): Experiment | Promise<Experiment> {
throw new Error('Method not implemented.');
}
getDomains(): Domain[] {
return [
{
id: 'Dummy',
label: 'Dummy',
datasets: [{ id: 'DummyDataset', label: 'DummyDataset' }],
groups: [
{
id: 'DummyGroup',
variables: ['DummyVar'],
groups: [],
},
],
rootGroup: { id: 'DummyGroup' },
variables: [{ id: 'DummyVar', type: 'string' }],
},
];
}
getActiveUser(): string {
const dummyUser = {
username: 'anonymous',
subjectId: 'anonymousId',
fullname: 'anonymous',
email: 'anonymous@anonymous.com',
agreeNDA: true,
};
return JSON.stringify(dummyUser);
}
editActiveUser(): Observable<string> {
throw new Error('Method not implemented.');
}
getExperimentREST(): Observable<string> {
throw new Error('Method not implemented.');
}
deleteExperiment(): Observable<string> {
throw new Error('Method not implemented.');
}
editExperimentREST(): Observable<string> {
throw new Error('Method not implemented.');
}
startExperimentTransient(): Observable<string> {
throw new Error('Method not implemented.');
}
startExperiment(): Observable<string> {
throw new Error('Method not implemented.');
}
getExperiments(): string {
return '[]';
}
getAlgorithmsREST(): string {
return '[]';
}
}
...@@ -6,9 +6,13 @@ export class Group extends Entity { ...@@ -6,9 +6,13 @@ export class Group extends Entity {
@Field({ nullable: true }) @Field({ nullable: true })
description?: string; description?: string;
@Field(() => [Group]) @Field(() => [Group], { defaultValue: [], nullable: true })
groups: Group[]; groups?: Group[];
@Field(() => [String], { description: "List of variable's ids" }) @Field(() => [String], {
variables: string[]; description: "List of variable's ids",
defaultValue: [],
nullable: true,
})
variables?: string[];
} }
...@@ -11,10 +11,10 @@ type Group { ...@@ -11,10 +11,10 @@ type Group {
id: String! id: String!
label: String label: String
description: String description: String
groups: [Group!]! groups: [Group!]
"""List of variable's ids""" """List of variable's ids"""
variables: [String!]! variables: [String!]
} }
type Variable { type Variable {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment