Skip to content

Commit

Permalink
fixed deployment of docker containers
Browse files Browse the repository at this point in the history
  • Loading branch information
datomo committed Mar 1, 2024
1 parent 5433cb7 commit 2a1029a
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<strong>Connection attempt failed:</strong>
{{ handshake.lastErrorMessage }}
</div>
<button class="btn btn-primary" (click)="redoHandshake()">Try again</button>
<button cButton color="primary" (click)="redoHandshake()">Try again</button>
</div>

Run the following command on <strong>{{ handshake.hostname }}:</strong><br>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export class DockerhandshakeComponent implements OnInit {
@Output() redo = new EventEmitter<void>();

constructor(
private _util: UtilService,
protected _util: UtilService,
) { }

ngOnInit(): void {
Expand Down
22 changes: 18 additions & 4 deletions src/app/views/adapters/adapters.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,25 @@ import {CrudService} from '../../services/crud.service';
import {ActivatedRoute, Router} from '@angular/router';
import {AdapterModel, AdapterType, PolyMap} from './adapter.model';
import {ToasterService} from '../../components/toast-exposer/toaster.service';
import {AbstractControl, FormGroup, UntypedFormArray, UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, ValidatorFn, Validators} from '@angular/forms';
import {
AbstractControl,
FormGroup,
UntypedFormArray,
UntypedFormBuilder,
UntypedFormControl,
UntypedFormGroup,
ValidatorFn,
Validators
} from '@angular/forms';
import {PathAccessRequest, RelationalResult} from '../../components/data-view/models/result-set.model';
import {Subscription} from 'rxjs';
import {CatalogService} from '../../services/catalog.service';
import {AdapterSettingModel, AdapterSettingValueModel, AdapterTemplateModel, DeployMode} from '../../models/catalog.model';
import {
AdapterSettingModel,
AdapterSettingValueModel,
AdapterTemplateModel,
DeployMode
} from '../../models/catalog.model';
import {LeftSidebarService} from '../../components/left-sidebar/left-sidebar.service';

@Component({
Expand Down Expand Up @@ -36,6 +50,7 @@ export class AdaptersComponent implements OnInit, OnDestroy {

this.stores = computed(() => {
this._catalog.listener();
console.log(this._catalog.getStores())
return this._catalog.getStores();
});
this.sources = computed(() => {
Expand Down Expand Up @@ -94,7 +109,7 @@ export class AdaptersComponent implements OnInit, OnDestroy {
this.subscribeActiveChange();

this.currentRoute.set(this._route.snapshot.paramMap.get('action'));
console.log(this.currentRoute());

const sub = this._route.params.subscribe(params => {
this.currentRoute.set(params['action']);
});
Expand Down Expand Up @@ -395,7 +410,6 @@ export class AdaptersComponent implements OnInit, OnDestroy {
this._toast.exception(result, 'Could not deploy adapter');
}
this.modalActive = false;
// this._catalog.updateIfNecessary();
},
error: err => {
this._toast.error('Could not deploy adapter');
Expand Down
4 changes: 2 additions & 2 deletions src/app/views/dockerconfig/dockerconfig.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ <h1>Docker</h1>
</c-row>

<c-row *ngIf="status.available && (!status.connected || autoConnectRunning)" class="pb-3">
<div class="col">
<button class="btn btn-success" (click)="autoDocker()" [disabled]="status.running || autoConnectRunning">
<div cCol>
<button cButton color="success" (click)="autoDocker()" [disabled]="status.running || autoConnectRunning">
<div *ngIf="status.running || autoConnectRunning" class="spinner-border spinner-border-sm" role="status"></div>
Autoconnect to localhost
</button>
Expand Down
11 changes: 5 additions & 6 deletions src/app/views/dockerconfig/dockerconfig.component.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import {Component, OnDestroy, OnInit, ViewChild} from '@angular/core';
import {Component, OnDestroy, OnInit} from '@angular/core';
import {CrudService} from '../../services/crud.service';
import {ToasterService} from '../../components/toast-exposer/toaster.service';
import {LeftSidebarService} from '../../components/left-sidebar/left-sidebar.service';
import {BreadcrumbService} from '../../components/breadcrumb/breadcrumb.service';
import {BreadcrumbItem} from '../../components/breadcrumb/breadcrumb-item';
import {ModalDirective} from 'ngx-bootstrap/modal';

@Component({
selector: 'app-dockerconfig',
Expand Down Expand Up @@ -48,16 +47,16 @@ export class DockerconfigComponent implements OnInit, OnDestroy {

updateList() {
this._crud.getDockerInstances().subscribe({
next: res => {
this.instances = <DockerInstance[]>res;
next: (res: DockerInstance[]) => {
this.instances = res;
},
error: err => {
console.log(err);
},
});
this._crud.getAutoDockerStatus().subscribe({
next: res => {
this.status = <AutoDockerStatus>res;
next: (res: AutoDockerStatus) => {
this.status = res;
},
error: err => {
console.log(err);
Expand Down

0 comments on commit 2a1029a

Please sign in to comment.