mirror of
https://github.com/gsi-upm/senpy
synced 2024-11-22 08:12:27 +00:00
Playground improved. This closes #8
This commit is contained in:
parent
477cb18db1
commit
cb963dc438
@ -70,12 +70,20 @@ body {
|
|||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
}
|
}
|
||||||
#input_request {
|
#input_request {
|
||||||
|
margin-top: 5px;
|
||||||
display:block;
|
display:block;
|
||||||
width:150px;
|
|
||||||
word-wrap:break-word;
|
word-wrap:break-word;
|
||||||
|
white-space:pre;
|
||||||
|
overflow: auto;
|
||||||
|
margin-top: 20px;
|
||||||
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
textarea
|
#input_request a{
|
||||||
{
|
width:100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
textarea{
|
||||||
border:1px solid #999999;
|
border:1px solid #999999;
|
||||||
width:100%;
|
width:100%;
|
||||||
margin:5px 0;
|
margin:5px 0;
|
||||||
|
@ -29,6 +29,7 @@ $(document).ready(function() {
|
|||||||
var response = JSON.parse($.ajax({type: "GET", url: "/api/plugins/" , async: false}).responseText);
|
var response = JSON.parse($.ajax({type: "GET", url: "/api/plugins/" , async: false}).responseText);
|
||||||
var defaultPlugin= JSON.parse($.ajax({type: "GET", url: "/api/plugins/default" , async: false}).responseText);
|
var defaultPlugin= JSON.parse($.ajax({type: "GET", url: "/api/plugins/default" , async: false}).responseText);
|
||||||
html="";
|
html="";
|
||||||
|
var availablePlugins = document.getElementById('availablePlugins');
|
||||||
plugins = response.plugins;
|
plugins = response.plugins;
|
||||||
for (r in plugins){
|
for (r in plugins){
|
||||||
if (plugins[r]["name"]){
|
if (plugins[r]["name"]){
|
||||||
@ -62,12 +63,17 @@ $(document).ready(function() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
var pluginList = document.createElement('li');
|
||||||
|
pluginList.innerHTML = "<a href=https://github.com/gsi-upm/senpy-plugins-community>" + plugins[r]["name"] + "</a>" + ": " + plugins[r]["description"]
|
||||||
|
availablePlugins.appendChild(pluginList)
|
||||||
}
|
}
|
||||||
document.getElementById('plugins').innerHTML = html;
|
document.getElementById('plugins').innerHTML = html;
|
||||||
change_params();
|
change_params();
|
||||||
|
|
||||||
$(window).on('hashchange', hashchanged);
|
$(window).on('hashchange', hashchanged);
|
||||||
hashchanged();
|
hashchanged();
|
||||||
$('.tooltip-form').tooltip();
|
$('.tooltip-form').tooltip();
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@ -113,7 +119,7 @@ function load_JSON(){
|
|||||||
}
|
}
|
||||||
var editor = new JSONEditor(container, options, response);
|
var editor = new JSONEditor(container, options, response);
|
||||||
document.getElementById("jsonraw").innerHTML = replaceURLWithHTMLLinks(JSON.stringify(response, undefined, 2))
|
document.getElementById("jsonraw").innerHTML = replaceURLWithHTMLLinks(JSON.stringify(response, undefined, 2))
|
||||||
document.getElementById("input_request").innerHTML = "<label>"+url+"</label>"
|
document.getElementById("input_request").innerHTML = "<a href='"+url+"'>"+url+"</a>"
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -48,8 +48,6 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div class="col-lg-6 ">
|
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading"><i class="fa fa-sign-in"></i> Follow us on <a href="http://www.github.com/gsi-upm/senpy">GitHub</a></div>
|
<div class="panel-heading"><i class="fa fa-sign-in"></i> Follow us on <a href="http://www.github.com/gsi-upm/senpy">GitHub</a></div>
|
||||||
</div>
|
</div>
|
||||||
@ -57,6 +55,15 @@
|
|||||||
<div class="panel-heading"><i class="fa fa-child"></i> Enjoy.</div>
|
<div class="panel-heading"><i class="fa fa-child"></i> Enjoy.</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-lg-6 ">
|
||||||
|
<div class="well">
|
||||||
|
<h2>Available Plugins</h2>
|
||||||
|
<div>
|
||||||
|
<span><ul id=availablePlugins></ul></span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user