fix(core): update
This commit is contained in:
@ -21,12 +21,10 @@ export class DockerContainer {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param containerId
|
||||
*/
|
||||
static async getContainerById(containerId: string) {
|
||||
|
||||
}
|
||||
static async getContainerById(containerId: string) {}
|
||||
static async create() {}
|
||||
|
||||
// ========
|
||||
@ -36,7 +34,7 @@ export class DockerContainer {
|
||||
constructor(dockerContainerObjectArg: any) {
|
||||
Object.keys(dockerContainerObjectArg).forEach(keyArg => {
|
||||
this[keyArg] = dockerContainerObjectArg[keyArg];
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
Id: string;
|
||||
|
@ -37,7 +37,7 @@ export class DockerHost {
|
||||
async getContainers() {
|
||||
const containerArray = await DockerContainer.getContainers(this);
|
||||
return containerArray;
|
||||
};
|
||||
}
|
||||
|
||||
async getEventObservable(): Promise<plugins.rxjs.Observable<any>> {
|
||||
const response = await this.requestStreaming('GET', '/events');
|
||||
@ -70,15 +70,16 @@ export class DockerHost {
|
||||
async requestStreaming(methodArg: string, routeArg: string, dataArg = {}) {
|
||||
const requestUrl = `${this.sockPath}${routeArg}`;
|
||||
const response = await plugins.smartrequest.request(
|
||||
requestUrl, {
|
||||
method: methodArg,
|
||||
headers: {
|
||||
// 'Content-Type': 'application/json',
|
||||
Host: 'docker.sock'
|
||||
requestUrl,
|
||||
{
|
||||
method: methodArg,
|
||||
headers: {
|
||||
// 'Content-Type': 'application/json',
|
||||
Host: 'docker.sock'
|
||||
},
|
||||
requestBody: null
|
||||
},
|
||||
requestBody: null
|
||||
},
|
||||
true
|
||||
true
|
||||
);
|
||||
console.log(response.statusCode);
|
||||
console.log(response.body);
|
||||
|
@ -4,16 +4,9 @@ import * as smartlog from '@pushrocks/smartlog';
|
||||
import * as smartpromise from '@pushrocks/smartpromise';
|
||||
import * as smartrequest from '@pushrocks/smartrequest';
|
||||
|
||||
export {
|
||||
lik,
|
||||
smartlog,
|
||||
smartpromise,
|
||||
smartrequest
|
||||
};
|
||||
export { lik, smartlog, smartpromise, smartrequest };
|
||||
|
||||
// third party
|
||||
import * as rxjs from 'rxjs';
|
||||
|
||||
export {
|
||||
rxjs
|
||||
};
|
||||
export { rxjs };
|
||||
|
@ -1,2 +1,2 @@
|
||||
// tslint:disable-next-line: interface-over-type-literal
|
||||
export type TLabels = {[key: string]: string };
|
||||
export type TLabels = { [key: string]: string };
|
||||
|
@ -3,4 +3,4 @@ export interface IPort {
|
||||
Type: 'tcp';
|
||||
}
|
||||
|
||||
export type TPorts = IPort[];
|
||||
export type TPorts = IPort[];
|
||||
|
Reference in New Issue
Block a user