Skip to content

Commit

Permalink
Merge pull request #291 from amosproj/revert-284-257-disable-select-i…
Browse files Browse the repository at this point in the history
…mage

Revert "Disabled button #257"
  • Loading branch information
Jean28518 committed Jul 19, 2022
2 parents bbce876 + 9676dc2 commit 2bf8270
Show file tree
Hide file tree
Showing 55 changed files with 755 additions and 462 deletions.
34 changes: 17 additions & 17 deletions Documentation/api/openapi_lissy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -469,15 +469,15 @@ paths:
required: true
schema:
type: string

- name: revocable
in: "query"
required: true
description: Can be true or false, not implemented yet in Lissi
schema:
type: string
example: "false"

/credential/all:
get:
tags:
Expand All @@ -499,15 +499,15 @@ paths:
schema:
type: string
example: "GCevMyEWCa5Fd58gfzkASy:3:CL:8768:Mitarbeiter Ausweis Adorsys"

- name: page
in: "query"
description: "requested page. Default: 0"
required: false
schema:
type: string
example: "0"

- name: size
in: "query"
description: "page size of each page. Default: 10"
Expand All @@ -522,7 +522,7 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/PagedDtoCredentialIssuance"
$ref: "#/components/schemas/PagedDtoCredentialIssuance"
400:
description: Bad Request.
401:
Expand All @@ -531,7 +531,7 @@ paths:
description: Forbidden.
500:
description: Internal Server Error.

/credential/{id}:
get:
tags:
Expand Down Expand Up @@ -560,7 +560,7 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/PagedDtoCredentialIssuance"
$ref: "#/components/schemas/PagedDtoCredentialIssuance"
400:
description: Bad Request.
401:
Expand All @@ -569,7 +569,7 @@ paths:
description: Forbidden.
500:
description: Internal Server Error.

/credential/log:
get:
tags:
Expand All @@ -591,23 +591,23 @@ paths:
schema:
type: string
example: "GCevMyEWCa5Fd58gfzkASy:3:CL:8768:Mitarbeiter Ausweis Adorsys"

- name: connectionSearchText
in: "query"
description: "Search Text "
required: false
schema:
type: string
example: "Hans Mueller"

- name: page
in: "query"
description: "requested page. Default: 0"
required: false
schema:
type: string
example: "0"

- name: size
in: "query"
description: "page size of each page. Default: 10"
Expand All @@ -622,7 +622,7 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/DtoPageDtoLogActivity"
$ref: "#/components/schemas/DtoPageDtoLogActivity"
400:
description: Bad Request.
401:
Expand Down Expand Up @@ -720,7 +720,7 @@ paths:
description: Forbidden.
500:
description: Internal Server Error.

/presentation-proof/send:
post:
tags:
Expand Down Expand Up @@ -880,7 +880,7 @@ components:
format: int32
description: The total number of pages available.
title: DtoPage«DtoCredentialIssuance»

DtoCredentialIssuance:
type: object
required:
Expand Down Expand Up @@ -931,7 +931,7 @@ components:
updatedAt:
type: string
title: DtoCredentialIssuance

DtoCredentialIssuanceDetails:
type: object
required:
Expand All @@ -944,7 +944,7 @@ components:
issuance:
$ref: "#/components/schemas/DtoCredentialIssuance"
title: DtoCredentialIssuanceDetails

DtoLogActivity:
type: object
required:
Expand Down Expand Up @@ -994,7 +994,7 @@ components:
timestamp:
type: string
title: DtoLogActivity

DtoPageDtoLogActivity:
type: object
properties:
Expand Down
4 changes: 3 additions & 1 deletion Documentation/dev/testing/frontend/TestingFrontend.md
Original file line number Diff line number Diff line change
Expand Up @@ -302,9 +302,11 @@ it("should not show test div in production", () => {
expect(test_div).toBeNull();
});
```
# Angular Material testing
To test components using Angular Materials you can use the testclasses provided by Angular Materials:
Read up on usage. Maybe this article will help: https://kevinkreuzer.medium.com/test-your-components-using-angular-materials-component-harnesses-f9c1deebdf5d
Read up on usage. Maybe this article will help: https://kevinkreuzer.medium.com/test-your-components-using-angular-materials-component-harnesses-f9c1deebdf5d
# Sources
Expand Down
15 changes: 7 additions & 8 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: '3.3'
version: "3.3"

services:
mysql:
Expand All @@ -8,20 +8,20 @@ services:
environment:
MYSQL_ROOT_PASSWORD: aosai6aH
MYSQL_USER: didentity
MYSQL_PASSWORD: aosai6aH
MYSQL_PASSWORD: aosai6aH
MYSQL_DATABASE: digital_identity

backend:
image: openjdk
working_dir: /app
# ports:
# - 8080:8080 # Disable for production!!
# ports:
# - 8080:8080 # Disable for production!!
volumes:
- ./src/digitalIdentity-backend:/app
command: bash -c "./mvnw spring-boot:run"
environment:
MYSQL_HOST: mysql
HOSTNAME:
HOSTNAME:
# Mail Relay Configuration:
MAIL_RELAY_HOST: smtp.gmail.com
MAIL_RELAY_PORT: 587
Expand All @@ -30,10 +30,9 @@ services:
MAIL_RELAY_SMTP: "true"
MAIL_RELAY_STARRTTLS: "true"
# Lissi API Configuration
LISSI_API_URL:
LISSI_API_URL:
LISSI_API_AUTH_CLIENT_ID: FILL ME
LISSI_API_AUTH_CLIENT_SECRET : FILL ME

LISSI_API_AUTH_CLIENT_SECRET: FILL ME

frontend:
image: node
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import didentity.amos.digitalIdentity.messages.answers.credentials.PagedCredentialLogAnswer;
import didentity.amos.digitalIdentity.messages.responses.ConnectionsResponse;
import didentity.amos.digitalIdentity.messages.responses.CreateConnectionResponse;
import didentity.amos.digitalIdentity.model.connection.ConnectionContent;
import didentity.amos.digitalIdentity.messages.responses.proofs.CreateProofTemplateResponse;
import didentity.amos.digitalIdentity.messages.responses.proofs.SendPresentationProofResponse;
import didentity.amos.digitalIdentity.messages.responses.proofs.presentation.ProofResponse;
Expand All @@ -18,6 +19,7 @@
import org.springframework.web.client.RestClientException;

import java.io.File;
import java.util.List;

@Service
@SuppressWarnings("unchecked") // TODO: if someone wants to bother with generic arrays, feel free :)
Expand All @@ -35,11 +37,24 @@ public class LissiApiService {
public ResponseEntity<ConnectionsResponse> provideExistingConnections() {
String url = baseUrl + "/ctrl/api/v1.0/connections";

ResponseEntity<ConnectionsResponse> response = httpService.executeMediaRequest(url, HttpMethod.GET,
ConnectionsResponse.class);

// check response status code
return handleResponse(response);
ResponseEntity<ConnectionsResponse> response = httpService.executeUriRequest(url, HttpMethod.GET,
ConnectionsResponse.class, Pair.of("size", "100"));

if (handleResponse(response) == null) {
return null;
}

int pages = response.getBody().getTotalPages();
for (int i = 1; i < pages; i++) {
ResponseEntity<ConnectionsResponse> furtherResponse = httpService.executeUriRequest(url, HttpMethod.GET,
ConnectionsResponse.class, Pair.of("page", Integer.toString(i)), Pair.of("size", "100"));
List<ConnectionContent> content = response.getBody().getContent();
content.addAll(furtherResponse.getBody().getContent());
response.getBody().setContent(content);
}

return response;
}

/**
Expand Down
2 changes: 0 additions & 2 deletions src/digitalIdentity-frontend/cypress/e2e/diconnections.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,5 @@ describe('DI Connection specs', () => {
cy.get('.mat-dialog-actions').contains('Yes').click();

cy.wait(2000);


});
});
3 changes: 0 additions & 3 deletions src/digitalIdentity-frontend/src/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
<app-navigation-bar
*ngIf="!router.url.includes('login') && !router.url.includes('password')"
></app-navigation-bar>
<!--<a class="nav-item nav-link" routerLink="/">Home</a>-->
<!-- <a class="nav-item nav-link" routerLink="/login">Login</a> -->
<!-- <a class="nav-item nav-link" routerLink="/create-new-DI">Create new digital identity</a> -->
</div>
</nav>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +0,0 @@
span button:active {
background-color: #525252;
color: #fafafa;
}

span button.selected {
background-color: black;
color: white;
}

span button.selected:hover {
background-color: #505050;
color: white;
}

span button.selected:active {
background-color: black;
color: white;
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<mat-menu #childMenu="matMenu" [overlapTrigger]="false" class="children">
<span *ngFor="let child of items; let j = index">
<mat-menu #childMenu="matMenu" [overlapTrigger]="false">
<span *ngFor="let child of items; let j = index" class="nav-bar-children">
<span
*ngIf="child.children && child.children.length > 0"
(click)="onClick($event, j)"
(mouseup)="handleMouseEvent($event, child)"
>
<button [matMenuTriggerFor]="menu.childMenu" mat-menu-item>
<span>{{ child.displayName }}</span>
Expand All @@ -13,8 +13,7 @@
<span *ngIf="!child.children || child.children.length === 0">
<button
mat-menu-item
[routerLink]="child.route"
(click)="onClick($event, j); onSelect(child)"
(mouseup)="handleMouseEvent($event, child)"
[class.selected]="child === subMenu"
>
<span>{{ child.displayName }}</span>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { MatDialogRef } from '@angular/material/dialog';
import { Router, RouterModule } from '@angular/router';
import { Router } from '@angular/router';
import { MaterialModule } from '../material/material.module';

import { MenuItemComponent } from './menu-item.component';
Expand Down
Loading

0 comments on commit 2bf8270

Please sign in to comment.