Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}).then(response => {
return exists("TargetClusterUsages.TargetClusterUsage", response) ? response.TargetClusterUsages.TargetClusterUsage : [];
});
}
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);
}
});
} else if (_url.param("dsp")) {
connection.send(action, {}).then(function (response) {
if (util_1.exists("Results.HIPIE_DDL.Row", response[responseID_1]) && response[responseID_1].Results.HIPIE_DDL.Row.length) {
var ddl = JSON.parse(response[responseID_1].Results.HIPIE_DDL.Row[0].HIPIE_DDL);
_this._dashy.importDDL(ddl, baseUrl_2, _url.param("Wuid"));
}
});
}
return this.connection.TpServiceQuery({}).then(response => {
const rootProtocol = this.connection.protocol();
const ip = this.connection.ip();
let port = rootProtocol === "https:" ? "18002" : "8002";
if (exists("ServiceList.TpEspServers.TpEspServer", response)) {
for (const item of response.ServiceList.TpEspServers.TpEspServer) {
if (exists("TpBindings.TpBinding", item)) {
for (const binding of item.TpBindings.TpBinding) {
if (binding.Service === type && binding.Protocol + ":" === rootProtocol) {
port = binding.Port;
}
}
}
}
}
return `${rootProtocol}//${ip}:${port}/`;
});
}
bpGetValidLocations(filePath: any) {
const retVal: any[] = [];
if (exists("W_LOCAL.Graphs", this.jsonWU)) {
let id = "";
walkXmlJson(this.jsonWU.W_LOCAL.Graphs, (key: string, item: any, _stack: any[]) => {
if (key === "$" && item.id) {
id = item.id;
}
if (key === "$" && item.name === "definition") {
const match = /([a-z,A-Z]:\\(?:[-\w\.\d]+\\)*(?:[-\w\.\d]+)?|(?:\/[\w\.\-]+)+)\((\d*),(\d*)\)/.exec(item.value);
if (match) {
const [, file, row, _col] = match;
const line: number = +row;
const col: number = +_col;
if (filePath === file) {
retVal.push({ file, line, col, id });
}
}
}
return this.connection.TpServiceQuery({}).then(response => {
const rootProtocol = this.connection.protocol();
const ip = this.connection.ip();
let port = rootProtocol === "https:" ? "18002" : "8002";
if (exists("ServiceList.TpEspServers.TpEspServer", response)) {
for (const item of response.ServiceList.TpEspServers.TpEspServer) {
if (exists("TpBindings.TpBinding", item)) {
for (const binding of item.TpBindings.TpBinding) {
if (binding.Service === type && binding.Protocol + ":" === rootProtocol) {
port = binding.Port;
}
}
}
}
}
return `${rootProtocol}//${ip}:${port}/`;
});
}