Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Created d-Flow angular app #140

Merged
merged 48 commits into from
Nov 27, 2018
Merged

Created d-Flow angular app #140

merged 48 commits into from
Nov 27, 2018

Conversation

esune
Copy link
Member

@esune esune commented Nov 22, 2018

The PR contains the initial review for the re-implementation of the Permitify demo app in Angular.

Other than being an Angular app, the main change is the new graph UI, which is updated dynamically as the user proceeds through the steps in the demo.

Currently the topology definition is served from a hard-coded JSON file, work to wire up the API call and make the whole system more flexible is currently in progress.

@esune esune requested a review from nrempel November 22, 2018 23:11
@esune
Copy link
Member Author

esune commented Nov 23, 2018

@nrempel please wait to merge if the code looks okay, I will update this PR to allow OpenShift to build and deploy correctly

Copy link
Contributor

@nrempel nrempel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The graph looks great!

The code looks good to me. I like the directory structure approach you took for components 👍🏼

When I click on a credential from the graph it looks like a get an error from the org book:

screen shot 2018-11-23 at 11 42 29 am

tob-api_1_795764ef243f | ERROR 2018-11-23 19:24:19,998 service 10 140226513069824 Exception while handling request:
tob-api_1_795764ef243f | Traceback (most recent call last):
tob-api_1_795764ef243f |   File "/home/indy/.pyenv/versions/3.6.7/lib/python3.6/site-packages/vonx/common/service.py", line 255, in _handle_message
tob-api_1_795764ef243f |     reply = await self._service_request(request)
tob-api_1_795764ef243f |   File "/home/indy/.pyenv/versions/3.6.7/lib/python3.6/site-packages/vonx/indy/service.py", line 1245, in _service_request
tob-api_1_795764ef243f |     request.verifier_id, request.proof_req, request.proof)
tob-api_1_795764ef243f |   File "/home/indy/.pyenv/versions/3.6.7/lib/python3.6/site-packages/vonx/indy/service.py", line 1023, in _verify_proof
tob-api_1_795764ef243f |     parsed_proof = revealed_attrs(proof.proof)
tob-api_1_795764ef243f |   File "/home/indy/.pyenv/versions/3.6.7/lib/python3.6/site-packages/von_anchor/util.py", line 692, in revealed_attrs
tob-api_1_795764ef243f |     for attr in proof['proof']['proofs'][sub_index]['primary_proof']['eq_proof']['revealed_attrs']
tob-api_1_795764ef243f |   File "/home/indy/.pyenv/versions/3.6.7/lib/python3.6/site-packages/von_anchor/util.py", line 692, in <dictcomp>
tob-api_1_795764ef243f |     for attr in proof['proof']['proofs'][sub_index]['primary_proof']['eq_proof']['revealed_attrs']
tob-api_1_795764ef243f |   File "/home/indy/.pyenv/versions/3.6.7/lib/python3.6/site-packages/von_anchor/codec.py", line 138, in decode
tob-api_1_795764ef243f |     return ibytes.decode() if prefix == Prefix.STR else json.loads(ibytes.decode())
tob-api_1_795764ef243f | UnicodeDecodeError: 'utf-8' codec can't decode byte 0x9a in position 1: invalid start byte
tob-api_1_795764ef243f | ERROR 2018-11-23 19:24:20,001 views 10 140226985481984 Credential verification error:
tob-api_1_795764ef243f | Traceback (most recent call last):
tob-api_1_795764ef243f |   File "/home/indy/tob_anchor/views.py", line 547, in verify_credential
tob-api_1_795764ef243f |     VonxConstructedProof(proof))
tob-api_1_795764ef243f |   File "/home/indy/.pyenv/versions/3.6.7/lib/python3.6/site-packages/vonx/indy/client.py", line 397, in verify_proof
tob-api_1_795764ef243f |     VerifiedProof)
tob-api_1_795764ef243f |   File "/home/indy/.pyenv/versions/3.6.7/lib/python3.6/site-packages/vonx/indy/client.py", line 95, in _fetch
tob-api_1_795764ef243f |     raise IndyClientError("Unexpected result: {}".format(result))
tob-api_1_795764ef243f | vonx.indy.errors.IndyClientError: Unexpected result: ServiceFail(value=Exception while handling request)
tob-api_1_795764ef243f | Traceback (most recent call last):
tob-api_1_795764ef243f |   File "/home/indy/.pyenv/versions/3.6.7/lib/python3.6/site-packages/vonx/common/service.py", line 255, in _handle_message
tob-api_1_795764ef243f |     reply = await self._service_request(request)
tob-api_1_795764ef243f |   File "/home/indy/.pyenv/versions/3.6.7/lib/python3.6/site-packages/vonx/indy/service.py", line 1245, in _service_request
tob-api_1_795764ef243f |     request.verifier_id, request.proof_req, request.proof)
tob-api_1_795764ef243f |   File "/home/indy/.pyenv/versions/3.6.7/lib/python3.6/site-packages/vonx/indy/service.py", line 1023, in _verify_proof
tob-api_1_795764ef243f |     parsed_proof = revealed_attrs(proof.proof)
tob-api_1_795764ef243f |   File "/home/indy/.pyenv/versions/3.6.7/lib/python3.6/site-packages/von_anchor/util.py", line 692, in revealed_attrs
tob-api_1_795764ef243f |     for attr in proof['proof']['proofs'][sub_index]['primary_proof']['eq_proof']['revealed_attrs']
tob-api_1_795764ef243f |   File "/home/indy/.pyenv/versions/3.6.7/lib/python3.6/site-packages/von_anchor/util.py", line 692, in <dictcomp>
tob-api_1_795764ef243f |     for attr in proof['proof']['proofs'][sub_index]['primary_proof']['eq_proof']['revealed_attrs']
tob-api_1_795764ef243f |   File "/home/indy/.pyenv/versions/3.6.7/lib/python3.6/site-packages/von_anchor/codec.py", line 138, in decode
tob-api_1_795764ef243f |     return ibytes.decode() if prefix == Prefix.STR else json.loads(ibytes.decode())
tob-api_1_795764ef243f | UnicodeDecodeError: 'utf-8' codec can't decode byte 0x9a in position 1: invalid start byte
tob-api_1_795764ef243f | 

@nrempel
Copy link
Contributor

nrempel commented Nov 23, 2018

Besides that error, looks good to me!

Not necessary immediately, but what do you think about migrating the rest of the application to the angular app? Just something to think about

@esune
Copy link
Member Author

esune commented Nov 23, 2018

@nrempel : I don't seem to be able to reproduce the issue, I tried registering a couple of corps. and generating proofs and I can always see them in ToB:
image

About moving everything to the angular app: it will not be possible to move the resources required by the agents into the angular app, as they need to be served/injected into each agent using the proxy.
I will, however, try to clean up the directory structure once I have it all finalized and working smoothly.

@esune esune dismissed nrempel’s stale review November 27, 2018 23:15

Discussed changes in person, as per above comments.

@esune esune mentioned this pull request Nov 27, 2018
@WadeBarnes WadeBarnes merged commit 7d74c9e into bcgov:master Nov 27, 2018
@esune esune deleted the angular-app branch January 2, 2019 23:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants