twb 0.0.34 → 0.0.35
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/twb.rb +1 -1
- data/lib/twb/util/xraydashboards.rb +29 -20
- data/twb-0.0.34.gem +0 -0
- metadata +2 -1
data/lib/twb.rb
CHANGED
@@ -45,7 +45,7 @@ module Twb
|
|
45
45
|
@@shapeRadius = 1000
|
46
46
|
@@shapeDiam = 2*@@shapeRadius
|
47
47
|
|
48
|
-
@@htmlTableLead = '<p style="font: normal 12px Verdana, Calibri, Geneva, sans-serif; color: #000000;">The Dashboard\'s panels, one per row.<br />
|
48
|
+
@@htmlTableLead = '<p style="font: normal 12px Verdana, Calibri, Geneva, sans-serif; color: #000000;">The Dashboard\'s panels, one per row.<br />Mousing over the table highlights the Dashboard\'s panels in the diagram.</p>'
|
49
49
|
@@htmlTableFNote = '<p><span style="font: normal 12px Verdana, Calibri, Geneva, sans-serif; color: #000000;">Note: the Dashboard\'s \'x\', \'y\', \'w\', and \'h\' values are shown as coded in the<br />Tableau Workbook. It appears that the maximum value –100,000– indicates<br />that the Dashboard size is set to Automatic.</span></p>'
|
50
50
|
|
51
51
|
@maxSVGDim = 600.0 # need the decimal for dashboard scaling with svgScale in fn termDashSVG
|
@@ -192,8 +192,8 @@ end
|
|
192
192
|
recordZone(dash.name, zone, dzcnt+=1)
|
193
193
|
end
|
194
194
|
termDashSVG
|
195
|
-
initDashHTML(dash.name, dashCnt += 1, @dashboards.length)
|
196
|
-
@dashboardHTMLDocs[dash.name] = termDashHTML
|
195
|
+
initDashHTML(dash.name, dashCnt += 1, @dashboards.length, dZones.length)
|
196
|
+
@dashboardHTMLDocs[dash.name] = termDashHTML(dZones.length)
|
197
197
|
end
|
198
198
|
return @dashboardHTMLDocs
|
199
199
|
end
|
@@ -268,7 +268,7 @@ end
|
|
268
268
|
$Fsvg.close unless $Fsvg.nil?
|
269
269
|
end
|
270
270
|
|
271
|
-
def initDashHTML(dashName, dashNum, dashCount)
|
271
|
+
def initDashHTML(dashName, dashNum, dashCount, zonesCnt)
|
272
272
|
@htmlHead = '<!DOCTYPE HTML PUBLIC "-//W3C//Dth HTML 3.2 Final//EN">'
|
273
273
|
@htmlHead << "\n<HTML>"
|
274
274
|
@htmlHead << "\n<HEAD>"
|
@@ -315,10 +315,16 @@ end
|
|
315
315
|
@htmlHead << "\n}\n"
|
316
316
|
@htmlHead << @fnScaleDash
|
317
317
|
@htmlHead << "\n</script>"
|
318
|
-
|
319
318
|
@htmlHead << "\n</HEAD>"
|
320
|
-
|
321
319
|
@htmlHead << "\n<BODY BGCOLOR=\"#FFFFFF\">\n"
|
320
|
+
if zonesCnt > 0
|
321
|
+
addPageLead(dashName, dashNum, dashCount)
|
322
|
+
else
|
323
|
+
@htmlHead << "\n<div style='font-size:125%; margin: 25px 0 0 5em;'>'#{dashName}' has no panels (zones)</div>"
|
324
|
+
end
|
325
|
+
end
|
326
|
+
|
327
|
+
def addPageLead(dashName, dashNum, dashCount)
|
322
328
|
@htmlHead << <<-PAGELEAD
|
323
329
|
<div id='LeftTitle' width='45%'>
|
324
330
|
<p><span style='font: normal 16px Verdana, Calibri, Geneva, sans-serif; color: #000000;padding: 0px 10px 0px 15px;'>#{@workbook.name}</span><br />
|
@@ -335,21 +341,24 @@ end
|
|
335
341
|
PAGELEAD
|
336
342
|
end
|
337
343
|
|
338
|
-
|
344
|
+
|
345
|
+
def termDashHTML(zonesCnt)
|
339
346
|
dhtml = ''
|
340
347
|
dhtml << @htmlHead
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
348
|
+
if zonesCnt > 0
|
349
|
+
dhtml << '<div id="LeftColumn" width="620">'
|
350
|
+
dhtml << @svgHead
|
351
|
+
dhtml << @svg
|
352
|
+
dhtml << @@svgTail
|
353
|
+
dhtml << '</div>'
|
354
|
+
dhtml << '<div id="RightColumn">'
|
355
|
+
dhtml << @@htmlTableLead
|
356
|
+
dhtml << @@htmlTableHead
|
357
|
+
dhtml << @htmlTable
|
358
|
+
dhtml << ('</table>')
|
359
|
+
dhtml << @@htmlTableFNote
|
360
|
+
dhtml << '</div>'
|
361
|
+
end
|
353
362
|
dhtml << ('</BODY>')
|
354
363
|
dhtml << ('</HTML>')
|
355
364
|
end
|
@@ -401,7 +410,7 @@ end
|
|
401
410
|
else
|
402
411
|
drawLine = ''
|
403
412
|
rxy = ' rx="3000" ry="3000"'
|
404
|
-
|
413
|
+
@strokeWidth = 200
|
405
414
|
strokeStyle = 'stroke:blue;'
|
406
415
|
x = zone.attribute('x').text.to_i + @strokeWidth
|
407
416
|
y = zone.attribute('y').text.to_i + @strokeWidth
|
data/twb-0.0.34.gem
ADDED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: twb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.35
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -53,6 +53,7 @@ files:
|
|
53
53
|
- test/Web Page Dashboards.twb
|
54
54
|
- twb-0.0.32.gem
|
55
55
|
- twb-0.0.33.gem
|
56
|
+
- twb-0.0.34.gem
|
56
57
|
- twb.gemspec
|
57
58
|
homepage: http://rubygems.org/gems/twb
|
58
59
|
licenses:
|