OXIESEC PANEL
- Current Dir:
/
/
home
/
cubot
/
docroot
/
showcase
/
js
/
app
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
12/31/2022 06:53:36 AM
rwxr-xr-x
📁
.svn
-
08/14/2022 11:05:11 AM
rwxr-xr-x
📄
chartPrefs.js
14.32 KB
08/14/2022 11:05:11 AM
rw-r--r--
📄
compute.js
6.11 KB
08/14/2022 11:05:11 AM
rw-r--r--
📄
filterClass.js
4.91 KB
08/14/2022 11:05:11 AM
rw-r--r--
📄
filter_template.js
72.65 KB
08/14/2022 11:05:11 AM
rw-r--r--
📄
ws.app.js
18.87 KB
08/14/2022 11:05:11 AM
rw-r--r--
📄
ws.lib.js
24.63 KB
08/14/2022 11:05:11 AM
rw-r--r--
Editing: chartPrefs.js
Close
/* * Class defined to hold graph data. */ function Report(data, title, gtype, height, width, layout, dimensions, dimmeta, measures, formats, minmax, systitle, subtitle, sortcolumn, topn){ this.data=data; this.title=title; this.gtype=gtype; this.height=height; this.width=width; this.layout=layout; this.dimensions=dimensions; this.dimmeta=dimmeta; this.measures=measures; this.formats=formats; this.minmax=minmax; this.systitle=systitle; this.subtitle=subtitle; this.sortcolumn=sortcolumn; this.topn=topn; this.dimensionIds; this.measureIds; this.dimensionFilters; this.measureFilters; this.filterList; this.graphId; this.parentId; this.instance; this.description; this.note; this.expire; this.refresh; this.category; this.isdasboard; this.properties; this.reportPermission; this.dispObj = {}; this.compute = new computedColumnList(); /* Functions */ this.setdata=setdata; this.getdata=getdata; this.setsystitle=setsystitle; this.getsystitle=getsystitle; this.setsubtitle=setsubtitle; this.getsubtitle=getsubtitle; this.settitle=settitle; this.gettitle=gettitle; this.setgtype=setgtype; this.getgtype=getgtype; this.setheight=setheight; this.getheight=getheight; this.setwidth=setwidth; this.getwidth=getwidth; this.setlayout=setlayout; this.getlayout=getlayout; this.setdimensions=setdimensions; this.getdimensions=getdimensions; this.addDimensions=addDimensions; this.delDimensions=delDimensions; this.setdimmeta=setdimmeta; this.getdimmeta=getdimmeta; this.addDimMeta=addDimMeta; this.delDimMeta=delDimMeta; this.setmeasures=setmeasures; this.getmeasures=getmeasures; this.addMeasures=addMeasures; this.delMeasures=delMeasures; this.setformats=setformats; this.getformats=getformats; this.addFormats=addFormats; this.delFormats=delFormats; this.setminmax=setminmax; this.getminmax=getminmax; this.addMinMax=addMinMax; this.delMinMax=delMinMax; this.setsortcolumn=setsortcolumn; this.getsortcolumn=getsortcolumn; this.settopn=settopn; this.gettopn=gettopn; this.setdimensionIds=setdimensionIds; this.getdimensionIds=getdimensionIds; this.addDimensionIds=addDimensionIds; this.delDimensionIds=delDimensionIds; this.setmeasureIds=setmeasureIds; this.getmeasureIds=getmeasureIds; this.addMeasureIds=addMeasureIds; this.delMeasureIds=delMeasureIds; this.setdimensionFilters=setdimensionFilters; this.getdimensionFilters=getdimensionFilters; this.addDimensionFilters=addDimensionFilters; this.delDimensionFilters=delDimensionFilters; this.setmeasureFilters=setmeasureFilters; this.getmeasureFilters=getmeasureFilters; this.addMeasureFilters=addMeasureFilters; this.delMeasureFilters=delMeasureFilters; this.addDimensionToReport=addDimensionToReport; this.deleteDimensionFromReport=deleteDimensionFromReport; this.addMeasureToReport=addMeasureToReport; this.deleteMeasureFromReport=deleteMeasureFromReport; this.setgraphId=setgraphId; this.getgraphId=getgraphId; this.setparentId=setparentId; this.getparentId=getparentId; this.setinstance=setinstance; this.getinstance=getinstance; this.setdescription=setdescription; this.getdescription=getdescription; this.setnote=setnote; this.getnote=getnote; this.setrefresh=setrefresh; this.getrefresh=getrefresh; this.setcategory=setcategory; this.getcategory=getcategory; this.setproperties=setproperties; this.getproperties=getproperties; this.setPropsValue=setPropsValue; this.getPropsValue=getPropsValue; this.setPermission=setPermission; this.setReportPermission=setReportPermission; this.getReportPermission=getReportPermission; this.deleteMeasureFromReport=deleteMeasureFromReport; } // Functions defined to put and get graph data parameters. function setdata(data){ this.data=data; } function getdata(){ with(this) return data; } function settitle(title){ this.title=title; } function gettitle(){ with(this) return title; } function setsystitle(systitle){ this.systitle=systitle; } function getsystitle(){ with(this) return systitle; } function setsubtitle(subtitle){ this.subtitle=subtitle; } function getsubtitle(){ with(this) return subtitle; } function setgtype(gtype){ this.gtype=gtype; } function getgtype(){ with(this) return gtype; } function setheight(height){ this.height=height; } function getheight(){ with(this) return height; } function setwidth(width){ this.width=width; } function getwidth(){ with(this) return width; } function setlayout(layout){ this.layout=layout; } function getlayout(){ with(this) return layout; } function setdimensions(dimensions){ this.dimensions=dimensions; } function getdimensions(){ with(this) return dimensions; } function addDimensions(dimensionName, position){ if(this.dimensions == undefined || this.dimensions.length == 0){ this.dimensions = new Array(); } addToArray(this.dimensions, dimensionName, position); } function delDimensions(dimensionName){ deleteFromArray(this.dimensions, dimensionName); } function setdimmeta(dimmeta){ this.dimmeta=dimmeta; } function getdimmeta(){ with(this) return dimmeta; } function addDimMeta(dimensionMeta, position){ if(this.dimmeta == undefined || this.dimmeta.length == 0){ this.dimmeta = new Array(); } if(this.dimmeta.indexOf(dimensionMeta<0)){ if(position != undefined && position >= 0 && this.dimmeta[position] != undefined) this.dimmeta.splice(position, 0, dimensionMeta); else this.dimmeta.push(dimensionMeta); } } function delDimMeta(dimensionMeta){ if(this.dimmeta == undefined || this.dimmeta.length == 0){ return false; } var position = this.dimmeta.indexOf(dimensionMeta); if(position >= 0){ this.dimmeta.splice(position, 1); return true; } return false; } function setmeasures(measures){ this.measures=measures; } function getmeasures(){ with(this) return measures; } function addMeasures(measureName, position){ if(this.measures == undefined || this.measures.length == 0){ this.measures = new Array(); } addToArray(this.measures, measureName, position); } function delMeasures(measureName){ deleteFromArray(this.measures, measureName); } function setformats(formats){ this.formats=formats; } function getformats(){ with(this) return formats; } function addFormats(format, position){ if(this.formats == undefined || this.formats.length == 0){ this.formats = new Array(); } addToArray(this.formats, format, position); } function delFormats(format){ deleteFromArray(this.formats, format); } function setminmax(minmax){ this.minmax=minmax; } function getminmax(){ with(this) return minmax; } function addMinMax(minmax, position){ if(this.minmax == undefined || this.minmax.length == 0){ this.minmax = new Array(); } addToArray(this.minmax, minmax, position); } function delMinMax(minmax){ deleteFromArray(this.minmax, minmax); } function setsortcolumn(sortcolumn){ this.sortcolumn=sortcolumn; } function getsortcolumn(){ with(this) return sortcolumn; } function settopn(topn){ this.topn=topn; } function gettopn(){ with(this) return topn; } function setdimensionIds(dimensionIds){ this.dimensionIds=dimensionIds; } function getdimensionIds(dimensionIds){ with(this) return dimensionIds; } function addDimensionIds(dimensionId, position){ if(this.dimensionIds == undefined || this.dimensionIds.length == 0){ this.dimensionIds = new Array(); } if(this.dimensionIds.indexOf(dimensionId)<0){ if(position != undefined && position >= 0 && this.dimensionIds[position] != undefined) this.dimensionIds.splice(position, 0, dimensionId); else this.dimensionIds.push(dimensionId); } } function delDimensionIds(dimensionId){ if(this.dimensionIds == undefined || this.dimensionIds.length == 0){ return false; } var position = this.dimensionIds.indexOf(dimensionId); if(position >= 0){ this.dimensionIds.splice(position, 1); return position; } return -1; } function setmeasureIds(measureIds){ this.measureIds=measureIds; } function getmeasureIds(){ with(this) return measureIds; } function addMeasureIds(measureId, position){ if(this.measureIds == undefined || this.measureIds.length == 0){ this.measureIds = new Array(); } if(this.measureIds.indexOf(measureId)<0){ if(position != undefined && position >= 0 && this.measureIds[position] != undefined) this.measureIds.splice(position, 0, measureId); else this.measureIds.push(measureId); } } function delMeasureIds(measureId){ if(this.measureIds == undefined || this.measureIds.length == 0){ return false; } var position = this.measureIds.indexOf(measureId); if(position >= 0){ this.measureIds.splice(position, 1); return true; } return false; } function setdimensionFilters(dimensionFilters){ if(dimensionFilters instanceof Array) this.dimensionFilters=dimensionFilters; else this.dimensionFilters=[dimensionFilters]; } function getdimensionFilters(){ if( typeof this.dimensionFilters != 'undefined') return this.dimensionFilters; else return []; } function addDimensionFilters(dimensionFilter, position){ if(this.dimensionFilters == undefined || this.dimensionFilters.length == 0){ this.dimensionFilters = new Array(); // Think to avoid taking Array } if(this.dimensionFilters.indexOf(dimensionFilter)<0){ if(position != undefined && position >= 0 && this.dimensionFilters[position] != undefined) this.dimensionFilters.splice(position, 0, dimensionFilter); else this.dimensionFilters.push(dimensionFilter); } } function delDimensionFilters(dimensionFilter){ if(this.dimensionFilters == undefined || this.dimensionFilters.length == 0){ return false; } var position = this.dimensionFilters.indexOf(dimensionFilter); if(position >= 0){ this.dimensionFilters.splice(position, 1); return true; } return false; } function setmeasureFilters(measureFilters){ if(measureFilters instanceof Array) this.measureFilters=measureFilters; else this.measureFilters=[measureFilters]; } function getmeasureFilters(){ if( typeof this.measureFilters != 'undefined') return this.measureFilters; else return []; } function addMeasureFilters(measureFilter, position){ if(this.measureFilters == undefined || this.measureFilters.length == 0){ this.measureFilters = new Array();// Think to avoid taking Array } if(this.measureFilters.indexOf(measureFilter<0)){ if(position != undefined && position >= 0 && this.measureFilters[position] != undefined) this.measureFilters.splice(position, 0, measureFilter); else this.measureFilters.push(measureFilter); } } function delMeasureFilters(measureFilter){ if(this.measureFilters == undefined || this.measureFilters.length == 0){ return false; } var position = this.measureFilters.indexOf(measureFilter); if(position >= 0){ this.measureFilters.splice(position, 1); return true; } return false; } function setgraphId(graphId){ this.graphId=graphId; } function getgraphId(){ with(this) return graphId; } function setparentId(parentId){ this.parentId=parentId; } function getparentId(){ with(this) return parentId; } function setinstance(instance){ this.instance=instance; } function getinstance(){ with(this) return instance; } /* Start: Graph Properties */ function setproperties(propsArray){ this.properties=propsArray; } function getproperties(){ with(this) return properties; } function setPropsValue(propName, propValue){ if(this.properties != undefined){ for(var i=0; i<this.properties.length; i++){ if(this.properties[i][0]== propName){ this.properties[i][1]=propValue; return; } } } var newProps=new Array(); newProps[0]=new Array(2); newProps[0][0]=propName; newProps[0][1]=propValue; if(this.properties != undefined && this.properties instanceof Array ){ this.properties.push(newProps[0]); } else{ this.properties=newProps; } } function getPropsValue(propName){ for(var i=0; this.properties && i<this.properties.length; i++){ if(this.properties[i][0]== propName) return this.properties[i][1]; } return ""; } /* End: Graph Properties */ function setdescription(description){ this.description=description; } function getdescription(){ with(this) return description; } function setnote(note){ this.note=note; } function getnote(){ with(this) return note; } function setrefresh(refresh){ this.refresh=refresh; } function getrefresh(){ with(this) return refresh; } function setcategory(category){ this.category=category; } function getcategory(){ with(this) return category; } /*Start Permission*/ function setPermission(user, isGroup, level){ var p1 = new Array(); p1[0] = new Array(3); p1[0][0] = user ; p1[0][1] = isGroup; p1[0][2] = level; if(this.reportPermission != undefined) this.reportPermission.push(p1[0]); else this.reportPermission=p1; } function setReportPermission(reportPermission){ this.reportPermission = reportPermission; } function getReportPermission(){ with(this) return reportPermission; } /*End Permission*/ function addToArray(destArray, itemToAdd, position){ if(destArray == undefined || !(destArray instanceof Array)){ destArray = new Array(); } if(destArray.indexOf(itemToAdd<0)){ if(position != undefined && position >= 0 && destArray[position] != undefined) destArray.splice(position, 0, itemToAdd); else destArray.push(itemToAdd); } } function deleteFromArray(destArray, itemToDel){ if(destArray == undefined || destArray.length == 0){ return false; } var position = destArray.indexOf(itemToDel); if(position >= 0){ destArray.splice(position, 1); return true; } return false; } function addDimensionToReport(item){ this.addDimensionIds(item.Id); this.addDimensions(item.Name); this.addDimMeta(item.Column); //this.addFormats(item.Format); //this.addMinMax(item.MinimumValue+':'+item.MaximumValue); } function deleteDimensionFromReport(item){ this.delDimensionIds(item.Id); this.delDimensions(item.Name); this.delDimMeta(item.Column); //this.delFormats(item.Format); this.delMinMax(item.MinimumValue+':'+item.MaximumValue); } function addMeasureToReport(item){ this.addMeasureIds(item.Id); this.addMeasures(item.Name); this.addFormats(item.Format); this.addMinMax(item.MinimumValue+':'+item.MaximumValue); } function deleteMeasureFromReport(item){ this.delMeasureIds(item.Id); this.delMeasures(item.Name); this.delFormats(item.Format); this.delMinmax(item.MinimumValue+':'+item.MaximumValue); } /*------------------------------------------------End of Class ----------------------------------------------------------*/