Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #13

Merged
merged 35 commits into from
Apr 13, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
c66100e
Fixed wrong XML prefix
aljoshakoecher Dec 26, 2022
6184b92
Fixes current activity not properly being displayed
aljoshakoecher Dec 26, 2022
776675a
Moved dashboard code
aljoshakoecher Dec 26, 2022
c9d8b43
Updated fontawesome
aljoshakoecher Jan 4, 2023
38f1c8d
Added iconclass to message
aljoshakoecher Jan 4, 2023
93f1e43
Started working on dashboard cleanup
aljoshakoecher Jan 4, 2023
6bc5d70
Updated bootstrap
aljoshakoecher Jan 5, 2023
a2ae2ad
Added "ping" methods to API services
aljoshakoecher Jan 5, 2023
3656468
Added a settings overview to dashboard
aljoshakoecher Jan 5, 2023
fd565a0
Added capabilityType
aljoshakoecher Feb 15, 2023
b4f872f
Added settings overview and improved graphs
aljoshakoecher Feb 15, 2023
89131e9
Updated dependencies and settings
aljoshakoecher Feb 16, 2023
be925c0
Updated HTTP and swapped UUID against crypto
aljoshakoecher Feb 16, 2023
fa1ce0a
Fixing minor UI issues
aljoshakoecher Mar 13, 2023
f363942
Fixed IRI of GetOutputs
aljoshakoecher Mar 13, 2023
96a1000
refactor(ontology): New ontology IRIs
aljoshakoecher Apr 3, 2023
d7b3e31
refactor(shared): :building_construction: aligned command / transitio…
aljoshakoecher Apr 3, 2023
0dd6004
refactor(backend): :coffin: deleted old route
aljoshakoecher Apr 3, 2023
d10500c
chore(config): :wrench: adds conventional commit scopes
aljoshakoecher Apr 3, 2023
14b8e1e
feat(frontend): :sparkles: skill type charts
aljoshakoecher Apr 3, 2023
d0ea196
refactor(ontology): :recycle: REST skills according to new ontology
aljoshakoecher Apr 12, 2023
59bb562
chore(config): :wrench: Adds conventional commit scopes
aljoshakoecher Apr 12, 2023
6816588
feat(backend): :sparkles: retrieving capability process type
aljoshakoecher Apr 12, 2023
e300969
feat(backend): :sparkles: retrieving skill interface type
aljoshakoecher Apr 12, 2023
83d926b
feat(frontend): :sparkles: new pie charts for capability and skill types
aljoshakoecher Apr 12, 2023
307e724
refactor(frontend): :lipstick: sorting messages on dashboards by date
aljoshakoecher Apr 12, 2023
f148f28
feat(front&back): :sparkles: capability filter feature
aljoshakoecher Apr 12, 2023
da9697f
feat(frontend): :sparkles: warning messages and modal for GraphDB
aljoshakoecher Apr 12, 2023
44d938e
chore(config): :wrench: conventional commit scope front&back
aljoshakoecher Apr 12, 2023
bb6edd4
fix(frontend): :bug: fixed dropdowns
aljoshakoecher Apr 12, 2023
7061901
feat(frontend): :lipstick: link to GraphDB workbench
aljoshakoecher Apr 12, 2023
47e0fe4
refactor(frontend): :recycle: code clean up and miro UI changes
aljoshakoecher Apr 13, 2023
0894b38
refactor(frontend): :recycle: improved modal handling
aljoshakoecher Apr 13, 2023
5d430e8
fix(frontend): :bug: display of currently active instance
aljoshakoecher Apr 13, 2023
7e9f799
Merge pull request #12 from aljoshakoecher/refactoring/data-model
aljoshakoecher Apr 13, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added "ping" methods to API services
  • Loading branch information
aljoshakoecher committed Jan 5, 2023
commit a2ae2ad540c8e06e5f3c03ff32969ab9e3996898
32 changes: 18 additions & 14 deletions frontend/src/shared/services/bpmn/process-definition.service.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { HttpClient } from '@angular/common/http';
import { HttpClient, HttpResponse } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { ProcessDefinition, ProcessDefinitionDto } from '@shared/models/processDefinition/ProcessDefinition';
import { ProcessInstance, ProcessInstanceDto } from '@shared/models/processInstance/ProcessInstance';
import { ProcessInstance } from '@shared/models/processInstance/ProcessInstance';
import { Observable } from 'rxjs';
import { map } from 'rxjs/operators';
import { first, map } from 'rxjs/operators';

@Injectable({
providedIn: 'root'
Expand All @@ -14,9 +14,14 @@ export class ProcessDefinitionService {

constructor(private http: HttpClient) { }

isConnected(): Observable<HttpResponse<any>> {
const url = `${this.engineRestRoot}/process-definition`;
return this.http.get<any>(url, { observe: 'response' }).pipe(first());
}

getAllDeployedProcessDefinitions(): Observable<ProcessDefinition[]> {
const URL = `${this.engineRestRoot}/process-definition`;
return this.http.get<ProcessDefinitionDto[]>(URL).pipe(
const url = `${this.engineRestRoot}/process-definition`;
return this.http.get<ProcessDefinitionDto[]>(url).pipe(
map((data: ProcessDefinitionDto[]) => data.map(processDefDto => new ProcessDefinition(
processDefDto.id, processDefDto.key, processDefDto.category,
processDefDto.description, processDefDto.name, processDefDto.version, processDefDto.resource,
Expand All @@ -27,9 +32,8 @@ export class ProcessDefinitionService {

}
getDeployedProcessDefinitionById(processDefinitionId: string): Observable<ProcessDefinition> {
console.log("Searching Def:" + processDefinitionId);
const URL = `${this.engineRestRoot}/process-definition/${processDefinitionId}`;
return this.http.get<ProcessDefinitionDto>(URL).pipe(
const url = `${this.engineRestRoot}/process-definition/${processDefinitionId}`;
return this.http.get<ProcessDefinitionDto>(url).pipe(
map((data: ProcessDefinitionDto) => new ProcessDefinition(
data.id, data.key, data.category,
data.description, data.name, data.version, data.resource,
Expand All @@ -48,19 +52,19 @@ export class ProcessDefinitionService {
* @returns
*/
deleteProcessDefinition(processInstanceId: string, cascade: boolean): Observable<void> {
const URL = `${this.engineRestRoot}/process-definition/${processInstanceId}`;
const url = `${this.engineRestRoot}/process-definition/${processInstanceId}`;
const options = {
params: {
cascade: cascade
}
};
return this.http.delete<void>(URL, options);
return this.http.delete<void>(url, options);
}


getXMLofProcessDefinition(processDefinitionId: string): Observable<BpmnXmlResult> {
const URL = `${this.engineRestRoot}/process-definition/${processDefinitionId}/xml`;
return this.http.get<BpmnXmlResult>(URL);
const url = `${this.engineRestRoot}/process-definition/${processDefinitionId}/xml`;
return this.http.get<BpmnXmlResult>(url);
}


Expand All @@ -71,9 +75,9 @@ export class ProcessDefinitionService {
* @returns The new instance
*/
startNewProcessInstance(processDefinition: ProcessDefinition, variablesBody: string): Observable<ProcessInstance> {
const URL = `${this.engineRestRoot}/process-definition/${processDefinition.id}/start`;
const url = `${this.engineRestRoot}/process-definition/${processDefinition.id}/start`;
const body = variablesBody;
return this.http.post<ProcessInstance>(URL, {});
return this.http.post<ProcessInstance>(url, {});
}


Expand Down
28 changes: 18 additions & 10 deletions frontend/src/shared/services/graphDbRepoService.service.ts
Original file line number Diff line number Diff line change
@@ -1,43 +1,51 @@
import { Injectable } from '@angular/core';
import { HttpClient, HttpErrorResponse } from '@angular/common/http';
import { HttpClient, HttpErrorResponse, HttpResponse } from '@angular/common/http';
import { Observable, throwError } from 'rxjs';
import { catchError } from 'rxjs/operators';
import { catchError, first } from 'rxjs/operators';

@Injectable({
providedIn: 'root'
})
export class GraphDbRepoService {

baseRoute = "/api/graph-repositories";

constructor(private httpClient: HttpClient) { }

isConnected(): Observable<HttpResponse<any>> {
return this.httpClient.get<any>(this.baseRoute, { observe: 'response' }).pipe(first());
}

getCurrentConfig(): Observable<DbConfig> {
return this.httpClient.get('/api/graph-repositories/config') as Observable<DbConfig>;
const url = `${this.baseRoute}/config`;
return this.httpClient.get(url) as Observable<DbConfig>;
}

changeConfig(newConfig): Observable<DbConfig>{
return this.httpClient.put('/api/graph-repositories/config', newConfig)
const url = `${this.baseRoute}/config`;
return this.httpClient.put(url, newConfig)
.pipe(catchError((e: HttpErrorResponse) => {
return throwError(e);
})) as Observable<DbConfig>;
}

getRepositories(): Observable<GraphDbRepositoryInfo[]> {
return this.httpClient.get('/api/graph-repositories') as Observable<GraphDbRepositoryInfo[]>;
return this.httpClient.get(this.baseRoute) as Observable<GraphDbRepositoryInfo[]>;
}

changeRepository(newRepoId: string): Observable<Record<string, any>> {
const newRepo = {"selectedRepo" : newRepoId};
return this.httpClient.patch('/api/graph-repositories/config', newRepo);
const url = `${this.baseRoute}/config`;
return this.httpClient.patch(url, newRepo);
}

}

export interface DbConfig {
host: string;
user: string;
password: string;
selectedRepo: string;
host: string;
user: string;
password: string;
selectedRepo: string;
}

export interface GraphDbRepositoryInfo {
Expand Down
8 changes: 6 additions & 2 deletions frontend/src/shared/services/mtp-mapping.service.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { HttpClient, HttpParams } from '@angular/common/http';
import { HttpClient, HttpParams, HttpResponse } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { first, Observable } from 'rxjs';
import {MappingServiceConfig} from '@shared/models/mappings/MappingServiceConfig';

@Injectable({
Expand All @@ -14,6 +14,10 @@ export class MtpMappingService {
private httpClient: HttpClient
) { }

isConnected(): Observable<HttpResponse<any>> {
return this.httpClient.get<any>(this.baseApiRoute, { observe: 'response' }).pipe(first());
}


/**
* Change the URL of the MTP mapping webservice
Expand Down
8 changes: 6 additions & 2 deletions frontend/src/shared/services/plc-mapping.service.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { HttpClient, HttpParams } from '@angular/common/http';
import { HttpClient, HttpParams, HttpResponse } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { first, Observable } from 'rxjs';
import { MappingServiceConfig } from '@shared/models/mappings/MappingServiceConfig';

@Injectable({
Expand All @@ -15,6 +15,10 @@ export class PlcMappingService {
) { }


isConnected(): Observable<HttpResponse<any>> {
return this.httpClient.get<any>(this.baseApiRoute, { observe: 'response' }).pipe(first());
}

/**
* Change the URL of the MTP mapping webservice
* @param newUrl New URL of the mto mapping service
Expand Down