Skip to content

Commit

Permalink
hotfix 2.21.1: fix update worker settings propagation (#3203)
Browse files Browse the repository at this point in the history
* fix update worker settings

Signed-off-by: artembuslaev <artem.buslaev@envisionblockchain.com>

* fix

Signed-off-by: artembuslaev <artem.buslaev@envisionblockchain.com>

* update version
Signed-off-by: simvalery <valeriy.simonov@envisionblockchain.com>

Signed-off-by: simvalery <valeriy.simonov@envisionblockchain.com>

* [skip ci] Add swagger.yaml

* update settings
Signed-off-by: simvalery <valeriy.simonov@envisionblockchain.com>

Signed-off-by: simvalery <valeriy.simonov@envisionblockchain.com>

* fix fint
Signed-off-by: simvalery <valeriy.simonov@envisionblockchain.com>

Signed-off-by: simvalery <valeriy.simonov@envisionblockchain.com>

---------

Signed-off-by: artembuslaev <artem.buslaev@envisionblockchain.com>
Signed-off-by: simvalery <valeriy.simonov@envisionblockchain.com>
Co-authored-by: artembuslaev <artem.buslaev@envisionblockchain.com>
Co-authored-by: envision-ci-agent <envision-ci-agent@users.noreply.github.com>
  • Loading branch information
3 people authored Feb 6, 2024
1 parent e62fbf1 commit 1539a3d
Show file tree
Hide file tree
Showing 27 changed files with 141 additions and 123 deletions.
2 changes: 1 addition & 1 deletion ai-service/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ai-service",
"version": "2.21.0",
"version": "2.21.1",
"main": "dist/app.js",
"license": "MIT",
"dependencies": {
Expand Down
6 changes: 3 additions & 3 deletions analytics-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
},
"author": "Envision Blockchain Solutions <info@envisionblockchain.com>",
"dependencies": {
"@guardian/common": "^2.21.0",
"@guardian/interfaces": "^2.21.0",
"@guardian/common": "^2.21.1",
"@guardian/interfaces": "^2.21.1",
"@nestjs/common": "^9.4.1",
"@nestjs/core": "^9.4.1",
"@nestjs/jwt": "^10.0.3",
Expand Down Expand Up @@ -81,5 +81,5 @@
"start": "node dist/index.js",
"test": "mocha tests/**/*.test.js --reporter mocha-junit-reporter --reporter-options mochaFile=../test_results/ui-service.xml"
},
"version": "2.21.0"
"version": "2.21.1"
}
6 changes: 3 additions & 3 deletions api-gateway/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
},
"author": "Envision Blockchain Solutions <info@envisionblockchain.com>",
"dependencies": {
"@guardian/common": "^2.21.0",
"@guardian/interfaces": "^2.21.0",
"@guardian/common": "^2.21.1",
"@guardian/interfaces": "^2.21.1",
"@nestjs/common": "^9.4.1",
"@nestjs/core": "^9.4.1",
"@nestjs/jwt": "^10.0.3",
Expand Down Expand Up @@ -82,5 +82,5 @@
"start": "node dist/index.js",
"test": "mocha tests/**/*.test.js --reporter mocha-junit-reporter --reporter-options mochaFile=../test_results/ui-service.xml"
},
"version": "2.21.0"
"version": "2.21.1"
}
2 changes: 1 addition & 1 deletion api-tests/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "api-tests",
"version": "2.21.0",
"version": "2.21.1",
"description": "API Tests",
"main": "index.js",
"scripts": {
Expand Down
6 changes: 3 additions & 3 deletions auth-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"image-size": "1.0.2"
},
"dependencies": {
"@guardian/common": "^2.21.0",
"@guardian/interfaces": "^2.21.0",
"@guardian/common": "^2.21.1",
"@guardian/interfaces": "^2.21.1",
"@meeco/cryppo": "^2.0.2",
"@mikro-orm/core": "5.7.12",
"@mikro-orm/mongodb": "5.7.12",
Expand Down Expand Up @@ -74,5 +74,5 @@
"start": "node dist/index.js",
"test": "mocha tests/**/*.test.js --reporter mocha-junit-reporter --reporter-options mochaFile=../test_results/ui-service.xml"
},
"version": "2.21.0"
"version": "2.21.1"
}
4 changes: 2 additions & 2 deletions common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"@azure/identity": "^3.2.2",
"@azure/keyvault-secrets": "^4.7.0",
"@google-cloud/secret-manager": "^4.2.2",
"@guardian/interfaces": "^2.21.0",
"@guardian/interfaces": "^2.21.1",
"@hashgraph/sdk": "2.34.1",
"@mattrglobal/jsonld-signatures-bbs": "^1.1.2",
"@meeco/cryppo": "^2.0.2",
Expand Down Expand Up @@ -83,5 +83,5 @@
"test:local": "mocha tests/**/*.test.js --exit",
"test:stability": "mocha tests/stability.test.js"
},
"version": "2.21.0"
"version": "2.21.1"
}
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,5 @@
"test": "ng test",
"watch": "ng build --watch --configuration development --output-path ../www-data"
},
"version": "2.21.0"
"version": "2.21.1"
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ export class CopySchemaDialog {
this.policies = data.policies || [];
this.modules = data.modules || [];
this.tools = data.tools || [];
console.log(this);
}

public get isSystem(): boolean {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ export class SchemaConfigurationComponent implements OnInit {
isRef: false,
customType: 'hederaAccount'
};
console.log(this);
}

get currentEntity(): any {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export class ServiceStatusComponent implements OnInit {
private route: ActivatedRoute,
private router: Router
) {
console.log(this);
this.servicesStates = this.wsService.getServicesStatesArray();
this.last = this.route?.snapshot?.queryParams?.last;
try {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,3 @@
<!--<h1 class="settings-title">Change settings</h1>
<div *ngIf="!isLoading; else spinner">
<form [formGroup]="dataForm" (ngSubmit)="onSubmit()">
<mat-form-field class="submit-field" appearance="outline">
<mat-label>* OPERATOR ID:</mat-label>
<input matInput name="OPERATOR_ID" type="text" formControlName="operatorId">
</mat-form-field>
<mat-form-field class="submit-field" appearance="outline">
<mat-label>* OPERATOR KEY:</mat-label>
<input matInput name="OPERATOR_KEY" type="password" placeholder="Enter secret key" formControlName="operatorKey">
</mat-form-field>
<mat-form-field class="submit-field" appearance="outline">
<mat-label>* IPFS STORAGE API KEY:</mat-label>
<input matInput name="IPFS_STORAGE_API_KEY" type="password" placeholder="Enter secret key" formControlName="ipfsStorageApiKey">
</mat-form-field>
<button mat-raised-button color="primary" type="submit" class="submit-button"
[disabled]="!dataForm.valid">Ok</button>
</form>
</div>-->

<div class="container">
<ng-container [ngTemplateOutlet]="header"></ng-container>
<ng-container *ngIf="!isLoading">
Expand Down Expand Up @@ -53,8 +30,15 @@ <h1>Settings</h1>
</div>
<div class="form-input-container">
<label class="p-field-label" for="ipfsKey">* IPFS Storage API Key</label>
<input class="p-field-input" formControlName="ipfsStorageApiKey" id="ipfsKey" pInputText
placeholder="IPFS Storage API Key" type="text"/>
<input [formControl]="getFormControl(keyAndProof,'key')" class="p-field-input" id="ipfsKey"
pInputText placeholder="IPFS Storage API Key"
type="text"/>
</div>
<div class="form-input-container">
<label class="p-field-label" for="ipfsKey">* IPFS Storage API proof</label>
<input [formControl]="getFormControl(keyAndProof,'proof')" class="p-field-input" id="ipfsProof"
pInputText placeholder="IPFS Storage API Key"
type="text"/>
</div>
</form>
</div>
Expand Down
126 changes: 78 additions & 48 deletions frontend/src/app/views/admin/settings-view/settings-view.component.ts
Original file line number Diff line number Diff line change
@@ -1,55 +1,85 @@
import { Component, OnInit } from '@angular/core';
import { FormBuilder, Validators } from '@angular/forms';
import { Component, OnDestroy, OnInit } from '@angular/core';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms';
import { CommonSettings } from '@guardian/interfaces';
import { SettingsService } from 'src/app/services/settings.service';
import { Subscription } from 'rxjs'

@Component({
selector: 'app-settings-view',
templateUrl: './settings-view.component.html',
selector: 'app-settings-view',
templateUrl: './settings-view.component.html',
styleUrls: ['./settings-view.component.scss']
})
export class SettingsViewComponent implements OnInit {
dataForm = this.fb.group({
operatorId: ['', Validators.compose([
Validators.required,
Validators.pattern(/^\d+\.\d+\.\d+$/)
])],
operatorKey: ['', Validators.compose([
Validators.required,
Validators.minLength(5)
])],
ipfsStorageApiKey: ['', Validators.compose([
Validators.required,
Validators.minLength(5)
])]
});
isLoading: boolean = true;

constructor(
private fb: FormBuilder,
private settingsService: SettingsService) {
}

ngOnInit() {
this.settingsService.getSettings()
.subscribe((result: CommonSettings) => {
this.dataForm.patchValue(result);
this.isLoading = false
}, (error) => {
this.isLoading = true
});
}

onSubmit() {
if (this.dataForm.valid) {
this.isLoading = true;
this.settingsService.updateSettings(this.dataForm.value)
.subscribe(() => {
this.isLoading = false;
}, () => {
this.isLoading = false;
this.ngOnInit();
});
}
}
export class SettingsViewComponent implements OnInit, OnDestroy{
dataForm = this.fb.group({
operatorId: [
'', Validators.compose([
Validators.required,
Validators.pattern(/^\d+\.\d+\.\d+$/)
])],
operatorKey: [
'', Validators.compose([
Validators.required,
Validators.minLength(5)
])],
ipfsStorageApiKey: [
'', Validators.compose([
Validators.required,
Validators.minLength(5)
])]
});
isLoading: boolean = true;

keyAndProof = this.fb.group({
key: ['', Validators.required],
proof: ['', Validators.required]
})

private subscription: Subscription;

constructor(
private fb: FormBuilder,
private settingsService: SettingsService) {
this.subscription = new Subscription();
}

ngOnInit() {
this.subscription.add(
this.settingsService.getSettings()
.subscribe((result: CommonSettings) => {
this.dataForm.patchValue(result);
this.isLoading = false
}, (error) => {
this.isLoading = true
})
);

this.subscription.add(
this.keyAndProof.valueChanges.subscribe(values => {
this.dataForm.patchValue({
ipfsStorageApiKey: `${values.key};${values.proof}`
})
})
);
}

getFormControl(formGroup: FormGroup, name: string): FormControl {
return formGroup.get(name) as FormControl;
}

ngOnDestroy() {
this.subscription.unsubscribe()
}

onSubmit() {
if (this.dataForm.valid) {
this.isLoading = true;
this.settingsService.updateSettings(this.dataForm.value)
.subscribe(() => {
this.isLoading = false;
}, () => {
this.isLoading = false;
this.ngOnInit();
});
}
}
}
1 change: 0 additions & 1 deletion frontend/src/app/views/login/login.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ export class LoginComponent implements OnInit, OnDestroy {
}

ngOnInit() {
console.log(this);
this.testUsers$ = this.otherService.getAllUsers();
this.loading = false;
this.redirect().finally(() => {
Expand Down
1 change: 0 additions & 1 deletion frontend/src/app/views/schemas/schemas.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ export class SchemaConfigComponent implements OnInit {
const topic = this.route.snapshot.queryParams['topic'];
this.type = this.getType(type);
this.currentTopic = topic && topic !== 'all' ? topic : '';
console.log(this);
this.loadProfile();
}

Expand Down
6 changes: 3 additions & 3 deletions guardian-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"image-size": "1.0.2"
},
"dependencies": {
"@guardian/common": "^2.21.0",
"@guardian/interfaces": "^2.21.0",
"@guardian/common": "^2.21.1",
"@guardian/interfaces": "^2.21.1",
"@hashgraph/sdk": "2.34.1",
"@mattrglobal/jsonld-signatures-bbs": "^1.1.2",
"@meeco/cryppo": "^2.0.2",
Expand Down Expand Up @@ -98,5 +98,5 @@
"test:local": "mocha tests/**/*.test.js --exit",
"test:stability": "mocha tests/stability.test.js"
},
"version": "2.21.0"
"version": "2.21.1"
}
2 changes: 1 addition & 1 deletion interfaces/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
"prepack": "npm run build",
"test": "echo \"Error: no test specified\" && exit 1"
},
"version": "2.21.0"
"version": "2.21.1"
}
6 changes: 3 additions & 3 deletions logger-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"image-size": "1.0.2"
},
"dependencies": {
"@guardian/common": "^2.21.0",
"@guardian/interfaces": "^2.21.0",
"@guardian/common": "^2.21.1",
"@guardian/interfaces": "^2.21.1",
"@mikro-orm/core": "5.7.12",
"@mikro-orm/mongodb": "5.7.12",
"@nestjs/common": "^9.4.1",
Expand Down Expand Up @@ -53,5 +53,5 @@
"start": "node dist/index.js",
"watch": "nodemon src/index.ts"
},
"version": "2.21.0"
"version": "2.21.1"
}
4 changes: 2 additions & 2 deletions mrv-sender/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"image-size": "1.0.2"
},
"dependencies": {
"@guardian/common": "^2.21.0",
"@guardian/common": "^2.21.1",
"@transmute/credentials-context": "0.7.0-unstable.80",
"@transmute/did-context": "0.7.0-unstable.80",
"@transmute/ed25519-signature-2018": "0.7.0-unstable.80",
Expand Down Expand Up @@ -43,5 +43,5 @@
"dev:docker": "nodemon .",
"start": "node dist/index.js"
},
"version": "2.21.0"
"version": "2.21.1"
}
6 changes: 3 additions & 3 deletions notification-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"image-size": "1.0.2"
},
"dependencies": {
"@guardian/common": "^2.21.0",
"@guardian/interfaces": "^2.21.0",
"@guardian/common": "^2.21.1",
"@guardian/interfaces": "^2.21.1",
"@mikro-orm/core": "5.7.12",
"@mikro-orm/mongodb": "5.7.12",
"@nestjs/common": "^9.4.1",
Expand Down Expand Up @@ -52,5 +52,5 @@
"start": "node dist/index.js",
"watch": "nodemon src/index.ts"
},
"version": "2.21.0"
"version": "2.21.1"
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"ai-service",
"notification-service"
],
"version": "2.21.0",
"version": "2.21.1",
"devDependencies": {
"detect-secrets": "^1.0.6"
},
Expand Down
Loading

0 comments on commit 1539a3d

Please sign in to comment.