This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Component } from '@angular/core'; | |
| import { TranslationLoaderService } from './translation-loader.service'; | |
| import { take } from 'rxjs/operators'; | |
| export enum LanguageTypes { | |
| Nl = 'Nl', | |
| Fr = 'Fr', | |
| De = 'De' | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { | |
| Attribute, | |
| ChangeDetectorRef, | |
| ComponentFactoryResolver, | |
| Directive, | |
| Input, | |
| ViewContainerRef | |
| } from '@angular/core'; | |
| import { ActivatedRoute, ChildrenOutletContexts, PRIMARY_OUTLET, RouterOutlet } from '@angular/router'; | |
| // insert correct location to the fallback view |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function loadScript() { | |
| var script = document.createElement('script'); | |
| script.type = 'text/javascript'; | |
| script.src = 'https://cdn.rawgit.com/jestersimpps/d34b7160b82b616e4c06a261c4e3f353/raw/3b899e520b315b074748ecd7969866e31a243ae3/swaggerauth.js' | |
| window.document.body.appendChild(script); | |
| console.log('script appended'); | |
| } | |
| setTimeout(function(){ loadScript()}, 1000); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| setTimeout(function(){ | |
| // Build a system | |
| const ui = SwaggerUIBundle({ | |
| oauth2RedirectUrl: "http://" + location.host + "/api/oauth2-redirect.html", | |
| }) | |
| ui.initOAuth(); | |
| window.ui = ui |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private listen(): void { | |
| const listener = Consumer.create({ | |
| queueUrl: this.queryUrl, | |
| handleMessage: (message, done) => { | |
| Log.awssqs.info(`Handling new queue item form ${EnvConfig.AWS_QUEUE_NAME}: ${message.Body}`); | |
| const body = <MessageBody>Utils.deserializeJson(message.Body); | |
| // TODO: rework payload to pass through identity to chaincode | |
| this.hlfClient.invoke(body.chainMethod, [body.payload]) | |
| .then(result => { | |
| // notify frontend of succesful transaction |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public invokeRequest(chainMethod: ChainMethod, params: any[], userId: string): Promise<InvokeResult> { | |
| Utils.stringifyParams(params); | |
| return this.queuePusherService.add(chainMethod, params, userId) | |
| .then((response) => { | |
| Log.config.info('Valid transaction'); | |
| return response; | |
| }) | |
| .catch(error => { | |
| Log.config.error(`${chainMethod} error`, error); | |
| return error; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // init hlf client | |
| this.hlfClient.init().then(result => { | |
| Log.awssqs.info(`Starting Queue Listener...`); | |
| this.queueListenerService.init(); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { ApiModelProperty } from '@nestjs/swagger'; | |
| export class AssetDto { | |
| @ApiModelProperty() | |
| readonly name: string; | |
| @ApiModelProperty() | |
| readonly description: string; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Module({ | |
| controllers: [ | |
| PingController, | |
| AssetsController | |
| ], | |
| components: [ | |
| PingService, | |
| AssetsService | |
| ], | |
| modules: [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| #!/bin/bash | |
| YELLOW='\033[1;33m' | |
| RED='\033[1;31m' | |
| GREEN='\033[1;32m' | |
| RESET='\033[0m' | |
| # indent text on echo |
NewerOlder