aboutsummaryrefslogtreecommitdiff
path: root/src/client/northstar
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/northstar')
-rw-r--r--src/client/northstar/dash-nodes/HistogramBoxPrimitives.tsx6
-rw-r--r--src/client/northstar/manager/Gateway.ts12
2 files changed, 9 insertions, 9 deletions
diff --git a/src/client/northstar/dash-nodes/HistogramBoxPrimitives.tsx b/src/client/northstar/dash-nodes/HistogramBoxPrimitives.tsx
index 4c5bdb14b..721bf6a89 100644
--- a/src/client/northstar/dash-nodes/HistogramBoxPrimitives.tsx
+++ b/src/client/northstar/dash-nodes/HistogramBoxPrimitives.tsx
@@ -1,7 +1,7 @@
import React = require("react");
import { computed, observable, reaction, runInAction, trace, action } from "mobx";
import { observer } from "mobx-react";
-import { Utils as DashUtils } from '../../../Utils';
+import { Utils as DashUtils, emptyFunction } from '../../../Utils';
import { FilterModel } from "../../northstar/core/filter/FilterModel";
import { ModelHelpers } from "../../northstar/model/ModelHelpers";
import { ArrayUtil } from "../../northstar/utils/ArrayUtil";
@@ -49,7 +49,7 @@ export class HistogramBoxPrimitives extends React.Component<HistogramPrimitivesP
private getSelectionToggle(binPrimitives: HistogramBinPrimitive[], allBrushIndex: number, filterModel: FilterModel) {
let rawAllBrushPrim = ArrayUtil.FirstOrDefault(binPrimitives, bp => bp.BrushIndex === allBrushIndex);
if (!rawAllBrushPrim) {
- return () => { };
+ return emptyFunction;
}
let allBrushPrim = rawAllBrushPrim;
return () => runInAction(() => {
@@ -97,7 +97,7 @@ export class HistogramBoxPrimitives extends React.Component<HistogramPrimitivesP
let trans1Ypercent = `${yFrom / this.renderDimension * 100}%`;
return <line className="histogramboxprimitives-line" key={DashUtils.GenerateGuid()} x1={trans1Xpercent} x2={`${trans2Xpercent}`} y1={trans1Ypercent} y2={`${trans2Ypercent}`} />;
}
- drawRect(r: PIXIRectangle, barAxis: number, color: number | undefined, classExt: string, tapHandler: () => void = () => { }) {
+ drawRect(r: PIXIRectangle, barAxis: number, color: number | undefined, classExt: string, tapHandler: () => void = emptyFunction) {
if (r.height < 0) {
r.y += r.height;
r.height = -r.height;
diff --git a/src/client/northstar/manager/Gateway.ts b/src/client/northstar/manager/Gateway.ts
index 8f3b6b11c..207a9ad19 100644
--- a/src/client/northstar/manager/Gateway.ts
+++ b/src/client/northstar/manager/Gateway.ts
@@ -23,9 +23,9 @@ export class Gateway {
}
}
- public async GetSchema(dbName: string): Promise<Catalog> {
+ public async GetSchema(pathname: string, schemaname: string): Promise<Catalog> {
try {
- const json = await this.MakeGetRequest("schema", undefined, dbName);
+ const json = await this.MakeGetRequest("schema", undefined, { path: pathname, schema: schemaname });
const cat = Catalog.fromJS(json);
return cat;
}
@@ -144,13 +144,13 @@ export class Gateway {
});
}
- public async MakeGetRequest(endpoint: string, signal?: AbortSignal, data?: any): Promise<any> {
- let url = !data ? Gateway.ConstructUrl(endpoint) :
+ public async MakeGetRequest(endpoint: string, signal?: AbortSignal, params?: any): Promise<any> {
+ let url = !params ? Gateway.ConstructUrl(endpoint) :
(() => {
let newUrl = new URL(Gateway.ConstructUrl(endpoint));
- newUrl.searchParams.append("data", data);
+ Object.getOwnPropertyNames(params).map(prop =>
+ newUrl.searchParams.append(prop, params[prop]));
return Gateway.ConstructUrl(endpoint) + newUrl.search;
- return newUrl as any;
})();
const response = await fetch(url,