Sha256: 8f649c52b44e3da68f0bce78e5250e406ee97a5b0dc63752ccb0904f35f551d6

Contents?: true

Size: 1.39 KB

Versions: 36

Compression:

Stored size: 1.39 KB

Contents

<% 
  s = nil 
  if @displayname.nil?
	s = @sources[0]
  else
    @sources.each { |source| s = source if source['name'] == @displayname }
  end
%>
  <% if s.nil? or s['data'].length < 1 %>
    <center>No data for <b><%= s.nil? ? "" : s['name'] %></b></center><br/><br/>
  <% else %>
    <div id="chartdiv" style="height:295px;width:670px; display:none;"></div>
  <%end%>
<% 
def fix_json(instring)
	outstring = instring.gsub(/"/,"'")
	outstring = outstring.gsub(/('.*?enderer'):'(.*?)'/,'\1:\2')
	outstring
end

%>

<% if @displayname.nil? %>
<script type="text/javascript">
document.getElementById('chartdiv').style.display = '';plot = $.jqplot('chartdiv',<%=@sources[0]['data'].to_json.gsub(/"/,"'")%>,<%=fix_json(@sources[0]['options'].to_json)%>); plot.redraw();
</script>
<%end%>

<br/>



<% if @sources.length > 1%>

<% @sources.each do |source| %>
	<% if @displayname == source['name'] %>
	<script type="text/javascript">
	document.getElementById('chartdiv').style.display = '';plot = $.jqplot('chartdiv',<%=source['data'].to_json.gsub(/"/,"'")%>,<%=fix_json(source['options'].to_json)%>); plot.redraw();
	</script>
	
	<% end %>
	
	<a style="margin-right:5px" href="javascript:void(0);"
	onclick="loadXMLDoc('<%= url_path(@uri + '?display='+ source['name'])%>','main_box');">
	<%= source['name'] %>
	</a>
<% end%>


<% end %>

<br/><div style="margin-top:3px;">Select and drag to zoom. Double click to reset.</div>

Version data entries

36 entries across 36 versions & 2 rubygems

Version Path
rhosync-2.1.18.beta2 lib/rhosync/console/app/views/jqplot.erb
rhosync-2.1.18.beta1 lib/rhosync/console/app/views/jqplot.erb
rhosync-2.1.17 lib/rhosync/console/app/views/jqplot.erb
rhosync-2.1.17.beta7 lib/rhosync/console/app/views/jqplot.erb
rhosync-2.1.17.beta6 lib/rhosync/console/app/views/jqplot.erb
rhosync-2.1.17.beta5 lib/rhosync/console/app/views/jqplot.erb
rhosync-2.1.17.beta4 lib/rhosync/console/app/views/jqplot.erb
rhosync-2.1.17.beta3 lib/rhosync/console/app/views/jqplot.erb
rhosync-2.1.17.beta2 lib/rhosync/console/app/views/jqplot.erb
rhosync-2.1.17.beta1 lib/rhosync/console/app/views/jqplot.erb
rhoconnect-3.1.2 lib/rhoconnect/console/app/views/jqplot.erb
rhosync-2.1.16 lib/rhosync/console/app/views/jqplot.erb
rhoconnect-3.1.1 lib/rhoconnect/console/app/views/jqplot.erb
rhosync-2.1.15 lib/rhosync/console/app/views/jqplot.erb
rhoconnect-3.1.0 lib/rhoconnect/console/app/views/jqplot.erb
rhoconnect-3.1.0.beta2 lib/rhoconnect/console/app/views/jqplot.erb
rhosync-2.1.14 lib/rhosync/console/app/views/jqplot.erb
rhoconnect-3.1.0.beta1 lib/rhoconnect/console/app/views/jqplot.erb
rhoconnect-3.0.6 lib/rhoconnect/console/app/views/jqplot.erb
rhosync-2.1.13 lib/rhosync/console/app/views/jqplot.erb