@hpcc-js/eclwatch 3.2.2 → 3.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs.map +1 -1
- package/package.json +4 -4
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/__package__.ts","../src/ECLArchiveViewer.ts","../src/WUGraphLegend.ts","../src/WUScopeController.ts","../src/WUGraph.ts","../src/WUResultStore.ts","../src/WUResult.ts","../src/WUStatus.ts","../src/WUTimeline.ts"],"sourcesContent":["export const PKG_NAME = \"@hpcc-js/eclwatch\";\nexport const PKG_VERSION = \"3.1.1\";\nexport const BUILD_VERSION = \"3.2.1\";\n","import { Editor } from \"@hpcc-js/codemirror\";\nimport { Workunit } from \"@hpcc-js/comms\";\nimport { SplitPanel } from \"@hpcc-js/phosphor\";\nimport { DirectoryTree } from \"@hpcc-js/tree\";\nimport { hashSum, xml2json } from \"@hpcc-js/util\";\n\nexport class ECLArchiveViewer extends SplitPanel {\n private _prevHash;\n private _contentStr;\n public _directoryPane = new DirectoryTree();\n public _fileEditorPane = new Editor()\n .text(\"\")\n ;\n\n constructor() {\n super(\"horizontal\");\n this._directoryPane.rowClick = (text) => {\n this._fileEditorPane\n .text(text)\n .render()\n ;\n };\n }\n\n protected transformArchiveTreeData(json) {\n const ret = {\n label: json.name,\n children: json._children.map(transformNode).filter(n => n)\n };\n\n if (ret.children && ret.children[0] && ret.children[0].label === \"html\") {\n // must be parsererror\n return {\n label: \"root\",\n children: [\n {\n label: \"error\",\n content: JSON.stringify(ret, null, 4)\n }\n ]\n };\n }\n return ret;\n\n function transformNode(node) {\n const _node: any = {};\n _node.label = node.name + (node[\"$\"] && node[\"$\"].key ? ` (${node[\"$\"].key})` : \"\");\n if (node._children && node._children.length > 0) {\n _node.children = node._children.map(_node => {\n return transformNode(_node);\n })\n .filter(n => n)\n ;\n } else if (typeof node.content === \"string\" && node.content.trim()) {\n _node.content = node.content;\n } else {\n return false;\n }\n return _node;\n }\n }\n\n updateDirectoryPane(contentStr) {\n let json;\n if (contentStr) {\n try {\n json = JSON.parse(contentStr);\n } catch (e) {\n json = xml2json(contentStr);\n }\n }\n if (json) {\n const _data = this.transformArchiveTreeData(json);\n this._directoryPane\n .data(_data)\n .render()\n ;\n }\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n this\n .addWidget(this._directoryPane)\n .addWidget(this._fileEditorPane)\n ;\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n\n const hash = hashSum({\n baseUrl: this.baseUrl(),\n wuid: this.wuid()\n });\n\n if (this._prevHash !== hash || typeof this._contentStr === \"undefined\") {\n Workunit.attach({ baseUrl: this.baseUrl() }, this.wuid())\n .fetchArchive()\n .then(resp => {\n\n this._contentStr = resp;\n this.updateDirectoryPane(this._contentStr);\n\n this._prevHash = hash;\n });\n } else {\n this.updateDirectoryPane(this._contentStr);\n }\n\n this.relativeSizes([this.directoryWidthRatio(), 1 - this.directoryWidthRatio()]);\n }\n}\nECLArchiveViewer.prototype._class += \" eclwatch_ECLArchiveViewer\";\n\nexport interface ECLArchiveViewer {\n directoryPaneColor(): string;\n directoryPaneColor(_: string): this;\n directoryPaneHoverColor(): string;\n directoryPaneHoverColor(_: string): this;\n fontColor(): string;\n fontColor(_: string): this;\n fontFamily(): string;\n fontFamily(_: string): this;\n fontSize(): number;\n fontSize(_: number): this;\n fileIconSize(): number;\n fileIconSize(_: number): this;\n folderIconOpen(): string;\n folderIconOpen(_: string): this;\n folderIconClosed(): string;\n folderIconClosed(_: string): this;\n textFileIcon(): string;\n textFileIcon(_: string): this;\n codeFileIcon(): string;\n codeFileIcon(_: string): this;\n verticalScroll(): boolean;\n verticalScroll(_: boolean): this;\n directoryWidthRatio(): number;\n directoryWidthRatio(_: number): this;\n baseUrl(): string;\n baseUrl(_: string): this;\n wuid(): string;\n wuid(_: string): this;\n}\nECLArchiveViewer.prototype.publish(\"baseUrl\", \"\", \"string\", \"HPCC Platform Base URL\");\nECLArchiveViewer.prototype.publish(\"wuid\", \"\", \"string\", \"Workunit ID\");\nECLArchiveViewer.prototype.publish(\"directoryWidthRatio\", 0.38, \"number\", \"Default directory panel width ratio relative to the full width\");\nECLArchiveViewer.prototype.publish(\"contentString\", null, \"string\", \"XML/JSON archive content string\");\nECLArchiveViewer.prototype.publishProxy(\"directoryPaneColor\", \"_directoryPane\", \"backgroundColor\");\nECLArchiveViewer.prototype.publishProxy(\"directoryPaneHoverColor\", \"_directoryPane\", \"hoverBackgroundColor\");\nECLArchiveViewer.prototype.publishProxy(\"iconSize\", \"_directoryPane\");\nECLArchiveViewer.prototype.publishProxy(\"fontColor\", \"_directoryPane\");\nECLArchiveViewer.prototype.publishProxy(\"fontFamily\", \"_directoryPane\");\nECLArchiveViewer.prototype.publishProxy(\"fontSize\", \"_directoryPane\");\nECLArchiveViewer.prototype.publishProxy(\"folderIconOpen\", \"_directoryPane\");\nECLArchiveViewer.prototype.publishProxy(\"folderIconClosed\", \"_directoryPane\");\nECLArchiveViewer.prototype.publishProxy(\"textFileIcon\", \"_directoryPane\");\nECLArchiveViewer.prototype.publishProxy(\"codeFileIcon\", \"_directoryPane\");\nECLArchiveViewer.prototype.publishProxy(\"verticalScroll\", \"_directoryPane\");\n","import { Vertex } from \"@hpcc-js/graph\";\nimport { Legend } from \"@hpcc-js/layout\";\nimport { local as d3Local, select as d3Select } from \"d3-selection\";\n\nimport \"../src/WUGraphLegend.css\";\n\nexport interface WUGraphLegendData {\n kind: number;\n faChar: string;\n label: string;\n count: number;\n}\n\nclass LegendVertex extends Vertex {\n\n constructor() {\n super();\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n this._icon.on(\"click\", () => {\n this.click(this.data());\n });\n }\n\n click(kind: number) {\n }\n}\n\nexport class WUGraphLegend extends Legend {\n\n private icon = d3Local<Vertex>();\n protected _disabled2: { [kind: number]: boolean } = {\n /* TODO: Default some to disabled?\n 43: true,\n 71: true,\n 82: true,\n 88: true\n */\n };\n\n disabled(): number[];\n disabled(_: number[]): this;\n disabled(_?: number[]): number[] | this {\n if (!arguments.length) {\n const retVal = [];\n for (const key in this._disabled2) {\n if (this._disabled2[key]) {\n retVal.push(key);\n }\n }\n return retVal;\n }\n this._disabled2 = {};\n _.forEach(kind => this._disabled2[kind] = true);\n return this;\n }\n\n toggle(kind: number) {\n this._disabled2[kind] = !this._disabled2[kind];\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n\n const context = this;\n const items = this._g.selectAll(\".legendItem\").data(this.data(), (d: any) => d.kind);\n items.enter().append(\"g\")\n .attr(\"class\", \"legendItem\")\n .each(function (this: HTMLElement, d) {\n context.icon.set(this, new LegendVertex()\n .target(this)\n .data(d.kind)\n .textbox_shape_colorStroke(\"none\")\n .textbox_shape_colorFill(\"none\")\n .iconAnchor(\"left\")\n .faChar(d.faChar)\n .text(`${d.label} (${d.count})`)\n .tooltip(`${d.kind} - ${d.label}`)\n .on(\"click\", kind => {\n context.toggle(kind);\n context.render();\n context.click(kind);\n })\n .on(\"mouseover\", kind => {\n context.mouseover(kind);\n })\n .on(\"mouseout\", kind => {\n context.mouseout(kind);\n })\n );\n })\n .merge(items)\n .each(function (this: HTMLElement, d, i) {\n const bbox = context.icon.get(this)\n .icon_shape_colorFill(context._disabled2[d.kind] ? \"gray\" : null)\n .render().getBBox();\n\n d3Select(this)\n .attr(\"transform\", `translate(${+bbox.width / 2}, ${i * 30})`)\n ;\n })\n ;\n items.exit()\n .each(function (this: HTMLElement, d) {\n context.icon.get(this)\n .target(null)\n .render();\n })\n .remove();\n const bbox = this.getBBox(true, true);\n this._g.attr(\"transform\", `translate(16, ${this.height() / 2 - bbox.height / 2})`);\n }\n\n // Events ---\n click(kind: number) {\n }\n\n mouseover(kind: number) {\n }\n\n mouseout(kind: number) {\n }\n}\nWUGraphLegend.prototype._class += \" eclwatch_WUGraphLegend\";\n","import { Icon } from \"@hpcc-js/common\";\nimport { BaseScope, ScopeEdge, ScopeGraph, ScopeSubgraph, ScopeVertex } from \"@hpcc-js/comms\";\nimport { Edge, IGraphData, Lineage, Subgraph, Vertex } from \"@hpcc-js/graph\";\nimport { Edge as UtilEdge, Subgraph as UtilSubgraph, Vertex as UtilVertex } from \"@hpcc-js/util\";\nimport { WUGraphLegendData } from \"./WUGraphLegend.ts\";\n\nexport type VertexType = Vertex | Icon;\n\nexport interface MyGraphData {\n subgraphs: Subgraph[];\n vertices: VertexType[];\n edges: Edge[];\n hierarchy: Lineage[];\n}\n\nfunction faCharFactory(kind): string {\n switch (kind) {\n case \"2\": return \"\\uf0c7\"; // Disk Write\n case \"3\": return \"\\uf15d\"; // sort\n case \"5\": return \"\\uf0b0\"; // Filter\n case \"6\": return \"\\uf1e0\"; // Split\n case \"12\": return \"\\uf039\"; // First N\n case \"15\": return \"\\uf126\"; // Lightweight Join\n case \"17\": return \"\\uf126\"; // Lookup Join\n case \"22\": return \"\\uf1e6\"; // Pipe Output\n case \"23\": return \"\\uf078\"; // Funnel\n case \"25\": return \"\\uf0ce\"; // Inline Dataset\n case \"26\": return \"\\uf074\"; // distribute\n case \"29\": return \"\\uf005\"; // Store Internal Result\n case \"36\": return \"\\uf128\"; // If\n case \"44\": return \"\\uf0c7\"; // write csv\n case \"47\": return \"\\uf0c7\"; // write\n case \"54\": return \"\\uf013\"; // Workunit Read\n case \"56\": return \"\\uf0c7\"; // Spill\n case \"59\": return \"\\uf126\"; // Merge\n case \"61\": return \"\\uf0c7\"; // write xml\n case \"82\": return \"\\uf1c0\"; // Projected Disk Read Spill\n case \"88\": return \"\\uf1c0\"; // Projected Disk Read Spill\n case \"92\": return \"\\uf129\"; // Limted Index Read\n case \"93\": return \"\\uf129\"; // Limted Index Read\n case \"99\": return \"\\uf1c0\"; // CSV Read\n case \"105\": return \"\\uf1c0\"; // CSV Read\n\n case \"7\": return \"\\uf090\"; // Project\n case \"9\": return \"\\uf0e2\"; // Local Iterate\n case \"16\": return \"\\uf005\"; // Output Internal\n case \"19\": return \"\\uf074\"; // Hash Distribute\n case \"21\": return \"\\uf275\"; // Normalize\n case \"35\": return \"\\uf0c7\"; // CSV Write\n case \"37\": return \"\\uf0c7\"; // Index Write\n case \"71\": return \"\\uf1c0\"; // Disk Read Spill\n case \"133\": return \"\\uf0ce\"; // Inline Dataset\n case \"148\": return \"\\uf0ce\"; // Inline Dataset\n case \"168\": return \"\\uf275\"; // Local Denormalize\n }\n return \"\\uf063\";\n}\n\nexport class WUScopeController {\n private graphDB: ScopeGraph;\n private subgraphsMap: { [id: string]: Subgraph } = {};\n private rSubgraphsMap: { [id: string]: ScopeSubgraph } = {};\n private verticesMap: { [id: string]: VertexType } = {};\n private rVerticesMap: { [id: string]: ScopeVertex } = {};\n private edgesMap: { [id: string]: Edge } = {};\n private rEdgesMap: { [id: string]: ScopeEdge } = {};\n private kindMap: { [id: string]: ScopeVertex[] } = {};\n\n protected _disabled: { [kind: number]: boolean } = {};\n\n constructor() {\n }\n\n clear() {\n this.subgraphsMap = {};\n this.rSubgraphsMap = {};\n this.verticesMap = {};\n this.rVerticesMap = {};\n this.edgesMap = {};\n this.rEdgesMap = {};\n }\n\n set(masterGraph: ScopeGraph) {\n this.graphDB = masterGraph;\n this.graphGui(this.graphDB);\n\n this.kindMap = {};\n this.graphDB.walk(item => {\n if (item instanceof UtilSubgraph) {\n } else if (item instanceof UtilVertex) {\n const kind = item._.attr(\"Kind\").RawValue;\n if (!this.kindMap[kind]) {\n this.kindMap[kind] = [];\n }\n this.kindMap[kind].push(item);\n } else if (item instanceof UtilEdge) {\n }\n });\n }\n\n disabled(): number[];\n disabled(_: number[]): this;\n disabled(_?: number[]): number[] | this {\n if (!arguments.length) {\n const retVal = [];\n for (const key in this._disabled) {\n if (this._disabled[key]) {\n retVal.push(key);\n }\n }\n return retVal;\n }\n this._disabled = {};\n _.forEach(kind => this._disabled[kind] = true);\n return this;\n }\n\n graphGui(graphDB: ScopeGraph): IGraphData {\n const graphGui: MyGraphData = {\n subgraphs: [],\n vertices: [],\n edges: [],\n hierarchy: []\n };\n\n graphDB.walk((item) => {\n if (item instanceof UtilSubgraph) {\n const subgraph = this.appendSubgraph(item, graphGui.hierarchy, graphGui.subgraphs);\n subgraph.showMinMax(item.vertices.length > 3 || subgraph.minState() !== \"normal\");\n } else if (item instanceof UtilVertex) {\n this.appendVertex(item, graphGui.hierarchy, graphGui.vertices);\n } else if (item instanceof UtilEdge) {\n this.appendEdge(item, graphGui.edges);\n }\n });\n\n return graphGui;\n }\n\n format(labelTpl, obj) {\n let retVal = \"\";\n let lpos = labelTpl.indexOf(\"%\");\n let rpos = -1;\n while (lpos >= 0) {\n retVal += labelTpl.substring(rpos + 1, lpos);\n rpos = labelTpl.indexOf(\"%\", lpos + 1);\n if (rpos < 0) {\n console.warn(\"Invalid Label Template\");\n break;\n }\n const key = labelTpl.substring(lpos + 1, rpos);\n retVal += !key ? \"%\" : (obj[labelTpl.substring(lpos + 1, rpos)] || \"\");\n lpos = labelTpl.indexOf(\"%\", rpos + 1);\n }\n retVal += labelTpl.substring(rpos + 1, labelTpl.length);\n return retVal.split(\"\\\\n\").join(\"\\n\");\n }\n\n createSubgraph(subgraph: ScopeSubgraph): Subgraph {\n let sg = this.subgraphsMap[subgraph._.Id];\n if (!sg) {\n sg = new Subgraph()\n .title(subgraph._.Id)\n .on(\"minClick\", () => {\n this.minClick(sg);\n })\n ;\n this.subgraphsMap[subgraph._.Id] = sg;\n this.rSubgraphsMap[sg.id()] = subgraph;\n }\n return sg;\n }\n\n createVertex(vertex: ScopeVertex): VertexType {\n let v = this.verticesMap[vertex._.Id];\n if (!v) {\n const attrs = vertex._.rawAttrs();\n if (vertex._.ScopeType === \"dummy\") {\n const parent = this.subgraphsMap[vertex.parent._.Id];\n v = new Icon()\n .shape_colorFill(\"darkred\")\n .shape_colorStroke(\"darkred\")\n .image_colorFill(\"white\")\n .faChar(\"\\uf067\")\n .on(\"click\", () => {\n parent.minState(\"normal\");\n this.minClick(parent);\n })\n ;\n } else {\n v = new Vertex()\n .icon_shape_colorFill(\"#1f77b4\")\n .icon_image_colorFill(\"white\")\n .faChar(faCharFactory(attrs[\"Kind\"]))\n .text(attrs[\"Label\"])\n ;\n const annotations = [];\n if (vertex._.hasAttr(\"Definition\")) {\n annotations.push({\n faChar: \"\\uf036\",\n tooltip: \"Definition\",\n shape_colorFill: \"lightgray\",\n shape_colorStroke: \"lightgray\",\n image_colorFill: \"black\"\n });\n }\n if (vertex._.hasAttr(\"IsInternal\")) {\n annotations.push({\n faChar: \"\\uf085\",\n tooltip: \"IsInternal\",\n shape_colorFill: \"red\",\n shape_colorStroke: \"red\",\n image_colorFill: \"white\"\n });\n }\n v.annotationIcons(annotations);\n }\n this.verticesMap[vertex._.Id] = v;\n this.rVerticesMap[v.id()] = vertex;\n }\n return v;\n }\n\n isSpill(edge: ScopeEdge): boolean {\n const sourceKind = edge.source._.attr(\"Kind\").RawValue;\n const targetKind = edge.target._.attr(\"Kind\").RawValue;\n return sourceKind === \"2\" || targetKind === \"71\";\n }\n\n spansSubgraph(edge: ScopeEdge): boolean {\n return edge.source.parent._.Id !== edge.target.parent._.Id;\n }\n\n createEdge(edge: ScopeEdge): Edge | undefined {\n let e = this.edgesMap[edge._.Id];\n if (!e) {\n const attrs = edge._.rawAttrs();\n const sourceV = this.verticesMap[edge.source._.Id];\n const targetV = this.verticesMap[edge.target._.Id];\n if (sourceV && targetV) {\n const isSpill = this.isSpill(edge);\n const spansSubgraph = this.spansSubgraph(edge);\n\n const label = this.format(\"%Label%\\n%NumRowsProcessed%\", attrs);\n /* TODO: Add extra annotations once WUDetails is fixed...\n const numSlaves = parseInt(attrs[\"NumSlaves\"]);\n const numStarts = parseInt(attrs[\"NumStarts\"]);\n const numStops = parseInt(attrs[\"NumStops\"]);\n const started = numStarts > 0;\n const finished = numStops === numSlaves;\n const active = started && !finished;\n */\n\n let strokeDasharray = null;\n let weight = 100;\n if (attrs[\"IsDependency\"]) {\n weight = 10;\n strokeDasharray = \"1,5\";\n } else if (attrs[\"_childGraph\"]) {\n strokeDasharray = \"5,5\";\n } else if (isSpill) {\n weight = 25;\n strokeDasharray = \"5,5,10,5\";\n } else if (spansSubgraph) {\n weight = 5;\n strokeDasharray = \"5,5\";\n }\n e = new Edge()\n .sourceVertex(sourceV)\n .targetVertex(targetV)\n .sourceMarker(\"circle\")\n .targetMarker(\"arrow\")\n .weight(weight)\n .strokeDasharray(strokeDasharray)\n .text(label)\n ;\n this.edgesMap[edge._.Id] = e;\n this.rEdgesMap[e.id()] = edge;\n }\n }\n return e;\n }\n\n appendSubgraph(subgraph: ScopeSubgraph, hierarchy: Lineage[], subgraphs: Subgraph[]): Subgraph {\n const sg = this.createSubgraph(subgraph);\n subgraphs.push(sg);\n const parent = this.subgraphsMap[subgraph.parent._.Id];\n if (parent) {\n hierarchy.push({ parent, child: sg });\n }\n return sg;\n }\n\n appendVertex(vertex: ScopeVertex, hierarchy: Lineage[], vertices: VertexType[]): VertexType {\n const v = this.createVertex(vertex);\n vertices.push(v);\n const parent = this.subgraphsMap[vertex.parent._.Id];\n if (parent) {\n hierarchy.push({ parent, child: v });\n }\n return v;\n }\n\n appendEdge(edge: ScopeEdge, edges: Edge[]): Edge {\n const e = this.createEdge(edge);\n if (e) {\n edges.push(e);\n }\n return e;\n }\n\n filterLegend(graphDB: ScopeGraph) {\n for (let i = graphDB.vertices.length - 1; i >= 0; --i) {\n const vertex = graphDB.vertices[i];\n const kind = vertex._.attr(\"Kind\").RawValue;\n if (this._disabled[kind]) {\n vertex.remove(false, (source: BaseScope, target: BaseScope) => {\n return new BaseScope({\n ScopeName: vertex._.ScopeName + \":in\",\n Id: source.Id + \"->\" + target.Id,\n ScopeType: \"dummy-edge\",\n Properties: {\n Property: [vertex._.attr(\"Label\")]\n },\n Notes: {\n Note: []\n },\n SinkActivity: \"\"\n });\n });\n }\n }\n }\n\n filterPartial(graphDB: ScopeGraph) {\n for (const subgraph of graphDB.subgraphs) {\n const sg = this.subgraphsMap[subgraph._.Id];\n switch (sg.minState()) {\n case \"partial\":\n const childVertices: ReadonlyArray<ScopeVertex> = subgraph.vertices;\n const vShow: ScopeVertex[] = [];\n const vHide: ScopeVertex[] = [];\n\n for (const vertex of childVertices) {\n if (vertex.inEdges.length === 0 || vertex.inEdges.some(edge => edge.source.parent !== edge.target.parent) ||\n vertex.outEdges.length === 0 || vertex.outEdges.some(edge => edge.source.parent !== edge.target.parent)) {\n vShow.push(vertex);\n } else {\n vHide.push(vertex);\n }\n }\n\n if (vHide.length > 1) {\n const dummyDetails = {\n ScopeName: subgraph._.ScopeName,\n Id: subgraph._.Id + \":dummy\",\n ScopeType: \"dummy\",\n Properties: {\n Property: [{\n Name: \"Activities\",\n RawValue: \"\" + vHide.length,\n Formatted: \"\" + vHide.length,\n Measure: \"count\",\n Creator: \"\",\n CreatorType: \"\"\n }]\n },\n Notes: {\n Note: []\n },\n SinkActivity: \"\"\n };\n const dummyScope = new BaseScope(dummyDetails);\n const dummyVertex = subgraph.createVertex(dummyScope);\n\n for (const vertex of vHide) {\n for (const edge of vertex.inEdges) {\n if (vShow.indexOf(edge.source) >= 0) {\n const dummyEdgeScope = new BaseScope({\n ScopeName: edge.source._.ScopeName,\n Id: edge.source._.Id + \"->\" + dummyVertex._.Id,\n ScopeType: \"dummy-in\",\n Properties: {\n Property: []\n },\n Notes: {\n Note: []\n },\n SinkActivity: \"\"\n });\n subgraph.createEdge(edge.source, dummyVertex, dummyEdgeScope);\n }\n }\n for (const edge of vertex.outEdges) {\n if (vShow.indexOf(edge.target) >= 0) {\n const dummyEdgeScope = new BaseScope({\n ScopeName: edge.target._.ScopeName,\n Id: dummyVertex._.Id + \"->\" + edge.target._.Id,\n ScopeType: \"dummy-out\",\n Properties: {\n Property: []\n },\n Notes: {\n Note: []\n },\n SinkActivity: \"\"\n });\n subgraph.createEdge(dummyVertex, edge.target, dummyEdgeScope);\n }\n }\n }\n vHide.forEach(vertex => vertex.remove(true));\n }\n break;\n }\n }\n }\n\n filterEmptySubgraphs(graphDB: ScopeGraph) {\n while (true) {\n const emptySubgraphs = graphDB.subgraphs.filter(subgraph => subgraph.subgraphs.length === 0 && subgraph.vertices.length === 0);\n if (emptySubgraphs.length === 0) break;\n emptySubgraphs.forEach(subgraph => subgraph.remove(true));\n }\n }\n\n removeObsoleteSubgraphs(graphDB: ScopeGraph) {\n for (const subgraph of [...graphDB.subgraphs]) {\n if (subgraph.vertices.length === 0) {\n subgraph.remove(false);\n }\n }\n }\n\n graphData(): IGraphData {\n const graphDB = this.graphDB.clone();\n this.filterLegend(graphDB);\n this.filterPartial(graphDB);\n this.filterEmptySubgraphs(graphDB);\n this.removeObsoleteSubgraphs(graphDB);\n return this.graphGui(graphDB);\n }\n\n calcLegend(): WUGraphLegendData[] {\n const retVal: WUGraphLegendData[] = [];\n for (const kind in this.kindMap) {\n retVal.push({\n kind: parseInt(kind),\n faChar: faCharFactory(kind),\n label: this.kindMap[kind][0]._.attr(\"Label\").RawValue.split(\"\\n\")[0],\n count: this.kindMap[kind].length\n });\n }\n return retVal;\n }\n\n vertices(kind: number): VertexType[] {\n const retVal: VertexType[] = [];\n for (const v of this.kindMap[kind]) {\n retVal.push(this.verticesMap[v._.Id]);\n }\n return retVal;\n }\n\n formatRow(item: ScopeEdge | ScopeSubgraph | ScopeVertex, columns, row) {\n const attrs = item._.formattedAttrs();\n for (const key in attrs) {\n const idx = columns.indexOf(key);\n if (idx === -1) {\n columns.push(key);\n row.push(attrs[key]);\n } else {\n row[idx] = attrs[key];\n }\n }\n for (let i = 0; i < 100; ++i) {\n if (row[i] === undefined) {\n row[i] = \"\";\n }\n }\n return row;\n }\n\n activityData(): { columns: string[], data: any[][] } {\n const columns = [\"Id\", \"Kind\", \"Label\"];\n const data = this.graphDB.vertices.map(v => {\n const row = [parseInt(v._.Id.split(\"a\")[1])];\n return this.formatRow(v, columns, row);\n });\n return { columns, data };\n }\n\n edgeData(): { columns: string[], data: any[][] } {\n const columns = [\"Id\", \"Label\"];\n const data = this.graphDB.edges.map(e => {\n const row = [e._.Id];\n return this.formatRow(e, columns, row);\n });\n return { columns, data };\n }\n\n subgraphData(): { columns: string[], data: any[][] } {\n const columns = [\"Id\", \"Label\"];\n const data = this.graphDB.subgraphs.map(sg => {\n const row = [sg._.Id];\n return this.formatRow(sg, columns, row);\n });\n return { columns, data };\n }\n\n calcGraphTooltip(item: VertexType | Edge) {\n let scope;\n let parentScope;\n if (item instanceof Subgraph) {\n const subgraph = this.rSubgraphsMap[item.id()];\n scope = subgraph._;\n parentScope = subgraph.parent._;\n } else if (item instanceof Vertex || item instanceof Icon) {\n const vertex = this.rVerticesMap[item.id()];\n scope = vertex._;\n parentScope = vertex.parent._;\n } else if (item instanceof Edge) {\n const edge = this.rEdgesMap[item.id()];\n scope = edge._;\n parentScope = edge.parent._;\n }\n if (scope) {\n return scope.calcTooltip(parentScope);\n }\n return \"\";\n }\n\n subgraph(id: string): Subgraph | undefined {\n return this.subgraphsMap[id];\n }\n\n vertex(id: string): VertexType | undefined {\n return this.verticesMap[id];\n }\n\n edge(id: string): Edge {\n return this.edgesMap[id];\n }\n\n // Events ---\n minClick(sg: Subgraph) {\n }\n}\n","import { Button, Spacer, ToggleButton, Widget } from \"@hpcc-js/common\";\nimport { ScopeGraph, Workunit } from \"@hpcc-js/comms\";\nimport { Table } from \"@hpcc-js/dgrid\";\nimport { Graph as GraphWidget, Subgraph, Vertex } from \"@hpcc-js/graph\";\nimport { Carousel, ChartPanel } from \"@hpcc-js/layout\";\nimport { hashSum } from \"@hpcc-js/util\";\nimport { WUGraphLegend } from \"./WUGraphLegend.ts\";\nimport { WUScopeController } from \"./WUScopeController.ts\";\n\nimport \"../src/WUGraph.css\";\n\nexport class WUGraph extends ChartPanel {\n\n private _partialAll = new Button().faChar(\"fa-window-restore\").tooltip(\"Partial All\")\n .on(\"click\", () => {\n this.stateClick(this._partialAll);\n });\n\n private _maxAll = new Button().faChar(\"fa-window-maximize\").tooltip(\"Max All\")\n .on(\"click\", () => {\n this.stateClick(this._maxAll);\n });\n\n private _toggleGraph = new ToggleButton().faChar(\"fa-chain\").tooltip(\"Graph\")\n .selected(true)\n .on(\"click\", () => {\n this.viewClick(this._toggleGraph);\n });\n\n private _toggleActivities = new ToggleButton().faChar(\"fa-table\").tooltip(\"Activitiies\")\n .selected(false)\n .on(\"click\", () => {\n this.viewClick(this._toggleActivities);\n });\n\n private _toggleEdges = new ToggleButton().faChar(\"fa-table\").tooltip(\"Edges\")\n .selected(false)\n .on(\"click\", () => {\n this.viewClick(this._toggleEdges);\n });\n\n private _toggleSubgraphs = new ToggleButton().faChar(\"fa-table\").tooltip(\"Subgraphs\")\n .selected(false)\n .on(\"click\", () => {\n this.viewClick(this._toggleSubgraphs);\n });\n\n protected _graph = new GraphWidget()\n .layout(\"Hierarchy\")\n .applyScaleOnLayout(true)\n .showToolbar(false)\n .allowDragging(false)\n ;\n\n private _activities = new Table()\n .pagination(false)\n ;\n\n private _edges = new Table()\n .pagination(false)\n ;\n\n private _subgraphs = new Table()\n .pagination(false)\n ;\n\n protected _legend = new WUGraphLegend(this)\n .on(\"click\", kind => {\n this.render();\n })\n .on(\"mouseover\", kind => {\n const verticesMap: { [id: string]: boolean } = {};\n for (const vertex of this._gc.vertices(kind)) {\n verticesMap[vertex.id()] = true;\n }\n this._graph.highlightVerticies(verticesMap);\n })\n .on(\"mouseout\", kind => {\n this._graph.highlightVerticies();\n })\n ;\n\n protected _view = new Carousel().widgets([this._graph, this._activities, this._edges, this._subgraphs]);\n\n protected _gc = new WUScopeController();\n\n constructor() {\n super();\n this.topOverlay(false);\n this.widget(this._view);\n const buttons: Widget[] = [\n this._toggleGraph,\n this._toggleActivities,\n this._toggleEdges,\n this._toggleSubgraphs,\n new Spacer(),\n this._partialAll,\n this._maxAll,\n new Spacer(),\n ...this._graph.iconBarButtons(),\n new Spacer()];\n this.buttons(buttons.concat(this.buttons()));\n this._gc.minClick = (sg: Subgraph) => {\n this.loadGraph();\n this._graph.render(w => {\n this._graph\n .selection([sg])\n .centerOnItem(sg)\n ;\n });\n };\n\n this._graph.tooltipHTML((v: Vertex) => {\n return this._gc.calcGraphTooltip(v);\n });\n }\n\n stateClick(sourceB: Button) {\n switch (sourceB) {\n case this._partialAll:\n this._graph.data().subgraphs.forEach((sg: Subgraph) => {\n sg.minState(\"partial\");\n });\n break;\n case this._maxAll:\n this._graph.data().subgraphs.forEach((sg: Subgraph) => {\n sg.minState(\"normal\");\n });\n break;\n }\n this.render();\n }\n\n viewClick(sourceTB: ToggleButton) {\n this._toggleGraph.selected(sourceTB === this._toggleGraph);\n this._toggleActivities.selected(sourceTB === this._toggleActivities);\n this._toggleEdges.selected(sourceTB === this._toggleEdges);\n this._toggleSubgraphs.selected(sourceTB === this._toggleSubgraphs);\n switch (sourceTB) {\n case this._toggleGraph:\n this._view.active(0);\n break;\n case this._toggleActivities:\n this._view.active(1);\n break;\n case this._toggleEdges:\n this._view.active(2);\n break;\n case this._toggleSubgraphs:\n this._view.active(3);\n break;\n }\n this.render(w => {\n });\n }\n\n private _prevHashSum;\n private _prevScopeGraph: ScopeGraph;\n fetchScopeGraph(): Promise<ScopeGraph> {\n const hash = hashSum({\n baseUrl: this.baseUrl(),\n wuid: this.wuid(),\n graphID: this.graphID(),\n subgraphID: this.subgraphID()\n });\n if (!this._prevScopeGraph || this._prevHashSum !== hash) {\n this.startProgress();\n this._prevHashSum = hash;\n this._gc.clear();\n const wu = Workunit.attach({ baseUrl: this.baseUrl() }, this.wuid());\n return wu.fetchGraphs().then(graphs => {\n for (const graph of graphs) {\n if (graph.Name === this.graphID()) {\n this.finishProgress();\n return graph.fetchScopeGraph(this.subgraphID());\n }\n }\n }).then(scopeGraph => {\n this._prevScopeGraph = scopeGraph;\n return this._prevScopeGraph;\n });\n }\n return Promise.resolve(this._prevScopeGraph);\n }\n\n enter(domNode, _element) {\n super.enter(domNode, _element);\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n }\n\n exit(domNode, element) {\n super.exit(domNode, element);\n }\n\n loadGraph() {\n this._gc.disabled(this._legend.disabled());\n this._graph\n .data(this._gc.graphData(), true)\n ;\n {\n const { columns, data } = this._gc.activityData();\n this._activities\n .columns(columns)\n .data(data)\n ;\n }\n {\n const { columns, data } = this._gc.edgeData();\n this._edges\n .columns(columns)\n .data(data)\n ;\n }\n {\n const { columns, data } = this._gc.subgraphData();\n this._subgraphs\n .columns(columns)\n .data(data)\n ;\n }\n }\n\n render(callback?: (w: Widget) => void): this {\n if (this.wuid() && this.graphID()) {\n this.fetchScopeGraph().then(scopedGraph => {\n this._gc.set(scopedGraph);\n this._legend.data(this._gc.calcLegend());\n this.loadGraph();\n super.render(callback);\n });\n } else {\n super.render(callback);\n }\n return this;\n }\n\n selection(_?) {\n if (!arguments.length) return this._graph.selection();\n const item = this._gc.vertex(_) || this._gc.edge(_) || this._gc.subgraph(_);\n if (item) {\n this._graph.selection([item]);\n }\n return this;\n }\n}\nWUGraph.prototype._class += \" eclwatch_WUGraph\";\n\nexport interface WUGraph {\n baseUrl(): string;\n baseUrl(_: string): this;\n wuid(): string;\n wuid(_: string): this;\n graphID(): string;\n graphID(_: string): this;\n subgraphID(): string;\n subgraphID(_: string): this;\n}\n\nWUGraph.prototype.publish(\"baseUrl\", \"\", \"string\", \"HPCC Platform Base URL\");\nWUGraph.prototype.publish(\"wuid\", \"\", \"string\", \"Workunit ID\");\nWUGraph.prototype.publish(\"graphID\", \"\", \"string\", \"Graph ID\");\nWUGraph.prototype.publish(\"subgraphID\", \"\", \"string\", \"Subgraph ID\");\n","import { ResultFilter, Result, XSDSchema, XSDXMLNode } from \"@hpcc-js/comms\";\nimport { ColumnType, Deferred, domConstruct, QueryResults, RowFormatter } from \"@hpcc-js/dgrid\";\n\nfunction entitiesEncode(str) {\n return String(str).replace(/&/g, \"&\").replace(/</g, \"<\").replace(/>/g, \">\").replace(/\"/g, \""\");\n}\n\nfunction safeEncode(item) {\n switch (Object.prototype.toString.call(item)) {\n case \"[object Undefined]\":\n case \"[object Boolean]\":\n case \"[object Number]\":\n return item;\n case \"[object String]\":\n return entitiesEncode(item);\n default:\n console.warn(\"Unknown cell type: \" + Object.prototype.toString.call(item)); \n }\n return item;\n}\n\nexport class Store {\n protected wuResult: Result;\n protected schema: XSDSchema;\n protected _columns: any[];\n protected _cache: { [key: string]: Promise<{ totalLength: number, data: any[] }> } = {};\n private rowFormatter: RowFormatter;\n protected _filter: ResultFilter = {};\n\n constructor(wuResult: Result, schema: XSDSchema, renderHtml: boolean, filter: ResultFilter = {}) {\n this.wuResult = wuResult;\n this.schema = schema;\n this._columns = this.schema2Columns(this.schema.root);\n this.rowFormatter = new RowFormatter(this._columns, renderHtml);\n this._filter = filter;\n }\n\n columns() {\n return this._columns;\n }\n\n schema2Columns(parentNode: XSDXMLNode, prefix: string = \"\"): ColumnType[] {\n if (!parentNode) return [];\n return parentNode.children().filter(node => node.name.indexOf(\"__hidden\", node.name.length - \"__hidden\".length) === -1).map((node, idx) => {\n const label = node.name;\n const keyed = node.attrs[\"hpcc:keyed\"];\n const column: ColumnType = {\n field: prefix + label,\n leafID: label,\n idx,\n label: label + (keyed ? \" (i)\" : \"\"),\n className: \"resultGridCell\",\n sortable: false,\n width: keyed ? 16 : 0,\n isSet: node.isSet\n };\n const children = this.schema2Columns(node, prefix + label + \"_\");\n if (children.length) {\n column.width += 10 + children.reduce((prev: number, childNode: ColumnType) => {\n return prev + childNode.width!;\n }, 0);\n column.children = children;\n } else {\n column.width += node.charWidth() * 9;\n column.formatter = (cell, row) => {\n switch (typeof cell) {\n case \"string\":\n return {\n html: cell.replace(/\\t/g, \" \").trim()\n };\n case \"undefined\":\n return \"\";\n }\n return cell;\n };\n }\n return column;\n });\n }\n\n isChildDataset(cell) {\n if (Object.prototype.toString.call(cell) !== \"[object Object]\") {\n return false;\n }\n let propCount = 0;\n let firstPropType = null;\n for (const key in cell) {\n if (!firstPropType) {\n firstPropType = Object.prototype.toString.call(cell[key]);\n }\n propCount++;\n }\n return propCount === 1 && firstPropType === \"[object Array]\";\n }\n\n rowToTable(cell, __row, node) {\n if (this.isChildDataset(cell)) { // Don't display \"Row\" as a header ---\n for (const key in cell) {\n this.rowToTable(cell[key], __row, node);\n }\n return;\n }\n\n const table = domConstruct.create(\"table\", { border: 1, cellspacing: 0, width: \"100%\" }, node);\n switch (Object.prototype.toString.call(cell)) {\n case \"[object Object]\":\n let tr = domConstruct.create(\"tr\", null, table);\n for (const key in cell) {\n domConstruct.create(\"th\", { innerHTML: safeEncode(key) }, tr);\n }\n tr = domConstruct.create(\"tr\", null, table);\n for (const key in cell) {\n switch (Object.prototype.toString.call(cell[key])) {\n case \"[object Object]\":\n case \"[object Array]\":\n this.rowToTable(cell[key], __row, node);\n break;\n default:\n domConstruct.create(\"td\", { innerHTML: safeEncode(cell[key]) }, tr);\n break;\n }\n }\n break;\n case \"[object Array]\":\n for (let i = 0; i < cell.length; ++i) {\n switch (Object.prototype.toString.call(cell[i])) {\n case \"[object Boolean]\":\n case \"[object Number]\":\n case \"[object String]\":\n // Item in Scalar ---\n const tr1 = domConstruct.create(\"tr\", null, table);\n domConstruct.create(\"td\", { innerHTML: safeEncode(cell[i]) }, tr1);\n break;\n default:\n // Child Dataset ---\n if (i === 0) {\n const tr2 = domConstruct.create(\"tr\", null, table);\n for (const key in cell[i]) {\n domConstruct.create(\"th\", { innerHTML: safeEncode(key) }, tr2);\n }\n }\n domConstruct.create(\"tr\", null, table);\n for (const key in cell[i]) {\n if (cell[i][key]) {\n if (Object.prototype.toString.call(cell[i][key]) === \"[object Object]\" || Object.prototype.toString.call(cell[i][key]) === \"[object Array]\") {\n const td = domConstruct.create(\"td\", null, tr1);\n this.rowToTable(cell[i][key], cell[i], td);\n } else if (key.indexOf(\"__html\", key.length - \"__html\".length) !== -1) {\n domConstruct.create(\"td\", { innerHTML: cell[i][key] }, tr1);\n } else if (key.indexOf(\"__javascript\", key.length - \"__javascript\".length) !== -1) {\n /*const td = */ domConstruct.create(\"td\", null, tr1);\n // this.injectJavascript(cell[i][key], cell[i], td);\n } else {\n const val = cell[i][key];\n domConstruct.create(\"td\", { innerHTML: safeEncode(val) }, tr1);\n }\n } else {\n domConstruct.create(\"td\", { innerHTML: \"\" }, tr1);\n }\n }\n }\n }\n break;\n }\n }\n\n getIdentity(row) {\n return row.__hpcc_id;\n }\n\n _request(start, end): Promise<{ totalLength: number, data: any[] }> {\n if (!this.wuResult) return Promise.resolve({ totalLength: 0, data: [] });\n const cacheKey = `${start}->${end}`;\n if (this._cache[cacheKey]) return this._cache[cacheKey];\n const retVal = this.wuResult.fetchRows(start, end - start, false, this._filter).then((rows: any[]) => {\n return {\n totalLength: this.wuResult.Total,\n data: rows.map((row, idx) => {\n const formattedRow: any = this.rowFormatter.format(row);\n formattedRow.__hpcc_id = start + idx;\n formattedRow.__hpcc_orig = row;\n return formattedRow;\n })\n };\n });\n this._cache[cacheKey] = retVal;\n return retVal;\n }\n\n fetchRange(options): Promise<any[]> {\n const retVal = new Deferred();\n this._request(options.start, options.end).then(response => retVal.resolve(response));\n return new QueryResults(retVal.then(response => response.data), {\n totalLength: retVal.then(response => response.totalLength)\n });\n }\n}\n","import { ResultFilter, IOptions, Result } from \"@hpcc-js/comms\";\nimport { Common } from \"@hpcc-js/dgrid\";\nimport { hashSum } from \"@hpcc-js/util\";\nimport { Store } from \"./WUResultStore.ts\";\n\nexport class WUResult extends Common {\n\n protected _result: Result;\n protected _localStore: Store;\n\n constructor() {\n super();\n this.renderHtml(false);\n }\n\n hashSum(opts: any = {}) {\n return hashSum({\n baseUrl: this.baseUrl(),\n wuid: this.wuid(),\n resultName: this.resultName(),\n sequence: this.sequence(),\n nodeGroup: this.nodeGroup(),\n logicalFile: this.logicalFile(),\n userID: this.user(),\n password: this.password(),\n ...opts\n });\n }\n\n protected _prevResultHash: string;\n calcResult(): Result | null {\n const resultHash = this.hashSum();\n if (this._prevResultHash !== resultHash) {\n this._prevResultHash = resultHash;\n\n const opts: IOptions = {\n baseUrl: this.baseUrl(),\n userID: this.user(),\n password: this.password()\n };\n if (this.wuid() && this.resultName()) {\n this._result = Result.attach(opts, this.wuid(), this.resultName());\n } else if (this.wuid() && this.sequence() !== undefined) {\n this._result = Result.attach(opts, this.wuid(), this.sequence());\n } else if (this.logicalFile() && this.nodeGroup()) {\n this._result = Result.attachLogicalFile(opts, this.nodeGroup(), this.logicalFile());\n } else if (this.logicalFile()) {\n this._result = Result.attachLogicalFile(opts, \"\", this.logicalFile());\n }\n }\n return this._result;\n }\n\n fetch(row, count, abortController = new AbortController()): Promise<object[]> {\n const result = this.calcResult();\n if (result) {\n return result.fetchRows(row, count, false, {}, abortController.signal);\n }\n return Promise.resolve([]);\n }\n\n protected _prevStoreHash: string;\n protected _prevQueryHash: string;\n update(domNode, element) {\n super.update(domNode, element);\n const storeHash = this.hashSum({\n renderHtml: this.renderHtml(),\n filter: this.filter()\n });\n if (this._prevStoreHash !== storeHash) {\n this._prevStoreHash = storeHash;\n const result = this.calcResult();\n if (result) {\n result.fetchXMLSchema().then(schema => {\n this._localStore = new Store(result, schema, this.renderHtml(), this.filter());\n this._dgrid?.set(\"columns\", this._localStore.columns());\n this._dgrid?.set(\"collection\", this._localStore);\n });\n }\n }\n }\n\n click(row, col, sel) {\n }\n}\nWUResult.prototype._class += \" eclwatch_WUResult\";\n\nexport interface WUResult {\n baseUrl(): string;\n baseUrl(_: string): this;\n user(): string;\n user(_: string): this;\n password(): string;\n password(_: string): this;\n wuid(): string;\n wuid(_: string): this;\n resultName(): string;\n resultName(_: string): this;\n sequence(): number;\n sequence(_: number): this;\n nodeGroup(): string;\n nodeGroup(_: string): this;\n logicalFile(): string;\n logicalFile(_: string): this;\n filter(): ResultFilter;\n filter(_: ResultFilter): this;\n}\n\nWUResult.prototype.publish(\"baseUrl\", \"\", \"string\", \"URL to WsWorkunits\");\nWUResult.prototype.publish(\"user\", \"\", \"string\", \"User ID\");\nWUResult.prototype.publish(\"password\", \"\", \"string\", \"Password\");\nWUResult.prototype.publish(\"wuid\", \"\", \"string\", \"Workunit ID\");\nWUResult.prototype.publish(\"resultName\", \"\", \"string\", \"Result Name\");\nWUResult.prototype.publish(\"sequence\", undefined, \"number\", \"Sequence Number\");\nWUResult.prototype.publish(\"nodeGroup\", \"\", \"string\", \"NodeGroup\");\nWUResult.prototype.publish(\"logicalFile\", \"\", \"string\", \"Logical File Name\");\nWUResult.prototype.publish(\"filter\", {}, \"object\", \"Filter\");\n","import { Workunit, WUStateID } from \"@hpcc-js/comms\";\nimport { Edge, Graph, Vertex } from \"@hpcc-js/graph\";\nimport { hashSum, IObserverHandle } from \"@hpcc-js/util\";\n\nexport enum STATUS {\n CREATE = \"Created\",\n COMPILE = \"Compiled\",\n EXECUTE = \"Executed\",\n COMPLETE = \"Completed\"\n}\n\nexport enum STATUS_ACTIVE {\n CREATE = \"Creating\",\n COMPILE = \"Compiling\",\n EXECUTE = \"Executing\",\n COMPLETE = \"Completed\"\n}\n\nexport class WUStatus extends Graph {\n\n protected _wu: Workunit;\n protected _wuHandle: IObserverHandle;\n\n protected _create: Vertex;\n protected _compile: Vertex;\n protected _execute: Vertex;\n protected _complete: Vertex;\n\n constructor() {\n super();\n this\n .zoomable(false)\n .zoomToFitLimit(1)\n .layout(\"Hierarchy\")\n .hierarchyRankDirection(\"LR\")\n .showToolbar(false)\n .allowDragging(false)\n ;\n }\n\n private _prevHash;\n attachWorkunit() {\n const hash = hashSum({\n baseUrl: this.baseUrl(),\n wuid: this.wuid()\n });\n if (this._prevHash !== hash) {\n this._prevHash = hash;\n this._wu = Workunit.attach({ baseUrl: this.baseUrl() }, this.wuid());\n if (this._wuHandle) {\n this._wuHandle.release();\n }\n this._wuHandle = this._wu.watch(changes => {\n this.lazyRender();\n });\n }\n }\n\n createVertex(faChar: string) {\n return new Vertex()\n .icon_diameter(32)\n .icon_shape_colorFill(\"none\")\n .icon_shape_colorStroke(\"none\")\n .icon_image_colorFill(\"darkgray\")\n .iconAnchor(\"middle\")\n .textbox_shape_colorFill(\"none\")\n .textbox_shape_colorStroke(\"none\")\n .textbox_text_colorFill(\"darkgray\")\n .faChar(faChar)\n ;\n }\n\n updateVertex(vertex: Vertex, color: string) {\n vertex\n .icon_image_colorFill(color)\n .textbox_text_colorFill(color)\n ;\n }\n\n updateVertexStatus(level: 0 | 1 | 2 | 3 | 4, active: boolean = false) {\n const completeColor = this._wu.isFailed() ? \"darkred\" : \"darkgreen\";\n this._create.text(STATUS.CREATE);\n this._compile.text(STATUS.COMPILE);\n this._execute.text(STATUS.EXECUTE);\n this._complete.text(STATUS.COMPLETE);\n switch (level) {\n case 0:\n this.updateVertex(this._create, \"darkgray\");\n this.updateVertex(this._compile, \"darkgray\");\n this.updateVertex(this._execute, \"darkgray\");\n this.updateVertex(this._complete, \"darkgray\");\n break;\n case 1:\n this._create.text(STATUS_ACTIVE.CREATE);\n this.updateVertex(this._create, active ? \"orange\" : completeColor);\n this.updateVertex(this._compile, \"darkgray\");\n this.updateVertex(this._execute, \"darkgray\");\n this.updateVertex(this._complete, \"darkgray\");\n break;\n case 2:\n this._compile.text(STATUS_ACTIVE.COMPILE);\n this.updateVertex(this._create, completeColor);\n this.updateVertex(this._compile, active ? \"orange\" : completeColor);\n this.updateVertex(this._execute, completeColor);\n this.updateVertex(this._complete, \"darkgray\");\n break;\n case 3:\n this._execute.text(STATUS_ACTIVE.EXECUTE);\n this.updateVertex(this._create, completeColor);\n this.updateVertex(this._compile, completeColor);\n this.updateVertex(this._execute, active ? \"orange\" : completeColor);\n this.updateVertex(this._complete, \"darkgray\");\n break;\n case 4:\n this.updateVertex(this._create, completeColor);\n this.updateVertex(this._compile, completeColor);\n this.updateVertex(this._execute, completeColor);\n this.updateVertex(this._complete, completeColor);\n break;\n }\n }\n\n createEdge(source, target) {\n return new Edge()\n .sourceVertex(source)\n .targetVertex(target)\n .strokeColor(\"black\")\n .showArc(false)\n ;\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n this._create = this.createVertex(\"\\uf11d\");\n this._compile = this.createVertex(\"\\uf085\");\n this._execute = this.createVertex(\"\\uf275\");\n this._complete = this.createVertex(\"\\uf11e\");\n const e1 = this.createEdge(this._create, this._compile);\n const e2 = this.createEdge(this._compile, this._execute);\n const e3 = this.createEdge(this._execute, this._complete);\n this.data({\n vertices: [this._create, this._compile, this._execute, this._complete],\n edges: [e1, e2, e3]\n });\n }\n\n update(domNode, element) {\n this.attachWorkunit();\n switch (this._wu.StateID) {\n case WUStateID.Blocked:\n case WUStateID.Wait:\n case WUStateID.Scheduled:\n case WUStateID.UploadingFiled:\n this.updateVertexStatus(1);\n break;\n case WUStateID.Compiling:\n this.updateVertexStatus(2, true);\n break;\n case WUStateID.Submitted:\n this.updateVertexStatus(1, true);\n break;\n case WUStateID.Compiled:\n this.updateVertexStatus(2);\n break;\n case WUStateID.Aborting:\n case WUStateID.Running:\n this.updateVertexStatus(3, true);\n break;\n case WUStateID.Aborted:\n case WUStateID.Archived:\n case WUStateID.Completed:\n this.updateVertexStatus(4);\n break;\n case WUStateID.Failed:\n this.updateVertexStatus(4, false);\n break;\n case WUStateID.DebugPaused:\n case WUStateID.DebugRunning:\n case WUStateID.Paused:\n case WUStateID.Unknown:\n default:\n this.updateVertexStatus(0);\n break;\n }\n super.update(domNode, element);\n this.zoomToFit();\n }\n\n exit(domNode, element) {\n if (this._wuHandle) {\n this._wuHandle.release();\n }\n super.exit(domNode, element);\n }\n}\nWUStatus.prototype._class += \" eclwatch_WUStatus\";\n\nexport interface WUStatus {\n baseUrl(): string;\n baseUrl(_: string): this;\n wuid(): string;\n wuid(_: string): this;\n}\n\nWUStatus.prototype.publish(\"baseUrl\", \"\", \"string\", \"HPCC Platform Base URL\");\nWUStatus.prototype.publish(\"wuid\", \"\", \"string\", \"Workunit ID\");\n","import { Palette } from \"@hpcc-js/common\";\nimport { Scope, Workunit, WsWorkunits } from \"@hpcc-js/comms\";\nimport { ReactTimelineSeries } from \"@hpcc-js/timeline\";\nimport { hashSum, RecursivePartial } from \"@hpcc-js/util\";\n\nimport \"../src/WUGraph.css\";\n\nconst columns = [\"label\", \"start\", \"end\", \"icon\", \"color\", \"series\"];\n\nexport class WUTimeline extends ReactTimelineSeries {\n\n protected _palette = Palette.ordinal(\"default\");\n\n constructor() {\n super();\n this\n .columns(columns)\n .titleColumn(\"label\")\n .iconColumn(\"icon\")\n .colorColumn(\"color\")\n .seriesColumn(\"series\")\n .timePattern(\"%Y-%m-%dT%H:%M:%S.%LZ\")\n .tickFormat(\"%H:%M\")\n .tooltipTimeFormat(\"%H:%M:%S.%L\")\n .tooltipHTML(d => {\n return d[columns.length].calcTooltip();\n })\n ;\n }\n\n private _prevHashSum;\n clear(): this {\n delete this._prevHashSum;\n return this;\n }\n fetchScopes() {\n const hash = hashSum({\n baseUrl: this.baseUrl(),\n wuid: this.wuid(),\n request: this.request()\n });\n if (this._prevHashSum !== hash) {\n this._prevHashSum = hash;\n const wu = Workunit.attach({ baseUrl: this.baseUrl() }, this.wuid());\n wu.fetchDetails(this.request()).then(scopes => {\n return scopes.filter(scope => scope.Id && scope.attr(\"WhenStarted\").RawValue).map((scope: Scope) => {\n const whenStarted = +scope.attr(\"WhenStarted\").RawValue / 1000;\n const timeElapsed = +scope.attr(\"TimeElapsed\").RawValue / 1000000;\n return [\n scope.Id,\n new Date(whenStarted).toISOString(),\n timeElapsed ? new Date(whenStarted + timeElapsed).toISOString() : undefined,\n null,\n this._palette(scope.ScopeType),\n scope.ScopeName.split(\"::\").join(\":\").split(\":\").slice(0, 1),\n scope\n ];\n });\n }).then(scopes => {\n this\n .data(scopes)\n .render()\n ;\n });\n }\n }\n\n enter(domNode, _element) {\n super.enter(domNode, _element);\n }\n\n update(domNode, element) {\n this.fetchScopes();\n super.update(domNode, element);\n }\n\n exit(domNode, element) {\n super.exit(domNode, element);\n }\n}\nWUTimeline.prototype._class += \" eclwatch_WUTimeline\";\n\nexport interface WUTimeline {\n baseUrl(): string;\n baseUrl(_: string): this;\n wuid(): string;\n wuid(_: string): this;\n request(): Partial<WsWorkunits.WUDetails>;\n request(_: RecursivePartial<WsWorkunits.WUDetails>): this;\n}\n\nWUTimeline.prototype.publish(\"baseUrl\", \"\", \"string\", \"HPCC Platform Base URL\");\nWUTimeline.prototype.publish(\"wuid\", \"\", \"string\", \"Workunit ID\");\nWUTimeline.prototype.publish(\"request\", {\n ScopeFilter: {\n MaxDepth: 3,\n ScopeTypes: [\"graph\", \"subgraph\"]\n },\n NestedFilter: {\n Depth: 0,\n ScopeTypes: []\n },\n PropertiesToReturn: {\n AllProperties: false,\n AllStatistics: true,\n AllHints: false,\n Properties: [\"WhenStarted\", \"TimeElapsed\"]\n },\n ScopeOptions: {\n IncludeId: true,\n IncludeScope: true,\n IncludeScopeType: true\n },\n PropertyOptions: {\n IncludeName: true,\n IncludeRawValue: true,\n IncludeFormatted: true,\n IncludeMeasure: true,\n IncludeCreator: false,\n IncludeCreatorType: false\n }\n}, \"object\", \"WUDetails Request\");\n"],"names":["_node","d3Local","bbox","d3Select","UtilSubgraph","UtilVertex","UtilEdge","Subgraph","Edge","columns","GraphWidget","STATUS","STATUS_ACTIVE"],"mappings":";;;;;;;;;;;;;AAAO,MAAM,WAAW,qBACX,cAAc,SACd,gBAAgB;ACItB,MAAM,yBAAyB,WAAW;AAAA,EAQ7C,cAAc;AACV,UAAM,YAAY;AARd;AACA;AACD,0CAAiB,IAAI,cAAc;AACnC,2CAAkB,IAAI,SACxB,KAAK,EAAE;AAKH,SAAA,eAAe,WAAW,CAAC,SAAS;AACrC,WAAK,gBACA,KAAK,IAAI,EACT,OAAO;AAAA,IAEhB;AAAA,EAAA;AAAA,EAGM,yBAAyB,MAAM;AACrC,UAAM,MAAM;AAAA,MACR,OAAO,KAAK;AAAA,MACZ,UAAU,KAAK,UAAU,IAAI,aAAa,EAAE,OAAO,OAAK,CAAC;AAAA,IAC7D;AAEI,QAAA,IAAI,YAAY,IAAI,SAAS,CAAC,KAAK,IAAI,SAAS,CAAC,EAAE,UAAU;AAEtD,aAAA;AAAA,QACH,OAAO;AAAA,QACP,UAAU;AAAA,UACN;AAAA,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AAc;AAAA,IACd,kBAAkB;AAAA,EACtB;AAAA,EACA,iBAAiB;AAAA,IACb,aAAa;AAAA,IACb,iBAAiB;AAAA,IACjB,kBAAkB;AAAA,IAClB,gBAAgB;AAAA,IAChB,gBAAgB;AAAA,IAChB,oBAAoB;AAAA,EAAA;AAE5B,GAAG,UAAU,mBAAmB;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/__package__.ts","../src/ECLArchiveViewer.ts","../src/WUGraphLegend.ts","../src/WUScopeController.ts","../src/WUGraph.ts","../src/WUResultStore.ts","../src/WUResult.ts","../src/WUStatus.ts","../src/WUTimeline.ts"],"sourcesContent":["export const PKG_NAME = \"@hpcc-js/eclwatch\";\nexport const PKG_VERSION = \"3.1.1\";\nexport const BUILD_VERSION = \"3.2.1\";\n","import { Editor } from \"@hpcc-js/codemirror\";\nimport { Workunit } from \"@hpcc-js/comms\";\nimport { SplitPanel } from \"@hpcc-js/phosphor\";\nimport { DirectoryTree } from \"@hpcc-js/tree\";\nimport { hashSum, xml2json } from \"@hpcc-js/util\";\n\nexport class ECLArchiveViewer extends SplitPanel {\n private _prevHash;\n private _contentStr;\n public _directoryPane = new DirectoryTree();\n public _fileEditorPane = new Editor()\n .text(\"\")\n ;\n\n constructor() {\n super(\"horizontal\");\n this._directoryPane.rowClick = (text) => {\n this._fileEditorPane\n .text(text)\n .render()\n ;\n };\n }\n\n protected transformArchiveTreeData(json) {\n const ret = {\n label: json.name,\n children: json._children.map(transformNode).filter(n => n)\n };\n\n if (ret.children && ret.children[0] && ret.children[0].label === \"html\") {\n // must be parsererror\n return {\n label: \"root\",\n children: [\n {\n label: \"error\",\n content: JSON.stringify(ret, null, 4)\n }\n ]\n };\n }\n return ret;\n\n function transformNode(node) {\n const _node: any = {};\n _node.label = node.name + (node[\"$\"] && node[\"$\"].key ? ` (${node[\"$\"].key})` : \"\");\n if (node._children && node._children.length > 0) {\n _node.children = node._children.map(_node => {\n return transformNode(_node);\n })\n .filter(n => n)\n ;\n } else if (typeof node.content === \"string\" && node.content.trim()) {\n _node.content = node.content;\n } else {\n return false;\n }\n return _node;\n }\n }\n\n updateDirectoryPane(contentStr) {\n let json;\n if (contentStr) {\n try {\n json = JSON.parse(contentStr);\n } catch (e) {\n json = xml2json(contentStr);\n }\n }\n if (json) {\n const _data = this.transformArchiveTreeData(json);\n this._directoryPane\n .data(_data)\n .render()\n ;\n }\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n this\n .addWidget(this._directoryPane)\n .addWidget(this._fileEditorPane)\n ;\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n\n const hash = hashSum({\n baseUrl: this.baseUrl(),\n wuid: this.wuid()\n });\n\n if (this._prevHash !== hash || typeof this._contentStr === \"undefined\") {\n Workunit.attach({ baseUrl: this.baseUrl() }, this.wuid())\n .fetchArchive()\n .then(resp => {\n\n this._contentStr = resp;\n this.updateDirectoryPane(this._contentStr);\n\n this._prevHash = hash;\n });\n } else {\n this.updateDirectoryPane(this._contentStr);\n }\n\n this.relativeSizes([this.directoryWidthRatio(), 1 - this.directoryWidthRatio()]);\n }\n}\nECLArchiveViewer.prototype._class += \" eclwatch_ECLArchiveViewer\";\n\nexport interface ECLArchiveViewer {\n directoryPaneColor(): string;\n directoryPaneColor(_: string): this;\n directoryPaneHoverColor(): string;\n directoryPaneHoverColor(_: string): this;\n fontColor(): string;\n fontColor(_: string): this;\n fontFamily(): string;\n fontFamily(_: string): this;\n fontSize(): number;\n fontSize(_: number): this;\n fileIconSize(): number;\n fileIconSize(_: number): this;\n folderIconOpen(): string;\n folderIconOpen(_: string): this;\n folderIconClosed(): string;\n folderIconClosed(_: string): this;\n textFileIcon(): string;\n textFileIcon(_: string): this;\n codeFileIcon(): string;\n codeFileIcon(_: string): this;\n verticalScroll(): boolean;\n verticalScroll(_: boolean): this;\n directoryWidthRatio(): number;\n directoryWidthRatio(_: number): this;\n baseUrl(): string;\n baseUrl(_: string): this;\n wuid(): string;\n wuid(_: string): this;\n}\nECLArchiveViewer.prototype.publish(\"baseUrl\", \"\", \"string\", \"HPCC Platform Base URL\");\nECLArchiveViewer.prototype.publish(\"wuid\", \"\", \"string\", \"Workunit ID\");\nECLArchiveViewer.prototype.publish(\"directoryWidthRatio\", 0.38, \"number\", \"Default directory panel width ratio relative to the full width\");\nECLArchiveViewer.prototype.publish(\"contentString\", null, \"string\", \"XML/JSON archive content string\");\nECLArchiveViewer.prototype.publishProxy(\"directoryPaneColor\", \"_directoryPane\", \"backgroundColor\");\nECLArchiveViewer.prototype.publishProxy(\"directoryPaneHoverColor\", \"_directoryPane\", \"hoverBackgroundColor\");\nECLArchiveViewer.prototype.publishProxy(\"iconSize\", \"_directoryPane\");\nECLArchiveViewer.prototype.publishProxy(\"fontColor\", \"_directoryPane\");\nECLArchiveViewer.prototype.publishProxy(\"fontFamily\", \"_directoryPane\");\nECLArchiveViewer.prototype.publishProxy(\"fontSize\", \"_directoryPane\");\nECLArchiveViewer.prototype.publishProxy(\"folderIconOpen\", \"_directoryPane\");\nECLArchiveViewer.prototype.publishProxy(\"folderIconClosed\", \"_directoryPane\");\nECLArchiveViewer.prototype.publishProxy(\"textFileIcon\", \"_directoryPane\");\nECLArchiveViewer.prototype.publishProxy(\"codeFileIcon\", \"_directoryPane\");\nECLArchiveViewer.prototype.publishProxy(\"verticalScroll\", \"_directoryPane\");\n","import { Vertex } from \"@hpcc-js/graph\";\nimport { Legend } from \"@hpcc-js/layout\";\nimport { local as d3Local, select as d3Select } from \"d3-selection\";\n\nimport \"../src/WUGraphLegend.css\";\n\nexport interface WUGraphLegendData {\n kind: number;\n faChar: string;\n label: string;\n count: number;\n}\n\nclass LegendVertex extends Vertex {\n\n constructor() {\n super();\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n this._icon.on(\"click\", () => {\n this.click(this.data());\n });\n }\n\n click(kind: number) {\n }\n}\n\nexport class WUGraphLegend extends Legend {\n\n private icon = d3Local<Vertex>();\n protected _disabled2: { [kind: number]: boolean } = {\n /* TODO: Default some to disabled?\n 43: true,\n 71: true,\n 82: true,\n 88: true\n */\n };\n\n disabled(): number[];\n disabled(_: number[]): this;\n disabled(_?: number[]): number[] | this {\n if (!arguments.length) {\n const retVal = [];\n for (const key in this._disabled2) {\n if (this._disabled2[key]) {\n retVal.push(key);\n }\n }\n return retVal;\n }\n this._disabled2 = {};\n _.forEach(kind => this._disabled2[kind] = true);\n return this;\n }\n\n toggle(kind: number) {\n this._disabled2[kind] = !this._disabled2[kind];\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n\n const context = this;\n const items = this._g.selectAll(\".legendItem\").data(this.data(), (d: any) => d.kind);\n items.enter().append(\"g\")\n .attr(\"class\", \"legendItem\")\n .each(function (this: HTMLElement, d) {\n context.icon.set(this, new LegendVertex()\n .target(this)\n .data(d.kind)\n .textbox_shape_colorStroke(\"none\")\n .textbox_shape_colorFill(\"none\")\n .iconAnchor(\"left\")\n .faChar(d.faChar)\n .text(`${d.label} (${d.count})`)\n .tooltip(`${d.kind} - ${d.label}`)\n .on(\"click\", kind => {\n context.toggle(kind);\n context.render();\n context.click(kind);\n })\n .on(\"mouseover\", kind => {\n context.mouseover(kind);\n })\n .on(\"mouseout\", kind => {\n context.mouseout(kind);\n })\n );\n })\n .merge(items)\n .each(function (this: HTMLElement, d, i) {\n const bbox = context.icon.get(this)\n .icon_shape_colorFill(context._disabled2[d.kind] ? \"gray\" : null)\n .render().getBBox();\n\n d3Select(this)\n .attr(\"transform\", `translate(${+bbox.width / 2}, ${i * 30})`)\n ;\n })\n ;\n items.exit()\n .each(function (this: HTMLElement, d) {\n context.icon.get(this)\n .target(null)\n .render();\n })\n .remove();\n const bbox = this.getBBox(true, true);\n this._g.attr(\"transform\", `translate(16, ${this.height() / 2 - bbox.height / 2})`);\n }\n\n // Events ---\n click(kind: number) {\n }\n\n mouseover(kind: number) {\n }\n\n mouseout(kind: number) {\n }\n}\nWUGraphLegend.prototype._class += \" eclwatch_WUGraphLegend\";\n","import { Icon } from \"@hpcc-js/common\";\nimport { BaseScope, ScopeEdge, ScopeGraph, ScopeSubgraph, ScopeVertex } from \"@hpcc-js/comms\";\nimport { Edge, IGraphData, Lineage, Subgraph, Vertex } from \"@hpcc-js/graph\";\nimport { Edge as UtilEdge, Subgraph as UtilSubgraph, Vertex as UtilVertex } from \"@hpcc-js/util\";\nimport { WUGraphLegendData } from \"./WUGraphLegend.ts\";\n\nexport type VertexType = Vertex | Icon;\n\nexport interface MyGraphData {\n subgraphs: Subgraph[];\n vertices: VertexType[];\n edges: Edge[];\n hierarchy: Lineage[];\n}\n\nfunction faCharFactory(kind): string {\n switch (kind) {\n case \"2\": return \"\\uf0c7\"; // Disk Write\n case \"3\": return \"\\uf15d\"; // sort\n case \"5\": return \"\\uf0b0\"; // Filter\n case \"6\": return \"\\uf1e0\"; // Split\n case \"12\": return \"\\uf039\"; // First N\n case \"15\": return \"\\uf126\"; // Lightweight Join\n case \"17\": return \"\\uf126\"; // Lookup Join\n case \"22\": return \"\\uf1e6\"; // Pipe Output\n case \"23\": return \"\\uf078\"; // Funnel\n case \"25\": return \"\\uf0ce\"; // Inline Dataset\n case \"26\": return \"\\uf074\"; // distribute\n case \"29\": return \"\\uf005\"; // Store Internal Result\n case \"36\": return \"\\uf128\"; // If\n case \"44\": return \"\\uf0c7\"; // write csv\n case \"47\": return \"\\uf0c7\"; // write\n case \"54\": return \"\\uf013\"; // Workunit Read\n case \"56\": return \"\\uf0c7\"; // Spill\n case \"59\": return \"\\uf126\"; // Merge\n case \"61\": return \"\\uf0c7\"; // write xml\n case \"82\": return \"\\uf1c0\"; // Projected Disk Read Spill\n case \"88\": return \"\\uf1c0\"; // Projected Disk Read Spill\n case \"92\": return \"\\uf129\"; // Limted Index Read\n case \"93\": return \"\\uf129\"; // Limted Index Read\n case \"99\": return \"\\uf1c0\"; // CSV Read\n case \"105\": return \"\\uf1c0\"; // CSV Read\n\n case \"7\": return \"\\uf090\"; // Project\n case \"9\": return \"\\uf0e2\"; // Local Iterate\n case \"16\": return \"\\uf005\"; // Output Internal\n case \"19\": return \"\\uf074\"; // Hash Distribute\n case \"21\": return \"\\uf275\"; // Normalize\n case \"35\": return \"\\uf0c7\"; // CSV Write\n case \"37\": return \"\\uf0c7\"; // Index Write\n case \"71\": return \"\\uf1c0\"; // Disk Read Spill\n case \"133\": return \"\\uf0ce\"; // Inline Dataset\n case \"148\": return \"\\uf0ce\"; // Inline Dataset\n case \"168\": return \"\\uf275\"; // Local Denormalize\n }\n return \"\\uf063\";\n}\n\nexport class WUScopeController {\n private graphDB: ScopeGraph;\n private subgraphsMap: { [id: string]: Subgraph } = {};\n private rSubgraphsMap: { [id: string]: ScopeSubgraph } = {};\n private verticesMap: { [id: string]: VertexType } = {};\n private rVerticesMap: { [id: string]: ScopeVertex } = {};\n private edgesMap: { [id: string]: Edge } = {};\n private rEdgesMap: { [id: string]: ScopeEdge } = {};\n private kindMap: { [id: string]: ScopeVertex[] } = {};\n\n protected _disabled: { [kind: number]: boolean } = {};\n\n constructor() {\n }\n\n clear() {\n this.subgraphsMap = {};\n this.rSubgraphsMap = {};\n this.verticesMap = {};\n this.rVerticesMap = {};\n this.edgesMap = {};\n this.rEdgesMap = {};\n }\n\n set(masterGraph: ScopeGraph) {\n this.graphDB = masterGraph;\n this.graphGui(this.graphDB);\n\n this.kindMap = {};\n this.graphDB.walk(item => {\n if (item instanceof UtilSubgraph) {\n } else if (item instanceof UtilVertex) {\n const kind = item._.attr(\"Kind\").RawValue;\n if (!this.kindMap[kind]) {\n this.kindMap[kind] = [];\n }\n this.kindMap[kind].push(item);\n } else if (item instanceof UtilEdge) {\n }\n });\n }\n\n disabled(): number[];\n disabled(_: number[]): this;\n disabled(_?: number[]): number[] | this {\n if (!arguments.length) {\n const retVal = [];\n for (const key in this._disabled) {\n if (this._disabled[key]) {\n retVal.push(key);\n }\n }\n return retVal;\n }\n this._disabled = {};\n _.forEach(kind => this._disabled[kind] = true);\n return this;\n }\n\n graphGui(graphDB: ScopeGraph): IGraphData {\n const graphGui: MyGraphData = {\n subgraphs: [],\n vertices: [],\n edges: [],\n hierarchy: []\n };\n\n graphDB.walk((item) => {\n if (item instanceof UtilSubgraph) {\n const subgraph = this.appendSubgraph(item, graphGui.hierarchy, graphGui.subgraphs);\n subgraph.showMinMax(item.vertices.length > 3 || subgraph.minState() !== \"normal\");\n } else if (item instanceof UtilVertex) {\n this.appendVertex(item, graphGui.hierarchy, graphGui.vertices);\n } else if (item instanceof UtilEdge) {\n this.appendEdge(item, graphGui.edges);\n }\n });\n\n return graphGui;\n }\n\n format(labelTpl, obj) {\n let retVal = \"\";\n let lpos = labelTpl.indexOf(\"%\");\n let rpos = -1;\n while (lpos >= 0) {\n retVal += labelTpl.substring(rpos + 1, lpos);\n rpos = labelTpl.indexOf(\"%\", lpos + 1);\n if (rpos < 0) {\n console.warn(\"Invalid Label Template\");\n break;\n }\n const key = labelTpl.substring(lpos + 1, rpos);\n retVal += !key ? \"%\" : (obj[labelTpl.substring(lpos + 1, rpos)] || \"\");\n lpos = labelTpl.indexOf(\"%\", rpos + 1);\n }\n retVal += labelTpl.substring(rpos + 1, labelTpl.length);\n return retVal.split(\"\\\\n\").join(\"\\n\");\n }\n\n createSubgraph(subgraph: ScopeSubgraph): Subgraph {\n let sg = this.subgraphsMap[subgraph._.Id];\n if (!sg) {\n sg = new Subgraph()\n .title(subgraph._.Id)\n .on(\"minClick\", () => {\n this.minClick(sg);\n })\n ;\n this.subgraphsMap[subgraph._.Id] = sg;\n this.rSubgraphsMap[sg.id()] = subgraph;\n }\n return sg;\n }\n\n createVertex(vertex: ScopeVertex): VertexType {\n let v = this.verticesMap[vertex._.Id];\n if (!v) {\n const attrs = vertex._.rawAttrs();\n if (vertex._.ScopeType === \"dummy\") {\n const parent = this.subgraphsMap[vertex.parent._.Id];\n v = new Icon()\n .shape_colorFill(\"darkred\")\n .shape_colorStroke(\"darkred\")\n .image_colorFill(\"white\")\n .faChar(\"\\uf067\")\n .on(\"click\", () => {\n parent.minState(\"normal\");\n this.minClick(parent);\n })\n ;\n } else {\n v = new Vertex()\n .icon_shape_colorFill(\"#1f77b4\")\n .icon_image_colorFill(\"white\")\n .faChar(faCharFactory(attrs[\"Kind\"]))\n .text(attrs[\"Label\"])\n ;\n const annotations = [];\n if (vertex._.hasAttr(\"Definition\")) {\n annotations.push({\n faChar: \"\\uf036\",\n tooltip: \"Definition\",\n shape_colorFill: \"lightgray\",\n shape_colorStroke: \"lightgray\",\n image_colorFill: \"black\"\n });\n }\n if (vertex._.hasAttr(\"IsInternal\")) {\n annotations.push({\n faChar: \"\\uf085\",\n tooltip: \"IsInternal\",\n shape_colorFill: \"red\",\n shape_colorStroke: \"red\",\n image_colorFill: \"white\"\n });\n }\n v.annotationIcons(annotations);\n }\n this.verticesMap[vertex._.Id] = v;\n this.rVerticesMap[v.id()] = vertex;\n }\n return v;\n }\n\n isSpill(edge: ScopeEdge): boolean {\n const sourceKind = edge.source._.attr(\"Kind\").RawValue;\n const targetKind = edge.target._.attr(\"Kind\").RawValue;\n return sourceKind === \"2\" || targetKind === \"71\";\n }\n\n spansSubgraph(edge: ScopeEdge): boolean {\n return edge.source.parent._.Id !== edge.target.parent._.Id;\n }\n\n createEdge(edge: ScopeEdge): Edge | undefined {\n let e = this.edgesMap[edge._.Id];\n if (!e) {\n const attrs = edge._.rawAttrs();\n const sourceV = this.verticesMap[edge.source._.Id];\n const targetV = this.verticesMap[edge.target._.Id];\n if (sourceV && targetV) {\n const isSpill = this.isSpill(edge);\n const spansSubgraph = this.spansSubgraph(edge);\n\n const label = this.format(\"%Label%\\n%NumRowsProcessed%\", attrs);\n /* TODO: Add extra annotations once WUDetails is fixed...\n const numSlaves = parseInt(attrs[\"NumSlaves\"]);\n const numStarts = parseInt(attrs[\"NumStarts\"]);\n const numStops = parseInt(attrs[\"NumStops\"]);\n const started = numStarts > 0;\n const finished = numStops === numSlaves;\n const active = started && !finished;\n */\n\n let strokeDasharray = null;\n let weight = 100;\n if (attrs[\"IsDependency\"]) {\n weight = 10;\n strokeDasharray = \"1,5\";\n } else if (attrs[\"_childGraph\"]) {\n strokeDasharray = \"5,5\";\n } else if (isSpill) {\n weight = 25;\n strokeDasharray = \"5,5,10,5\";\n } else if (spansSubgraph) {\n weight = 5;\n strokeDasharray = \"5,5\";\n }\n e = new Edge()\n .sourceVertex(sourceV)\n .targetVertex(targetV)\n .sourceMarker(\"circle\")\n .targetMarker(\"arrow\")\n .weight(weight)\n .strokeDasharray(strokeDasharray)\n .text(label)\n ;\n this.edgesMap[edge._.Id] = e;\n this.rEdgesMap[e.id()] = edge;\n }\n }\n return e;\n }\n\n appendSubgraph(subgraph: ScopeSubgraph, hierarchy: Lineage[], subgraphs: Subgraph[]): Subgraph {\n const sg = this.createSubgraph(subgraph);\n subgraphs.push(sg);\n const parent = this.subgraphsMap[subgraph.parent._.Id];\n if (parent) {\n hierarchy.push({ parent, child: sg });\n }\n return sg;\n }\n\n appendVertex(vertex: ScopeVertex, hierarchy: Lineage[], vertices: VertexType[]): VertexType {\n const v = this.createVertex(vertex);\n vertices.push(v);\n const parent = this.subgraphsMap[vertex.parent._.Id];\n if (parent) {\n hierarchy.push({ parent, child: v });\n }\n return v;\n }\n\n appendEdge(edge: ScopeEdge, edges: Edge[]): Edge {\n const e = this.createEdge(edge);\n if (e) {\n edges.push(e);\n }\n return e;\n }\n\n filterLegend(graphDB: ScopeGraph) {\n for (let i = graphDB.vertices.length - 1; i >= 0; --i) {\n const vertex = graphDB.vertices[i];\n const kind = vertex._.attr(\"Kind\").RawValue;\n if (this._disabled[kind]) {\n vertex.remove(false, (source: BaseScope, target: BaseScope) => {\n return new BaseScope({\n ScopeName: vertex._.ScopeName + \":in\",\n Id: source.Id + \"->\" + target.Id,\n ScopeType: \"dummy-edge\",\n Properties: {\n Property: [vertex._.attr(\"Label\")]\n },\n Notes: {\n Note: []\n },\n SinkActivity: \"\"\n });\n });\n }\n }\n }\n\n filterPartial(graphDB: ScopeGraph) {\n for (const subgraph of graphDB.subgraphs) {\n const sg = this.subgraphsMap[subgraph._.Id];\n switch (sg.minState()) {\n case \"partial\":\n const childVertices: ReadonlyArray<ScopeVertex> = subgraph.vertices;\n const vShow: ScopeVertex[] = [];\n const vHide: ScopeVertex[] = [];\n\n for (const vertex of childVertices) {\n if (vertex.inEdges.length === 0 || vertex.inEdges.some(edge => edge.source.parent !== edge.target.parent) ||\n vertex.outEdges.length === 0 || vertex.outEdges.some(edge => edge.source.parent !== edge.target.parent)) {\n vShow.push(vertex);\n } else {\n vHide.push(vertex);\n }\n }\n\n if (vHide.length > 1) {\n const dummyDetails = {\n ScopeName: subgraph._.ScopeName,\n Id: subgraph._.Id + \":dummy\",\n ScopeType: \"dummy\",\n Properties: {\n Property: [{\n Name: \"Activities\",\n RawValue: \"\" + vHide.length,\n Formatted: \"\" + vHide.length,\n Measure: \"count\",\n Creator: \"\",\n CreatorType: \"\"\n }]\n },\n Notes: {\n Note: []\n },\n SinkActivity: \"\"\n };\n const dummyScope = new BaseScope(dummyDetails);\n const dummyVertex = subgraph.createVertex(dummyScope);\n\n for (const vertex of vHide) {\n for (const edge of vertex.inEdges) {\n if (vShow.indexOf(edge.source) >= 0) {\n const dummyEdgeScope = new BaseScope({\n ScopeName: edge.source._.ScopeName,\n Id: edge.source._.Id + \"->\" + dummyVertex._.Id,\n ScopeType: \"dummy-in\",\n Properties: {\n Property: []\n },\n Notes: {\n Note: []\n },\n SinkActivity: \"\"\n });\n subgraph.createEdge(edge.source, dummyVertex, dummyEdgeScope);\n }\n }\n for (const edge of vertex.outEdges) {\n if (vShow.indexOf(edge.target) >= 0) {\n const dummyEdgeScope = new BaseScope({\n ScopeName: edge.target._.ScopeName,\n Id: dummyVertex._.Id + \"->\" + edge.target._.Id,\n ScopeType: \"dummy-out\",\n Properties: {\n Property: []\n },\n Notes: {\n Note: []\n },\n SinkActivity: \"\"\n });\n subgraph.createEdge(dummyVertex, edge.target, dummyEdgeScope);\n }\n }\n }\n vHide.forEach(vertex => vertex.remove(true));\n }\n break;\n }\n }\n }\n\n filterEmptySubgraphs(graphDB: ScopeGraph) {\n while (true) {\n const emptySubgraphs = graphDB.subgraphs.filter(subgraph => subgraph.subgraphs.length === 0 && subgraph.vertices.length === 0);\n if (emptySubgraphs.length === 0) break;\n emptySubgraphs.forEach(subgraph => subgraph.remove(true));\n }\n }\n\n removeObsoleteSubgraphs(graphDB: ScopeGraph) {\n for (const subgraph of [...graphDB.subgraphs]) {\n if (subgraph.vertices.length === 0) {\n subgraph.remove(false);\n }\n }\n }\n\n graphData(): IGraphData {\n const graphDB = this.graphDB.clone();\n this.filterLegend(graphDB);\n this.filterPartial(graphDB);\n this.filterEmptySubgraphs(graphDB);\n this.removeObsoleteSubgraphs(graphDB);\n return this.graphGui(graphDB);\n }\n\n calcLegend(): WUGraphLegendData[] {\n const retVal: WUGraphLegendData[] = [];\n for (const kind in this.kindMap) {\n retVal.push({\n kind: parseInt(kind),\n faChar: faCharFactory(kind),\n label: this.kindMap[kind][0]._.attr(\"Label\").RawValue.split(\"\\n\")[0],\n count: this.kindMap[kind].length\n });\n }\n return retVal;\n }\n\n vertices(kind: number): VertexType[] {\n const retVal: VertexType[] = [];\n for (const v of this.kindMap[kind]) {\n retVal.push(this.verticesMap[v._.Id]);\n }\n return retVal;\n }\n\n formatRow(item: ScopeEdge | ScopeSubgraph | ScopeVertex, columns, row) {\n const attrs = item._.formattedAttrs();\n for (const key in attrs) {\n const idx = columns.indexOf(key);\n if (idx === -1) {\n columns.push(key);\n row.push(attrs[key]);\n } else {\n row[idx] = attrs[key];\n }\n }\n for (let i = 0; i < 100; ++i) {\n if (row[i] === undefined) {\n row[i] = \"\";\n }\n }\n return row;\n }\n\n activityData(): { columns: string[], data: any[][] } {\n const columns = [\"Id\", \"Kind\", \"Label\"];\n const data = this.graphDB.vertices.map(v => {\n const row = [parseInt(v._.Id.split(\"a\")[1])];\n return this.formatRow(v, columns, row);\n });\n return { columns, data };\n }\n\n edgeData(): { columns: string[], data: any[][] } {\n const columns = [\"Id\", \"Label\"];\n const data = this.graphDB.edges.map(e => {\n const row = [e._.Id];\n return this.formatRow(e, columns, row);\n });\n return { columns, data };\n }\n\n subgraphData(): { columns: string[], data: any[][] } {\n const columns = [\"Id\", \"Label\"];\n const data = this.graphDB.subgraphs.map(sg => {\n const row = [sg._.Id];\n return this.formatRow(sg, columns, row);\n });\n return { columns, data };\n }\n\n calcGraphTooltip(item: VertexType | Edge) {\n let scope;\n let parentScope;\n if (item instanceof Subgraph) {\n const subgraph = this.rSubgraphsMap[item.id()];\n scope = subgraph._;\n parentScope = subgraph.parent._;\n } else if (item instanceof Vertex || item instanceof Icon) {\n const vertex = this.rVerticesMap[item.id()];\n scope = vertex._;\n parentScope = vertex.parent._;\n } else if (item instanceof Edge) {\n const edge = this.rEdgesMap[item.id()];\n scope = edge._;\n parentScope = edge.parent._;\n }\n if (scope) {\n return scope.calcTooltip(parentScope);\n }\n return \"\";\n }\n\n subgraph(id: string): Subgraph | undefined {\n return this.subgraphsMap[id];\n }\n\n vertex(id: string): VertexType | undefined {\n return this.verticesMap[id];\n }\n\n edge(id: string): Edge {\n return this.edgesMap[id];\n }\n\n // Events ---\n minClick(sg: Subgraph) {\n }\n}\n","import { Button, Spacer, ToggleButton, Widget } from \"@hpcc-js/common\";\nimport { ScopeGraph, Workunit } from \"@hpcc-js/comms\";\nimport { Table } from \"@hpcc-js/dgrid\";\nimport { Graph as GraphWidget, Subgraph, Vertex } from \"@hpcc-js/graph\";\nimport { Carousel, ChartPanel } from \"@hpcc-js/layout\";\nimport { hashSum } from \"@hpcc-js/util\";\nimport { WUGraphLegend } from \"./WUGraphLegend.ts\";\nimport { WUScopeController } from \"./WUScopeController.ts\";\n\nimport \"../src/WUGraph.css\";\n\nexport class WUGraph extends ChartPanel {\n\n private _partialAll = new Button().faChar(\"fa-window-restore\").tooltip(\"Partial All\")\n .on(\"click\", () => {\n this.stateClick(this._partialAll);\n });\n\n private _maxAll = new Button().faChar(\"fa-window-maximize\").tooltip(\"Max All\")\n .on(\"click\", () => {\n this.stateClick(this._maxAll);\n });\n\n private _toggleGraph = new ToggleButton().faChar(\"fa-chain\").tooltip(\"Graph\")\n .selected(true)\n .on(\"click\", () => {\n this.viewClick(this._toggleGraph);\n });\n\n private _toggleActivities = new ToggleButton().faChar(\"fa-table\").tooltip(\"Activitiies\")\n .selected(false)\n .on(\"click\", () => {\n this.viewClick(this._toggleActivities);\n });\n\n private _toggleEdges = new ToggleButton().faChar(\"fa-table\").tooltip(\"Edges\")\n .selected(false)\n .on(\"click\", () => {\n this.viewClick(this._toggleEdges);\n });\n\n private _toggleSubgraphs = new ToggleButton().faChar(\"fa-table\").tooltip(\"Subgraphs\")\n .selected(false)\n .on(\"click\", () => {\n this.viewClick(this._toggleSubgraphs);\n });\n\n protected _graph = new GraphWidget()\n .layout(\"Hierarchy\")\n .applyScaleOnLayout(true)\n .showToolbar(false)\n .allowDragging(false)\n ;\n\n private _activities = new Table()\n .pagination(false)\n ;\n\n private _edges = new Table()\n .pagination(false)\n ;\n\n private _subgraphs = new Table()\n .pagination(false)\n ;\n\n protected _legend = new WUGraphLegend(this)\n .on(\"click\", kind => {\n this.render();\n })\n .on(\"mouseover\", kind => {\n const verticesMap: { [id: string]: boolean } = {};\n for (const vertex of this._gc.vertices(kind)) {\n verticesMap[vertex.id()] = true;\n }\n this._graph.highlightVerticies(verticesMap);\n })\n .on(\"mouseout\", kind => {\n this._graph.highlightVerticies();\n })\n ;\n\n protected _view = new Carousel().widgets([this._graph, this._activities, this._edges, this._subgraphs]);\n\n protected _gc = new WUScopeController();\n\n constructor() {\n super();\n this.topOverlay(false);\n this.widget(this._view);\n const buttons: Widget[] = [\n this._toggleGraph,\n this._toggleActivities,\n this._toggleEdges,\n this._toggleSubgraphs,\n new Spacer(),\n this._partialAll,\n this._maxAll,\n new Spacer(),\n ...this._graph.iconBarButtons(),\n new Spacer()];\n this.buttons(buttons.concat(this.buttons()));\n this._gc.minClick = (sg: Subgraph) => {\n this.loadGraph();\n this._graph.render(w => {\n this._graph\n .selection([sg])\n .centerOnItem(sg)\n ;\n });\n };\n\n this._graph.tooltipHTML((v: Vertex) => {\n return this._gc.calcGraphTooltip(v);\n });\n }\n\n stateClick(sourceB: Button) {\n switch (sourceB) {\n case this._partialAll:\n this._graph.data().subgraphs.forEach((sg: Subgraph) => {\n sg.minState(\"partial\");\n });\n break;\n case this._maxAll:\n this._graph.data().subgraphs.forEach((sg: Subgraph) => {\n sg.minState(\"normal\");\n });\n break;\n }\n this.render();\n }\n\n viewClick(sourceTB: ToggleButton) {\n this._toggleGraph.selected(sourceTB === this._toggleGraph);\n this._toggleActivities.selected(sourceTB === this._toggleActivities);\n this._toggleEdges.selected(sourceTB === this._toggleEdges);\n this._toggleSubgraphs.selected(sourceTB === this._toggleSubgraphs);\n switch (sourceTB) {\n case this._toggleGraph:\n this._view.active(0);\n break;\n case this._toggleActivities:\n this._view.active(1);\n break;\n case this._toggleEdges:\n this._view.active(2);\n break;\n case this._toggleSubgraphs:\n this._view.active(3);\n break;\n }\n this.render(w => {\n });\n }\n\n private _prevHashSum;\n private _prevScopeGraph: ScopeGraph;\n fetchScopeGraph(): Promise<ScopeGraph> {\n const hash = hashSum({\n baseUrl: this.baseUrl(),\n wuid: this.wuid(),\n graphID: this.graphID(),\n subgraphID: this.subgraphID()\n });\n if (!this._prevScopeGraph || this._prevHashSum !== hash) {\n this.startProgress();\n this._prevHashSum = hash;\n this._gc.clear();\n const wu = Workunit.attach({ baseUrl: this.baseUrl() }, this.wuid());\n return wu.fetchGraphs().then(graphs => {\n for (const graph of graphs) {\n if (graph.Name === this.graphID()) {\n this.finishProgress();\n return graph.fetchScopeGraph(this.subgraphID());\n }\n }\n }).then(scopeGraph => {\n this._prevScopeGraph = scopeGraph;\n return this._prevScopeGraph;\n });\n }\n return Promise.resolve(this._prevScopeGraph);\n }\n\n enter(domNode, _element) {\n super.enter(domNode, _element);\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n }\n\n exit(domNode, element) {\n super.exit(domNode, element);\n }\n\n loadGraph() {\n this._gc.disabled(this._legend.disabled());\n this._graph\n .data(this._gc.graphData(), true)\n ;\n {\n const { columns, data } = this._gc.activityData();\n this._activities\n .columns(columns)\n .data(data)\n ;\n }\n {\n const { columns, data } = this._gc.edgeData();\n this._edges\n .columns(columns)\n .data(data)\n ;\n }\n {\n const { columns, data } = this._gc.subgraphData();\n this._subgraphs\n .columns(columns)\n .data(data)\n ;\n }\n }\n\n render(callback?: (w: Widget) => void): this {\n if (this.wuid() && this.graphID()) {\n this.fetchScopeGraph().then(scopedGraph => {\n this._gc.set(scopedGraph);\n this._legend.data(this._gc.calcLegend());\n this.loadGraph();\n super.render(callback);\n });\n } else {\n super.render(callback);\n }\n return this;\n }\n\n selection(_?) {\n if (!arguments.length) return this._graph.selection();\n const item = this._gc.vertex(_) || this._gc.edge(_) || this._gc.subgraph(_);\n if (item) {\n this._graph.selection([item]);\n }\n return this;\n }\n}\nWUGraph.prototype._class += \" eclwatch_WUGraph\";\n\nexport interface WUGraph {\n baseUrl(): string;\n baseUrl(_: string): this;\n wuid(): string;\n wuid(_: string): this;\n graphID(): string;\n graphID(_: string): this;\n subgraphID(): string;\n subgraphID(_: string): this;\n}\n\nWUGraph.prototype.publish(\"baseUrl\", \"\", \"string\", \"HPCC Platform Base URL\");\nWUGraph.prototype.publish(\"wuid\", \"\", \"string\", \"Workunit ID\");\nWUGraph.prototype.publish(\"graphID\", \"\", \"string\", \"Graph ID\");\nWUGraph.prototype.publish(\"subgraphID\", \"\", \"string\", \"Subgraph ID\");\n","import { ResultFilter, Result, XSDSchema, XSDXMLNode } from \"@hpcc-js/comms\";\nimport { ColumnType, Deferred, domConstruct, QueryResults, RowFormatter } from \"@hpcc-js/dgrid\";\n\nfunction entitiesEncode(str) {\n return String(str).replace(/&/g, \"&\").replace(/</g, \"<\").replace(/>/g, \">\").replace(/\"/g, \""\");\n}\n\nfunction safeEncode(item) {\n switch (Object.prototype.toString.call(item)) {\n case \"[object Undefined]\":\n case \"[object Boolean]\":\n case \"[object Number]\":\n return item;\n case \"[object String]\":\n return entitiesEncode(item);\n default:\n console.warn(\"Unknown cell type: \" + Object.prototype.toString.call(item)); \n }\n return item;\n}\n\nexport class Store {\n protected wuResult: Result;\n protected schema: XSDSchema;\n protected _columns: any[];\n protected _cache: { [key: string]: Promise<{ totalLength: number, data: any[] }> } = {};\n private rowFormatter: RowFormatter;\n protected _filter: ResultFilter = {};\n\n constructor(wuResult: Result, schema: XSDSchema, renderHtml: boolean, filter: ResultFilter = {}) {\n this.wuResult = wuResult;\n this.schema = schema;\n this._columns = this.schema2Columns(this.schema.root);\n this.rowFormatter = new RowFormatter(this._columns, renderHtml);\n this._filter = filter;\n }\n\n columns() {\n return this._columns;\n }\n\n schema2Columns(parentNode: XSDXMLNode, prefix: string = \"\"): ColumnType[] {\n if (!parentNode) return [];\n return parentNode.children().filter(node => node.name.indexOf(\"__hidden\", node.name.length - \"__hidden\".length) === -1).map((node, idx) => {\n const label = node.name;\n const keyed = node.attrs[\"hpcc:keyed\"];\n const column: ColumnType = {\n field: prefix + label,\n leafID: label,\n idx,\n label: label + (keyed ? \" (i)\" : \"\"),\n className: \"resultGridCell\",\n sortable: false,\n width: keyed ? 16 : 0,\n isSet: node.isSet\n };\n const children = this.schema2Columns(node, prefix + label + \"_\");\n if (children.length) {\n column.width += 10 + children.reduce((prev: number, childNode: ColumnType) => {\n return prev + childNode.width!;\n }, 0);\n column.children = children;\n } else {\n column.width += node.charWidth() * 9;\n column.formatter = (cell, row) => {\n switch (typeof cell) {\n case \"string\":\n return {\n html: cell.replace(/\\t/g, \" \").trim()\n };\n case \"undefined\":\n return \"\";\n }\n return cell;\n };\n }\n return column;\n });\n }\n\n isChildDataset(cell) {\n if (Object.prototype.toString.call(cell) !== \"[object Object]\") {\n return false;\n }\n let propCount = 0;\n let firstPropType = null;\n for (const key in cell) {\n if (!firstPropType) {\n firstPropType = Object.prototype.toString.call(cell[key]);\n }\n propCount++;\n }\n return propCount === 1 && firstPropType === \"[object Array]\";\n }\n\n rowToTable(cell, __row, node) {\n if (this.isChildDataset(cell)) { // Don't display \"Row\" as a header ---\n for (const key in cell) {\n this.rowToTable(cell[key], __row, node);\n }\n return;\n }\n\n const table = domConstruct.create(\"table\", { border: 1, cellspacing: 0, width: \"100%\" }, node);\n switch (Object.prototype.toString.call(cell)) {\n case \"[object Object]\":\n let tr = domConstruct.create(\"tr\", null, table);\n for (const key in cell) {\n domConstruct.create(\"th\", { innerHTML: safeEncode(key) }, tr);\n }\n tr = domConstruct.create(\"tr\", null, table);\n for (const key in cell) {\n switch (Object.prototype.toString.call(cell[key])) {\n case \"[object Object]\":\n case \"[object Array]\":\n this.rowToTable(cell[key], __row, node);\n break;\n default:\n domConstruct.create(\"td\", { innerHTML: safeEncode(cell[key]) }, tr);\n break;\n }\n }\n break;\n case \"[object Array]\":\n for (let i = 0; i < cell.length; ++i) {\n switch (Object.prototype.toString.call(cell[i])) {\n case \"[object Boolean]\":\n case \"[object Number]\":\n case \"[object String]\":\n // Item in Scalar ---\n const tr1 = domConstruct.create(\"tr\", null, table);\n domConstruct.create(\"td\", { innerHTML: safeEncode(cell[i]) }, tr1);\n break;\n default:\n // Child Dataset ---\n if (i === 0) {\n const tr2 = domConstruct.create(\"tr\", null, table);\n for (const key in cell[i]) {\n domConstruct.create(\"th\", { innerHTML: safeEncode(key) }, tr2);\n }\n }\n domConstruct.create(\"tr\", null, table);\n for (const key in cell[i]) {\n if (cell[i][key]) {\n if (Object.prototype.toString.call(cell[i][key]) === \"[object Object]\" || Object.prototype.toString.call(cell[i][key]) === \"[object Array]\") {\n const td = domConstruct.create(\"td\", null, tr1);\n this.rowToTable(cell[i][key], cell[i], td);\n } else if (key.indexOf(\"__html\", key.length - \"__html\".length) !== -1) {\n domConstruct.create(\"td\", { innerHTML: cell[i][key] }, tr1);\n } else if (key.indexOf(\"__javascript\", key.length - \"__javascript\".length) !== -1) {\n /*const td = */ domConstruct.create(\"td\", null, tr1);\n // this.injectJavascript(cell[i][key], cell[i], td);\n } else {\n const val = cell[i][key];\n domConstruct.create(\"td\", { innerHTML: safeEncode(val) }, tr1);\n }\n } else {\n domConstruct.create(\"td\", { innerHTML: \"\" }, tr1);\n }\n }\n }\n }\n break;\n }\n }\n\n getIdentity(row) {\n return row.__hpcc_id;\n }\n\n _request(start, end): Promise<{ totalLength: number, data: any[] }> {\n if (!this.wuResult) return Promise.resolve({ totalLength: 0, data: [] });\n const cacheKey = `${start}->${end}`;\n if (this._cache[cacheKey]) return this._cache[cacheKey];\n const retVal = this.wuResult.fetchRows(start, end - start, false, this._filter).then((rows: any[]) => {\n return {\n totalLength: this.wuResult.Total,\n data: rows.map((row, idx) => {\n const formattedRow: any = this.rowFormatter.format(row);\n formattedRow.__hpcc_id = start + idx;\n formattedRow.__hpcc_orig = row;\n return formattedRow;\n })\n };\n });\n this._cache[cacheKey] = retVal;\n return retVal;\n }\n\n fetchRange(options): Promise<any[]> {\n const retVal = new Deferred();\n this._request(options.start, options.end).then(response => retVal.resolve(response));\n return new QueryResults(retVal.then(response => response.data), {\n totalLength: retVal.then(response => response.totalLength)\n });\n }\n}\n","import { ResultFilter, IOptions, Result } from \"@hpcc-js/comms\";\nimport { Common } from \"@hpcc-js/dgrid\";\nimport { hashSum } from \"@hpcc-js/util\";\nimport { Store } from \"./WUResultStore.ts\";\n\nexport class WUResult extends Common {\n\n protected _result: Result;\n protected _localStore: Store;\n\n constructor() {\n super();\n this.renderHtml(false);\n }\n\n hashSum(opts: any = {}) {\n return hashSum({\n baseUrl: this.baseUrl(),\n wuid: this.wuid(),\n resultName: this.resultName(),\n sequence: this.sequence(),\n nodeGroup: this.nodeGroup(),\n logicalFile: this.logicalFile(),\n userID: this.user(),\n password: this.password(),\n ...opts\n });\n }\n\n protected _prevResultHash: string;\n calcResult(): Result | null {\n const resultHash = this.hashSum();\n if (this._prevResultHash !== resultHash) {\n this._prevResultHash = resultHash;\n\n const opts: IOptions = {\n baseUrl: this.baseUrl(),\n userID: this.user(),\n password: this.password()\n };\n if (this.wuid() && this.resultName()) {\n this._result = Result.attach(opts, this.wuid(), this.resultName());\n } else if (this.wuid() && this.sequence() !== undefined) {\n this._result = Result.attach(opts, this.wuid(), this.sequence());\n } else if (this.logicalFile() && this.nodeGroup()) {\n this._result = Result.attachLogicalFile(opts, this.nodeGroup(), this.logicalFile());\n } else if (this.logicalFile()) {\n this._result = Result.attachLogicalFile(opts, \"\", this.logicalFile());\n }\n }\n return this._result;\n }\n\n fetch(row, count, abortController = new AbortController()): Promise<object[]> {\n const result = this.calcResult();\n if (result) {\n return result.fetchRows(row, count, false, {}, abortController.signal);\n }\n return Promise.resolve([]);\n }\n\n protected _prevStoreHash: string;\n protected _prevQueryHash: string;\n update(domNode, element) {\n super.update(domNode, element);\n const storeHash = this.hashSum({\n renderHtml: this.renderHtml(),\n filter: this.filter()\n });\n if (this._prevStoreHash !== storeHash) {\n this._prevStoreHash = storeHash;\n const result = this.calcResult();\n if (result) {\n result.fetchXMLSchema().then(schema => {\n this._localStore = new Store(result, schema, this.renderHtml(), this.filter());\n this._dgrid?.set(\"columns\", this._localStore.columns());\n this._dgrid?.set(\"collection\", this._localStore);\n });\n }\n }\n }\n\n click(row, col, sel) {\n }\n}\nWUResult.prototype._class += \" eclwatch_WUResult\";\n\nexport interface WUResult {\n baseUrl(): string;\n baseUrl(_: string): this;\n user(): string;\n user(_: string): this;\n password(): string;\n password(_: string): this;\n wuid(): string;\n wuid(_: string): this;\n resultName(): string;\n resultName(_: string): this;\n sequence(): number;\n sequence(_: number): this;\n nodeGroup(): string;\n nodeGroup(_: string): this;\n logicalFile(): string;\n logicalFile(_: string): this;\n filter(): ResultFilter;\n filter(_: ResultFilter): this;\n}\n\nWUResult.prototype.publish(\"baseUrl\", \"\", \"string\", \"URL to WsWorkunits\");\nWUResult.prototype.publish(\"user\", \"\", \"string\", \"User ID\");\nWUResult.prototype.publish(\"password\", \"\", \"string\", \"Password\");\nWUResult.prototype.publish(\"wuid\", \"\", \"string\", \"Workunit ID\");\nWUResult.prototype.publish(\"resultName\", \"\", \"string\", \"Result Name\");\nWUResult.prototype.publish(\"sequence\", undefined, \"number\", \"Sequence Number\");\nWUResult.prototype.publish(\"nodeGroup\", \"\", \"string\", \"NodeGroup\");\nWUResult.prototype.publish(\"logicalFile\", \"\", \"string\", \"Logical File Name\");\nWUResult.prototype.publish(\"filter\", {}, \"object\", \"Filter\");\n","import { Workunit, WUStateID } from \"@hpcc-js/comms\";\nimport { Edge, Graph, Vertex } from \"@hpcc-js/graph\";\nimport { hashSum, IObserverHandle } from \"@hpcc-js/util\";\n\nexport enum STATUS {\n CREATE = \"Created\",\n COMPILE = \"Compiled\",\n EXECUTE = \"Executed\",\n COMPLETE = \"Completed\"\n}\n\nexport enum STATUS_ACTIVE {\n CREATE = \"Creating\",\n COMPILE = \"Compiling\",\n EXECUTE = \"Executing\",\n COMPLETE = \"Completed\"\n}\n\nexport class WUStatus extends Graph {\n\n protected _wu: Workunit;\n protected _wuHandle: IObserverHandle;\n\n protected _create: Vertex;\n protected _compile: Vertex;\n protected _execute: Vertex;\n protected _complete: Vertex;\n\n constructor() {\n super();\n this\n .zoomable(false)\n .zoomToFitLimit(1)\n .layout(\"Hierarchy\")\n .hierarchyRankDirection(\"LR\")\n .showToolbar(false)\n .allowDragging(false)\n ;\n }\n\n private _prevHash;\n attachWorkunit() {\n const hash = hashSum({\n baseUrl: this.baseUrl(),\n wuid: this.wuid()\n });\n if (this._prevHash !== hash) {\n this._prevHash = hash;\n this._wu = Workunit.attach({ baseUrl: this.baseUrl() }, this.wuid());\n if (this._wuHandle) {\n this._wuHandle.release();\n }\n this._wuHandle = this._wu.watch(changes => {\n this.lazyRender();\n });\n }\n }\n\n createVertex(faChar: string) {\n return new Vertex()\n .icon_diameter(32)\n .icon_shape_colorFill(\"none\")\n .icon_shape_colorStroke(\"none\")\n .icon_image_colorFill(\"darkgray\")\n .iconAnchor(\"middle\")\n .textbox_shape_colorFill(\"none\")\n .textbox_shape_colorStroke(\"none\")\n .textbox_text_colorFill(\"darkgray\")\n .faChar(faChar)\n ;\n }\n\n updateVertex(vertex: Vertex, color: string) {\n vertex\n .icon_image_colorFill(color)\n .textbox_text_colorFill(color)\n ;\n }\n\n updateVertexStatus(level: 0 | 1 | 2 | 3 | 4, active: boolean = false) {\n const completeColor = this._wu.isFailed() ? \"darkred\" : \"darkgreen\";\n this._create.text(STATUS.CREATE);\n this._compile.text(STATUS.COMPILE);\n this._execute.text(STATUS.EXECUTE);\n this._complete.text(STATUS.COMPLETE);\n switch (level) {\n case 0:\n this.updateVertex(this._create, \"darkgray\");\n this.updateVertex(this._compile, \"darkgray\");\n this.updateVertex(this._execute, \"darkgray\");\n this.updateVertex(this._complete, \"darkgray\");\n break;\n case 1:\n this._create.text(STATUS_ACTIVE.CREATE);\n this.updateVertex(this._create, active ? \"orange\" : completeColor);\n this.updateVertex(this._compile, \"darkgray\");\n this.updateVertex(this._execute, \"darkgray\");\n this.updateVertex(this._complete, \"darkgray\");\n break;\n case 2:\n this._compile.text(STATUS_ACTIVE.COMPILE);\n this.updateVertex(this._create, completeColor);\n this.updateVertex(this._compile, active ? \"orange\" : completeColor);\n this.updateVertex(this._execute, completeColor);\n this.updateVertex(this._complete, \"darkgray\");\n break;\n case 3:\n this._execute.text(STATUS_ACTIVE.EXECUTE);\n this.updateVertex(this._create, completeColor);\n this.updateVertex(this._compile, completeColor);\n this.updateVertex(this._execute, active ? \"orange\" : completeColor);\n this.updateVertex(this._complete, \"darkgray\");\n break;\n case 4:\n this.updateVertex(this._create, completeColor);\n this.updateVertex(this._compile, completeColor);\n this.updateVertex(this._execute, completeColor);\n this.updateVertex(this._complete, completeColor);\n break;\n }\n }\n\n createEdge(source, target) {\n return new Edge()\n .sourceVertex(source)\n .targetVertex(target)\n .strokeColor(\"black\")\n .showArc(false)\n ;\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n this._create = this.createVertex(\"\\uf11d\");\n this._compile = this.createVertex(\"\\uf085\");\n this._execute = this.createVertex(\"\\uf275\");\n this._complete = this.createVertex(\"\\uf11e\");\n const e1 = this.createEdge(this._create, this._compile);\n const e2 = this.createEdge(this._compile, this._execute);\n const e3 = this.createEdge(this._execute, this._complete);\n this.data({\n vertices: [this._create, this._compile, this._execute, this._complete],\n edges: [e1, e2, e3]\n });\n }\n\n update(domNode, element) {\n this.attachWorkunit();\n switch (this._wu.StateID) {\n case WUStateID.Blocked:\n case WUStateID.Wait:\n case WUStateID.Scheduled:\n case WUStateID.UploadingFiled:\n this.updateVertexStatus(1);\n break;\n case WUStateID.Compiling:\n this.updateVertexStatus(2, true);\n break;\n case WUStateID.Submitted:\n this.updateVertexStatus(1, true);\n break;\n case WUStateID.Compiled:\n this.updateVertexStatus(2);\n break;\n case WUStateID.Aborting:\n case WUStateID.Running:\n this.updateVertexStatus(3, true);\n break;\n case WUStateID.Aborted:\n case WUStateID.Archived:\n case WUStateID.Completed:\n this.updateVertexStatus(4);\n break;\n case WUStateID.Failed:\n this.updateVertexStatus(4, false);\n break;\n case WUStateID.DebugPaused:\n case WUStateID.DebugRunning:\n case WUStateID.Paused:\n case WUStateID.Unknown:\n default:\n this.updateVertexStatus(0);\n break;\n }\n super.update(domNode, element);\n this.zoomToFit();\n }\n\n exit(domNode, element) {\n if (this._wuHandle) {\n this._wuHandle.release();\n }\n super.exit(domNode, element);\n }\n}\nWUStatus.prototype._class += \" eclwatch_WUStatus\";\n\nexport interface WUStatus {\n baseUrl(): string;\n baseUrl(_: string): this;\n wuid(): string;\n wuid(_: string): this;\n}\n\nWUStatus.prototype.publish(\"baseUrl\", \"\", \"string\", \"HPCC Platform Base URL\");\nWUStatus.prototype.publish(\"wuid\", \"\", \"string\", \"Workunit ID\");\n","import { Palette } from \"@hpcc-js/common\";\nimport { Scope, Workunit, WsWorkunits } from \"@hpcc-js/comms\";\nimport { ReactTimelineSeries } from \"@hpcc-js/timeline\";\nimport { hashSum, RecursivePartial } from \"@hpcc-js/util\";\n\nimport \"../src/WUGraph.css\";\n\nconst columns = [\"label\", \"start\", \"end\", \"icon\", \"color\", \"series\"];\n\nexport class WUTimeline extends ReactTimelineSeries {\n\n protected _palette = Palette.ordinal(\"default\");\n\n constructor() {\n super();\n this\n .columns(columns)\n .titleColumn(\"label\")\n .iconColumn(\"icon\")\n .colorColumn(\"color\")\n .seriesColumn(\"series\")\n .timePattern(\"%Y-%m-%dT%H:%M:%S.%LZ\")\n .tickFormat(\"%H:%M\")\n .tooltipTimeFormat(\"%H:%M:%S.%L\")\n .tooltipHTML(d => {\n return d[columns.length].calcTooltip();\n })\n ;\n }\n\n private _prevHashSum;\n clear(): this {\n delete this._prevHashSum;\n return this;\n }\n fetchScopes() {\n const hash = hashSum({\n baseUrl: this.baseUrl(),\n wuid: this.wuid(),\n request: this.request()\n });\n if (this._prevHashSum !== hash) {\n this._prevHashSum = hash;\n const wu = Workunit.attach({ baseUrl: this.baseUrl() }, this.wuid());\n wu.fetchDetails(this.request()).then(scopes => {\n return scopes.filter(scope => scope.Id && scope.attr(\"WhenStarted\").RawValue).map((scope: Scope) => {\n const whenStarted = +scope.attr(\"WhenStarted\").RawValue / 1000;\n const timeElapsed = +scope.attr(\"TimeElapsed\").RawValue / 1000000;\n return [\n scope.Id,\n new Date(whenStarted).toISOString(),\n timeElapsed ? new Date(whenStarted + timeElapsed).toISOString() : undefined,\n null,\n this._palette(scope.ScopeType),\n scope.ScopeName.split(\"::\").join(\":\").split(\":\").slice(0, 1),\n scope\n ];\n });\n }).then(scopes => {\n this\n .data(scopes)\n .render()\n ;\n });\n }\n }\n\n enter(domNode, _element) {\n super.enter(domNode, _element);\n }\n\n update(domNode, element) {\n this.fetchScopes();\n super.update(domNode, element);\n }\n\n exit(domNode, element) {\n super.exit(domNode, element);\n }\n}\nWUTimeline.prototype._class += \" eclwatch_WUTimeline\";\n\nexport interface WUTimeline {\n baseUrl(): string;\n baseUrl(_: string): this;\n wuid(): string;\n wuid(_: string): this;\n request(): Partial<WsWorkunits.WUDetails>;\n request(_: RecursivePartial<WsWorkunits.WUDetails>): this;\n}\n\nWUTimeline.prototype.publish(\"baseUrl\", \"\", \"string\", \"HPCC Platform Base URL\");\nWUTimeline.prototype.publish(\"wuid\", \"\", \"string\", \"Workunit ID\");\nWUTimeline.prototype.publish(\"request\", {\n ScopeFilter: {\n MaxDepth: 3,\n ScopeTypes: [\"graph\", \"subgraph\"]\n },\n NestedFilter: {\n Depth: 0,\n ScopeTypes: []\n },\n PropertiesToReturn: {\n AllProperties: false,\n AllStatistics: true,\n AllHints: false,\n Properties: [\"WhenStarted\", \"TimeElapsed\"]\n },\n ScopeOptions: {\n IncludeId: true,\n IncludeScope: true,\n IncludeScopeType: true\n },\n PropertyOptions: {\n IncludeName: true,\n IncludeRawValue: true,\n IncludeFormatted: true,\n IncludeMeasure: true,\n IncludeCreator: false,\n IncludeCreatorType: false\n }\n}, \"object\", \"WUDetails Request\");\n"],"names":["_node","d3Local","bbox","d3Select","UtilSubgraph","UtilVertex","UtilEdge","Subgraph","Edge","columns","GraphWidget","STATUS","STATUS_ACTIVE"],"mappings":";;;;;;;;;;;;;AAAO,MAAM,WAAW,qBACX,cAAc,SACd,gBAAgB;ACItB,MAAM,yBAAyB,WAAW;AAAA,EAQ7C,cAAc;AACV,UAAM,YAAY;AARd;AACA;AACD,0CAAiB,IAAI,cAAc;AACnC,2CAAkB,IAAI,SACxB,KAAK,EAAE;AAKH,SAAA,eAAe,WAAW,CAAC,SAAS;AACrC,WAAK,gBACA,KAAK,IAAI,EACT,OAAO;AAAA,IAEhB;AAAA,EAAA;AAAA,EAGM,yBAAyB,MAAM;AACrC,UAAM,MAAM;AAAA,MACR,OAAO,KAAK;AAAA,MACZ,UAAU,KAAK,UAAU,IAAI,aAAa,EAAE,OAAO,OAAK,CAAC;AAAA,IAC7D;AAEI,QAAA,IAAI,YAAY,IAAI,SAAS,CAAC,KAAK,IAAI,SAAS,CAAC,EAAE,UAAU;AAEtD,aAAA;AAAA,QACH,OAAO;AAAA,QACP,UAAU;AAAA,UACN;AAAA,Y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ACd,kBAAkB;AAAA,EACtB;AAAA,EACA,iBAAiB;AAAA,IACb,aAAa;AAAA,IACb,iBAAiB;AAAA,IACjB,kBAAkB;AAAA,IAClB,gBAAgB;AAAA,IAChB,gBAAgB;AAAA,IAChB,oBAAoB;AAAA,EAAA;AAE5B,GAAG,UAAU,mBAAmB;"}
|
package/dist/index.umd.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.umd.cjs","sources":["../src/__package__.ts","../src/ECLArchiveViewer.ts","../src/WUGraphLegend.ts","../src/WUScopeController.ts","../src/WUGraph.ts","../src/WUResultStore.ts","../src/WUResult.ts","../src/WUStatus.ts","../src/WUTimeline.ts"],"sourcesContent":["export const PKG_NAME = \"@hpcc-js/eclwatch\";\nexport const PKG_VERSION = \"3.1.1\";\nexport const BUILD_VERSION = \"3.2.1\";\n","import { Editor } from \"@hpcc-js/codemirror\";\nimport { Workunit } from \"@hpcc-js/comms\";\nimport { SplitPanel } from \"@hpcc-js/phosphor\";\nimport { DirectoryTree } from \"@hpcc-js/tree\";\nimport { hashSum, xml2json } from \"@hpcc-js/util\";\n\nexport class ECLArchiveViewer extends SplitPanel {\n private _prevHash;\n private _contentStr;\n public _directoryPane = new DirectoryTree();\n public _fileEditorPane = new Editor()\n .text(\"\")\n ;\n\n constructor() {\n super(\"horizontal\");\n this._directoryPane.rowClick = (text) => {\n this._fileEditorPane\n .text(text)\n .render()\n ;\n };\n }\n\n protected transformArchiveTreeData(json) {\n const ret = {\n label: json.name,\n children: json._children.map(transformNode).filter(n => n)\n };\n\n if (ret.children && ret.children[0] && ret.children[0].label === \"html\") {\n // must be parsererror\n return {\n label: \"root\",\n children: [\n {\n label: \"error\",\n content: JSON.stringify(ret, null, 4)\n }\n ]\n };\n }\n return ret;\n\n function transformNode(node) {\n const _node: any = {};\n _node.label = node.name + (node[\"$\"] && node[\"$\"].key ? ` (${node[\"$\"].key})` : \"\");\n if (node._children && node._children.length > 0) {\n _node.children = node._children.map(_node => {\n return transformNode(_node);\n })\n .filter(n => n)\n ;\n } else if (typeof node.content === \"string\" && node.content.trim()) {\n _node.content = node.content;\n } else {\n return false;\n }\n return _node;\n }\n }\n\n updateDirectoryPane(contentStr) {\n let json;\n if (contentStr) {\n try {\n json = JSON.parse(contentStr);\n } catch (e) {\n json = xml2json(contentStr);\n }\n }\n if (json) {\n const _data = this.transformArchiveTreeData(json);\n this._directoryPane\n .data(_data)\n .render()\n ;\n }\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n this\n .addWidget(this._directoryPane)\n .addWidget(this._fileEditorPane)\n ;\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n\n const hash = hashSum({\n baseUrl: this.baseUrl(),\n wuid: this.wuid()\n });\n\n if (this._prevHash !== hash || typeof this._contentStr === \"undefined\") {\n Workunit.attach({ baseUrl: this.baseUrl() }, this.wuid())\n .fetchArchive()\n .then(resp => {\n\n this._contentStr = resp;\n this.updateDirectoryPane(this._contentStr);\n\n this._prevHash = hash;\n });\n } else {\n this.updateDirectoryPane(this._contentStr);\n }\n\n this.relativeSizes([this.directoryWidthRatio(), 1 - this.directoryWidthRatio()]);\n }\n}\nECLArchiveViewer.prototype._class += \" eclwatch_ECLArchiveViewer\";\n\nexport interface ECLArchiveViewer {\n directoryPaneColor(): string;\n directoryPaneColor(_: string): this;\n directoryPaneHoverColor(): string;\n directoryPaneHoverColor(_: string): this;\n fontColor(): string;\n fontColor(_: string): this;\n fontFamily(): string;\n fontFamily(_: string): this;\n fontSize(): number;\n fontSize(_: number): this;\n fileIconSize(): number;\n fileIconSize(_: number): this;\n folderIconOpen(): string;\n folderIconOpen(_: string): this;\n folderIconClosed(): string;\n folderIconClosed(_: string): this;\n textFileIcon(): string;\n textFileIcon(_: string): this;\n codeFileIcon(): string;\n codeFileIcon(_: string): this;\n verticalScroll(): boolean;\n verticalScroll(_: boolean): this;\n directoryWidthRatio(): number;\n directoryWidthRatio(_: number): this;\n baseUrl(): string;\n baseUrl(_: string): this;\n wuid(): string;\n wuid(_: string): this;\n}\nECLArchiveViewer.prototype.publish(\"baseUrl\", \"\", \"string\", \"HPCC Platform Base URL\");\nECLArchiveViewer.prototype.publish(\"wuid\", \"\", \"string\", \"Workunit ID\");\nECLArchiveViewer.prototype.publish(\"directoryWidthRatio\", 0.38, \"number\", \"Default directory panel width ratio relative to the full width\");\nECLArchiveViewer.prototype.publish(\"contentString\", null, \"string\", \"XML/JSON archive content string\");\nECLArchiveViewer.prototype.publishProxy(\"directoryPaneColor\", \"_directoryPane\", \"backgroundColor\");\nECLArchiveViewer.prototype.publishProxy(\"directoryPaneHoverColor\", \"_directoryPane\", \"hoverBackgroundColor\");\nECLArchiveViewer.prototype.publishProxy(\"iconSize\", \"_directoryPane\");\nECLArchiveViewer.prototype.publishProxy(\"fontColor\", \"_directoryPane\");\nECLArchiveViewer.prototype.publishProxy(\"fontFamily\", \"_directoryPane\");\nECLArchiveViewer.prototype.publishProxy(\"fontSize\", \"_directoryPane\");\nECLArchiveViewer.prototype.publishProxy(\"folderIconOpen\", \"_directoryPane\");\nECLArchiveViewer.prototype.publishProxy(\"folderIconClosed\", \"_directoryPane\");\nECLArchiveViewer.prototype.publishProxy(\"textFileIcon\", \"_directoryPane\");\nECLArchiveViewer.prototype.publishProxy(\"codeFileIcon\", \"_directoryPane\");\nECLArchiveViewer.prototype.publishProxy(\"verticalScroll\", \"_directoryPane\");\n","import { Vertex } from \"@hpcc-js/graph\";\nimport { Legend } from \"@hpcc-js/layout\";\nimport { local as d3Local, select as d3Select } from \"d3-selection\";\n\nimport \"../src/WUGraphLegend.css\";\n\nexport interface WUGraphLegendData {\n kind: number;\n faChar: string;\n label: string;\n count: number;\n}\n\nclass LegendVertex extends Vertex {\n\n constructor() {\n super();\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n this._icon.on(\"click\", () => {\n this.click(this.data());\n });\n }\n\n click(kind: number) {\n }\n}\n\nexport class WUGraphLegend extends Legend {\n\n private icon = d3Local<Vertex>();\n protected _disabled2: { [kind: number]: boolean } = {\n /* TODO: Default some to disabled?\n 43: true,\n 71: true,\n 82: true,\n 88: true\n */\n };\n\n disabled(): number[];\n disabled(_: number[]): this;\n disabled(_?: number[]): number[] | this {\n if (!arguments.length) {\n const retVal = [];\n for (const key in this._disabled2) {\n if (this._disabled2[key]) {\n retVal.push(key);\n }\n }\n return retVal;\n }\n this._disabled2 = {};\n _.forEach(kind => this._disabled2[kind] = true);\n return this;\n }\n\n toggle(kind: number) {\n this._disabled2[kind] = !this._disabled2[kind];\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n\n const context = this;\n const items = this._g.selectAll(\".legendItem\").data(this.data(), (d: any) => d.kind);\n items.enter().append(\"g\")\n .attr(\"class\", \"legendItem\")\n .each(function (this: HTMLElement, d) {\n context.icon.set(this, new LegendVertex()\n .target(this)\n .data(d.kind)\n .textbox_shape_colorStroke(\"none\")\n .textbox_shape_colorFill(\"none\")\n .iconAnchor(\"left\")\n .faChar(d.faChar)\n .text(`${d.label} (${d.count})`)\n .tooltip(`${d.kind} - ${d.label}`)\n .on(\"click\", kind => {\n context.toggle(kind);\n context.render();\n context.click(kind);\n })\n .on(\"mouseover\", kind => {\n context.mouseover(kind);\n })\n .on(\"mouseout\", kind => {\n context.mouseout(kind);\n })\n );\n })\n .merge(items)\n .each(function (this: HTMLElement, d, i) {\n const bbox = context.icon.get(this)\n .icon_shape_colorFill(context._disabled2[d.kind] ? \"gray\" : null)\n .render().getBBox();\n\n d3Select(this)\n .attr(\"transform\", `translate(${+bbox.width / 2}, ${i * 30})`)\n ;\n })\n ;\n items.exit()\n .each(function (this: HTMLElement, d) {\n context.icon.get(this)\n .target(null)\n .render();\n })\n .remove();\n const bbox = this.getBBox(true, true);\n this._g.attr(\"transform\", `translate(16, ${this.height() / 2 - bbox.height / 2})`);\n }\n\n // Events ---\n click(kind: number) {\n }\n\n mouseover(kind: number) {\n }\n\n mouseout(kind: number) {\n }\n}\nWUGraphLegend.prototype._class += \" eclwatch_WUGraphLegend\";\n","import { Icon } from \"@hpcc-js/common\";\nimport { BaseScope, ScopeEdge, ScopeGraph, ScopeSubgraph, ScopeVertex } from \"@hpcc-js/comms\";\nimport { Edge, IGraphData, Lineage, Subgraph, Vertex } from \"@hpcc-js/graph\";\nimport { Edge as UtilEdge, Subgraph as UtilSubgraph, Vertex as UtilVertex } from \"@hpcc-js/util\";\nimport { WUGraphLegendData } from \"./WUGraphLegend.ts\";\n\nexport type VertexType = Vertex | Icon;\n\nexport interface MyGraphData {\n subgraphs: Subgraph[];\n vertices: VertexType[];\n edges: Edge[];\n hierarchy: Lineage[];\n}\n\nfunction faCharFactory(kind): string {\n switch (kind) {\n case \"2\": return \"\\uf0c7\"; // Disk Write\n case \"3\": return \"\\uf15d\"; // sort\n case \"5\": return \"\\uf0b0\"; // Filter\n case \"6\": return \"\\uf1e0\"; // Split\n case \"12\": return \"\\uf039\"; // First N\n case \"15\": return \"\\uf126\"; // Lightweight Join\n case \"17\": return \"\\uf126\"; // Lookup Join\n case \"22\": return \"\\uf1e6\"; // Pipe Output\n case \"23\": return \"\\uf078\"; // Funnel\n case \"25\": return \"\\uf0ce\"; // Inline Dataset\n case \"26\": return \"\\uf074\"; // distribute\n case \"29\": return \"\\uf005\"; // Store Internal Result\n case \"36\": return \"\\uf128\"; // If\n case \"44\": return \"\\uf0c7\"; // write csv\n case \"47\": return \"\\uf0c7\"; // write\n case \"54\": return \"\\uf013\"; // Workunit Read\n case \"56\": return \"\\uf0c7\"; // Spill\n case \"59\": return \"\\uf126\"; // Merge\n case \"61\": return \"\\uf0c7\"; // write xml\n case \"82\": return \"\\uf1c0\"; // Projected Disk Read Spill\n case \"88\": return \"\\uf1c0\"; // Projected Disk Read Spill\n case \"92\": return \"\\uf129\"; // Limted Index Read\n case \"93\": return \"\\uf129\"; // Limted Index Read\n case \"99\": return \"\\uf1c0\"; // CSV Read\n case \"105\": return \"\\uf1c0\"; // CSV Read\n\n case \"7\": return \"\\uf090\"; // Project\n case \"9\": return \"\\uf0e2\"; // Local Iterate\n case \"16\": return \"\\uf005\"; // Output Internal\n case \"19\": return \"\\uf074\"; // Hash Distribute\n case \"21\": return \"\\uf275\"; // Normalize\n case \"35\": return \"\\uf0c7\"; // CSV Write\n case \"37\": return \"\\uf0c7\"; // Index Write\n case \"71\": return \"\\uf1c0\"; // Disk Read Spill\n case \"133\": return \"\\uf0ce\"; // Inline Dataset\n case \"148\": return \"\\uf0ce\"; // Inline Dataset\n case \"168\": return \"\\uf275\"; // Local Denormalize\n }\n return \"\\uf063\";\n}\n\nexport class WUScopeController {\n private graphDB: ScopeGraph;\n private subgraphsMap: { [id: string]: Subgraph } = {};\n private rSubgraphsMap: { [id: string]: ScopeSubgraph } = {};\n private verticesMap: { [id: string]: VertexType } = {};\n private rVerticesMap: { [id: string]: ScopeVertex } = {};\n private edgesMap: { [id: string]: Edge } = {};\n private rEdgesMap: { [id: string]: ScopeEdge } = {};\n private kindMap: { [id: string]: ScopeVertex[] } = {};\n\n protected _disabled: { [kind: number]: boolean } = {};\n\n constructor() {\n }\n\n clear() {\n this.subgraphsMap = {};\n this.rSubgraphsMap = {};\n this.verticesMap = {};\n this.rVerticesMap = {};\n this.edgesMap = {};\n this.rEdgesMap = {};\n }\n\n set(masterGraph: ScopeGraph) {\n this.graphDB = masterGraph;\n this.graphGui(this.graphDB);\n\n this.kindMap = {};\n this.graphDB.walk(item => {\n if (item instanceof UtilSubgraph) {\n } else if (item instanceof UtilVertex) {\n const kind = item._.attr(\"Kind\").RawValue;\n if (!this.kindMap[kind]) {\n this.kindMap[kind] = [];\n }\n this.kindMap[kind].push(item);\n } else if (item instanceof UtilEdge) {\n }\n });\n }\n\n disabled(): number[];\n disabled(_: number[]): this;\n disabled(_?: number[]): number[] | this {\n if (!arguments.length) {\n const retVal = [];\n for (const key in this._disabled) {\n if (this._disabled[key]) {\n retVal.push(key);\n }\n }\n return retVal;\n }\n this._disabled = {};\n _.forEach(kind => this._disabled[kind] = true);\n return this;\n }\n\n graphGui(graphDB: ScopeGraph): IGraphData {\n const graphGui: MyGraphData = {\n subgraphs: [],\n vertices: [],\n edges: [],\n hierarchy: []\n };\n\n graphDB.walk((item) => {\n if (item instanceof UtilSubgraph) {\n const subgraph = this.appendSubgraph(item, graphGui.hierarchy, graphGui.subgraphs);\n subgraph.showMinMax(item.vertices.length > 3 || subgraph.minState() !== \"normal\");\n } else if (item instanceof UtilVertex) {\n this.appendVertex(item, graphGui.hierarchy, graphGui.vertices);\n } else if (item instanceof UtilEdge) {\n this.appendEdge(item, graphGui.edges);\n }\n });\n\n return graphGui;\n }\n\n format(labelTpl, obj) {\n let retVal = \"\";\n let lpos = labelTpl.indexOf(\"%\");\n let rpos = -1;\n while (lpos >= 0) {\n retVal += labelTpl.substring(rpos + 1, lpos);\n rpos = labelTpl.indexOf(\"%\", lpos + 1);\n if (rpos < 0) {\n console.warn(\"Invalid Label Template\");\n break;\n }\n const key = labelTpl.substring(lpos + 1, rpos);\n retVal += !key ? \"%\" : (obj[labelTpl.substring(lpos + 1, rpos)] || \"\");\n lpos = labelTpl.indexOf(\"%\", rpos + 1);\n }\n retVal += labelTpl.substring(rpos + 1, labelTpl.length);\n return retVal.split(\"\\\\n\").join(\"\\n\");\n }\n\n createSubgraph(subgraph: ScopeSubgraph): Subgraph {\n let sg = this.subgraphsMap[subgraph._.Id];\n if (!sg) {\n sg = new Subgraph()\n .title(subgraph._.Id)\n .on(\"minClick\", () => {\n this.minClick(sg);\n })\n ;\n this.subgraphsMap[subgraph._.Id] = sg;\n this.rSubgraphsMap[sg.id()] = subgraph;\n }\n return sg;\n }\n\n createVertex(vertex: ScopeVertex): VertexType {\n let v = this.verticesMap[vertex._.Id];\n if (!v) {\n const attrs = vertex._.rawAttrs();\n if (vertex._.ScopeType === \"dummy\") {\n const parent = this.subgraphsMap[vertex.parent._.Id];\n v = new Icon()\n .shape_colorFill(\"darkred\")\n .shape_colorStroke(\"darkred\")\n .image_colorFill(\"white\")\n .faChar(\"\\uf067\")\n .on(\"click\", () => {\n parent.minState(\"normal\");\n this.minClick(parent);\n })\n ;\n } else {\n v = new Vertex()\n .icon_shape_colorFill(\"#1f77b4\")\n .icon_image_colorFill(\"white\")\n .faChar(faCharFactory(attrs[\"Kind\"]))\n .text(attrs[\"Label\"])\n ;\n const annotations = [];\n if (vertex._.hasAttr(\"Definition\")) {\n annotations.push({\n faChar: \"\\uf036\",\n tooltip: \"Definition\",\n shape_colorFill: \"lightgray\",\n shape_colorStroke: \"lightgray\",\n image_colorFill: \"black\"\n });\n }\n if (vertex._.hasAttr(\"IsInternal\")) {\n annotations.push({\n faChar: \"\\uf085\",\n tooltip: \"IsInternal\",\n shape_colorFill: \"red\",\n shape_colorStroke: \"red\",\n image_colorFill: \"white\"\n });\n }\n v.annotationIcons(annotations);\n }\n this.verticesMap[vertex._.Id] = v;\n this.rVerticesMap[v.id()] = vertex;\n }\n return v;\n }\n\n isSpill(edge: ScopeEdge): boolean {\n const sourceKind = edge.source._.attr(\"Kind\").RawValue;\n const targetKind = edge.target._.attr(\"Kind\").RawValue;\n return sourceKind === \"2\" || targetKind === \"71\";\n }\n\n spansSubgraph(edge: ScopeEdge): boolean {\n return edge.source.parent._.Id !== edge.target.parent._.Id;\n }\n\n createEdge(edge: ScopeEdge): Edge | undefined {\n let e = this.edgesMap[edge._.Id];\n if (!e) {\n const attrs = edge._.rawAttrs();\n const sourceV = this.verticesMap[edge.source._.Id];\n const targetV = this.verticesMap[edge.target._.Id];\n if (sourceV && targetV) {\n const isSpill = this.isSpill(edge);\n const spansSubgraph = this.spansSubgraph(edge);\n\n const label = this.format(\"%Label%\\n%NumRowsProcessed%\", attrs);\n /* TODO: Add extra annotations once WUDetails is fixed...\n const numSlaves = parseInt(attrs[\"NumSlaves\"]);\n const numStarts = parseInt(attrs[\"NumStarts\"]);\n const numStops = parseInt(attrs[\"NumStops\"]);\n const started = numStarts > 0;\n const finished = numStops === numSlaves;\n const active = started && !finished;\n */\n\n let strokeDasharray = null;\n let weight = 100;\n if (attrs[\"IsDependency\"]) {\n weight = 10;\n strokeDasharray = \"1,5\";\n } else if (attrs[\"_childGraph\"]) {\n strokeDasharray = \"5,5\";\n } else if (isSpill) {\n weight = 25;\n strokeDasharray = \"5,5,10,5\";\n } else if (spansSubgraph) {\n weight = 5;\n strokeDasharray = \"5,5\";\n }\n e = new Edge()\n .sourceVertex(sourceV)\n .targetVertex(targetV)\n .sourceMarker(\"circle\")\n .targetMarker(\"arrow\")\n .weight(weight)\n .strokeDasharray(strokeDasharray)\n .text(label)\n ;\n this.edgesMap[edge._.Id] = e;\n this.rEdgesMap[e.id()] = edge;\n }\n }\n return e;\n }\n\n appendSubgraph(subgraph: ScopeSubgraph, hierarchy: Lineage[], subgraphs: Subgraph[]): Subgraph {\n const sg = this.createSubgraph(subgraph);\n subgraphs.push(sg);\n const parent = this.subgraphsMap[subgraph.parent._.Id];\n if (parent) {\n hierarchy.push({ parent, child: sg });\n }\n return sg;\n }\n\n appendVertex(vertex: ScopeVertex, hierarchy: Lineage[], vertices: VertexType[]): VertexType {\n const v = this.createVertex(vertex);\n vertices.push(v);\n const parent = this.subgraphsMap[vertex.parent._.Id];\n if (parent) {\n hierarchy.push({ parent, child: v });\n }\n return v;\n }\n\n appendEdge(edge: ScopeEdge, edges: Edge[]): Edge {\n const e = this.createEdge(edge);\n if (e) {\n edges.push(e);\n }\n return e;\n }\n\n filterLegend(graphDB: ScopeGraph) {\n for (let i = graphDB.vertices.length - 1; i >= 0; --i) {\n const vertex = graphDB.vertices[i];\n const kind = vertex._.attr(\"Kind\").RawValue;\n if (this._disabled[kind]) {\n vertex.remove(false, (source: BaseScope, target: BaseScope) => {\n return new BaseScope({\n ScopeName: vertex._.ScopeName + \":in\",\n Id: source.Id + \"->\" + target.Id,\n ScopeType: \"dummy-edge\",\n Properties: {\n Property: [vertex._.attr(\"Label\")]\n },\n Notes: {\n Note: []\n },\n SinkActivity: \"\"\n });\n });\n }\n }\n }\n\n filterPartial(graphDB: ScopeGraph) {\n for (const subgraph of graphDB.subgraphs) {\n const sg = this.subgraphsMap[subgraph._.Id];\n switch (sg.minState()) {\n case \"partial\":\n const childVertices: ReadonlyArray<ScopeVertex> = subgraph.vertices;\n const vShow: ScopeVertex[] = [];\n const vHide: ScopeVertex[] = [];\n\n for (const vertex of childVertices) {\n if (vertex.inEdges.length === 0 || vertex.inEdges.some(edge => edge.source.parent !== edge.target.parent) ||\n vertex.outEdges.length === 0 || vertex.outEdges.some(edge => edge.source.parent !== edge.target.parent)) {\n vShow.push(vertex);\n } else {\n vHide.push(vertex);\n }\n }\n\n if (vHide.length > 1) {\n const dummyDetails = {\n ScopeName: subgraph._.ScopeName,\n Id: subgraph._.Id + \":dummy\",\n ScopeType: \"dummy\",\n Properties: {\n Property: [{\n Name: \"Activities\",\n RawValue: \"\" + vHide.length,\n Formatted: \"\" + vHide.length,\n Measure: \"count\",\n Creator: \"\",\n CreatorType: \"\"\n }]\n },\n Notes: {\n Note: []\n },\n SinkActivity: \"\"\n };\n const dummyScope = new BaseScope(dummyDetails);\n const dummyVertex = subgraph.createVertex(dummyScope);\n\n for (const vertex of vHide) {\n for (const edge of vertex.inEdges) {\n if (vShow.indexOf(edge.source) >= 0) {\n const dummyEdgeScope = new BaseScope({\n ScopeName: edge.source._.ScopeName,\n Id: edge.source._.Id + \"->\" + dummyVertex._.Id,\n ScopeType: \"dummy-in\",\n Properties: {\n Property: []\n },\n Notes: {\n Note: []\n },\n SinkActivity: \"\"\n });\n subgraph.createEdge(edge.source, dummyVertex, dummyEdgeScope);\n }\n }\n for (const edge of vertex.outEdges) {\n if (vShow.indexOf(edge.target) >= 0) {\n const dummyEdgeScope = new BaseScope({\n ScopeName: edge.target._.ScopeName,\n Id: dummyVertex._.Id + \"->\" + edge.target._.Id,\n ScopeType: \"dummy-out\",\n Properties: {\n Property: []\n },\n Notes: {\n Note: []\n },\n SinkActivity: \"\"\n });\n subgraph.createEdge(dummyVertex, edge.target, dummyEdgeScope);\n }\n }\n }\n vHide.forEach(vertex => vertex.remove(true));\n }\n break;\n }\n }\n }\n\n filterEmptySubgraphs(graphDB: ScopeGraph) {\n while (true) {\n const emptySubgraphs = graphDB.subgraphs.filter(subgraph => subgraph.subgraphs.length === 0 && subgraph.vertices.length === 0);\n if (emptySubgraphs.length === 0) break;\n emptySubgraphs.forEach(subgraph => subgraph.remove(true));\n }\n }\n\n removeObsoleteSubgraphs(graphDB: ScopeGraph) {\n for (const subgraph of [...graphDB.subgraphs]) {\n if (subgraph.vertices.length === 0) {\n subgraph.remove(false);\n }\n }\n }\n\n graphData(): IGraphData {\n const graphDB = this.graphDB.clone();\n this.filterLegend(graphDB);\n this.filterPartial(graphDB);\n this.filterEmptySubgraphs(graphDB);\n this.removeObsoleteSubgraphs(graphDB);\n return this.graphGui(graphDB);\n }\n\n calcLegend(): WUGraphLegendData[] {\n const retVal: WUGraphLegendData[] = [];\n for (const kind in this.kindMap) {\n retVal.push({\n kind: parseInt(kind),\n faChar: faCharFactory(kind),\n label: this.kindMap[kind][0]._.attr(\"Label\").RawValue.split(\"\\n\")[0],\n count: this.kindMap[kind].length\n });\n }\n return retVal;\n }\n\n vertices(kind: number): VertexType[] {\n const retVal: VertexType[] = [];\n for (const v of this.kindMap[kind]) {\n retVal.push(this.verticesMap[v._.Id]);\n }\n return retVal;\n }\n\n formatRow(item: ScopeEdge | ScopeSubgraph | ScopeVertex, columns, row) {\n const attrs = item._.formattedAttrs();\n for (const key in attrs) {\n const idx = columns.indexOf(key);\n if (idx === -1) {\n columns.push(key);\n row.push(attrs[key]);\n } else {\n row[idx] = attrs[key];\n }\n }\n for (let i = 0; i < 100; ++i) {\n if (row[i] === undefined) {\n row[i] = \"\";\n }\n }\n return row;\n }\n\n activityData(): { columns: string[], data: any[][] } {\n const columns = [\"Id\", \"Kind\", \"Label\"];\n const data = this.graphDB.vertices.map(v => {\n const row = [parseInt(v._.Id.split(\"a\")[1])];\n return this.formatRow(v, columns, row);\n });\n return { columns, data };\n }\n\n edgeData(): { columns: string[], data: any[][] } {\n const columns = [\"Id\", \"Label\"];\n const data = this.graphDB.edges.map(e => {\n const row = [e._.Id];\n return this.formatRow(e, columns, row);\n });\n return { columns, data };\n }\n\n subgraphData(): { columns: string[], data: any[][] } {\n const columns = [\"Id\", \"Label\"];\n const data = this.graphDB.subgraphs.map(sg => {\n const row = [sg._.Id];\n return this.formatRow(sg, columns, row);\n });\n return { columns, data };\n }\n\n calcGraphTooltip(item: VertexType | Edge) {\n let scope;\n let parentScope;\n if (item instanceof Subgraph) {\n const subgraph = this.rSubgraphsMap[item.id()];\n scope = subgraph._;\n parentScope = subgraph.parent._;\n } else if (item instanceof Vertex || item instanceof Icon) {\n const vertex = this.rVerticesMap[item.id()];\n scope = vertex._;\n parentScope = vertex.parent._;\n } else if (item instanceof Edge) {\n const edge = this.rEdgesMap[item.id()];\n scope = edge._;\n parentScope = edge.parent._;\n }\n if (scope) {\n return scope.calcTooltip(parentScope);\n }\n return \"\";\n }\n\n subgraph(id: string): Subgraph | undefined {\n return this.subgraphsMap[id];\n }\n\n vertex(id: string): VertexType | undefined {\n return this.verticesMap[id];\n }\n\n edge(id: string): Edge {\n return this.edgesMap[id];\n }\n\n // Events ---\n minClick(sg: Subgraph) {\n }\n}\n","import { Button, Spacer, ToggleButton, Widget } from \"@hpcc-js/common\";\nimport { ScopeGraph, Workunit } from \"@hpcc-js/comms\";\nimport { Table } from \"@hpcc-js/dgrid\";\nimport { Graph as GraphWidget, Subgraph, Vertex } from \"@hpcc-js/graph\";\nimport { Carousel, ChartPanel } from \"@hpcc-js/layout\";\nimport { hashSum } from \"@hpcc-js/util\";\nimport { WUGraphLegend } from \"./WUGraphLegend.ts\";\nimport { WUScopeController } from \"./WUScopeController.ts\";\n\nimport \"../src/WUGraph.css\";\n\nexport class WUGraph extends ChartPanel {\n\n private _partialAll = new Button().faChar(\"fa-window-restore\").tooltip(\"Partial All\")\n .on(\"click\", () => {\n this.stateClick(this._partialAll);\n });\n\n private _maxAll = new Button().faChar(\"fa-window-maximize\").tooltip(\"Max All\")\n .on(\"click\", () => {\n this.stateClick(this._maxAll);\n });\n\n private _toggleGraph = new ToggleButton().faChar(\"fa-chain\").tooltip(\"Graph\")\n .selected(true)\n .on(\"click\", () => {\n this.viewClick(this._toggleGraph);\n });\n\n private _toggleActivities = new ToggleButton().faChar(\"fa-table\").tooltip(\"Activitiies\")\n .selected(false)\n .on(\"click\", () => {\n this.viewClick(this._toggleActivities);\n });\n\n private _toggleEdges = new ToggleButton().faChar(\"fa-table\").tooltip(\"Edges\")\n .selected(false)\n .on(\"click\", () => {\n this.viewClick(this._toggleEdges);\n });\n\n private _toggleSubgraphs = new ToggleButton().faChar(\"fa-table\").tooltip(\"Subgraphs\")\n .selected(false)\n .on(\"click\", () => {\n this.viewClick(this._toggleSubgraphs);\n });\n\n protected _graph = new GraphWidget()\n .layout(\"Hierarchy\")\n .applyScaleOnLayout(true)\n .showToolbar(false)\n .allowDragging(false)\n ;\n\n private _activities = new Table()\n .pagination(false)\n ;\n\n private _edges = new Table()\n .pagination(false)\n ;\n\n private _subgraphs = new Table()\n .pagination(false)\n ;\n\n protected _legend = new WUGraphLegend(this)\n .on(\"click\", kind => {\n this.render();\n })\n .on(\"mouseover\", kind => {\n const verticesMap: { [id: string]: boolean } = {};\n for (const vertex of this._gc.vertices(kind)) {\n verticesMap[vertex.id()] = true;\n }\n this._graph.highlightVerticies(verticesMap);\n })\n .on(\"mouseout\", kind => {\n this._graph.highlightVerticies();\n })\n ;\n\n protected _view = new Carousel().widgets([this._graph, this._activities, this._edges, this._subgraphs]);\n\n protected _gc = new WUScopeController();\n\n constructor() {\n super();\n this.topOverlay(false);\n this.widget(this._view);\n const buttons: Widget[] = [\n this._toggleGraph,\n this._toggleActivities,\n this._toggleEdges,\n this._toggleSubgraphs,\n new Spacer(),\n this._partialAll,\n this._maxAll,\n new Spacer(),\n ...this._graph.iconBarButtons(),\n new Spacer()];\n this.buttons(buttons.concat(this.buttons()));\n this._gc.minClick = (sg: Subgraph) => {\n this.loadGraph();\n this._graph.render(w => {\n this._graph\n .selection([sg])\n .centerOnItem(sg)\n ;\n });\n };\n\n this._graph.tooltipHTML((v: Vertex) => {\n return this._gc.calcGraphTooltip(v);\n });\n }\n\n stateClick(sourceB: Button) {\n switch (sourceB) {\n case this._partialAll:\n this._graph.data().subgraphs.forEach((sg: Subgraph) => {\n sg.minState(\"partial\");\n });\n break;\n case this._maxAll:\n this._graph.data().subgraphs.forEach((sg: Subgraph) => {\n sg.minState(\"normal\");\n });\n break;\n }\n this.render();\n }\n\n viewClick(sourceTB: ToggleButton) {\n this._toggleGraph.selected(sourceTB === this._toggleGraph);\n this._toggleActivities.selected(sourceTB === this._toggleActivities);\n this._toggleEdges.selected(sourceTB === this._toggleEdges);\n this._toggleSubgraphs.selected(sourceTB === this._toggleSubgraphs);\n switch (sourceTB) {\n case this._toggleGraph:\n this._view.active(0);\n break;\n case this._toggleActivities:\n this._view.active(1);\n break;\n case this._toggleEdges:\n this._view.active(2);\n break;\n case this._toggleSubgraphs:\n this._view.active(3);\n break;\n }\n this.render(w => {\n });\n }\n\n private _prevHashSum;\n private _prevScopeGraph: ScopeGraph;\n fetchScopeGraph(): Promise<ScopeGraph> {\n const hash = hashSum({\n baseUrl: this.baseUrl(),\n wuid: this.wuid(),\n graphID: this.graphID(),\n subgraphID: this.subgraphID()\n });\n if (!this._prevScopeGraph || this._prevHashSum !== hash) {\n this.startProgress();\n this._prevHashSum = hash;\n this._gc.clear();\n const wu = Workunit.attach({ baseUrl: this.baseUrl() }, this.wuid());\n return wu.fetchGraphs().then(graphs => {\n for (const graph of graphs) {\n if (graph.Name === this.graphID()) {\n this.finishProgress();\n return graph.fetchScopeGraph(this.subgraphID());\n }\n }\n }).then(scopeGraph => {\n this._prevScopeGraph = scopeGraph;\n return this._prevScopeGraph;\n });\n }\n return Promise.resolve(this._prevScopeGraph);\n }\n\n enter(domNode, _element) {\n super.enter(domNode, _element);\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n }\n\n exit(domNode, element) {\n super.exit(domNode, element);\n }\n\n loadGraph() {\n this._gc.disabled(this._legend.disabled());\n this._graph\n .data(this._gc.graphData(), true)\n ;\n {\n const { columns, data } = this._gc.activityData();\n this._activities\n .columns(columns)\n .data(data)\n ;\n }\n {\n const { columns, data } = this._gc.edgeData();\n this._edges\n .columns(columns)\n .data(data)\n ;\n }\n {\n const { columns, data } = this._gc.subgraphData();\n this._subgraphs\n .columns(columns)\n .data(data)\n ;\n }\n }\n\n render(callback?: (w: Widget) => void): this {\n if (this.wuid() && this.graphID()) {\n this.fetchScopeGraph().then(scopedGraph => {\n this._gc.set(scopedGraph);\n this._legend.data(this._gc.calcLegend());\n this.loadGraph();\n super.render(callback);\n });\n } else {\n super.render(callback);\n }\n return this;\n }\n\n selection(_?) {\n if (!arguments.length) return this._graph.selection();\n const item = this._gc.vertex(_) || this._gc.edge(_) || this._gc.subgraph(_);\n if (item) {\n this._graph.selection([item]);\n }\n return this;\n }\n}\nWUGraph.prototype._class += \" eclwatch_WUGraph\";\n\nexport interface WUGraph {\n baseUrl(): string;\n baseUrl(_: string): this;\n wuid(): string;\n wuid(_: string): this;\n graphID(): string;\n graphID(_: string): this;\n subgraphID(): string;\n subgraphID(_: string): this;\n}\n\nWUGraph.prototype.publish(\"baseUrl\", \"\", \"string\", \"HPCC Platform Base URL\");\nWUGraph.prototype.publish(\"wuid\", \"\", \"string\", \"Workunit ID\");\nWUGraph.prototype.publish(\"graphID\", \"\", \"string\", \"Graph ID\");\nWUGraph.prototype.publish(\"subgraphID\", \"\", \"string\", \"Subgraph ID\");\n","import { ResultFilter, Result, XSDSchema, XSDXMLNode } from \"@hpcc-js/comms\";\nimport { ColumnType, Deferred, domConstruct, QueryResults, RowFormatter } from \"@hpcc-js/dgrid\";\n\nfunction entitiesEncode(str) {\n return String(str).replace(/&/g, \"&\").replace(/</g, \"<\").replace(/>/g, \">\").replace(/\"/g, \""\");\n}\n\nfunction safeEncode(item) {\n switch (Object.prototype.toString.call(item)) {\n case \"[object Undefined]\":\n case \"[object Boolean]\":\n case \"[object Number]\":\n return item;\n case \"[object String]\":\n return entitiesEncode(item);\n default:\n console.warn(\"Unknown cell type: \" + Object.prototype.toString.call(item)); \n }\n return item;\n}\n\nexport class Store {\n protected wuResult: Result;\n protected schema: XSDSchema;\n protected _columns: any[];\n protected _cache: { [key: string]: Promise<{ totalLength: number, data: any[] }> } = {};\n private rowFormatter: RowFormatter;\n protected _filter: ResultFilter = {};\n\n constructor(wuResult: Result, schema: XSDSchema, renderHtml: boolean, filter: ResultFilter = {}) {\n this.wuResult = wuResult;\n this.schema = schema;\n this._columns = this.schema2Columns(this.schema.root);\n this.rowFormatter = new RowFormatter(this._columns, renderHtml);\n this._filter = filter;\n }\n\n columns() {\n return this._columns;\n }\n\n schema2Columns(parentNode: XSDXMLNode, prefix: string = \"\"): ColumnType[] {\n if (!parentNode) return [];\n return parentNode.children().filter(node => node.name.indexOf(\"__hidden\", node.name.length - \"__hidden\".length) === -1).map((node, idx) => {\n const label = node.name;\n const keyed = node.attrs[\"hpcc:keyed\"];\n const column: ColumnType = {\n field: prefix + label,\n leafID: label,\n idx,\n label: label + (keyed ? \" (i)\" : \"\"),\n className: \"resultGridCell\",\n sortable: false,\n width: keyed ? 16 : 0,\n isSet: node.isSet\n };\n const children = this.schema2Columns(node, prefix + label + \"_\");\n if (children.length) {\n column.width += 10 + children.reduce((prev: number, childNode: ColumnType) => {\n return prev + childNode.width!;\n }, 0);\n column.children = children;\n } else {\n column.width += node.charWidth() * 9;\n column.formatter = (cell, row) => {\n switch (typeof cell) {\n case \"string\":\n return {\n html: cell.replace(/\\t/g, \" \").trim()\n };\n case \"undefined\":\n return \"\";\n }\n return cell;\n };\n }\n return column;\n });\n }\n\n isChildDataset(cell) {\n if (Object.prototype.toString.call(cell) !== \"[object Object]\") {\n return false;\n }\n let propCount = 0;\n let firstPropType = null;\n for (const key in cell) {\n if (!firstPropType) {\n firstPropType = Object.prototype.toString.call(cell[key]);\n }\n propCount++;\n }\n return propCount === 1 && firstPropType === \"[object Array]\";\n }\n\n rowToTable(cell, __row, node) {\n if (this.isChildDataset(cell)) { // Don't display \"Row\" as a header ---\n for (const key in cell) {\n this.rowToTable(cell[key], __row, node);\n }\n return;\n }\n\n const table = domConstruct.create(\"table\", { border: 1, cellspacing: 0, width: \"100%\" }, node);\n switch (Object.prototype.toString.call(cell)) {\n case \"[object Object]\":\n let tr = domConstruct.create(\"tr\", null, table);\n for (const key in cell) {\n domConstruct.create(\"th\", { innerHTML: safeEncode(key) }, tr);\n }\n tr = domConstruct.create(\"tr\", null, table);\n for (const key in cell) {\n switch (Object.prototype.toString.call(cell[key])) {\n case \"[object Object]\":\n case \"[object Array]\":\n this.rowToTable(cell[key], __row, node);\n break;\n default:\n domConstruct.create(\"td\", { innerHTML: safeEncode(cell[key]) }, tr);\n break;\n }\n }\n break;\n case \"[object Array]\":\n for (let i = 0; i < cell.length; ++i) {\n switch (Object.prototype.toString.call(cell[i])) {\n case \"[object Boolean]\":\n case \"[object Number]\":\n case \"[object String]\":\n // Item in Scalar ---\n const tr1 = domConstruct.create(\"tr\", null, table);\n domConstruct.create(\"td\", { innerHTML: safeEncode(cell[i]) }, tr1);\n break;\n default:\n // Child Dataset ---\n if (i === 0) {\n const tr2 = domConstruct.create(\"tr\", null, table);\n for (const key in cell[i]) {\n domConstruct.create(\"th\", { innerHTML: safeEncode(key) }, tr2);\n }\n }\n domConstruct.create(\"tr\", null, table);\n for (const key in cell[i]) {\n if (cell[i][key]) {\n if (Object.prototype.toString.call(cell[i][key]) === \"[object Object]\" || Object.prototype.toString.call(cell[i][key]) === \"[object Array]\") {\n const td = domConstruct.create(\"td\", null, tr1);\n this.rowToTable(cell[i][key], cell[i], td);\n } else if (key.indexOf(\"__html\", key.length - \"__html\".length) !== -1) {\n domConstruct.create(\"td\", { innerHTML: cell[i][key] }, tr1);\n } else if (key.indexOf(\"__javascript\", key.length - \"__javascript\".length) !== -1) {\n /*const td = */ domConstruct.create(\"td\", null, tr1);\n // this.injectJavascript(cell[i][key], cell[i], td);\n } else {\n const val = cell[i][key];\n domConstruct.create(\"td\", { innerHTML: safeEncode(val) }, tr1);\n }\n } else {\n domConstruct.create(\"td\", { innerHTML: \"\" }, tr1);\n }\n }\n }\n }\n break;\n }\n }\n\n getIdentity(row) {\n return row.__hpcc_id;\n }\n\n _request(start, end): Promise<{ totalLength: number, data: any[] }> {\n if (!this.wuResult) return Promise.resolve({ totalLength: 0, data: [] });\n const cacheKey = `${start}->${end}`;\n if (this._cache[cacheKey]) return this._cache[cacheKey];\n const retVal = this.wuResult.fetchRows(start, end - start, false, this._filter).then((rows: any[]) => {\n return {\n totalLength: this.wuResult.Total,\n data: rows.map((row, idx) => {\n const formattedRow: any = this.rowFormatter.format(row);\n formattedRow.__hpcc_id = start + idx;\n formattedRow.__hpcc_orig = row;\n return formattedRow;\n })\n };\n });\n this._cache[cacheKey] = retVal;\n return retVal;\n }\n\n fetchRange(options): Promise<any[]> {\n const retVal = new Deferred();\n this._request(options.start, options.end).then(response => retVal.resolve(response));\n return new QueryResults(retVal.then(response => response.data), {\n totalLength: retVal.then(response => response.totalLength)\n });\n }\n}\n","import { ResultFilter, IOptions, Result } from \"@hpcc-js/comms\";\nimport { Common } from \"@hpcc-js/dgrid\";\nimport { hashSum } from \"@hpcc-js/util\";\nimport { Store } from \"./WUResultStore.ts\";\n\nexport class WUResult extends Common {\n\n protected _result: Result;\n protected _localStore: Store;\n\n constructor() {\n super();\n this.renderHtml(false);\n }\n\n hashSum(opts: any = {}) {\n return hashSum({\n baseUrl: this.baseUrl(),\n wuid: this.wuid(),\n resultName: this.resultName(),\n sequence: this.sequence(),\n nodeGroup: this.nodeGroup(),\n logicalFile: this.logicalFile(),\n userID: this.user(),\n password: this.password(),\n ...opts\n });\n }\n\n protected _prevResultHash: string;\n calcResult(): Result | null {\n const resultHash = this.hashSum();\n if (this._prevResultHash !== resultHash) {\n this._prevResultHash = resultHash;\n\n const opts: IOptions = {\n baseUrl: this.baseUrl(),\n userID: this.user(),\n password: this.password()\n };\n if (this.wuid() && this.resultName()) {\n this._result = Result.attach(opts, this.wuid(), this.resultName());\n } else if (this.wuid() && this.sequence() !== undefined) {\n this._result = Result.attach(opts, this.wuid(), this.sequence());\n } else if (this.logicalFile() && this.nodeGroup()) {\n this._result = Result.attachLogicalFile(opts, this.nodeGroup(), this.logicalFile());\n } else if (this.logicalFile()) {\n this._result = Result.attachLogicalFile(opts, \"\", this.logicalFile());\n }\n }\n return this._result;\n }\n\n fetch(row, count, abortController = new AbortController()): Promise<object[]> {\n const result = this.calcResult();\n if (result) {\n return result.fetchRows(row, count, false, {}, abortController.signal);\n }\n return Promise.resolve([]);\n }\n\n protected _prevStoreHash: string;\n protected _prevQueryHash: string;\n update(domNode, element) {\n super.update(domNode, element);\n const storeHash = this.hashSum({\n renderHtml: this.renderHtml(),\n filter: this.filter()\n });\n if (this._prevStoreHash !== storeHash) {\n this._prevStoreHash = storeHash;\n const result = this.calcResult();\n if (result) {\n result.fetchXMLSchema().then(schema => {\n this._localStore = new Store(result, schema, this.renderHtml(), this.filter());\n this._dgrid?.set(\"columns\", this._localStore.columns());\n this._dgrid?.set(\"collection\", this._localStore);\n });\n }\n }\n }\n\n click(row, col, sel) {\n }\n}\nWUResult.prototype._class += \" eclwatch_WUResult\";\n\nexport interface WUResult {\n baseUrl(): string;\n baseUrl(_: string): this;\n user(): string;\n user(_: string): this;\n password(): string;\n password(_: string): this;\n wuid(): string;\n wuid(_: string): this;\n resultName(): string;\n resultName(_: string): this;\n sequence(): number;\n sequence(_: number): this;\n nodeGroup(): string;\n nodeGroup(_: string): this;\n logicalFile(): string;\n logicalFile(_: string): this;\n filter(): ResultFilter;\n filter(_: ResultFilter): this;\n}\n\nWUResult.prototype.publish(\"baseUrl\", \"\", \"string\", \"URL to WsWorkunits\");\nWUResult.prototype.publish(\"user\", \"\", \"string\", \"User ID\");\nWUResult.prototype.publish(\"password\", \"\", \"string\", \"Password\");\nWUResult.prototype.publish(\"wuid\", \"\", \"string\", \"Workunit ID\");\nWUResult.prototype.publish(\"resultName\", \"\", \"string\", \"Result Name\");\nWUResult.prototype.publish(\"sequence\", undefined, \"number\", \"Sequence Number\");\nWUResult.prototype.publish(\"nodeGroup\", \"\", \"string\", \"NodeGroup\");\nWUResult.prototype.publish(\"logicalFile\", \"\", \"string\", \"Logical File Name\");\nWUResult.prototype.publish(\"filter\", {}, \"object\", \"Filter\");\n","import { Workunit, WUStateID } from \"@hpcc-js/comms\";\nimport { Edge, Graph, Vertex } from \"@hpcc-js/graph\";\nimport { hashSum, IObserverHandle } from \"@hpcc-js/util\";\n\nexport enum STATUS {\n CREATE = \"Created\",\n COMPILE = \"Compiled\",\n EXECUTE = \"Executed\",\n COMPLETE = \"Completed\"\n}\n\nexport enum STATUS_ACTIVE {\n CREATE = \"Creating\",\n COMPILE = \"Compiling\",\n EXECUTE = \"Executing\",\n COMPLETE = \"Completed\"\n}\n\nexport class WUStatus extends Graph {\n\n protected _wu: Workunit;\n protected _wuHandle: IObserverHandle;\n\n protected _create: Vertex;\n protected _compile: Vertex;\n protected _execute: Vertex;\n protected _complete: Vertex;\n\n constructor() {\n super();\n this\n .zoomable(false)\n .zoomToFitLimit(1)\n .layout(\"Hierarchy\")\n .hierarchyRankDirection(\"LR\")\n .showToolbar(false)\n .allowDragging(false)\n ;\n }\n\n private _prevHash;\n attachWorkunit() {\n const hash = hashSum({\n baseUrl: this.baseUrl(),\n wuid: this.wuid()\n });\n if (this._prevHash !== hash) {\n this._prevHash = hash;\n this._wu = Workunit.attach({ baseUrl: this.baseUrl() }, this.wuid());\n if (this._wuHandle) {\n this._wuHandle.release();\n }\n this._wuHandle = this._wu.watch(changes => {\n this.lazyRender();\n });\n }\n }\n\n createVertex(faChar: string) {\n return new Vertex()\n .icon_diameter(32)\n .icon_shape_colorFill(\"none\")\n .icon_shape_colorStroke(\"none\")\n .icon_image_colorFill(\"darkgray\")\n .iconAnchor(\"middle\")\n .textbox_shape_colorFill(\"none\")\n .textbox_shape_colorStroke(\"none\")\n .textbox_text_colorFill(\"darkgray\")\n .faChar(faChar)\n ;\n }\n\n updateVertex(vertex: Vertex, color: string) {\n vertex\n .icon_image_colorFill(color)\n .textbox_text_colorFill(color)\n ;\n }\n\n updateVertexStatus(level: 0 | 1 | 2 | 3 | 4, active: boolean = false) {\n const completeColor = this._wu.isFailed() ? \"darkred\" : \"darkgreen\";\n this._create.text(STATUS.CREATE);\n this._compile.text(STATUS.COMPILE);\n this._execute.text(STATUS.EXECUTE);\n this._complete.text(STATUS.COMPLETE);\n switch (level) {\n case 0:\n this.updateVertex(this._create, \"darkgray\");\n this.updateVertex(this._compile, \"darkgray\");\n this.updateVertex(this._execute, \"darkgray\");\n this.updateVertex(this._complete, \"darkgray\");\n break;\n case 1:\n this._create.text(STATUS_ACTIVE.CREATE);\n this.updateVertex(this._create, active ? \"orange\" : completeColor);\n this.updateVertex(this._compile, \"darkgray\");\n this.updateVertex(this._execute, \"darkgray\");\n this.updateVertex(this._complete, \"darkgray\");\n break;\n case 2:\n this._compile.text(STATUS_ACTIVE.COMPILE);\n this.updateVertex(this._create, completeColor);\n this.updateVertex(this._compile, active ? \"orange\" : completeColor);\n this.updateVertex(this._execute, completeColor);\n this.updateVertex(this._complete, \"darkgray\");\n break;\n case 3:\n this._execute.text(STATUS_ACTIVE.EXECUTE);\n this.updateVertex(this._create, completeColor);\n this.updateVertex(this._compile, completeColor);\n this.updateVertex(this._execute, active ? \"orange\" : completeColor);\n this.updateVertex(this._complete, \"darkgray\");\n break;\n case 4:\n this.updateVertex(this._create, completeColor);\n this.updateVertex(this._compile, completeColor);\n this.updateVertex(this._execute, completeColor);\n this.updateVertex(this._complete, completeColor);\n break;\n }\n }\n\n createEdge(source, target) {\n return new Edge()\n .sourceVertex(source)\n .targetVertex(target)\n .strokeColor(\"black\")\n .showArc(false)\n ;\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n this._create = this.createVertex(\"\\uf11d\");\n this._compile = this.createVertex(\"\\uf085\");\n this._execute = this.createVertex(\"\\uf275\");\n this._complete = this.createVertex(\"\\uf11e\");\n const e1 = this.createEdge(this._create, this._compile);\n const e2 = this.createEdge(this._compile, this._execute);\n const e3 = this.createEdge(this._execute, this._complete);\n this.data({\n vertices: [this._create, this._compile, this._execute, this._complete],\n edges: [e1, e2, e3]\n });\n }\n\n update(domNode, element) {\n this.attachWorkunit();\n switch (this._wu.StateID) {\n case WUStateID.Blocked:\n case WUStateID.Wait:\n case WUStateID.Scheduled:\n case WUStateID.UploadingFiled:\n this.updateVertexStatus(1);\n break;\n case WUStateID.Compiling:\n this.updateVertexStatus(2, true);\n break;\n case WUStateID.Submitted:\n this.updateVertexStatus(1, true);\n break;\n case WUStateID.Compiled:\n this.updateVertexStatus(2);\n break;\n case WUStateID.Aborting:\n case WUStateID.Running:\n this.updateVertexStatus(3, true);\n break;\n case WUStateID.Aborted:\n case WUStateID.Archived:\n case WUStateID.Completed:\n this.updateVertexStatus(4);\n break;\n case WUStateID.Failed:\n this.updateVertexStatus(4, false);\n break;\n case WUStateID.DebugPaused:\n case WUStateID.DebugRunning:\n case WUStateID.Paused:\n case WUStateID.Unknown:\n default:\n this.updateVertexStatus(0);\n break;\n }\n super.update(domNode, element);\n this.zoomToFit();\n }\n\n exit(domNode, element) {\n if (this._wuHandle) {\n this._wuHandle.release();\n }\n super.exit(domNode, element);\n }\n}\nWUStatus.prototype._class += \" eclwatch_WUStatus\";\n\nexport interface WUStatus {\n baseUrl(): string;\n baseUrl(_: string): this;\n wuid(): string;\n wuid(_: string): this;\n}\n\nWUStatus.prototype.publish(\"baseUrl\", \"\", \"string\", \"HPCC Platform Base URL\");\nWUStatus.prototype.publish(\"wuid\", \"\", \"string\", \"Workunit ID\");\n","import { Palette } from \"@hpcc-js/common\";\nimport { Scope, Workunit, WsWorkunits } from \"@hpcc-js/comms\";\nimport { ReactTimelineSeries } from \"@hpcc-js/timeline\";\nimport { hashSum, RecursivePartial } from \"@hpcc-js/util\";\n\nimport \"../src/WUGraph.css\";\n\nconst columns = [\"label\", \"start\", \"end\", \"icon\", \"color\", \"series\"];\n\nexport class WUTimeline extends ReactTimelineSeries {\n\n protected _palette = Palette.ordinal(\"default\");\n\n constructor() {\n super();\n this\n .columns(columns)\n .titleColumn(\"label\")\n .iconColumn(\"icon\")\n .colorColumn(\"color\")\n .seriesColumn(\"series\")\n .timePattern(\"%Y-%m-%dT%H:%M:%S.%LZ\")\n .tickFormat(\"%H:%M\")\n .tooltipTimeFormat(\"%H:%M:%S.%L\")\n .tooltipHTML(d => {\n return d[columns.length].calcTooltip();\n })\n ;\n }\n\n private _prevHashSum;\n clear(): this {\n delete this._prevHashSum;\n return this;\n }\n fetchScopes() {\n const hash = hashSum({\n baseUrl: this.baseUrl(),\n wuid: this.wuid(),\n request: this.request()\n });\n if (this._prevHashSum !== hash) {\n this._prevHashSum = hash;\n const wu = Workunit.attach({ baseUrl: this.baseUrl() }, this.wuid());\n wu.fetchDetails(this.request()).then(scopes => {\n return scopes.filter(scope => scope.Id && scope.attr(\"WhenStarted\").RawValue).map((scope: Scope) => {\n const whenStarted = +scope.attr(\"WhenStarted\").RawValue / 1000;\n const timeElapsed = +scope.attr(\"TimeElapsed\").RawValue / 1000000;\n return [\n scope.Id,\n new Date(whenStarted).toISOString(),\n timeElapsed ? new Date(whenStarted + timeElapsed).toISOString() : undefined,\n null,\n this._palette(scope.ScopeType),\n scope.ScopeName.split(\"::\").join(\":\").split(\":\").slice(0, 1),\n scope\n ];\n });\n }).then(scopes => {\n this\n .data(scopes)\n .render()\n ;\n });\n }\n }\n\n enter(domNode, _element) {\n super.enter(domNode, _element);\n }\n\n update(domNode, element) {\n this.fetchScopes();\n super.update(domNode, element);\n }\n\n exit(domNode, element) {\n super.exit(domNode, element);\n }\n}\nWUTimeline.prototype._class += \" eclwatch_WUTimeline\";\n\nexport interface WUTimeline {\n baseUrl(): string;\n baseUrl(_: string): this;\n wuid(): string;\n wuid(_: string): this;\n request(): Partial<WsWorkunits.WUDetails>;\n request(_: RecursivePartial<WsWorkunits.WUDetails>): this;\n}\n\nWUTimeline.prototype.publish(\"baseUrl\", \"\", \"string\", \"HPCC Platform Base URL\");\nWUTimeline.prototype.publish(\"wuid\", \"\", \"string\", \"Workunit ID\");\nWUTimeline.prototype.publish(\"request\", {\n ScopeFilter: {\n MaxDepth: 3,\n ScopeTypes: [\"graph\", \"subgraph\"]\n },\n NestedFilter: {\n Depth: 0,\n ScopeTypes: []\n },\n PropertiesToReturn: {\n AllProperties: false,\n AllStatistics: true,\n AllHints: false,\n Properties: [\"WhenStarted\", \"TimeElapsed\"]\n },\n ScopeOptions: {\n IncludeId: true,\n IncludeScope: true,\n IncludeScopeType: true\n },\n PropertyOptions: {\n IncludeName: true,\n IncludeRawValue: true,\n IncludeFormatted: true,\n IncludeMeasure: true,\n IncludeCreator: false,\n IncludeCreatorType: false\n }\n}, \"object\", \"WUDetails Request\");\n"],"names":["SplitPanel","DirectoryTree","Editor","_node","xml2json","hashSum","Workunit","Vertex","Legend","d3Local","bbox","d3Select","UtilSubgraph","UtilVertex","UtilEdge","Subgraph","Icon","Edge","BaseScope","columns","ChartPanel","Button","ToggleButton","GraphWidget","Table","Carousel","Spacer","graph","RowFormatter","domConstruct","Deferred","QueryResults","Common","Result","STATUS","STATUS_ACTIVE","Graph","WUStateID","ReactTimelineSeries","Palette"],"mappings":"qzCAAO,MAAM,SAAW,oBACX,YAAc,QACd,cAAgB,QCItB,MAAM,yBAAyBA,SAAAA,UAAW,CAQ7C,aAAc,CACV,MAAM,YAAY,EARd,gCACA,kCACD,oCAAiB,IAAIC,KAAAA,eACrB,qCAAkB,IAAIC,WAAAA,SACxB,KAAK,EAAE,GAKH,KAAA,eAAe,SAAY,MAAS,CACrC,KAAK,gBACA,KAAK,IAAI,EACT,OAAO,CAEhB,CAAA,CAGM,yBAAyB,KAAM,CACrC,MAAM,IAAM,CACR,MAAO,KAAK,KACZ,SAAU,KAAK,UAAU,IAAI,aAAa,EA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,KAAK,YAAY,EACX,MAAA,OAAO,QAAS,OAAO,CAAA,CAGjC,KAAK,QAAS,QAAS,CACb,MAAA,KAAK,QAAS,OAAO,CAAA,CAEnC,CACA,WAAW,UAAU,QAAU,uBAW/B,WAAW,UAAU,QAAQ,UAAW,GAAI,SAAU,wBAAwB,EAC9E,WAAW,UAAU,QAAQ,OAAQ,GAAI,SAAU,aAAa,EAChE,WAAW,UAAU,QAAQ,UAAW,CACpC,YAAa,CACT,SAAU,EACV,WAAY,CAAC,QAAS,UAAU,CACpC,EACA,aAAc,CACV,MAAO,EACP,WAAY,CAAA,CAChB,EACA,mBAAoB,CAChB,cAAe,GACf,cAAe,GACf,SAAU,GACV,WAAY,CAAC,cAAe,aAAa,CAC7C,EACA,aAAc,CACV,UAAW,GACX,aAAc,GACd,iBAAkB,EACtB,EACA,gBAAiB,CACb,YAAa,GACb,gBAAiB,GACjB,iBAAkB,GAClB,eAAgB,GAChB,eAAgB,GAChB,mBAAoB,EAAA,CAE5B,EAAG,SAAU,mBAAmB"}
|
|
1
|
+
{"version":3,"file":"index.umd.cjs","sources":["../src/__package__.ts","../src/ECLArchiveViewer.ts","../src/WUGraphLegend.ts","../src/WUScopeController.ts","../src/WUGraph.ts","../src/WUResultStore.ts","../src/WUResult.ts","../src/WUStatus.ts","../src/WUTimeline.ts"],"sourcesContent":["export const PKG_NAME = \"@hpcc-js/eclwatch\";\nexport const PKG_VERSION = \"3.1.1\";\nexport const BUILD_VERSION = \"3.2.1\";\n","import { Editor } from \"@hpcc-js/codemirror\";\nimport { Workunit } from \"@hpcc-js/comms\";\nimport { SplitPanel } from \"@hpcc-js/phosphor\";\nimport { DirectoryTree } from \"@hpcc-js/tree\";\nimport { hashSum, xml2json } from \"@hpcc-js/util\";\n\nexport class ECLArchiveViewer extends SplitPanel {\n private _prevHash;\n private _contentStr;\n public _directoryPane = new DirectoryTree();\n public _fileEditorPane = new Editor()\n .text(\"\")\n ;\n\n constructor() {\n super(\"horizontal\");\n this._directoryPane.rowClick = (text) => {\n this._fileEditorPane\n .text(text)\n .render()\n ;\n };\n }\n\n protected transformArchiveTreeData(json) {\n const ret = {\n label: json.name,\n children: json._children.map(transformNode).filter(n => n)\n };\n\n if (ret.children && ret.children[0] && ret.children[0].label === \"html\") {\n // must be parsererror\n return {\n label: \"root\",\n children: [\n {\n label: \"error\",\n content: JSON.stringify(ret, null, 4)\n }\n ]\n };\n }\n return ret;\n\n function transformNode(node) {\n const _node: any = {};\n _node.label = node.name + (node[\"$\"] && node[\"$\"].key ? ` (${node[\"$\"].key})` : \"\");\n if (node._children && node._children.length > 0) {\n _node.children = node._children.map(_node => {\n return transformNode(_node);\n })\n .filter(n => n)\n ;\n } else if (typeof node.content === \"string\" && node.content.trim()) {\n _node.content = node.content;\n } else {\n return false;\n }\n return _node;\n }\n }\n\n updateDirectoryPane(contentStr) {\n let json;\n if (contentStr) {\n try {\n json = JSON.parse(contentStr);\n } catch (e) {\n json = xml2json(contentStr);\n }\n }\n if (json) {\n const _data = this.transformArchiveTreeData(json);\n this._directoryPane\n .data(_data)\n .render()\n ;\n }\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n this\n .addWidget(this._directoryPane)\n .addWidget(this._fileEditorPane)\n ;\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n\n const hash = hashSum({\n baseUrl: this.baseUrl(),\n wuid: this.wuid()\n });\n\n if (this._prevHash !== hash || typeof this._contentStr === \"undefined\") {\n Workunit.attach({ baseUrl: this.baseUrl() }, this.wuid())\n .fetchArchive()\n .then(resp => {\n\n this._contentStr = resp;\n this.updateDirectoryPane(this._contentStr);\n\n this._prevHash = hash;\n });\n } else {\n this.updateDirectoryPane(this._contentStr);\n }\n\n this.relativeSizes([this.directoryWidthRatio(), 1 - this.directoryWidthRatio()]);\n }\n}\nECLArchiveViewer.prototype._class += \" eclwatch_ECLArchiveViewer\";\n\nexport interface ECLArchiveViewer {\n directoryPaneColor(): string;\n directoryPaneColor(_: string): this;\n directoryPaneHoverColor(): string;\n directoryPaneHoverColor(_: string): this;\n fontColor(): string;\n fontColor(_: string): this;\n fontFamily(): string;\n fontFamily(_: string): this;\n fontSize(): number;\n fontSize(_: number): this;\n fileIconSize(): number;\n fileIconSize(_: number): this;\n folderIconOpen(): string;\n folderIconOpen(_: string): this;\n folderIconClosed(): string;\n folderIconClosed(_: string): this;\n textFileIcon(): string;\n textFileIcon(_: string): this;\n codeFileIcon(): string;\n codeFileIcon(_: string): this;\n verticalScroll(): boolean;\n verticalScroll(_: boolean): this;\n directoryWidthRatio(): number;\n directoryWidthRatio(_: number): this;\n baseUrl(): string;\n baseUrl(_: string): this;\n wuid(): string;\n wuid(_: string): this;\n}\nECLArchiveViewer.prototype.publish(\"baseUrl\", \"\", \"string\", \"HPCC Platform Base URL\");\nECLArchiveViewer.prototype.publish(\"wuid\", \"\", \"string\", \"Workunit ID\");\nECLArchiveViewer.prototype.publish(\"directoryWidthRatio\", 0.38, \"number\", \"Default directory panel width ratio relative to the full width\");\nECLArchiveViewer.prototype.publish(\"contentString\", null, \"string\", \"XML/JSON archive content string\");\nECLArchiveViewer.prototype.publishProxy(\"directoryPaneColor\", \"_directoryPane\", \"backgroundColor\");\nECLArchiveViewer.prototype.publishProxy(\"directoryPaneHoverColor\", \"_directoryPane\", \"hoverBackgroundColor\");\nECLArchiveViewer.prototype.publishProxy(\"iconSize\", \"_directoryPane\");\nECLArchiveViewer.prototype.publishProxy(\"fontColor\", \"_directoryPane\");\nECLArchiveViewer.prototype.publishProxy(\"fontFamily\", \"_directoryPane\");\nECLArchiveViewer.prototype.publishProxy(\"fontSize\", \"_directoryPane\");\nECLArchiveViewer.prototype.publishProxy(\"folderIconOpen\", \"_directoryPane\");\nECLArchiveViewer.prototype.publishProxy(\"folderIconClosed\", \"_directoryPane\");\nECLArchiveViewer.prototype.publishProxy(\"textFileIcon\", \"_directoryPane\");\nECLArchiveViewer.prototype.publishProxy(\"codeFileIcon\", \"_directoryPane\");\nECLArchiveViewer.prototype.publishProxy(\"verticalScroll\", \"_directoryPane\");\n","import { Vertex } from \"@hpcc-js/graph\";\nimport { Legend } from \"@hpcc-js/layout\";\nimport { local as d3Local, select as d3Select } from \"d3-selection\";\n\nimport \"../src/WUGraphLegend.css\";\n\nexport interface WUGraphLegendData {\n kind: number;\n faChar: string;\n label: string;\n count: number;\n}\n\nclass LegendVertex extends Vertex {\n\n constructor() {\n super();\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n this._icon.on(\"click\", () => {\n this.click(this.data());\n });\n }\n\n click(kind: number) {\n }\n}\n\nexport class WUGraphLegend extends Legend {\n\n private icon = d3Local<Vertex>();\n protected _disabled2: { [kind: number]: boolean } = {\n /* TODO: Default some to disabled?\n 43: true,\n 71: true,\n 82: true,\n 88: true\n */\n };\n\n disabled(): number[];\n disabled(_: number[]): this;\n disabled(_?: number[]): number[] | this {\n if (!arguments.length) {\n const retVal = [];\n for (const key in this._disabled2) {\n if (this._disabled2[key]) {\n retVal.push(key);\n }\n }\n return retVal;\n }\n this._disabled2 = {};\n _.forEach(kind => this._disabled2[kind] = true);\n return this;\n }\n\n toggle(kind: number) {\n this._disabled2[kind] = !this._disabled2[kind];\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n\n const context = this;\n const items = this._g.selectAll(\".legendItem\").data(this.data(), (d: any) => d.kind);\n items.enter().append(\"g\")\n .attr(\"class\", \"legendItem\")\n .each(function (this: HTMLElement, d) {\n context.icon.set(this, new LegendVertex()\n .target(this)\n .data(d.kind)\n .textbox_shape_colorStroke(\"none\")\n .textbox_shape_colorFill(\"none\")\n .iconAnchor(\"left\")\n .faChar(d.faChar)\n .text(`${d.label} (${d.count})`)\n .tooltip(`${d.kind} - ${d.label}`)\n .on(\"click\", kind => {\n context.toggle(kind);\n context.render();\n context.click(kind);\n })\n .on(\"mouseover\", kind => {\n context.mouseover(kind);\n })\n .on(\"mouseout\", kind => {\n context.mouseout(kind);\n })\n );\n })\n .merge(items)\n .each(function (this: HTMLElement, d, i) {\n const bbox = context.icon.get(this)\n .icon_shape_colorFill(context._disabled2[d.kind] ? \"gray\" : null)\n .render().getBBox();\n\n d3Select(this)\n .attr(\"transform\", `translate(${+bbox.width / 2}, ${i * 30})`)\n ;\n })\n ;\n items.exit()\n .each(function (this: HTMLElement, d) {\n context.icon.get(this)\n .target(null)\n .render();\n })\n .remove();\n const bbox = this.getBBox(true, true);\n this._g.attr(\"transform\", `translate(16, ${this.height() / 2 - bbox.height / 2})`);\n }\n\n // Events ---\n click(kind: number) {\n }\n\n mouseover(kind: number) {\n }\n\n mouseout(kind: number) {\n }\n}\nWUGraphLegend.prototype._class += \" eclwatch_WUGraphLegend\";\n","import { Icon } from \"@hpcc-js/common\";\nimport { BaseScope, ScopeEdge, ScopeGraph, ScopeSubgraph, ScopeVertex } from \"@hpcc-js/comms\";\nimport { Edge, IGraphData, Lineage, Subgraph, Vertex } from \"@hpcc-js/graph\";\nimport { Edge as UtilEdge, Subgraph as UtilSubgraph, Vertex as UtilVertex } from \"@hpcc-js/util\";\nimport { WUGraphLegendData } from \"./WUGraphLegend.ts\";\n\nexport type VertexType = Vertex | Icon;\n\nexport interface MyGraphData {\n subgraphs: Subgraph[];\n vertices: VertexType[];\n edges: Edge[];\n hierarchy: Lineage[];\n}\n\nfunction faCharFactory(kind): string {\n switch (kind) {\n case \"2\": return \"\\uf0c7\"; // Disk Write\n case \"3\": return \"\\uf15d\"; // sort\n case \"5\": return \"\\uf0b0\"; // Filter\n case \"6\": return \"\\uf1e0\"; // Split\n case \"12\": return \"\\uf039\"; // First N\n case \"15\": return \"\\uf126\"; // Lightweight Join\n case \"17\": return \"\\uf126\"; // Lookup Join\n case \"22\": return \"\\uf1e6\"; // Pipe Output\n case \"23\": return \"\\uf078\"; // Funnel\n case \"25\": return \"\\uf0ce\"; // Inline Dataset\n case \"26\": return \"\\uf074\"; // distribute\n case \"29\": return \"\\uf005\"; // Store Internal Result\n case \"36\": return \"\\uf128\"; // If\n case \"44\": return \"\\uf0c7\"; // write csv\n case \"47\": return \"\\uf0c7\"; // write\n case \"54\": return \"\\uf013\"; // Workunit Read\n case \"56\": return \"\\uf0c7\"; // Spill\n case \"59\": return \"\\uf126\"; // Merge\n case \"61\": return \"\\uf0c7\"; // write xml\n case \"82\": return \"\\uf1c0\"; // Projected Disk Read Spill\n case \"88\": return \"\\uf1c0\"; // Projected Disk Read Spill\n case \"92\": return \"\\uf129\"; // Limted Index Read\n case \"93\": return \"\\uf129\"; // Limted Index Read\n case \"99\": return \"\\uf1c0\"; // CSV Read\n case \"105\": return \"\\uf1c0\"; // CSV Read\n\n case \"7\": return \"\\uf090\"; // Project\n case \"9\": return \"\\uf0e2\"; // Local Iterate\n case \"16\": return \"\\uf005\"; // Output Internal\n case \"19\": return \"\\uf074\"; // Hash Distribute\n case \"21\": return \"\\uf275\"; // Normalize\n case \"35\": return \"\\uf0c7\"; // CSV Write\n case \"37\": return \"\\uf0c7\"; // Index Write\n case \"71\": return \"\\uf1c0\"; // Disk Read Spill\n case \"133\": return \"\\uf0ce\"; // Inline Dataset\n case \"148\": return \"\\uf0ce\"; // Inline Dataset\n case \"168\": return \"\\uf275\"; // Local Denormalize\n }\n return \"\\uf063\";\n}\n\nexport class WUScopeController {\n private graphDB: ScopeGraph;\n private subgraphsMap: { [id: string]: Subgraph } = {};\n private rSubgraphsMap: { [id: string]: ScopeSubgraph } = {};\n private verticesMap: { [id: string]: VertexType } = {};\n private rVerticesMap: { [id: string]: ScopeVertex } = {};\n private edgesMap: { [id: string]: Edge } = {};\n private rEdgesMap: { [id: string]: ScopeEdge } = {};\n private kindMap: { [id: string]: ScopeVertex[] } = {};\n\n protected _disabled: { [kind: number]: boolean } = {};\n\n constructor() {\n }\n\n clear() {\n this.subgraphsMap = {};\n this.rSubgraphsMap = {};\n this.verticesMap = {};\n this.rVerticesMap = {};\n this.edgesMap = {};\n this.rEdgesMap = {};\n }\n\n set(masterGraph: ScopeGraph) {\n this.graphDB = masterGraph;\n this.graphGui(this.graphDB);\n\n this.kindMap = {};\n this.graphDB.walk(item => {\n if (item instanceof UtilSubgraph) {\n } else if (item instanceof UtilVertex) {\n const kind = item._.attr(\"Kind\").RawValue;\n if (!this.kindMap[kind]) {\n this.kindMap[kind] = [];\n }\n this.kindMap[kind].push(item);\n } else if (item instanceof UtilEdge) {\n }\n });\n }\n\n disabled(): number[];\n disabled(_: number[]): this;\n disabled(_?: number[]): number[] | this {\n if (!arguments.length) {\n const retVal = [];\n for (const key in this._disabled) {\n if (this._disabled[key]) {\n retVal.push(key);\n }\n }\n return retVal;\n }\n this._disabled = {};\n _.forEach(kind => this._disabled[kind] = true);\n return this;\n }\n\n graphGui(graphDB: ScopeGraph): IGraphData {\n const graphGui: MyGraphData = {\n subgraphs: [],\n vertices: [],\n edges: [],\n hierarchy: []\n };\n\n graphDB.walk((item) => {\n if (item instanceof UtilSubgraph) {\n const subgraph = this.appendSubgraph(item, graphGui.hierarchy, graphGui.subgraphs);\n subgraph.showMinMax(item.vertices.length > 3 || subgraph.minState() !== \"normal\");\n } else if (item instanceof UtilVertex) {\n this.appendVertex(item, graphGui.hierarchy, graphGui.vertices);\n } else if (item instanceof UtilEdge) {\n this.appendEdge(item, graphGui.edges);\n }\n });\n\n return graphGui;\n }\n\n format(labelTpl, obj) {\n let retVal = \"\";\n let lpos = labelTpl.indexOf(\"%\");\n let rpos = -1;\n while (lpos >= 0) {\n retVal += labelTpl.substring(rpos + 1, lpos);\n rpos = labelTpl.indexOf(\"%\", lpos + 1);\n if (rpos < 0) {\n console.warn(\"Invalid Label Template\");\n break;\n }\n const key = labelTpl.substring(lpos + 1, rpos);\n retVal += !key ? \"%\" : (obj[labelTpl.substring(lpos + 1, rpos)] || \"\");\n lpos = labelTpl.indexOf(\"%\", rpos + 1);\n }\n retVal += labelTpl.substring(rpos + 1, labelTpl.length);\n return retVal.split(\"\\\\n\").join(\"\\n\");\n }\n\n createSubgraph(subgraph: ScopeSubgraph): Subgraph {\n let sg = this.subgraphsMap[subgraph._.Id];\n if (!sg) {\n sg = new Subgraph()\n .title(subgraph._.Id)\n .on(\"minClick\", () => {\n this.minClick(sg);\n })\n ;\n this.subgraphsMap[subgraph._.Id] = sg;\n this.rSubgraphsMap[sg.id()] = subgraph;\n }\n return sg;\n }\n\n createVertex(vertex: ScopeVertex): VertexType {\n let v = this.verticesMap[vertex._.Id];\n if (!v) {\n const attrs = vertex._.rawAttrs();\n if (vertex._.ScopeType === \"dummy\") {\n const parent = this.subgraphsMap[vertex.parent._.Id];\n v = new Icon()\n .shape_colorFill(\"darkred\")\n .shape_colorStroke(\"darkred\")\n .image_colorFill(\"white\")\n .faChar(\"\\uf067\")\n .on(\"click\", () => {\n parent.minState(\"normal\");\n this.minClick(parent);\n })\n ;\n } else {\n v = new Vertex()\n .icon_shape_colorFill(\"#1f77b4\")\n .icon_image_colorFill(\"white\")\n .faChar(faCharFactory(attrs[\"Kind\"]))\n .text(attrs[\"Label\"])\n ;\n const annotations = [];\n if (vertex._.hasAttr(\"Definition\")) {\n annotations.push({\n faChar: \"\\uf036\",\n tooltip: \"Definition\",\n shape_colorFill: \"lightgray\",\n shape_colorStroke: \"lightgray\",\n image_colorFill: \"black\"\n });\n }\n if (vertex._.hasAttr(\"IsInternal\")) {\n annotations.push({\n faChar: \"\\uf085\",\n tooltip: \"IsInternal\",\n shape_colorFill: \"red\",\n shape_colorStroke: \"red\",\n image_colorFill: \"white\"\n });\n }\n v.annotationIcons(annotations);\n }\n this.verticesMap[vertex._.Id] = v;\n this.rVerticesMap[v.id()] = vertex;\n }\n return v;\n }\n\n isSpill(edge: ScopeEdge): boolean {\n const sourceKind = edge.source._.attr(\"Kind\").RawValue;\n const targetKind = edge.target._.attr(\"Kind\").RawValue;\n return sourceKind === \"2\" || targetKind === \"71\";\n }\n\n spansSubgraph(edge: ScopeEdge): boolean {\n return edge.source.parent._.Id !== edge.target.parent._.Id;\n }\n\n createEdge(edge: ScopeEdge): Edge | undefined {\n let e = this.edgesMap[edge._.Id];\n if (!e) {\n const attrs = edge._.rawAttrs();\n const sourceV = this.verticesMap[edge.source._.Id];\n const targetV = this.verticesMap[edge.target._.Id];\n if (sourceV && targetV) {\n const isSpill = this.isSpill(edge);\n const spansSubgraph = this.spansSubgraph(edge);\n\n const label = this.format(\"%Label%\\n%NumRowsProcessed%\", attrs);\n /* TODO: Add extra annotations once WUDetails is fixed...\n const numSlaves = parseInt(attrs[\"NumSlaves\"]);\n const numStarts = parseInt(attrs[\"NumStarts\"]);\n const numStops = parseInt(attrs[\"NumStops\"]);\n const started = numStarts > 0;\n const finished = numStops === numSlaves;\n const active = started && !finished;\n */\n\n let strokeDasharray = null;\n let weight = 100;\n if (attrs[\"IsDependency\"]) {\n weight = 10;\n strokeDasharray = \"1,5\";\n } else if (attrs[\"_childGraph\"]) {\n strokeDasharray = \"5,5\";\n } else if (isSpill) {\n weight = 25;\n strokeDasharray = \"5,5,10,5\";\n } else if (spansSubgraph) {\n weight = 5;\n strokeDasharray = \"5,5\";\n }\n e = new Edge()\n .sourceVertex(sourceV)\n .targetVertex(targetV)\n .sourceMarker(\"circle\")\n .targetMarker(\"arrow\")\n .weight(weight)\n .strokeDasharray(strokeDasharray)\n .text(label)\n ;\n this.edgesMap[edge._.Id] = e;\n this.rEdgesMap[e.id()] = edge;\n }\n }\n return e;\n }\n\n appendSubgraph(subgraph: ScopeSubgraph, hierarchy: Lineage[], subgraphs: Subgraph[]): Subgraph {\n const sg = this.createSubgraph(subgraph);\n subgraphs.push(sg);\n const parent = this.subgraphsMap[subgraph.parent._.Id];\n if (parent) {\n hierarchy.push({ parent, child: sg });\n }\n return sg;\n }\n\n appendVertex(vertex: ScopeVertex, hierarchy: Lineage[], vertices: VertexType[]): VertexType {\n const v = this.createVertex(vertex);\n vertices.push(v);\n const parent = this.subgraphsMap[vertex.parent._.Id];\n if (parent) {\n hierarchy.push({ parent, child: v });\n }\n return v;\n }\n\n appendEdge(edge: ScopeEdge, edges: Edge[]): Edge {\n const e = this.createEdge(edge);\n if (e) {\n edges.push(e);\n }\n return e;\n }\n\n filterLegend(graphDB: ScopeGraph) {\n for (let i = graphDB.vertices.length - 1; i >= 0; --i) {\n const vertex = graphDB.vertices[i];\n const kind = vertex._.attr(\"Kind\").RawValue;\n if (this._disabled[kind]) {\n vertex.remove(false, (source: BaseScope, target: BaseScope) => {\n return new BaseScope({\n ScopeName: vertex._.ScopeName + \":in\",\n Id: source.Id + \"->\" + target.Id,\n ScopeType: \"dummy-edge\",\n Properties: {\n Property: [vertex._.attr(\"Label\")]\n },\n Notes: {\n Note: []\n },\n SinkActivity: \"\"\n });\n });\n }\n }\n }\n\n filterPartial(graphDB: ScopeGraph) {\n for (const subgraph of graphDB.subgraphs) {\n const sg = this.subgraphsMap[subgraph._.Id];\n switch (sg.minState()) {\n case \"partial\":\n const childVertices: ReadonlyArray<ScopeVertex> = subgraph.vertices;\n const vShow: ScopeVertex[] = [];\n const vHide: ScopeVertex[] = [];\n\n for (const vertex of childVertices) {\n if (vertex.inEdges.length === 0 || vertex.inEdges.some(edge => edge.source.parent !== edge.target.parent) ||\n vertex.outEdges.length === 0 || vertex.outEdges.some(edge => edge.source.parent !== edge.target.parent)) {\n vShow.push(vertex);\n } else {\n vHide.push(vertex);\n }\n }\n\n if (vHide.length > 1) {\n const dummyDetails = {\n ScopeName: subgraph._.ScopeName,\n Id: subgraph._.Id + \":dummy\",\n ScopeType: \"dummy\",\n Properties: {\n Property: [{\n Name: \"Activities\",\n RawValue: \"\" + vHide.length,\n Formatted: \"\" + vHide.length,\n Measure: \"count\",\n Creator: \"\",\n CreatorType: \"\"\n }]\n },\n Notes: {\n Note: []\n },\n SinkActivity: \"\"\n };\n const dummyScope = new BaseScope(dummyDetails);\n const dummyVertex = subgraph.createVertex(dummyScope);\n\n for (const vertex of vHide) {\n for (const edge of vertex.inEdges) {\n if (vShow.indexOf(edge.source) >= 0) {\n const dummyEdgeScope = new BaseScope({\n ScopeName: edge.source._.ScopeName,\n Id: edge.source._.Id + \"->\" + dummyVertex._.Id,\n ScopeType: \"dummy-in\",\n Properties: {\n Property: []\n },\n Notes: {\n Note: []\n },\n SinkActivity: \"\"\n });\n subgraph.createEdge(edge.source, dummyVertex, dummyEdgeScope);\n }\n }\n for (const edge of vertex.outEdges) {\n if (vShow.indexOf(edge.target) >= 0) {\n const dummyEdgeScope = new BaseScope({\n ScopeName: edge.target._.ScopeName,\n Id: dummyVertex._.Id + \"->\" + edge.target._.Id,\n ScopeType: \"dummy-out\",\n Properties: {\n Property: []\n },\n Notes: {\n Note: []\n },\n SinkActivity: \"\"\n });\n subgraph.createEdge(dummyVertex, edge.target, dummyEdgeScope);\n }\n }\n }\n vHide.forEach(vertex => vertex.remove(true));\n }\n break;\n }\n }\n }\n\n filterEmptySubgraphs(graphDB: ScopeGraph) {\n while (true) {\n const emptySubgraphs = graphDB.subgraphs.filter(subgraph => subgraph.subgraphs.length === 0 && subgraph.vertices.length === 0);\n if (emptySubgraphs.length === 0) break;\n emptySubgraphs.forEach(subgraph => subgraph.remove(true));\n }\n }\n\n removeObsoleteSubgraphs(graphDB: ScopeGraph) {\n for (const subgraph of [...graphDB.subgraphs]) {\n if (subgraph.vertices.length === 0) {\n subgraph.remove(false);\n }\n }\n }\n\n graphData(): IGraphData {\n const graphDB = this.graphDB.clone();\n this.filterLegend(graphDB);\n this.filterPartial(graphDB);\n this.filterEmptySubgraphs(graphDB);\n this.removeObsoleteSubgraphs(graphDB);\n return this.graphGui(graphDB);\n }\n\n calcLegend(): WUGraphLegendData[] {\n const retVal: WUGraphLegendData[] = [];\n for (const kind in this.kindMap) {\n retVal.push({\n kind: parseInt(kind),\n faChar: faCharFactory(kind),\n label: this.kindMap[kind][0]._.attr(\"Label\").RawValue.split(\"\\n\")[0],\n count: this.kindMap[kind].length\n });\n }\n return retVal;\n }\n\n vertices(kind: number): VertexType[] {\n const retVal: VertexType[] = [];\n for (const v of this.kindMap[kind]) {\n retVal.push(this.verticesMap[v._.Id]);\n }\n return retVal;\n }\n\n formatRow(item: ScopeEdge | ScopeSubgraph | ScopeVertex, columns, row) {\n const attrs = item._.formattedAttrs();\n for (const key in attrs) {\n const idx = columns.indexOf(key);\n if (idx === -1) {\n columns.push(key);\n row.push(attrs[key]);\n } else {\n row[idx] = attrs[key];\n }\n }\n for (let i = 0; i < 100; ++i) {\n if (row[i] === undefined) {\n row[i] = \"\";\n }\n }\n return row;\n }\n\n activityData(): { columns: string[], data: any[][] } {\n const columns = [\"Id\", \"Kind\", \"Label\"];\n const data = this.graphDB.vertices.map(v => {\n const row = [parseInt(v._.Id.split(\"a\")[1])];\n return this.formatRow(v, columns, row);\n });\n return { columns, data };\n }\n\n edgeData(): { columns: string[], data: any[][] } {\n const columns = [\"Id\", \"Label\"];\n const data = this.graphDB.edges.map(e => {\n const row = [e._.Id];\n return this.formatRow(e, columns, row);\n });\n return { columns, data };\n }\n\n subgraphData(): { columns: string[], data: any[][] } {\n const columns = [\"Id\", \"Label\"];\n const data = this.graphDB.subgraphs.map(sg => {\n const row = [sg._.Id];\n return this.formatRow(sg, columns, row);\n });\n return { columns, data };\n }\n\n calcGraphTooltip(item: VertexType | Edge) {\n let scope;\n let parentScope;\n if (item instanceof Subgraph) {\n const subgraph = this.rSubgraphsMap[item.id()];\n scope = subgraph._;\n parentScope = subgraph.parent._;\n } else if (item instanceof Vertex || item instanceof Icon) {\n const vertex = this.rVerticesMap[item.id()];\n scope = vertex._;\n parentScope = vertex.parent._;\n } else if (item instanceof Edge) {\n const edge = this.rEdgesMap[item.id()];\n scope = edge._;\n parentScope = edge.parent._;\n }\n if (scope) {\n return scope.calcTooltip(parentScope);\n }\n return \"\";\n }\n\n subgraph(id: string): Subgraph | undefined {\n return this.subgraphsMap[id];\n }\n\n vertex(id: string): VertexType | undefined {\n return this.verticesMap[id];\n }\n\n edge(id: string): Edge {\n return this.edgesMap[id];\n }\n\n // Events ---\n minClick(sg: Subgraph) {\n }\n}\n","import { Button, Spacer, ToggleButton, Widget } from \"@hpcc-js/common\";\nimport { ScopeGraph, Workunit } from \"@hpcc-js/comms\";\nimport { Table } from \"@hpcc-js/dgrid\";\nimport { Graph as GraphWidget, Subgraph, Vertex } from \"@hpcc-js/graph\";\nimport { Carousel, ChartPanel } from \"@hpcc-js/layout\";\nimport { hashSum } from \"@hpcc-js/util\";\nimport { WUGraphLegend } from \"./WUGraphLegend.ts\";\nimport { WUScopeController } from \"./WUScopeController.ts\";\n\nimport \"../src/WUGraph.css\";\n\nexport class WUGraph extends ChartPanel {\n\n private _partialAll = new Button().faChar(\"fa-window-restore\").tooltip(\"Partial All\")\n .on(\"click\", () => {\n this.stateClick(this._partialAll);\n });\n\n private _maxAll = new Button().faChar(\"fa-window-maximize\").tooltip(\"Max All\")\n .on(\"click\", () => {\n this.stateClick(this._maxAll);\n });\n\n private _toggleGraph = new ToggleButton().faChar(\"fa-chain\").tooltip(\"Graph\")\n .selected(true)\n .on(\"click\", () => {\n this.viewClick(this._toggleGraph);\n });\n\n private _toggleActivities = new ToggleButton().faChar(\"fa-table\").tooltip(\"Activitiies\")\n .selected(false)\n .on(\"click\", () => {\n this.viewClick(this._toggleActivities);\n });\n\n private _toggleEdges = new ToggleButton().faChar(\"fa-table\").tooltip(\"Edges\")\n .selected(false)\n .on(\"click\", () => {\n this.viewClick(this._toggleEdges);\n });\n\n private _toggleSubgraphs = new ToggleButton().faChar(\"fa-table\").tooltip(\"Subgraphs\")\n .selected(false)\n .on(\"click\", () => {\n this.viewClick(this._toggleSubgraphs);\n });\n\n protected _graph = new GraphWidget()\n .layout(\"Hierarchy\")\n .applyScaleOnLayout(true)\n .showToolbar(false)\n .allowDragging(false)\n ;\n\n private _activities = new Table()\n .pagination(false)\n ;\n\n private _edges = new Table()\n .pagination(false)\n ;\n\n private _subgraphs = new Table()\n .pagination(false)\n ;\n\n protected _legend = new WUGraphLegend(this)\n .on(\"click\", kind => {\n this.render();\n })\n .on(\"mouseover\", kind => {\n const verticesMap: { [id: string]: boolean } = {};\n for (const vertex of this._gc.vertices(kind)) {\n verticesMap[vertex.id()] = true;\n }\n this._graph.highlightVerticies(verticesMap);\n })\n .on(\"mouseout\", kind => {\n this._graph.highlightVerticies();\n })\n ;\n\n protected _view = new Carousel().widgets([this._graph, this._activities, this._edges, this._subgraphs]);\n\n protected _gc = new WUScopeController();\n\n constructor() {\n super();\n this.topOverlay(false);\n this.widget(this._view);\n const buttons: Widget[] = [\n this._toggleGraph,\n this._toggleActivities,\n this._toggleEdges,\n this._toggleSubgraphs,\n new Spacer(),\n this._partialAll,\n this._maxAll,\n new Spacer(),\n ...this._graph.iconBarButtons(),\n new Spacer()];\n this.buttons(buttons.concat(this.buttons()));\n this._gc.minClick = (sg: Subgraph) => {\n this.loadGraph();\n this._graph.render(w => {\n this._graph\n .selection([sg])\n .centerOnItem(sg)\n ;\n });\n };\n\n this._graph.tooltipHTML((v: Vertex) => {\n return this._gc.calcGraphTooltip(v);\n });\n }\n\n stateClick(sourceB: Button) {\n switch (sourceB) {\n case this._partialAll:\n this._graph.data().subgraphs.forEach((sg: Subgraph) => {\n sg.minState(\"partial\");\n });\n break;\n case this._maxAll:\n this._graph.data().subgraphs.forEach((sg: Subgraph) => {\n sg.minState(\"normal\");\n });\n break;\n }\n this.render();\n }\n\n viewClick(sourceTB: ToggleButton) {\n this._toggleGraph.selected(sourceTB === this._toggleGraph);\n this._toggleActivities.selected(sourceTB === this._toggleActivities);\n this._toggleEdges.selected(sourceTB === this._toggleEdges);\n this._toggleSubgraphs.selected(sourceTB === this._toggleSubgraphs);\n switch (sourceTB) {\n case this._toggleGraph:\n this._view.active(0);\n break;\n case this._toggleActivities:\n this._view.active(1);\n break;\n case this._toggleEdges:\n this._view.active(2);\n break;\n case this._toggleSubgraphs:\n this._view.active(3);\n break;\n }\n this.render(w => {\n });\n }\n\n private _prevHashSum;\n private _prevScopeGraph: ScopeGraph;\n fetchScopeGraph(): Promise<ScopeGraph> {\n const hash = hashSum({\n baseUrl: this.baseUrl(),\n wuid: this.wuid(),\n graphID: this.graphID(),\n subgraphID: this.subgraphID()\n });\n if (!this._prevScopeGraph || this._prevHashSum !== hash) {\n this.startProgress();\n this._prevHashSum = hash;\n this._gc.clear();\n const wu = Workunit.attach({ baseUrl: this.baseUrl() }, this.wuid());\n return wu.fetchGraphs().then(graphs => {\n for (const graph of graphs) {\n if (graph.Name === this.graphID()) {\n this.finishProgress();\n return graph.fetchScopeGraph(this.subgraphID());\n }\n }\n }).then(scopeGraph => {\n this._prevScopeGraph = scopeGraph;\n return this._prevScopeGraph;\n });\n }\n return Promise.resolve(this._prevScopeGraph);\n }\n\n enter(domNode, _element) {\n super.enter(domNode, _element);\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n }\n\n exit(domNode, element) {\n super.exit(domNode, element);\n }\n\n loadGraph() {\n this._gc.disabled(this._legend.disabled());\n this._graph\n .data(this._gc.graphData(), true)\n ;\n {\n const { columns, data } = this._gc.activityData();\n this._activities\n .columns(columns)\n .data(data)\n ;\n }\n {\n const { columns, data } = this._gc.edgeData();\n this._edges\n .columns(columns)\n .data(data)\n ;\n }\n {\n const { columns, data } = this._gc.subgraphData();\n this._subgraphs\n .columns(columns)\n .data(data)\n ;\n }\n }\n\n render(callback?: (w: Widget) => void): this {\n if (this.wuid() && this.graphID()) {\n this.fetchScopeGraph().then(scopedGraph => {\n this._gc.set(scopedGraph);\n this._legend.data(this._gc.calcLegend());\n this.loadGraph();\n super.render(callback);\n });\n } else {\n super.render(callback);\n }\n return this;\n }\n\n selection(_?) {\n if (!arguments.length) return this._graph.selection();\n const item = this._gc.vertex(_) || this._gc.edge(_) || this._gc.subgraph(_);\n if (item) {\n this._graph.selection([item]);\n }\n return this;\n }\n}\nWUGraph.prototype._class += \" eclwatch_WUGraph\";\n\nexport interface WUGraph {\n baseUrl(): string;\n baseUrl(_: string): this;\n wuid(): string;\n wuid(_: string): this;\n graphID(): string;\n graphID(_: string): this;\n subgraphID(): string;\n subgraphID(_: string): this;\n}\n\nWUGraph.prototype.publish(\"baseUrl\", \"\", \"string\", \"HPCC Platform Base URL\");\nWUGraph.prototype.publish(\"wuid\", \"\", \"string\", \"Workunit ID\");\nWUGraph.prototype.publish(\"graphID\", \"\", \"string\", \"Graph ID\");\nWUGraph.prototype.publish(\"subgraphID\", \"\", \"string\", \"Subgraph ID\");\n","import { ResultFilter, Result, XSDSchema, XSDXMLNode } from \"@hpcc-js/comms\";\nimport { ColumnType, Deferred, domConstruct, QueryResults, RowFormatter } from \"@hpcc-js/dgrid\";\n\nfunction entitiesEncode(str) {\n return String(str).replace(/&/g, \"&\").replace(/</g, \"<\").replace(/>/g, \">\").replace(/\"/g, \""\");\n}\n\nfunction safeEncode(item) {\n switch (Object.prototype.toString.call(item)) {\n case \"[object Undefined]\":\n case \"[object Boolean]\":\n case \"[object Number]\":\n return item;\n case \"[object String]\":\n return entitiesEncode(item);\n default:\n console.warn(\"Unknown cell type: \" + Object.prototype.toString.call(item)); \n }\n return item;\n}\n\nexport class Store {\n protected wuResult: Result;\n protected schema: XSDSchema;\n protected _columns: any[];\n protected _cache: { [key: string]: Promise<{ totalLength: number, data: any[] }> } = {};\n private rowFormatter: RowFormatter;\n protected _filter: ResultFilter = {};\n\n constructor(wuResult: Result, schema: XSDSchema, renderHtml: boolean, filter: ResultFilter = {}) {\n this.wuResult = wuResult;\n this.schema = schema;\n this._columns = this.schema2Columns(this.schema.root);\n this.rowFormatter = new RowFormatter(this._columns, renderHtml);\n this._filter = filter;\n }\n\n columns() {\n return this._columns;\n }\n\n schema2Columns(parentNode: XSDXMLNode, prefix: string = \"\"): ColumnType[] {\n if (!parentNode) return [];\n return parentNode.children().filter(node => node.name.indexOf(\"__hidden\", node.name.length - \"__hidden\".length) === -1).map((node, idx) => {\n const label = node.name;\n const keyed = node.attrs[\"hpcc:keyed\"];\n const column: ColumnType = {\n field: prefix + label,\n leafID: label,\n idx,\n label: label + (keyed ? \" (i)\" : \"\"),\n className: \"resultGridCell\",\n sortable: false,\n width: keyed ? 16 : 0,\n isSet: node.isSet\n };\n const children = this.schema2Columns(node, prefix + label + \"_\");\n if (children.length) {\n column.width += 10 + children.reduce((prev: number, childNode: ColumnType) => {\n return prev + childNode.width!;\n }, 0);\n column.children = children;\n } else {\n column.width += node.charWidth() * 9;\n column.formatter = (cell, row) => {\n switch (typeof cell) {\n case \"string\":\n return {\n html: cell.replace(/\\t/g, \" \").trim()\n };\n case \"undefined\":\n return \"\";\n }\n return cell;\n };\n }\n return column;\n });\n }\n\n isChildDataset(cell) {\n if (Object.prototype.toString.call(cell) !== \"[object Object]\") {\n return false;\n }\n let propCount = 0;\n let firstPropType = null;\n for (const key in cell) {\n if (!firstPropType) {\n firstPropType = Object.prototype.toString.call(cell[key]);\n }\n propCount++;\n }\n return propCount === 1 && firstPropType === \"[object Array]\";\n }\n\n rowToTable(cell, __row, node) {\n if (this.isChildDataset(cell)) { // Don't display \"Row\" as a header ---\n for (const key in cell) {\n this.rowToTable(cell[key], __row, node);\n }\n return;\n }\n\n const table = domConstruct.create(\"table\", { border: 1, cellspacing: 0, width: \"100%\" }, node);\n switch (Object.prototype.toString.call(cell)) {\n case \"[object Object]\":\n let tr = domConstruct.create(\"tr\", null, table);\n for (const key in cell) {\n domConstruct.create(\"th\", { innerHTML: safeEncode(key) }, tr);\n }\n tr = domConstruct.create(\"tr\", null, table);\n for (const key in cell) {\n switch (Object.prototype.toString.call(cell[key])) {\n case \"[object Object]\":\n case \"[object Array]\":\n this.rowToTable(cell[key], __row, node);\n break;\n default:\n domConstruct.create(\"td\", { innerHTML: safeEncode(cell[key]) }, tr);\n break;\n }\n }\n break;\n case \"[object Array]\":\n for (let i = 0; i < cell.length; ++i) {\n switch (Object.prototype.toString.call(cell[i])) {\n case \"[object Boolean]\":\n case \"[object Number]\":\n case \"[object String]\":\n // Item in Scalar ---\n const tr1 = domConstruct.create(\"tr\", null, table);\n domConstruct.create(\"td\", { innerHTML: safeEncode(cell[i]) }, tr1);\n break;\n default:\n // Child Dataset ---\n if (i === 0) {\n const tr2 = domConstruct.create(\"tr\", null, table);\n for (const key in cell[i]) {\n domConstruct.create(\"th\", { innerHTML: safeEncode(key) }, tr2);\n }\n }\n domConstruct.create(\"tr\", null, table);\n for (const key in cell[i]) {\n if (cell[i][key]) {\n if (Object.prototype.toString.call(cell[i][key]) === \"[object Object]\" || Object.prototype.toString.call(cell[i][key]) === \"[object Array]\") {\n const td = domConstruct.create(\"td\", null, tr1);\n this.rowToTable(cell[i][key], cell[i], td);\n } else if (key.indexOf(\"__html\", key.length - \"__html\".length) !== -1) {\n domConstruct.create(\"td\", { innerHTML: cell[i][key] }, tr1);\n } else if (key.indexOf(\"__javascript\", key.length - \"__javascript\".length) !== -1) {\n /*const td = */ domConstruct.create(\"td\", null, tr1);\n // this.injectJavascript(cell[i][key], cell[i], td);\n } else {\n const val = cell[i][key];\n domConstruct.create(\"td\", { innerHTML: safeEncode(val) }, tr1);\n }\n } else {\n domConstruct.create(\"td\", { innerHTML: \"\" }, tr1);\n }\n }\n }\n }\n break;\n }\n }\n\n getIdentity(row) {\n return row.__hpcc_id;\n }\n\n _request(start, end): Promise<{ totalLength: number, data: any[] }> {\n if (!this.wuResult) return Promise.resolve({ totalLength: 0, data: [] });\n const cacheKey = `${start}->${end}`;\n if (this._cache[cacheKey]) return this._cache[cacheKey];\n const retVal = this.wuResult.fetchRows(start, end - start, false, this._filter).then((rows: any[]) => {\n return {\n totalLength: this.wuResult.Total,\n data: rows.map((row, idx) => {\n const formattedRow: any = this.rowFormatter.format(row);\n formattedRow.__hpcc_id = start + idx;\n formattedRow.__hpcc_orig = row;\n return formattedRow;\n })\n };\n });\n this._cache[cacheKey] = retVal;\n return retVal;\n }\n\n fetchRange(options): Promise<any[]> {\n const retVal = new Deferred();\n this._request(options.start, options.end).then(response => retVal.resolve(response));\n return new QueryResults(retVal.then(response => response.data), {\n totalLength: retVal.then(response => response.totalLength)\n });\n }\n}\n","import { ResultFilter, IOptions, Result } from \"@hpcc-js/comms\";\nimport { Common } from \"@hpcc-js/dgrid\";\nimport { hashSum } from \"@hpcc-js/util\";\nimport { Store } from \"./WUResultStore.ts\";\n\nexport class WUResult extends Common {\n\n protected _result: Result;\n protected _localStore: Store;\n\n constructor() {\n super();\n this.renderHtml(false);\n }\n\n hashSum(opts: any = {}) {\n return hashSum({\n baseUrl: this.baseUrl(),\n wuid: this.wuid(),\n resultName: this.resultName(),\n sequence: this.sequence(),\n nodeGroup: this.nodeGroup(),\n logicalFile: this.logicalFile(),\n userID: this.user(),\n password: this.password(),\n ...opts\n });\n }\n\n protected _prevResultHash: string;\n calcResult(): Result | null {\n const resultHash = this.hashSum();\n if (this._prevResultHash !== resultHash) {\n this._prevResultHash = resultHash;\n\n const opts: IOptions = {\n baseUrl: this.baseUrl(),\n userID: this.user(),\n password: this.password()\n };\n if (this.wuid() && this.resultName()) {\n this._result = Result.attach(opts, this.wuid(), this.resultName());\n } else if (this.wuid() && this.sequence() !== undefined) {\n this._result = Result.attach(opts, this.wuid(), this.sequence());\n } else if (this.logicalFile() && this.nodeGroup()) {\n this._result = Result.attachLogicalFile(opts, this.nodeGroup(), this.logicalFile());\n } else if (this.logicalFile()) {\n this._result = Result.attachLogicalFile(opts, \"\", this.logicalFile());\n }\n }\n return this._result;\n }\n\n fetch(row, count, abortController = new AbortController()): Promise<object[]> {\n const result = this.calcResult();\n if (result) {\n return result.fetchRows(row, count, false, {}, abortController.signal);\n }\n return Promise.resolve([]);\n }\n\n protected _prevStoreHash: string;\n protected _prevQueryHash: string;\n update(domNode, element) {\n super.update(domNode, element);\n const storeHash = this.hashSum({\n renderHtml: this.renderHtml(),\n filter: this.filter()\n });\n if (this._prevStoreHash !== storeHash) {\n this._prevStoreHash = storeHash;\n const result = this.calcResult();\n if (result) {\n result.fetchXMLSchema().then(schema => {\n this._localStore = new Store(result, schema, this.renderHtml(), this.filter());\n this._dgrid?.set(\"columns\", this._localStore.columns());\n this._dgrid?.set(\"collection\", this._localStore);\n });\n }\n }\n }\n\n click(row, col, sel) {\n }\n}\nWUResult.prototype._class += \" eclwatch_WUResult\";\n\nexport interface WUResult {\n baseUrl(): string;\n baseUrl(_: string): this;\n user(): string;\n user(_: string): this;\n password(): string;\n password(_: string): this;\n wuid(): string;\n wuid(_: string): this;\n resultName(): string;\n resultName(_: string): this;\n sequence(): number;\n sequence(_: number): this;\n nodeGroup(): string;\n nodeGroup(_: string): this;\n logicalFile(): string;\n logicalFile(_: string): this;\n filter(): ResultFilter;\n filter(_: ResultFilter): this;\n}\n\nWUResult.prototype.publish(\"baseUrl\", \"\", \"string\", \"URL to WsWorkunits\");\nWUResult.prototype.publish(\"user\", \"\", \"string\", \"User ID\");\nWUResult.prototype.publish(\"password\", \"\", \"string\", \"Password\");\nWUResult.prototype.publish(\"wuid\", \"\", \"string\", \"Workunit ID\");\nWUResult.prototype.publish(\"resultName\", \"\", \"string\", \"Result Name\");\nWUResult.prototype.publish(\"sequence\", undefined, \"number\", \"Sequence Number\");\nWUResult.prototype.publish(\"nodeGroup\", \"\", \"string\", \"NodeGroup\");\nWUResult.prototype.publish(\"logicalFile\", \"\", \"string\", \"Logical File Name\");\nWUResult.prototype.publish(\"filter\", {}, \"object\", \"Filter\");\n","import { Workunit, WUStateID } from \"@hpcc-js/comms\";\nimport { Edge, Graph, Vertex } from \"@hpcc-js/graph\";\nimport { hashSum, IObserverHandle } from \"@hpcc-js/util\";\n\nexport enum STATUS {\n CREATE = \"Created\",\n COMPILE = \"Compiled\",\n EXECUTE = \"Executed\",\n COMPLETE = \"Completed\"\n}\n\nexport enum STATUS_ACTIVE {\n CREATE = \"Creating\",\n COMPILE = \"Compiling\",\n EXECUTE = \"Executing\",\n COMPLETE = \"Completed\"\n}\n\nexport class WUStatus extends Graph {\n\n protected _wu: Workunit;\n protected _wuHandle: IObserverHandle;\n\n protected _create: Vertex;\n protected _compile: Vertex;\n protected _execute: Vertex;\n protected _complete: Vertex;\n\n constructor() {\n super();\n this\n .zoomable(false)\n .zoomToFitLimit(1)\n .layout(\"Hierarchy\")\n .hierarchyRankDirection(\"LR\")\n .showToolbar(false)\n .allowDragging(false)\n ;\n }\n\n private _prevHash;\n attachWorkunit() {\n const hash = hashSum({\n baseUrl: this.baseUrl(),\n wuid: this.wuid()\n });\n if (this._prevHash !== hash) {\n this._prevHash = hash;\n this._wu = Workunit.attach({ baseUrl: this.baseUrl() }, this.wuid());\n if (this._wuHandle) {\n this._wuHandle.release();\n }\n this._wuHandle = this._wu.watch(changes => {\n this.lazyRender();\n });\n }\n }\n\n createVertex(faChar: string) {\n return new Vertex()\n .icon_diameter(32)\n .icon_shape_colorFill(\"none\")\n .icon_shape_colorStroke(\"none\")\n .icon_image_colorFill(\"darkgray\")\n .iconAnchor(\"middle\")\n .textbox_shape_colorFill(\"none\")\n .textbox_shape_colorStroke(\"none\")\n .textbox_text_colorFill(\"darkgray\")\n .faChar(faChar)\n ;\n }\n\n updateVertex(vertex: Vertex, color: string) {\n vertex\n .icon_image_colorFill(color)\n .textbox_text_colorFill(color)\n ;\n }\n\n updateVertexStatus(level: 0 | 1 | 2 | 3 | 4, active: boolean = false) {\n const completeColor = this._wu.isFailed() ? \"darkred\" : \"darkgreen\";\n this._create.text(STATUS.CREATE);\n this._compile.text(STATUS.COMPILE);\n this._execute.text(STATUS.EXECUTE);\n this._complete.text(STATUS.COMPLETE);\n switch (level) {\n case 0:\n this.updateVertex(this._create, \"darkgray\");\n this.updateVertex(this._compile, \"darkgray\");\n this.updateVertex(this._execute, \"darkgray\");\n this.updateVertex(this._complete, \"darkgray\");\n break;\n case 1:\n this._create.text(STATUS_ACTIVE.CREATE);\n this.updateVertex(this._create, active ? \"orange\" : completeColor);\n this.updateVertex(this._compile, \"darkgray\");\n this.updateVertex(this._execute, \"darkgray\");\n this.updateVertex(this._complete, \"darkgray\");\n break;\n case 2:\n this._compile.text(STATUS_ACTIVE.COMPILE);\n this.updateVertex(this._create, completeColor);\n this.updateVertex(this._compile, active ? \"orange\" : completeColor);\n this.updateVertex(this._execute, completeColor);\n this.updateVertex(this._complete, \"darkgray\");\n break;\n case 3:\n this._execute.text(STATUS_ACTIVE.EXECUTE);\n this.updateVertex(this._create, completeColor);\n this.updateVertex(this._compile, completeColor);\n this.updateVertex(this._execute, active ? \"orange\" : completeColor);\n this.updateVertex(this._complete, \"darkgray\");\n break;\n case 4:\n this.updateVertex(this._create, completeColor);\n this.updateVertex(this._compile, completeColor);\n this.updateVertex(this._execute, completeColor);\n this.updateVertex(this._complete, completeColor);\n break;\n }\n }\n\n createEdge(source, target) {\n return new Edge()\n .sourceVertex(source)\n .targetVertex(target)\n .strokeColor(\"black\")\n .showArc(false)\n ;\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n this._create = this.createVertex(\"\\uf11d\");\n this._compile = this.createVertex(\"\\uf085\");\n this._execute = this.createVertex(\"\\uf275\");\n this._complete = this.createVertex(\"\\uf11e\");\n const e1 = this.createEdge(this._create, this._compile);\n const e2 = this.createEdge(this._compile, this._execute);\n const e3 = this.createEdge(this._execute, this._complete);\n this.data({\n vertices: [this._create, this._compile, this._execute, this._complete],\n edges: [e1, e2, e3]\n });\n }\n\n update(domNode, element) {\n this.attachWorkunit();\n switch (this._wu.StateID) {\n case WUStateID.Blocked:\n case WUStateID.Wait:\n case WUStateID.Scheduled:\n case WUStateID.UploadingFiled:\n this.updateVertexStatus(1);\n break;\n case WUStateID.Compiling:\n this.updateVertexStatus(2, true);\n break;\n case WUStateID.Submitted:\n this.updateVertexStatus(1, true);\n break;\n case WUStateID.Compiled:\n this.updateVertexStatus(2);\n break;\n case WUStateID.Aborting:\n case WUStateID.Running:\n this.updateVertexStatus(3, true);\n break;\n case WUStateID.Aborted:\n case WUStateID.Archived:\n case WUStateID.Completed:\n this.updateVertexStatus(4);\n break;\n case WUStateID.Failed:\n this.updateVertexStatus(4, false);\n break;\n case WUStateID.DebugPaused:\n case WUStateID.DebugRunning:\n case WUStateID.Paused:\n case WUStateID.Unknown:\n default:\n this.updateVertexStatus(0);\n break;\n }\n super.update(domNode, element);\n this.zoomToFit();\n }\n\n exit(domNode, element) {\n if (this._wuHandle) {\n this._wuHandle.release();\n }\n super.exit(domNode, element);\n }\n}\nWUStatus.prototype._class += \" eclwatch_WUStatus\";\n\nexport interface WUStatus {\n baseUrl(): string;\n baseUrl(_: string): this;\n wuid(): string;\n wuid(_: string): this;\n}\n\nWUStatus.prototype.publish(\"baseUrl\", \"\", \"string\", \"HPCC Platform Base URL\");\nWUStatus.prototype.publish(\"wuid\", \"\", \"string\", \"Workunit ID\");\n","import { Palette } from \"@hpcc-js/common\";\nimport { Scope, Workunit, WsWorkunits } from \"@hpcc-js/comms\";\nimport { ReactTimelineSeries } from \"@hpcc-js/timeline\";\nimport { hashSum, RecursivePartial } from \"@hpcc-js/util\";\n\nimport \"../src/WUGraph.css\";\n\nconst columns = [\"label\", \"start\", \"end\", \"icon\", \"color\", \"series\"];\n\nexport class WUTimeline extends ReactTimelineSeries {\n\n protected _palette = Palette.ordinal(\"default\");\n\n constructor() {\n super();\n this\n .columns(columns)\n .titleColumn(\"label\")\n .iconColumn(\"icon\")\n .colorColumn(\"color\")\n .seriesColumn(\"series\")\n .timePattern(\"%Y-%m-%dT%H:%M:%S.%LZ\")\n .tickFormat(\"%H:%M\")\n .tooltipTimeFormat(\"%H:%M:%S.%L\")\n .tooltipHTML(d => {\n return d[columns.length].calcTooltip();\n })\n ;\n }\n\n private _prevHashSum;\n clear(): this {\n delete this._prevHashSum;\n return this;\n }\n fetchScopes() {\n const hash = hashSum({\n baseUrl: this.baseUrl(),\n wuid: this.wuid(),\n request: this.request()\n });\n if (this._prevHashSum !== hash) {\n this._prevHashSum = hash;\n const wu = Workunit.attach({ baseUrl: this.baseUrl() }, this.wuid());\n wu.fetchDetails(this.request()).then(scopes => {\n return scopes.filter(scope => scope.Id && scope.attr(\"WhenStarted\").RawValue).map((scope: Scope) => {\n const whenStarted = +scope.attr(\"WhenStarted\").RawValue / 1000;\n const timeElapsed = +scope.attr(\"TimeElapsed\").RawValue / 1000000;\n return [\n scope.Id,\n new Date(whenStarted).toISOString(),\n timeElapsed ? new Date(whenStarted + timeElapsed).toISOString() : undefined,\n null,\n this._palette(scope.ScopeType),\n scope.ScopeName.split(\"::\").join(\":\").split(\":\").slice(0, 1),\n scope\n ];\n });\n }).then(scopes => {\n this\n .data(scopes)\n .render()\n ;\n });\n }\n }\n\n enter(domNode, _element) {\n super.enter(domNode, _element);\n }\n\n update(domNode, element) {\n this.fetchScopes();\n super.update(domNode, element);\n }\n\n exit(domNode, element) {\n super.exit(domNode, element);\n }\n}\nWUTimeline.prototype._class += \" eclwatch_WUTimeline\";\n\nexport interface WUTimeline {\n baseUrl(): string;\n baseUrl(_: string): this;\n wuid(): string;\n wuid(_: string): this;\n request(): Partial<WsWorkunits.WUDetails>;\n request(_: RecursivePartial<WsWorkunits.WUDetails>): this;\n}\n\nWUTimeline.prototype.publish(\"baseUrl\", \"\", \"string\", \"HPCC Platform Base URL\");\nWUTimeline.prototype.publish(\"wuid\", \"\", \"string\", \"Workunit ID\");\nWUTimeline.prototype.publish(\"request\", {\n ScopeFilter: {\n MaxDepth: 3,\n ScopeTypes: [\"graph\", \"subgraph\"]\n },\n NestedFilter: {\n Depth: 0,\n ScopeTypes: []\n },\n PropertiesToReturn: {\n AllProperties: false,\n AllStatistics: true,\n AllHints: false,\n Properties: [\"WhenStarted\", \"TimeElapsed\"]\n },\n ScopeOptions: {\n IncludeId: true,\n IncludeScope: true,\n IncludeScopeType: true\n },\n PropertyOptions: {\n IncludeName: true,\n IncludeRawValue: true,\n IncludeFormatted: true,\n IncludeMeasure: true,\n IncludeCreator: false,\n IncludeCreatorType: false\n }\n}, \"object\", \"WUDetails Request\");\n"],"names":["SplitPanel","DirectoryTree","Editor","_node","xml2json","hashSum","Workunit","Vertex","Legend","d3Local","bbox","d3Select","UtilSubgraph","UtilVertex","UtilEdge","Subgraph","Icon","Edge","BaseScope","columns","ChartPanel","Button","ToggleButton","GraphWidget","Table","Carousel","Spacer","graph","RowFormatter","domConstruct","Deferred","QueryResults","Common","Result","STATUS","STATUS_ACTIVE","Graph","WUStateID","ReactTimelineSeries","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AAE,YAAY,EAClC,YAAc,IAAI,KAAK,YAAc,WAAW,EAAE,cAAgB,OAClE,KACA,KAAK,SAAS,MAAM,SAAS,EAC7B,MAAM,UAAU,MAAM,IAAI,EAAE,KAAK,GAAG,EAAE,MAAM,GAAG,EAAE,MAAM,EAAG,CAAC,EAC3D,KACJ,CAAA,CACH,CACJ,EAAE,KAAe,QAAA,CAET,KAAA,KAAK,MAAM,EACX,OAAO,CAAA,CAEf,EACL,CAGJ,MAAM,QAAS,SAAU,CACf,MAAA,MAAM,QAAS,QAAQ,CAAA,CAGjC,OAAO,QAAS,QAAS,CACrB,KAAK,YAAY,EACX,MAAA,OAAO,QAAS,OAAO,CAAA,CAGjC,KAAK,QAAS,QAAS,CACb,MAAA,KAAK,QAAS,OAAO,CAAA,CAEnC,CACA,WAAW,UAAU,QAAU,uBAW/B,WAAW,UAAU,QAAQ,UAAW,GAAI,SAAU,wBAAwB,EAC9E,WAAW,UAAU,QAAQ,OAAQ,GAAI,SAAU,aAAa,EAChE,WAAW,UAAU,QAAQ,UAAW,CACpC,YAAa,CACT,SAAU,EACV,WAAY,CAAC,QAAS,UAAU,CACpC,EACA,aAAc,CACV,MAAO,EACP,WAAY,CAAA,CAChB,EACA,mBAAoB,CAChB,cAAe,GACf,cAAe,GACf,SAAU,GACV,WAAY,CAAC,cAAe,aAAa,CAC7C,EACA,aAAc,CACV,UAAW,GACX,aAAc,GACd,iBAAkB,EACtB,EACA,gBAAiB,CACb,YAAa,GACb,gBAAiB,GACjB,iBAAkB,GAClB,eAAgB,GAChB,eAAgB,GAChB,mBAAoB,EAAA,CAE5B,EAAG,SAAU,mBAAmB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hpcc-js/eclwatch",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.4",
|
|
4
4
|
"description": "hpcc-js - ECL Watch",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.umd.cjs",
|
|
@@ -39,9 +39,9 @@
|
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@hpcc-js/codemirror": "^3.2.0",
|
|
41
41
|
"@hpcc-js/common": "^3.3.0",
|
|
42
|
-
"@hpcc-js/comms": "^3.
|
|
42
|
+
"@hpcc-js/comms": "^3.5.0",
|
|
43
43
|
"@hpcc-js/dgrid": "^3.2.1",
|
|
44
|
-
"@hpcc-js/graph": "^3.
|
|
44
|
+
"@hpcc-js/graph": "^3.3.1",
|
|
45
45
|
"@hpcc-js/layout": "^3.2.0",
|
|
46
46
|
"@hpcc-js/phosphor": "^3.2.0",
|
|
47
47
|
"@hpcc-js/timeline": "^3.0.0",
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"url": "https://github.com/hpcc-systems/Visualization/issues"
|
|
64
64
|
},
|
|
65
65
|
"homepage": "https://github.com/hpcc-systems/Visualization",
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "85de89fcb489c807653c422459d98785ef647465"
|
|
67
67
|
}
|