|
@@ -1,6 +1,7 @@
|
|
|
var getItemLocalStorage = global.getItemLocalStorage;
|
|
|
var setItemLocalStorage = global.setItemLocalStorage;
|
|
|
var p5WFS_GetFeature = global.p5WFS_GetFeature;
|
|
|
+var renderGraph = global.renderGraph; // @from sankey-init
|
|
|
var DBG = DBG || 0;
|
|
|
|
|
|
function graphShowHide(nameSection) {
|
|
@@ -135,18 +136,22 @@ function graphFetchData(node, nameSection) {
|
|
|
)
|
|
|
).then(function (items) {
|
|
|
if(DBG)console.log('p5WFS_GetFeature: items: ', items);
|
|
|
- graphRender(node, {
|
|
|
+ graphRaportRender({
|
|
|
msg: "Pobrano dane",
|
|
|
typeName: ('pracownicy' === nameSection) ? 'default_db__x3A__BI_audit_ENERGA_PRACOWNICY:BI_audit_ENERGA_PRACOWNICY' : 'default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI:BI_audit_ENERGA_RUM_KONTRAHENCI',
|
|
|
items: items
|
|
|
- })
|
|
|
+ }, node)
|
|
|
}).catch(function (err) {
|
|
|
if(DBG)console.log('p5WFS_GetFeature: err: ', err);
|
|
|
- // graphRender(node, { msg: "Wystąpiły błędy podczas pobierania danych", nameSection: nameSection, err: err })
|
|
|
+ // graphRaportRender({ msg: "Wystąpiły błędy podczas pobierania danych", nameSection: nameSection, err: err }, node)
|
|
|
})
|
|
|
}
|
|
|
|
|
|
-function graphRender(wrapNode, props) {
|
|
|
+function graphRender(props, wrapNode) {
|
|
|
+ throw "TODO: graphRender..."
|
|
|
+}
|
|
|
+
|
|
|
+function graphRaportRender(props, wrapNode) {
|
|
|
var svgNode = jQuery(wrapNode).children('svg')
|
|
|
svgNode = (svgNode.length) ? d3.select(svgNode.get(0)) : d3.select(wrapNode).append("svg")
|
|
|
// svg.append("rect").attr("x",0).attr("y",0).attr("width","100%").attr("height","100%").attr("fill","white").attr('class','background').on('mouseup', () => redraw())
|
|
@@ -591,4 +596,8 @@ function graphAddNodeLabel(graphNode) {
|
|
|
}
|
|
|
|
|
|
|
|
|
-global.graphShowHide = graphShowHide;
|
|
|
+module.exports = {
|
|
|
+ graphShowHide: graphShowHide,
|
|
|
+ graphRender: graphRender,
|
|
|
+ graphRaportRender: graphRaportRender,
|
|
|
+}
|