Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Stats window now retrieves BBB server IP from the same place as setip…

…, rather than just looking for the server computer's IP
  • Loading branch information...
commit f347a23822d03cd136a47ec35697ffc3b28f297d 1 parent 128bd5b
Justin Robinson jtrobinson authored
2  bbb-aps/src.main.java.org.bigbluebutton.conference.service.poll/poll/Poll.java
View
@@ -34,6 +34,8 @@
@ThreadSafe
public class Poll{
+ // Poll URL http://142.204.133.24/bigbluebutton/polls.jsp?poll={webKey}
+
/* KEY PLACES TO UPDATE, WHEN ADDING NEW FIELDS TO THE HASH:
* PollService.java, getPoll()
* PollInvoker.java, invoke()
133 bbb-aps/src.main.java.org.bigbluebutton.conference.service.poll/poll/PollApplication.java
View
@@ -19,14 +19,15 @@
package org.bigbluebutton.conference.service.poll;
-import java.net.InetAddress;
+import java.net.*;
import java.util.List;
import org.slf4j.Logger;
import org.red5.logging.Red5LoggerFactory;
import java.util.ArrayList;
-
+import java.io.*;
+import java.util.Scanner;
import org.bigbluebutton.conference.service.poll.PollRoomsManager;
import org.bigbluebutton.conference.service.poll.PollRoom;
@@ -45,7 +46,11 @@
private static final String APP = "Poll";
private PollRoomsManager roomsManager;
private String CURRENTKEY = "bbb-polling-webID";
- private int MAX_WEBKEYS = 9999;
+ private Integer MAX_WEBKEYS = 9999;
+ private Integer MIN_WEBKEYS = 1000;
+ private String BBB_FILE = "/etc/nginx/sites-available/bigbluebutton";
+ private String BBB_SERVER_FIELD = "server_name";
+ private String BBB_PORT_FIELD = "listen";
public PollHandler handler;
@@ -61,22 +66,17 @@ public boolean destroyRoom(String name) {
return true;
}
+ // About to change dbConnect entirely, but if you can see this again you're back to normal.
public Jedis dbConnect(){
- // Reads IP from Java, for portability
- String serverIP = "INVALID IP";
- try
- {
- InetAddress addr = InetAddress.getLocalHost();
- // Get hostname
- String hostname = addr.getHostName();
- serverIP = hostname;
- }
- catch (Exception e)
- {
- log.error("IP capture failed.");
- }
- JedisPool redisPool = new JedisPool(serverIP, 6379);
- return redisPool.getResource();
+ try{
+ String serverIP = getLocalIP();
+ JedisPool redisPool = new JedisPool(serverIP, 6379);
+ return redisPool.getResource();
+ }
+ catch (Exception e){
+ log.error("Error in PollApplication.dbConnect()");
+ }
+ return null;
}
public void destroyPolls(String name){
@@ -105,7 +105,7 @@ public void cutOffWebPoll(String pollKey){
jedis.del(webKey);
}
catch (Exception e){
- log.warn("Error in deleting web key " + webKey);
+ log.error("Error in deleting web key " + webKey);
}
}
@@ -118,7 +118,7 @@ public boolean addRoomListener(String room, IPollRoomListener listener) {
roomsManager.addRoomListener(room, listener);
return true;
}
- log.warn("Adding listener to a non-existant room " + room);
+ log.error("Adding listener to a non-existant room " + room);
return false;
}
@@ -158,12 +158,15 @@ public void setStatus(String pollKey, Boolean status){
pollRecorder.setStatus(pollKey, status);
}
- public String generate(String pollKey){
+ public ArrayList generate(String pollKey){
Jedis jedis = dbConnect();
if (!jedis.exists(CURRENTKEY)){
- jedis.set(CURRENTKEY, "0");
+ Integer base = MIN_WEBKEYS -1;
+ jedis.set(CURRENTKEY, base.toString());
}
// The value stored in the bbb-polling-webID key represents the next available web-friendly poll ID
+ ArrayList webInfo = new ArrayList();
+
String nextWebKey = webKeyIncrement(Integer.parseInt(jedis.get(CURRENTKEY)), jedis);
jedis.del(nextWebKey);
jedis.set(nextWebKey, pollKey);
@@ -171,7 +174,15 @@ public String generate(String pollKey){
jedis.hset(pollKey, "webKey", nextWebKey);
// Replace the value stored in bbb-polling-webID
jedis.set(CURRENTKEY, nextWebKey);
- return nextWebKey;
+ webInfo.add(nextWebKey);
+
+ String hostname = getLocalIP();
+ webInfo.add(hostname);
+
+ String hostPort = getLocalPort();
+ webInfo.add(hostPort);
+
+ return webInfo;
}
private String webKeyIncrement(Integer index, Jedis jedis){
@@ -179,8 +190,82 @@ private String webKeyIncrement(Integer index, Jedis jedis){
if (++index <= MAX_WEBKEYS){
nextIndex = index.toString();
}else{
- nextIndex = "1";
+ nextIndex = MIN_WEBKEYS.toString();
}
return nextIndex;
}
+
+ private String getLocalIP()
+ {
+ File parseFile = new File(BBB_FILE);
+ try{
+ Scanner scanner = new Scanner(new FileReader(parseFile));
+ Boolean found = false;
+ String serverAddress = "";
+ while (!found && scanner.hasNextLine()){
+ serverAddress = processLine(scanner.nextLine(), BBB_SERVER_FIELD);
+ if (!serverAddress.equals(""))
+ found = true;
+ }
+ scanner.close();
+ return serverAddress;
+ }
+ catch (Exception e){
+ log.error("Error in scanning " + BBB_FILE + " to find server address.");
+ }
+ return null;
+ }
+
+ private String getLocalPort()
+ {
+ File parseFile = new File(BBB_FILE);
+ try{
+ Scanner scanner = new Scanner(new FileReader(parseFile));
+ Boolean found = false;
+ String serverAddress = "";
+ while (!found && scanner.hasNextLine()){
+ serverAddress = processLine(scanner.nextLine(), BBB_PORT_FIELD);
+ if (!serverAddress.equals(""))
+ found = true;
+ }
+ scanner.close();
+ return serverAddress;
+ }
+ catch (Exception e){
+ log.error("Error in scanning " + BBB_FILE + " to find server PORT.");
+ }
+ return null;
+ }
+
+ private String processLine(String line, String option){
+ //use a second Scanner to parse the content of each line
+ Scanner scanner = new Scanner(line);
+ if ( scanner.hasNext() ){
+ String name = scanner.next();
+ String value = scanner.next();
+ if (name.equals(option)){
+ // Return the host address without the trailing semicolon
+ return value.substring(0, value.length()-1);
+ }
+ }
+ else {
+ log.error("Error in processing server address from " + BBB_FILE);
+ }
+ return "";
+ }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
}
8 bbb-aps/src.main.java.org.bigbluebutton.conference.service.poll/poll/PollService.java
View
@@ -94,10 +94,10 @@ public void setStatus(String pollKey, Boolean status){
application.setStatus(pollKey, status);
}
- public String generate(String pollKey){
- String webKey;
- webKey = application.generate(pollKey);
- return webKey;
+ public ArrayList generate(String pollKey){
+ ArrayList webInfo = new ArrayList();
+ webInfo = application.generate(pollKey);
+ return webInfo;
}
public void cutOffWebPoll(String pollKey){
2  polling/events/GenerateWebKeyEvent.as
View
@@ -29,6 +29,8 @@ package org.bigbluebutton.modules.polling.events
public var repost:Boolean;
public var pollKey:String;
public var poll:PollObject;
+ public var webHostIP:String;
+ public var webHostPort:String;
public function GenerateWebKeyEvent(type:String, bubbles:Boolean=true, cancelable:Boolean=false)
{
11 polling/managers/PollingWindowManager.as
View
@@ -101,10 +101,17 @@ package org.bigbluebutton.modules.polling.managers
public function handleReturnWebKeyEvent(e:GenerateWebKeyEvent):void
{
- if (!e.repost)
+ var transferURL:String = e.webHostIP;
+ if (e.webHostPort != "80")
+ transferURL += (":" + e.webHostPort);
+ transferURL += "/bigbluebutton/polls.jsp?poll=" + e.poll.webKey;
+
+ statsWindow.webPollUrl = transferURL;
+ if (!e.repost){
instructionsWindow._webKey = e.poll.webKey;
- else
+ }else{
statsWindow.trackingPoll.webKey = e.poll.webKey;
+ }
}
// Action makers (function that actually act on the windows )
10 polling/service/PollingService.as
View
@@ -417,10 +417,18 @@ package org.bigbluebutton.modules.polling.service
//--------------------------------------//
// Responder functions
function success(obj:Object):void{
- var webKey:String = obj as String;
+ var webInfo:Array = obj as Array;
+
+ var webKey:String = webInfo[0];
+ var webHostIP:String = webInfo[1];
+ var webHostPort:String = webInfo[2];
+
var webKeyReturnEvent:GenerateWebKeyEvent = new GenerateWebKeyEvent(GenerateWebKeyEvent.RETURN);
webKeyReturnEvent.poll = generateEvent.poll
webKeyReturnEvent.poll.webKey = webKey;
+ webKeyReturnEvent.webHostIP = webHostIP;
+ webKeyReturnEvent.webHostPort = webHostPort;
+
dispatcher.dispatchEvent(webKeyReturnEvent);
}
function failure(obj:Object):void{
453 polling/views/PollingStatsWindow.mxml
View
@@ -21,268 +21,253 @@
-->
<MDIWindow xmlns="flexlib.mdi.containers.*" xmlns:mx="http://www.adobe.com/2006/mxml"
- width="380" height="150"
- xmlns:mate="http://mate.asfusion.com/"
- implements="org.bigbluebutton.common.IBbbModuleWindow"
- initialize="init();"
- creationComplete="onCreationComplete()"
- label="{ResourceUtil.getInstance().getString('bbb.polling.toolbar.toolTip')}"
- layout="absolute"
- title="{ResourceUtil.getInstance().getString('bbb.polling.toolbar.toolTip')}">
+ height="150"
+ width="380"
+ xmlns:mate="http://mate.asfusion.com/"
+ implements="org.bigbluebutton.common.IBbbModuleWindow"
+ initialize="init();"
+ creationComplete="onCreationComplete()"
+ label="{ResourceUtil.getInstance().getString('bbb.polling.toolbar.toolTip')}"
+ title="{ResourceUtil.getInstance().getString('bbb.polling.toolbar.toolTip')}"
+ layout="absolute">
<mx:Script>
<![CDATA[
import flexlib.mdi.events.MDIWindowEvent;
+ import org.bigbluebutton.main.views.MainCanvas;
+ import mx.controls.Alert;
+ import org.bigbluebutton.common.LogUtil;
+ import org.bigbluebutton.modules.polling.events.StartPollingEvent;
+ import org.bigbluebutton.modules.polling.managers.PollingManager;
+ import org.bigbluebutton.modules.polling.events.VoteEvent;
+ import org.bigbluebutton.modules.polling.events.PollingStatsWindowEvent;
+ import org.bigbluebutton.modules.polling.events.PollRefreshEvent;
+ import org.bigbluebutton.modules.polling.events.StopPollEvent;
+ import org.bigbluebutton.modules.polling.events.SavePollEvent;
+ import org.bigbluebutton.modules.polling.events.PublishPollEvent;
+ import org.bigbluebutton.modules.polling.events.GenerateWebKeyEvent;
- import org.bigbluebutton.main.views.MainCanvas;
- import mx.controls.Alert;
- import org.bigbluebutton.common.LogUtil;
- import org.bigbluebutton.modules.polling.events.StartPollingEvent;
- import org.bigbluebutton.modules.polling.managers.PollingManager;
- import org.bigbluebutton.modules.polling.events.VoteEvent;
- import org.bigbluebutton.modules.polling.events.PollingStatsWindowEvent;
- import org.bigbluebutton.modules.polling.events.PollRefreshEvent;
- import org.bigbluebutton.modules.polling.events.StopPollEvent;
- import org.bigbluebutton.modules.polling.events.SavePollEvent;
- import org.bigbluebutton.modules.polling.events.PublishPollEvent;
- import org.bigbluebutton.modules.polling.events.GenerateWebKeyEvent;
-
- import org.bigbluebutton.modules.polling.model.PollObject;
-
- import org.bigbluebutton.core.managers.UserManager;
- import org.bigbluebutton.main.model.users.Conference
- import org.bigbluebutton.main.model.users.BBBUser;
- import org.bigbluebutton.common.Role;
+ import org.bigbluebutton.modules.polling.model.PollObject;
+
+ import org.bigbluebutton.core.managers.UserManager;
+ import org.bigbluebutton.main.model.users.Conference
+ import org.bigbluebutton.main.model.users.BBBUser;
+ import org.bigbluebutton.common.Role;
- import mx.validators.Validator;
- import mx.utils.ObjectUtil;
- import org.bigbluebutton.util.i18n.ResourceUtil;
+ import mx.validators.Validator;
+ import mx.utils.ObjectUtil;
+ import org.bigbluebutton.util.i18n.ResourceUtil;
- import mx.collections.ArrayCollection;
- import mx.core.IUIComponent;
- import mx.controls.Text;
- import mx.controls.TextArea;
- import mx.containers.*;
- import mx.controls.*;
+ import mx.collections.ArrayCollection;
+ import mx.core.IUIComponent;
+ import mx.controls.Text;
+ import mx.controls.TextArea;
+ import mx.containers.*;
+ import mx.controls.*;
+ public static const LOGNAME:String = "[PollingStatsWindow] ";
+ [Bindable] public var question:String;
+ [Bindable] public var answers:Array;
+ [Bindable] public var trackingPoll:PollObject;
+ [Bindable] public var webPollUrl:String;
+ public var viewingClosedPoll:Boolean = false;
+ public var moduleAttributes:Object;
+ private var _userid:Number;
+ private var window:PollingStatsWindow;
+ private var conference:Conference;
+ public var reviewing:Boolean = false;
- public static const LOGNAME:String = "[PollingStatsWindow] ";
-
- [Bindable] public var question:String;
- [Bindable] public var answers:Array;
-
- [Bindable] public var trackingPoll:PollObject;
- public var viewingClosedPoll:Boolean = false;
-
-
- public var moduleAttributes:Object;
- private var _userid:Number;
- private var window:PollingStatsWindow;
- private var conference:Conference;
-
- public var reviewing:Boolean = false;
-
- private function init():void{
- webPollBox.visible = (!reviewing && trackingPoll.publishToWeb);
- if (!reviewing && trackingPoll.publishToWeb){
- var generate: GenerateWebKeyEvent = new GenerateWebKeyEvent(GenerateWebKeyEvent.GENERATE);
- generate.poll = trackingPoll;
- dispatchEvent(generate);
- }
+ private function init():void{
+ webPollBox.visible = (!reviewing && trackingPoll.publishToWeb);
+ if (!reviewing && trackingPoll.publishToWeb){
+ var generate: GenerateWebKeyEvent = new GenerateWebKeyEvent(GenerateWebKeyEvent.GENERATE);
+ generate.poll = trackingPoll;
+ dispatchEvent(generate);
}
+ }
- private function onCreationComplete():void{
- conference = UserManager.getInstance().getConference();
- // If the statistics window is being opened to view a poll that has been published and closed, the interface will
- // immediately appear with only the option to close the window.
- if(viewingClosedPoll)
- stopPoll();
-
- if (trackingPoll.publishToWeb){
- webPollURLBox.text = trackingPoll.webKey;
- }
-
- answers = trackingPoll.answers;
- question = trackingPoll.question;
-
- var lines:int = (question.length / 28) + 1;
- for(var s:String in answers){
- lines = lines + ((s.length / 28) + 1);
- }
- height = height + ((lines+1) * 45);
- createResultsTable(answers.length, answers);
- }
-
- public function getPrefferedPosition():String{
- return MainCanvas.POPUP;
+ private function onCreationComplete():void{
+ conference = UserManager.getInstance().getConference();
+ // If the statistics window is being opened to view a poll that has been published and closed, the interface will
+ // immediately appear with only the option to close the window.
+ if(viewingClosedPoll)
+ stopPoll();
+ if (trackingPoll.publishToWeb){
+ webPollURLBox.text = webPollUrl;
}
+ answers = trackingPoll.answers;
+ question = trackingPoll.question;
+ var lines:int = (question.length / 28) + 1;
+ for(var s:String in answers){
+ lines = lines + ((s.length / 28) + 1);
+ }
+ height = height + ((lines+1) * 45);
+ createResultsTable(answers.length, answers);
+ }
+
+ public function getPrefferedPosition():String{
+ return MainCanvas.POPUP;
+ }
- private function refreshPoll():void{
- var e:PollRefreshEvent = new PollRefreshEvent(PollRefreshEvent.GET);
- e.poll.title = trackingPoll.title;
- dispatchEvent(e);
- } // end of function refreshResults
-
- private function closeWindow():void{
- dispatchEvent(new PollingStatsWindowEvent(PollingStatsWindowEvent.CLOSE));
- }
+ private function refreshPoll():void{
+ var e:PollRefreshEvent = new PollRefreshEvent(PollRefreshEvent.GET);
+ e.poll.title = trackingPoll.title;
+ dispatchEvent(e);
+ } // end of function refreshResults
+
+ private function closeWindow():void{
+ dispatchEvent(new PollingStatsWindowEvent(PollingStatsWindowEvent.CLOSE));
+ }
- public function refreshWindow(newVotes:Array, totalVotes:int, noVoteYet:int):void{
- trackingPoll.votes = newVotes;
- trackingPoll.totalVotes = totalVotes;
- trackingPoll.didNotVote = noVoteYet;
- createResultsTable(trackingPoll.answers.length, trackingPoll.answers);
- invalidateDisplayList();
- validateNow();
- }
+ public function refreshWindow(newVotes:Array, totalVotes:int, noVoteYet:int):void{
+ trackingPoll.votes = newVotes;
+ trackingPoll.totalVotes = totalVotes;
+ trackingPoll.didNotVote = noVoteYet;
+ createResultsTable(trackingPoll.answers.length, trackingPoll.answers);
+ invalidateDisplayList();
+ validateNow();
+ }
- override public function close(event:MouseEvent = null):void {
- stopPoll();
- closeWindow();
- }
- private function stopPoll():void{
- refreshPoll();
- btnRefreshResults.label = ResourceUtil.getInstance().getString('bbb.polling.stats.repost');
- btnRefreshResults.removeEventListener(MouseEvent.CLICK, refreshWindow);
- btnRefreshResults.addEventListener(MouseEvent.CLICK, publishPollAgain);
-
- btnClosePoll.label = ResourceUtil.getInstance().getString('bbb.polling.stats.close');
- btnClosePoll.removeEventListener(MouseEvent.CLICK, closeWindow);
- btnClosePoll.addEventListener(MouseEvent.CLICK, closeButtonClick);
-
- trackingPoll.status = false;
- stopViewersPolls();
- }
+ private function stopPoll():void{
+ refreshPoll();
+ btnRefreshResults.label = ResourceUtil.getInstance().getString('bbb.polling.stats.repost');
+ btnRefreshResults.removeEventListener(MouseEvent.CLICK, refreshWindow);
+ btnRefreshResults.addEventListener(MouseEvent.CLICK, publishPollAgain);
+ btnClosePoll.label = ResourceUtil.getInstance().getString('bbb.polling.stats.close');
+ btnClosePoll.removeEventListener(MouseEvent.CLICK, closeWindow);
+ btnClosePoll.addEventListener(MouseEvent.CLICK, closeButtonClick);
+ trackingPoll.status = false;
+ stopViewersPolls();
+ }
- private function publishPollAgain(e:Event):void{
- var event:PublishPollEvent = new PublishPollEvent(PublishPollEvent.REPOST);
- event.poll = trackingPoll;
- dispatchEvent(event);
- closeWindow();
- }
+ private function publishPollAgain(e:Event):void{
+ var event:PublishPollEvent = new PublishPollEvent(PublishPollEvent.REPOST);
+ event.poll = trackingPoll;
+ dispatchEvent(event);
+ closeWindow();
+ }
- private function closeButtonClick(e:Event):void{
- closeWindow();
- }
+ private function closeButtonClick(e:Event):void{
+ closeWindow();
+ }
- private function stopViewersPolls():void{
- var stopPollEvent:StopPollEvent = new StopPollEvent(StopPollEvent.STOP_POLL);
- stopPollEvent.poll.title = title;
- dispatchEvent(stopPollEvent);
- }
+ private function stopViewersPolls():void{
+ var stopPollEvent:StopPollEvent = new StopPollEvent(StopPollEvent.STOP_POLL);
+ stopPollEvent.poll = trackingPoll;
+ dispatchEvent(stopPollEvent);
+ }
- // function receives Array.length and ArrayCollection
- private function createResultsTable(amount:uint, content:Array):void{
- var _tx: Text;
- var _votes: Text;
- var _percent: Text;
- var _hb: HBox;
- var _line: HRule;
-
- var totalVotes:int = 0;
- for (var n:int = 0; n < trackingPoll.votes.length; n++){
- totalVotes+= int(trackingPoll.votes[n]);
- }
+ // function receives Array.length and ArrayCollection
+ private function createResultsTable(amount:uint, content:Array):void{
+ var _tx: Text;
+ var _votes: Text;
+ var _percent: Text;
+ var _hb: HBox;
+ var _line: HRule;
+ var totalVotes:int = 0;
+ for (var n:int = 0; n < trackingPoll.votes.length; n++){
+ totalVotes+= int(trackingPoll.votes[n]);
+ }
+ // delete existing rows
+ resultBox.removeAllChildren();
+ // creating rows one by one
+ for (var i:int = 0; i < amount; i++) {
+ _tx = new Text();
+ _votes= new Text;
+ _percent= new Text();
+ _hb = new HBox();
- // delete existing rows
- resultBox.removeAllChildren();
+ _line = new HRule();
+ _line.width = 290;
- // creating rows one by one
- for (var i:int = 0; i < amount; i++) {
- _tx = new Text();
- _votes= new Text;
- _percent= new Text();
- _hb = new HBox();
- _line = new HRule();
-
- _line.width = 290;
-
- _tx.name = "option" +i;
- _tx.width = 200;
- // assigning array element to text field
- _tx.text =content[i].toString();
+ _tx.name = "option" +i;
+ _tx.width = 200;
+ _tx.text =content[i].toString();
- _votes.name = "votes" +i;
- _votes.width = 30;
- _votes.text = trackingPoll.votes[i];
-
- _percent.name = "percent" +i;
- _percent.width = 50;
-
- // Percentage is in terms of how many votes each option has in terms of total votes
- if (totalVotes > 0){
- _percent.text = Math.round(100*(trackingPoll.votes[i]/totalVotes)) + "%";
- }else{
- // Prevents percentages from displaying misleading results before any votes come in, and from dividing by zero
- _percent.text = " ";
- }
+ _votes.name = "votes" +i;
+ _votes.width = 30;
+ _votes.text = trackingPoll.votes[i];
- resultBox.addChild(_hb);
- _hb.addChild(_tx);
- _hb.addChild(_votes);
- _hb.addChild(_percent);
+ _percent.name = "percent" +i;
+ _percent.width = 50;
- resultBox.addChild(_line);
- } // end of loop
+ // Percentage is in terms of how many votes each option has in terms of total votes
+ if (totalVotes > 0){
+ _percent.text = Math.round(100*(trackingPoll.votes[i]/totalVotes)) + "%";
+ }else{
+ // Prevents percentages from displaying misleading results before any votes come in, and from dividing by zero
+ _percent.text = " ";
+ }
- didNotVote();
- invalidateDisplayList();
- resultBox.validateNow();
- } // end of function createResultsTable
-
- private function didNotVote():void{
- var _tx:Text = new Text();
- var _votes:Text= new Text;
- var _hb:HBox = new HBox();
-
- _tx.name = "optionNull";
- _tx.width = 200;
- _tx.text = ResourceUtil.getInstance().getString('bbb.polling.stats.didNotVote');
-
- _votes.name = "voteNull";
- _votes.width = 30;
-
- _votes.text = trackingPoll.didNotVote.toString();
-
resultBox.addChild(_hb);
_hb.addChild(_tx);
_hb.addChild(_votes);
- }
+ _hb.addChild(_percent);
+
+ resultBox.addChild(_line);
+ } // end of loop
+ didNotVote();
+ invalidateDisplayList();
+ resultBox.validateNow();
+ } // end of function createResultsTable
- ]]>
+ private function didNotVote():void{
+ var _tx:Text = new Text();
+ var _votes:Text= new Text;
+ var _hb:HBox = new HBox();
+ _tx.name = "optionNull";
+ _tx.width = 200;
+ _tx.text = ResourceUtil.getInstance().getString('bbb.polling.stats.didNotVote');
+
+ _votes.name = "voteNull";
+ _votes.width = 30;
+ _votes.text = trackingPoll.didNotVote.toString();
+
+ resultBox.addChild(_hb);
+ _hb.addChild(_tx);
+ _hb.addChild(_votes);
+ }
+ ]]>
</mx:Script>
-
-
-
-
<!-- Prototype of Polling Statistics View Design -->
- <mx:VBox width="100%" height="75%" horizontalAlign="center" paddingLeft="10" paddingRight="10">
- <mx:HBox id="webPollBox" width="90%" paddingTop="10">
- <mx:Text text="{ResourceUtil.getInstance().getString('bbb.polling.stats.webPollURL')}"
- width="140"/>
- <mx:TextArea id="webPollURLBox"
- editable="false"
- text=""
- horizontalScrollPolicy="off"
- verticalScrollPolicy="off"
- height="25"/>
- </mx:HBox>
- <mx:Text width="200"
- paddingTop="15" paddingBottom="10"
- fontWeight="bold" textAlign="center"
- text="{question}"/>
- <mx:Box id="resultBox" width="90%" height="90%" />
- </mx:VBox>
- <mx:ControlBar width="100%" horizontalAlign="center">
- <mx:Button id="btnRefreshResults"
- label="{ResourceUtil.getInstance().getString('bbb.polling.stats.refresh')}"
- click="refreshPoll()"
- width="100" height="30"/>
- <mx:Button id="btnClosePoll"
- label="{ResourceUtil.getInstance().getString('bbb.polling.stats.stopPoll')}"
- click="stopPoll()"
- width="100" height="30"/>
- </mx:ControlBar>
-
-
-</MDIWindow>
+ <mx:VBox width="100%"
+ height="75%"
+ horizontalAlign="center"
+ paddingLeft="10"
+ paddingRight="10">
+ <mx:HBox width="90%"
+ paddingTop="10">
+ <mx:Text text="{ResourceUtil.getInstance().getString('bbb.polling.stats.webPollURL')}"
+ width="140"/>
+ </mx:HBox>
+ <mx:HBox id="webPollBox"
+ width="90%" >
+ <mx:TextArea id="webPollURLBox"
+ editable="false"
+ text=""
+ horizontalScrollPolicy="off"
+ verticalScrollPolicy="off"
+ height="25"
+ width="95%"/>
+ </mx:HBox>
+ <mx:Text width="200"
+ paddingTop="15" paddingBottom="10"
+ fontWeight="bold" textAlign="center"
+ text="{question}"/>
+ <mx:Box id="resultBox"
+ width="90%"
+ height="90%" />
+ </mx:VBox>
+ <mx:ControlBar width="100%"
+ horizontalAlign="center">
+ <mx:Button id="btnRefreshResults"
+ label="{ResourceUtil.getInstance().getString('bbb.polling.stats.refresh')}"
+ click="refreshPoll()"
+ width="100"
+ height="30"/>
+ <mx:Button id="btnClosePoll"
+ label="{ResourceUtil.getInstance().getString('bbb.polling.stats.stopPoll')}"
+ click="stopPoll()"
+ width="100" height="30"/>
+ </mx:ControlBar>
+</MDIWindow>
Please sign in to comment.
Something went wrong with that request. Please try again.