Commit c685b870 authored by Kevin's avatar Kevin
Browse files

Fill Visitors-list with data from spaceboard.json

parent 45a49d8e
......@@ -9534,3 +9534,84 @@ Stack trace:
REQUEST_URI=/werkstatt/css/jquery.oembed.css
HTTP_REFERER=http://localhost/werkstatt/message/new
---
2014/04/19 13:27:08 [error] [exception.CHttpException.404] exception 'CHttpException' with message 'Unable to resolve the request "[object Object]".' in /Users/kkrieger/htdocs/yii1114/framework/web/CWebApplication.php:286
Stack trace:
#0 /Users/kkrieger/htdocs/yii1114/framework/web/CWebApplication.php(141): CWebApplication->runController('[object Object]')
#1 /Users/kkrieger/htdocs/yii1114/framework/base/CApplication.php(180): CWebApplication->processRequest()
#2 /Users/kkrieger/htdocs/werkstatt/index.php(13): CApplication->run()
#3 {main}
REQUEST_URI=/werkstatt/[object%20Object]
HTTP_REFERER=http://localhost/werkstatt/message
---
2014/04/19 13:27:43 [error] [exception.CHttpException.404] exception 'CHttpException' with message 'Unable to resolve the request "[object Object]".' in /Users/kkrieger/htdocs/yii1114/framework/web/CWebApplication.php:286
Stack trace:
#0 /Users/kkrieger/htdocs/yii1114/framework/web/CWebApplication.php(141): CWebApplication->runController('[object Object]')
#1 /Users/kkrieger/htdocs/yii1114/framework/base/CApplication.php(180): CWebApplication->processRequest()
#2 /Users/kkrieger/htdocs/werkstatt/index.php(13): CApplication->run()
#3 {main}
REQUEST_URI=/werkstatt/[object%20Object]
HTTP_REFERER=http://localhost/werkstatt/message
---
2014/04/19 13:30:14 [error] [exception.CHttpException.404] exception 'CHttpException' with message 'Unable to resolve the request "[object Object]".' in /Users/kkrieger/htdocs/yii1114/framework/web/CWebApplication.php:286
Stack trace:
#0 /Users/kkrieger/htdocs/yii1114/framework/web/CWebApplication.php(141): CWebApplication->runController('[object Object]')
#1 /Users/kkrieger/htdocs/yii1114/framework/base/CApplication.php(180): CWebApplication->processRequest()
#2 /Users/kkrieger/htdocs/werkstatt/index.php(13): CApplication->run()
#3 {main}
REQUEST_URI=/werkstatt/[object%20Object]
HTTP_REFERER=http://localhost/werkstatt/message
---
2014/04/19 13:30:50 [error] [exception.CHttpException.404] exception 'CHttpException' with message 'Unable to resolve the request "[object Object]".' in /Users/kkrieger/htdocs/yii1114/framework/web/CWebApplication.php:286
Stack trace:
#0 /Users/kkrieger/htdocs/yii1114/framework/web/CWebApplication.php(141): CWebApplication->runController('[object Object]')
#1 /Users/kkrieger/htdocs/yii1114/framework/base/CApplication.php(180): CWebApplication->processRequest()
#2 /Users/kkrieger/htdocs/werkstatt/index.php(13): CApplication->run()
#3 {main}
REQUEST_URI=/werkstatt/[object%20Object]
HTTP_REFERER=http://localhost/werkstatt/message
---
2014/04/19 13:31:12 [error] [exception.CHttpException.404] exception 'CHttpException' with message 'Unable to resolve the request "[object Object]".' in /Users/kkrieger/htdocs/yii1114/framework/web/CWebApplication.php:286
Stack trace:
#0 /Users/kkrieger/htdocs/yii1114/framework/web/CWebApplication.php(141): CWebApplication->runController('[object Object]')
#1 /Users/kkrieger/htdocs/yii1114/framework/base/CApplication.php(180): CWebApplication->processRequest()
#2 /Users/kkrieger/htdocs/werkstatt/index.php(13): CApplication->run()
#3 {main}
REQUEST_URI=/werkstatt/[object%20Object]
HTTP_REFERER=http://localhost/werkstatt/message
---
2014/04/19 13:31:46 [error] [exception.CHttpException.404] exception 'CHttpException' with message 'Unable to resolve the request "[object Object]".' in /Users/kkrieger/htdocs/yii1114/framework/web/CWebApplication.php:286
Stack trace:
#0 /Users/kkrieger/htdocs/yii1114/framework/web/CWebApplication.php(141): CWebApplication->runController('[object Object]')
#1 /Users/kkrieger/htdocs/yii1114/framework/base/CApplication.php(180): CWebApplication->processRequest()
#2 /Users/kkrieger/htdocs/werkstatt/index.php(13): CApplication->run()
#3 {main}
REQUEST_URI=/werkstatt/[object%20Object]
HTTP_REFERER=http://localhost/werkstatt/message
---
2014/04/19 13:32:53 [error] [exception.CHttpException.404] exception 'CHttpException' with message 'Unable to resolve the request "[object Object]".' in /Users/kkrieger/htdocs/yii1114/framework/web/CWebApplication.php:286
Stack trace:
#0 /Users/kkrieger/htdocs/yii1114/framework/web/CWebApplication.php(141): CWebApplication->runController('[object Object]')
#1 /Users/kkrieger/htdocs/yii1114/framework/base/CApplication.php(180): CWebApplication->processRequest()
#2 /Users/kkrieger/htdocs/werkstatt/index.php(13): CApplication->run()
#3 {main}
REQUEST_URI=/werkstatt/[object%20Object]
HTTP_REFERER=http://localhost/werkstatt/message
---
2014/04/19 13:33:25 [error] [exception.CHttpException.404] exception 'CHttpException' with message 'Unable to resolve the request "[object Object]".' in /Users/kkrieger/htdocs/yii1114/framework/web/CWebApplication.php:286
Stack trace:
#0 /Users/kkrieger/htdocs/yii1114/framework/web/CWebApplication.php(141): CWebApplication->runController('[object Object]')
#1 /Users/kkrieger/htdocs/yii1114/framework/base/CApplication.php(180): CWebApplication->processRequest()
#2 /Users/kkrieger/htdocs/werkstatt/index.php(13): CApplication->run()
#3 {main}
REQUEST_URI=/werkstatt/[object%20Object]
HTTP_REFERER=http://localhost/werkstatt/message
---
2014/04/19 13:34:17 [error] [exception.CHttpException.404] exception 'CHttpException' with message 'Unable to resolve the request "[object Object]".' in /Users/kkrieger/htdocs/yii1114/framework/web/CWebApplication.php:286
Stack trace:
#0 /Users/kkrieger/htdocs/yii1114/framework/web/CWebApplication.php(141): CWebApplication->runController('[object Object]')
#1 /Users/kkrieger/htdocs/yii1114/framework/base/CApplication.php(180): CWebApplication->processRequest()
#2 /Users/kkrieger/htdocs/werkstatt/index.php(13): CApplication->run()
#3 {main}
REQUEST_URI=/werkstatt/[object%20Object]
HTTP_REFERER=http://localhost/werkstatt/message
---
......@@ -20,10 +20,8 @@
<div class="news well">
<p class="bg-primary"><span class="glyphicon glyphicon-user">&nbsp;</span>Anwesende:</p>
<ul id="anwesende">
<li>User1</li>
<li>User2</li>
<li>User2</li>
<ul id="visitors">
</ul>
</div>
</div>
......@@ -42,18 +40,18 @@
$('#' + result.lastEventId + ' .panel-body').html(resultData.text);
$('#' + result.lastEventId + ' .panel-heading').html(resultData.created + " (" + result.lastEventId + ")");
$('#' + result.lastEventId).addClass("panel panel-" + resultData.infotype);
$('#' + result.lastEventId + " a.embed").oembed(null, {
maxWidth: 600,
maxHeight: 400,
//includeHandle: true,
embedMethod: 'auto',
});
// $('#' + result.lastEventId + " a.embed").oembed(null, {
// maxWidth: 600,
// maxHeight: 400,
// //includeHandle: true,
// embedMethod: 'auto',
// });
$('#placeholder').hide();
}
console.log(result);
console.log(result.type + " " + result.lastEventId);
//console.log(result);
//console.log(result.type + " " + result.lastEventId);
}, false);
......@@ -62,5 +60,27 @@
{
document.getElementById("result").innerHTML = "Sorry, your browser does not support server-sent events...";
}
//var jqxhr = $.getJSON("https://spaceboard.hacksaar.de/visitors.json", function() {
var jqxhr = $.getJSON("<?php echo Yii::app()->request->baseUrl; ?>/src/visitors.json", function() {
//console.log("success");
})
.done(function(data) {
$.each(data, function(i, item) {
$('#visitors').append("<li>" + item.name + "</li>");
//console.log("item", item);
});
//console.log("second success");
})
.fail(function() {
$('#visitors').append("<li>Liste konnte nicht geladen werden</li>");
//console.log("error");
})
.always(function() {
//console.log("complete");
});
</script>
......@@ -15,9 +15,6 @@
<textarea id="txtContent" placeholder="Enter text ..." style="width: 100%; height: 300px">
</textarea>
<button id="txtSubmit" type="button" class="btn btn-primary">Speichern</button>
<script type="text/javascript">
$('#txtResult').hide();
......@@ -107,6 +104,9 @@
</select>
</div>
<button id="txtSubmit" type="button" class="btn btn-primary">Speichern</button>
</div>
......
[{"hostnames":{"192.168.178.2":"00:11:22:33:44:55"},"avatar":"trollface.png","macs":["00:11:22:33:44:55"],"name":"Hacksaar24","last_seen":"2014-04-19T13:46:38+02:00","seen_since":"2014-04-18T21:24:07+02:00"},{"macs":["68:a8:6d:28:51:4a"],"avatar":"https://www.gravatar.com/avatar/c389c0aec2c37a9efb81a7bcfed0a072?s=133&d=identicon","contacts":{"homepage":"http://blog.kevinkrieger.de/"},"name":"Kevin Krieger","last_seen":"2014-04-19T13:46:38+02:00","seen_since":"2014-04-19T09:16:44+02:00"}]
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment