Skip to content
This repository was archived by the owner on Oct 1, 2024. It is now read-only.

Commit 7e43f6d

Browse files
author
Jim Heising
committedMar 13, 2014
Fixed some issues with datasource example
1 parent 4d0fbb2 commit 7e43f6d

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed
 

‎docs/plugin_example.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ <h3 id="datasource-definition">Datasource Definition</h3>
115115

116116
</div>
117117

118-
<div class="content"><div class='highlight'><pre> <span class="string">"display_name"</span>: <span class="string">"My Datasource Plugin"</span>,</pre></div></div>
118+
<div class="content"><div class='highlight'><pre> <span class="string">"display_name"</span>: <span class="string">"Datasource Plugin Example"</span>,</pre></div></div>
119119

120120
</li>
121121

@@ -505,7 +505,7 @@ <h3 id="datasource-implementation">Datasource Implementation</h3>
505505
<span class="comment">/* This is some function where I'll get my data from somewhere */</span>
506506
<span class="function"><span class="keyword">function</span> <span class="title">getData</span><span class="params">()</span>
507507
{</span>
508-
<span class="keyword">var</span> newData;
508+
<span class="keyword">var</span> newData = { hello : <span class="string">"world! it's "</span> + <span class="keyword">new</span> Date().toLocaleTimeString() }; <span class="comment">// Just putting some sample data in for fun.</span>
509509

510510
<span class="comment">/* Get my data from somewhere and populate newData with it... Probably a JSON API or something. */</span>
511511
<span class="comment">/* ... */</span></pre></div></div>
@@ -564,7 +564,7 @@ <h3 id="datasource-implementation">Datasource Implementation</h3>
564564

565565
</div>
566566

567-
<div class="content"><div class='highlight'><pre> self.getData();
567+
<div class="content"><div class='highlight'><pre> getData();
568568
}, interval);
569569
}</pre></div></div>
570570

@@ -738,7 +738,7 @@ <h3 id="widget-definition">Widget Definition</h3>
738738
</div>
739739

740740
<div class="content"><div class='highlight'><pre> <span class="string">"type_name"</span> : <span class="string">"my_widget_plugin"</span>,
741-
<span class="string">"display_name"</span>: <span class="string">"My Widget Plugin"</span>,
741+
<span class="string">"display_name"</span>: <span class="string">"Widget Plugin Example"</span>,
742742
<span class="string">"description"</span> : <span class="string">"Some sort of description &lt;strong&gt;with optional html!&lt;/strong&gt;"</span>,</pre></div></div>
743743

744744
</li>

‎examples/plugin_example.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@
127127
/* This is some function where I'll get my data from somewhere */
128128
function getData()
129129
{
130-
var newData;
130+
var newData = { hello : "world! it's " + new Date().toLocaleTimeString() }; // Just putting some sample data in for fun.
131131

132132
/* Get my data from somewhere and populate newData with it... Probably a JSON API or something. */
133133
/* ... */
@@ -149,7 +149,7 @@
149149
refreshTimer = setInterval(function()
150150
{
151151
// Here we call our getData function to update freeboard with new data.
152-
self.getData();
152+
getData();
153153
}, interval);
154154
}
155155

0 commit comments

Comments
 (0)