Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
this._dashy = new Dashy()
.target(placeholder)
.render()
;
}
this._dashy.element()
.on("drop", () => this.dropHandler(this.event()))
.on("dragover", () => this.dragOverHandler(this.event()))
;
if (_url.param("Wuid")) {
logger.debug(`WU Params: ${_url.params()}`);
const baseUrl = `${_url.param("Protocol")}://${_url.param("Hostname")}:${_url.param("Port")}`;
logger.debug(baseUrl);
const result = new Result({ baseUrl }, _url.param("Wuid"), _url.param("ResultName"));
result.fetchRows().then(async (response: any[]) => {
this.importDDL(response[0][_url.param("ResultName")], baseUrl, _url.param("Wuid"), layoutJson);
});
} else if (_url.param("QueryID")) {
// http://10.241.100.159:8002/WsEcl/submit/query/roxie/prichajx_govottocustomerstats.ins109_service_1/json
// ?Protocol=http&Hostname=10.241.100.159&Port=8002&QuerySet=roxie&QueryID=prichajx_govottocustomerstats.ins109_service_1
logger.debug(`Roxie Params: ${JSON.stringify(_url.params())}`);
const baseUrl = `${_url.param("Protocol") || "http"}://${_url.param("Hostname")}:${_url.param("Port")}`;
const action = `WsEcl/submit/query/${_url.param("QuerySet")}/${_url.param("QueryID")}/json`;
const responseID = `${_url.param("QueryID")}Response`;
logger.debug(action);
const connection = new Connection({ baseUrl });
connection.send(action, {}).then(response => {
if (exists("Results.HIPIE_DDL.Row", response[responseID]) && response[responseID].Results.HIPIE_DDL.Row.length) {
this.importDDL(response[responseID].Results.HIPIE_DDL.Row[0].HIPIE_DDL, baseUrl, _url.param("Wuid"), layoutJson);
}
App.prototype.parseUrl = function () {
var _this = this;
var _url = new other_1.Comms.ESPUrl().url(document.URL);
if (_url.param("Wuid")) {
logger.debug("WU Params: " + _url.params());
var baseUrl_1 = _url.param("Protocol") + "://" + _url.param("Hostname") + ":" + _url.param("Port");
logger.debug(baseUrl_1);
var result = new comms_1.Result({ baseUrl: baseUrl_1 }, _url.param("Wuid"), _url.param("ResultName"));
result.fetchRows().then(function (response) { return __awaiter(_this, void 0, void 0, function () {
var ddlStr, ddl;
return __generator(this, function (_a) {
ddlStr = response[0][_url.param("ResultName")];
ddl = JSON.parse(ddlStr);
this._dashy.importDDL(ddl, baseUrl_1, _url.param("Wuid"));
return [2 /*return*/];
});
}); });
}
else if (_url.param("QueryID")) {
// http://10.241.100.159:8002/WsEcl/submit/query/roxie/prichajx_govottocustomerstats.ins109_service_1/json
// ?Protocol=http&Hostname=10.241.100.159&Port=8002&QuerySet=roxie&QueryID=prichajx_govottocustomerstats.ins109_service_1
logger.debug("Roxie Params: " + JSON.stringify(_url.params()));
var baseUrl_2 = (_url.param("Protocol") || "http") + "://" + _url.param("Hostname") + ":" + _url.param("Port");
var action = "WsEcl/submit/query/" + _url.param("QuerySet") + "/" + _url.param("QueryID") + "/json";
_createResult(): Result {
return new Result({ baseUrl: this.url(), hookSend: this._ec.hookSend() }, this.logicalFile());
}
calcResult(): Result | null {
if (this.wuid() && this.resultName()) {
return new Result({ baseUrl: this.baseUrl() }, this.wuid(), this.resultName());
} else if (this.wuid() && this.sequence() !== undefined) {
return new Result({ baseUrl: this.baseUrl() }, this.wuid(), this.sequence());
} else if (this.logicalFile()) {
return new Result({ baseUrl: this.baseUrl() }, this.logicalFile());
}
return null;
}
parseParams() {
if (this._url.param("Wuid")) {
const baseUrl = `${this._url.param("Protocol")}://${this._url.param("Hostname")}:${this._url.param("Port")}`;
const fullUrl = `${baseUrl}/WsWorkunits/WUResult.json?Wuid=${this._url.param("Wuid")}&ResultName=${this._url.param("ResultName")}`;
logger.info(baseUrl);
const result = new Result({ baseUrl }, this._url.param("Wuid"), this._url.param("ResultName"));
result.fetchRows().then(async (response: object[]) => {
const ddl = JSON.parse(response[0][this._url.param("ResultName")]);
this._ddlv1.json(ddl);
this._ddlv2_upgraded.json(upgrade(ddl));
this._elementContainer.importV1DDL(fullUrl, ddl);
this._dashboard.lazyRender();
await this._elementContainer.refresh();
this._ddlv2.json(this._elementContainer.ddl());
});
} else if (this._url.param("QueryID")) {
} else {
logger.warning(`Unkown Params: ${this._url.params()}`);
}
}
calcResult(): Result | null {
if (this.wuid() && this.resultName()) {
return new Result({ baseUrl: this.baseUrl() }, this.wuid(), this.resultName());
} else if (this.wuid() && this.sequence() !== undefined) {
return new Result({ baseUrl: this.baseUrl() }, this.wuid(), this.sequence());
} else if (this.logicalFile()) {
return new Result({ baseUrl: this.baseUrl() }, this.logicalFile());
}
return null;
}
calcResult(): Result | null {
if (this.wuid() && this.resultName()) {
return new Result({ baseUrl: this.baseUrl() }, this.wuid(), this.resultName());
} else if (this.wuid() && this.sequence() !== undefined) {
return new Result({ baseUrl: this.baseUrl() }, this.wuid(), this.sequence());
} else if (this.logicalFile()) {
return new Result({ baseUrl: this.baseUrl() }, this.logicalFile());
}
return null;
}