OXIESEC PANEL
- Current Dir:
/
/
home
/
cubot
/
docroot
/
showcase
/
js
/
ws
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
12/31/2022 06:53:36 AM
rwxr-xr-x
📄
.filter_template.js.swp
20 KB
08/14/2022 11:05:24 AM
rw-r--r--
📄
.ws.core.js.swp
20 KB
08/14/2022 11:05:24 AM
rw-r--r--
📄
chartPrefs.js
14.4 KB
08/14/2022 11:05:24 AM
rw-r--r--
📄
compute.js
6.11 KB
08/14/2022 11:05:25 AM
rw-r--r--
📄
display.js
13.24 KB
08/14/2022 11:05:24 AM
rw-r--r--
📄
dtree.js
14.88 KB
08/14/2022 11:05:25 AM
rw-r--r--
📁
files
-
08/14/2022 11:05:24 AM
rwxr-xr-x
📄
filterClass.js
5.17 KB
08/14/2022 11:05:24 AM
rw-r--r--
📄
filter_template.js
87.03 KB
08/14/2022 11:05:25 AM
rw-r--r--
📄
filter_template.js_17Feb2020
85.47 KB
08/14/2022 11:05:24 AM
rw-r--r--
📄
filter_template.js_19jan18
81.31 KB
08/14/2022 11:05:25 AM
rw-r--r--
📄
ws.app.js
22.03 KB
08/14/2022 11:05:24 AM
rw-r--r--
📄
ws.core.js
46.33 KB
08/14/2022 11:05:24 AM
rw-r--r--
📄
ws.ext.js
34.42 KB
08/14/2022 11:05:24 AM
rw-r--r--
📄
ws.ext.js_09dec2019
33.16 KB
08/14/2022 11:05:24 AM
rw-r--r--
📄
ws.ext.js_10dec2019
32.45 KB
08/14/2022 11:05:25 AM
rw-r--r--
📄
ws.ext.js_28Aug2019
23.55 KB
08/14/2022 11:05:25 AM
rw-r--r--
📄
ws.lib.js
35.14 KB
08/14/2022 11:05:25 AM
rw-r--r--
📄
ws.lib.js_19jan18
30.59 KB
08/14/2022 11:05:24 AM
rw-r--r--
📄
wsAll.js
143.54 KB
08/14/2022 11:05:24 AM
rw-r--r--
Editing: display.js
Close
//{"RD":{"Grid":{"BgColor":"#fff","Depth":"2D","Shadow":true,"ShadowAngle":0,"ShadowOffset":10,"drawBorder":true},"Axes":{"Pad":10,"Mark":"Outside","ShowGridLines":true,"ShowTicks":true,"ShowLabel":true,"ShowTickLabels":true},"Legends":{"Show":true,"Location":"s","NumRows":30,"Xoffset":0,"Yoffset":0},"Topx":{"Type":"M","Values":"10:10:10"},"Measures":{"Names":"Units:Net:Gross"},"General":{}}} var G_seriesColors =["#3366cc", "#dc3912", "#ff9900", "#109618", "#990099", "#0099c6", "#dd4477","#66aa00", "#b82e2e", "#cccccc", "#0011cc", "#316395", "#994499", "#22aa99", "#aaaa11", "#6633cc", "#e67300", "#8b0707", "#651067", "#329262", "#3366cc", "#dc3912", "#ff9900", "#109618", "#990099", "#0099c6", "#dd4477","#66aa00", "#b82e2e", "#cccccc", "#0011cc", "#316395", "#994499", "#22aa99", "#aaaa11", "#6633cc", "#e67300", "#8b0707", "#651067", "#329262"] ; var isPhone=false; var orientation="landscape"; function displayOptions(RDobj){ this.RD=RDobj; this.RDsetGrid=RDsetGrid; //Grid this.getBgColor = getBgColor; this.getShadowAngle = getShadowAngle; this.getShadowOffset = getShadowOffset; this.getShadow = getShadow; this.getdrawBorder = getdrawBorder; this.getpointLabel = getpointLabel; this.getpointTooltip = getpointTooltip; this.RDsetAxes=RDsetAxes;//Axes this.getMultiAxes = getMultiAxes; this.getPad = getPad; this.getMark = getMark; this.getShowGridLines = getShowGridLines; this.getShowTicks = getShowTicks; this.getShowLabel = getShowLabel; this.getShowTickLabels = getShowTickLabels; this.getxFrom = getxFrom; this.getxLength = getxLength; this.getxPos= getxPos; this.RDsetLegends=RDsetLegends;//Legends this.getShowLegend = getShowLegend; this.getShowLabels = getShowLabels; this.getlegendPlacement=getlegendPlacement; this.getNumRows = getNumRows; this.getLocation = getLocation; this.RDsetTopx=RDsetTopx;//Topx this.getTopxType = getTopxType; this.getTopxValues = getTopxValues; this.RDsetThreshold=RDsetThreshold; this.getThreshold=RDgetThreshold; this.RDsetMeasure=RDsetMeasure;//Measures this.RDgetMeasure=RDgetMeasure; this.RDgetMeasureByName=RDgetMeasureByName; this.RDsetGeneral=RDsetGeneral;//General this.getSeriescolors=getSeriescolors; this.isComputedReport=false; this.RDreset=RDreset; } function isValid(val){ if(typeof val == "boolean") return true; else if(val.length>0) return true; else return false; } /****************************** Grid ***********************************/ function RDsetGrid(BgColor, ShowGridLines, Shadow, ShadowAngle, ShadowOffset, drawBorder, pointLabel,pointTooltip){ if(typeof this.RD.Grid == "undefined") this.RD.Grid={}; if(isValid(BgColor)) this.RD.Grid.BgColor=BgColor; if(isValid(ShowGridLines)) this.RD.Grid.ShowGridLines=ShowGridLines; if(isValid(Shadow)) this.RD.Grid.Shadow=Shadow; if(isValid(ShadowAngle)) this.RD.Grid.ShadowAngle=ShadowAngle; if(isValid(ShadowOffset)) this.RD.Grid.ShadowOffset=ShadowOffset; if(isValid(drawBorder)) this.RD.Grid.drawBorder=drawBorder; if(isValid(pointLabel)) this.RD.Grid.pointLabel=pointLabel; if(isValid(pointTooltip)) this.RD.Grid.pointTooltip=pointTooltip; } function getBgColor(){ if(this.RD && this.RD.Grid && this.RD.Grid.BgColor) return this.RD.Grid.BgColor; else return "#FFFFFF"; } function getShowGridLines(){ if(this.RD && this.RD.Grid && this.RD.Grid.ShowGridLines) return eval(this.RD.Grid.ShowGridLines); else return true; } function getShadow(){ if(this.RD && this.RD.Grid && this.RD.Grid.Shadow) return eval(this.RD.Grid.Shadow); else return false; } function getShadowAngle(){ if(this.RD && this.RD.Grid && this.RD.Grid.ShadowAngle) return this.RD.Grid.ShadowAngle; else return 40; } function getShadowOffset(){ if(this.RD && this.RD.Grid && this.RD.Grid.ShadowOffset) return this.RD.Grid.ShadowOffset; else return 1; } function getdrawBorder(){ if(this.RD && this.RD.Grid && this.RD.Grid.drawBorder) return eval(this.RD.Grid.drawBorder); else return false; } function getpointLabel(){ if(this.RD && this.RD.Grid && this.RD.Grid.pointLabel) return eval(this.RD.Grid.pointLabel); else return false; } function getpointTooltip(){ if(this.RD && this.RD.Grid && this.RD.Grid.pointTooltip) return (this.RD.Grid.pointTooltip); else return 'A'; } /****************************** Axes ***********************************/ function RDsetAxes(Pad,MultiAxes ,Mark, ShowTicks, ShowLabel, ShowTickLabels, xFrom, xLength, xPos){ if(typeof this.RD.Axes == "undefined") this.RD.Axes={}; if(isValid(Pad)) this.RD.Axes.Pad=Pad; if(isValid(MultiAxes)) this.RD.Axes.MultiAxes = MultiAxes; if(isValid(Mark)) this.RD.Axes.Mark=Mark; if(isValid(ShowTicks)) this.RD.Axes.ShowTicks=ShowTicks; if(isValid(ShowLabel)) this.RD.Axes.ShowLabel=ShowLabel; if(isValid(ShowTickLabels)) this.RD.Axes.ShowTickLabels=ShowTickLabels; if(isValid(xFrom)) this.RD.Axes.xFrom=xFrom; if(isValid(xLength) && xFrom != "all") this.RD.Axes.xLength=xLength; else this.RD.Axes.xLength=-1; if(isValid(xPos)) this.RD.Axes.xPos=xPos; } function getMultiAxes(){ if(this.RD && this.RD.Axes && this.RD.Axes.MultiAxes) return eval(this.RD.Axes.MultiAxes); else return false; } function getPad(){ if(this.RD && this.RD.Axes && this.RD.Axes.Pad) return this.RD.Axes.Pad; else return 0; } function getMark(){ if(this.RD && this.RD.Axes && this.RD.Axes.Mark) return eval(this.RD.Axes.Mark); else return false; } function getShowTicks(){ if(this.RD && this.RD.Axes && this.RD.Axes.ShowTicks) return eval(this.RD.Axes.ShowTicks); else return true; } function getShowLabel(){ if(this.RD && this.RD.Axes && this.RD.Axes.ShowLabel) return eval(this.RD.Axes.ShowLabel); else return true; } function getShowTickLabels(){ if(this.RD && this.RD.Axes && this.RD.Axes.ShowTickLabels) return eval(this.RD.Axes.ShowTickLabels); else return true; } function getxFrom(){ if(this.RD && this.RD.Axes && this.RD.Axes.xFrom) return this.RD.Axes.xFrom; else return "all"; } function getxLength(){ if(this.RD && this.RD.Axes && this.RD.Axes.xLength) return this.RD.Axes.xLength; else return -1; } function getxPos(){ if(this.RD && this.RD.Axes && this.RD.Axes.xPos) return this.RD.Axes.xPos; else return "A"; } /****************************** Legends ***********************************/ function RDsetLegends(Show, showLabels, Placement, LegendLoc, NumRows){ if(typeof this.RD.Legends == "undefined") this.RD.Legends={}; if(isValid(Show)) this.RD.Legends.Show=Show; if(isValid(showLabels)) this.RD.Legends.showLabels=showLabels; if(isValid(Placement)) this.RD.Legends.Placement=Placement; if(isValid(LegendLoc)) this.RD.Legends.Location=LegendLoc; if(isValid(NumRows)) this.RD.Legends.NumRows=NumRows; else this.RD.Legends.NumRows=""; } function getShowLegend(){ if(this.RD && this.RD.Legends && this.RD.Legends.Show) return eval(this.RD.Legends.Show); else return true; } function getShowLabels(){ if(this.RD && this.RD.Legends && this.RD.Legends.showLabels) return eval(this.RD.Legends.showLabels); else return true; } function getlegendPlacement(){ if(isPhone) return "outsideGrid"; if(this.RD && this.RD.Legends && this.RD.Legends.Placement) return this.RD.Legends.Placement; else return "outsideGrid"; } function getNumRows(){ if(isPhone) return 2; if(this.RD && this.RD.Legends && this.RD.Legends.NumRows) return this.RD.Legends.NumRows; else return 1; } function getLocation(){ if(isPhone) return "s"; if(this.RD && this.RD.Legends && this.RD.Legends.Location) return this.RD.Legends.Location; else return "s"; } /****************************** Topx ***********************************/ function RDsetTopx(Type, Value){ if(typeof this.RD.Topx == "undefined") this.RD.Topx={}; if(isValid(Type)) this.RD.Topx.Type=Type; if(isValid(Value)) this.RD.Topx.Values=Value; } function getTopxType(){ if(this.RD && this.RD.Topx && this.RD.Topx.Type) return this.RD.Topx.Type; else return 'N'; } function getTopxValues(){ if(this.RD && this.RD.Topx && this.RD.Topx.Values) return this.RD.Topx.Values; else return ""; } /****************************** Threshold***********************************/ function RDsetThreshold(redFrom,redTo, yellowFrom, yellowTo, greenFrom, greenTo, spcLines, upperValue, upperColor, upperLine, upperLabel, lowerValue, lowerColor, lowerLine, lowerLabel ){ if(typeof this.RD.Threshold == "undefined") this.RD.Threshold={}; this.RD.Threshold={ redFrom:redFrom, redTo:redTo, yellowFrom:yellowFrom, yellowTo:yellowTo, greenFrom:greenFrom, greenTo:greenTo, spcLines:spcLines, upperValue:upperValue, upperColor:upperColor, upperLine:upperLine, upperLabel:upperLabel, lowerValue:lowerValue, lowerColor:lowerColor, lowerLine:lowerLine, lowerLabel:lowerLabel }; } function RDgetThreshold(){ if(this.RD && this.RD.Threshold && (this.RD.Threshold.redFrom || this.RD.Threshold.spcLines=="true")) return this.RD.Threshold; else return {redFrom:0, redTo:30, yellowFrom:30, yellowTo:60, greenFrom:60, greenTo:100,spcLines:'false', upperValue:'', upperColor:'', upperLine:'', upperLabel:'', lowerValue:'', lowerColor:'', lowerLine:'', lowerLabel:'' }; } /****************************** Measures ***********************************/ function RDsetMeasure(measId, measName, showMe, displayAs, color, currency, dispType, precision, prefix, suffix){ if(typeof this.RD.Measures == "undefined") this.RD.Measures=[]; var position=-1; for(var i=0; i<this.RD.Measures.length; i++){ if(this.RD.Measures[i].id == measId){ position=i; break; } } var meas={id:measId, measName:measName, showMe:showMe, displayAs:displayAs, color:color, currency:currency, dispType:dispType, precision:precision, prefix:prefix, suffix:suffix}; if(position>=0) this.RD.Measures.splice(position,1, meas); else this.RD.Measures.push(meas) } function RDgetMeasure(measId){ if(this.RD && this.RD.Measures && this.RD.Measures.length>0){ for(var i=0; i<this.RD.Measures.length; i++){ if(this.RD.Measures[i].id == measId) return this.RD.Measures[i]; } } return {}; } function RDgetMeasureByName(measName){ if(this.RD && this.RD.Measures && this.RD.Measures.length>0){ for(var i=0; i<this.RD.Measures.length; i++){ if(this.RD.Measures[i].measName == measName) return this.RD.Measures[i]; } } return {}; } /**************************** General ***********************************/ function RDsetGeneral(){ //TO DO---------------------------------------------------------------------------------------------------- if(typeof this.RD == "undefined") this.RD={}; if(typeof this.RD.General == "undefined") this.RD.General={}; } function getSeriescolors(){ return G_seriesColors; } function RDreset(type){ if(type == "Grid"){ if(typeof this.RD.Grid != "undefined") this.RD.Grid={}; } else if(type == "Axes"){ if(typeof this.RD.Axes != "undefined") this.RD.Axes={}; } else if(type == "Legends"){ if(typeof this.RD.Legends != "undefined") this.RD.Legends={}; } else if(type == "TopX"){ if(typeof this.RD.Topx != "undefined") this.RD.Topx={}; } else if(type == "Threshold"){ if(typeof this.RD.Threshold!= "undefined") this.RD.Threshold={}; } else if(type == "Measures"){ if(typeof this.RD.Measures != "undefined") this.RD.Measures=[]; } else if(type == "General"){ if(typeof this.RD.General != "undefined") this.RD.General={}; } } var displayObj=new displayOptions(); /******************************************* Format Functions *******************************************/ function formatstr(val,formatter, ndims, nmeas){ if(typeof formatter == undefined || formatter.length<1) return val for (var i = 1;i<val.length;i++){ for (var j = ndims,k=0; j<val[0].length; j++,k++){ if(typeof formatter[k] == "undefined") return val; var Gsym=','; // Grouping Symbol var dec='.'; //Decimal symbol var precesion = formatter[k].indexOf("p"); var precesionVal=''; if(precesion >=0) precesionVal=formatter[k].substr(precesion + 1, 1); var prefix = formatter[k].indexOf("P"); var prefixval = ''; if(prefix>=0) prefixval = formatter[k].substr(prefix + 1, 1); var suffix = formatter[k].indexOf("S"); var suffixval = ''; if(suffix >= 0) suffixval = formatter[k].substr(suffix + 1, 1); if (formatter[k].charAt(1) == "e") { Gsym='.'; dec=','; } val[i][j]= formatMoney(val[i][j], prefixval, suffixval, precesionVal, dec, Gsym); } } return val; } function formatMoney(m,a,b,c, d, t){ var locale = 'en-US'; var localeOptions = {}; localeOptions.minimumFractionDigits = c; localeOptions.maximumFractionDigits = c; return Number(m).toLocaleString(locale, localeOptions); //var n = m, c = isNaN(c = Math.abs(c)) ? 2 : c, d = d == undefined ? "," : d, t = t == undefined ? "." : t, s = n < 0 ? "-" : "", i = parseInt(n = Math.abs(+n || 0).toFixed(c)) + "", j = (j = i.length) > 3 ? j % 3 : 0; //return a+""+s + (j ? i.substr(0, j) + t : "") + i.substr(j).replace(/(\d{3})(?=\d)/g, "$1" + t) + (c ? d + Math.abs(n - i).toFixed(c).slice(2) : "")+b; }