mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-26 05:42:15 +01:00
196 lines
7.8 KiB
HTML
196 lines
7.8 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>Pico Example - Everything</title>
|
|
<!-- Load the pico Javascript client, always automatically available at /pico.js -->
|
|
<script src="/pico.js"></script>
|
|
<!-- Or load our module proxy -->
|
|
<script src="/api.js"></script>
|
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
|
|
|
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" integrity="sha384-fLW2N01lMqjakBkx3l/M9EahuwpSfeNvV63J5ezn3uZzapT0u7EYsXMjQV+0En5r" crossorigin="anonymous">
|
|
|
|
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.6.0/styles/default.min.css">
|
|
|
|
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.6.0/highlight.min.js"></script>
|
|
<script></script>
|
|
|
|
<style type="text/css">
|
|
html, body {
|
|
height: 100%;
|
|
margin: 0px;
|
|
padding: 0px;
|
|
}
|
|
div {
|
|
padding: 5px;
|
|
}
|
|
#container {
|
|
height: 100%;
|
|
}
|
|
#header {
|
|
height: 5%;
|
|
}
|
|
#main {
|
|
height: 70%;
|
|
}
|
|
#output {
|
|
background-color: #333;
|
|
color: #aaa;
|
|
min-height: 15%;
|
|
overflow-y: scroll;
|
|
padding: 20px;
|
|
position: fixed;
|
|
bottom: 0px;
|
|
width: 100%;
|
|
}
|
|
.error {
|
|
color: #f00 !important;
|
|
}
|
|
#examples li{
|
|
padding: 10px;
|
|
margin: 10px;
|
|
background-color: silver;
|
|
}
|
|
code {
|
|
border-radius: 0;*/
|
|
margin: 5px;
|
|
white-space: pre !important;
|
|
}
|
|
#source {
|
|
height: 100%;
|
|
}
|
|
#examples {
|
|
height: 100%;
|
|
}
|
|
#spacer {
|
|
height: 20%;
|
|
}
|
|
|
|
.highlight {
|
|
background-color: yellow;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div id="container">
|
|
<div class="row row-eq-height">
|
|
<div class="col-md-12">
|
|
<h1>Pico Examples</h1>
|
|
<p>Here we show some simple examples of using Pico. Click any <code>api.X</code> link to see the corresponding Python source.</p>
|
|
</div>
|
|
</div>
|
|
<div class="row row-eq-height" id="main">
|
|
<div class="col-md-6" id="examples">
|
|
<ol>
|
|
|
|
<li id="example1">
|
|
<h4>Hello World</h4>
|
|
<pre><code class="js"></code></pre>
|
|
Name: <input type="text" name="name" value="Bob"/>
|
|
<button class="btn btn-default btn-sm" type="button" onclick="example1()">Submit</button>
|
|
</li>
|
|
<li id="deregister">
|
|
<h4>deregister_plugin_path</h4>
|
|
<pre><code class="js"></code></pre>
|
|
<button class="btn btn-default btn-sm" type="button" onclick="deregister()">Deregister</button>
|
|
</li>
|
|
<li id="register">
|
|
<h4>register_plugin_path</h4>
|
|
<pre><code class="js"></code></pre>
|
|
Path: <input type="text" name="path" value="C:/Users/hubert/CODE/pype-setup/repos/pype-config/pype/plugins/premiere/publish"/>
|
|
<button class="btn btn-default btn-sm" type="button" onclick="register()">Register path</button>
|
|
</li>
|
|
<li id="example2">
|
|
<h4>Numeric Multiplication</h4>
|
|
<pre><code class="js"></code></pre>
|
|
<input type="number" name="x" value="6"/> x <input type="number" name="y" value="7"/>
|
|
<button class="btn btn-default btn-sm" type="button" onclick="example2()">Multiply</button>
|
|
</li>
|
|
<li id="example3">
|
|
<h4>File Upload</h4>
|
|
<pre><code class="js"></code></pre>
|
|
<input type="file" name="upload"/>
|
|
<button class="btn btn-default btn-sm" type="button" onclick="example3()">Upload</button>
|
|
</li>
|
|
<li id="example4">
|
|
<h4>Request parameters (IP address)</h4>
|
|
<pre><code class="js"></code></pre>
|
|
<button class="btn btn-default btn-sm" type="button" onclick="example4()">What's my IP?</button>
|
|
</li>
|
|
<li id="example5">
|
|
<h4>Authentication</h4>
|
|
<pre><code class="js"></code></pre>
|
|
<p class="bg-info">Note: see <a href="#set_user" onclick="jumpTo('set_user')">api.set_user</a> for the authentication handler.</p>
|
|
Username: <input type="text" name="username" value="bob"/>
|
|
Password: <input type="password" name="password" value="secret"/>
|
|
<button class="btn btn-default btn-sm" type="button" onclick="example5()">Sign In</button>
|
|
</li>
|
|
<li id="example6">
|
|
<h4>Sessions (cookies)</h4>
|
|
<pre><code class="js"></code></pre>
|
|
<button class="btn btn-default btn-sm" type="button" onclick="example6()">What's my session id?</button>
|
|
</li>
|
|
<li id="example7">
|
|
<h4>Sessions (header)</h4>
|
|
<pre><code class="js"></code></pre>
|
|
<button class="btn btn-default btn-sm" type="button" onclick="example7()">What's my session id?</button>
|
|
</li>
|
|
<li id="example8">
|
|
<h4>Streaming Response</h4>
|
|
<pre><code class="js"></code></pre>
|
|
<button class="btn btn-default btn-sm" type="button" onclick="example8()">Countdown</button>
|
|
</li>
|
|
<li id="example9">
|
|
<h4>Objects</h4>
|
|
<pre><code class="js"></code></pre>
|
|
<button class="btn btn-default btn-sm" type="button" onclick="example9()">Submit</button>
|
|
</li>
|
|
<li id="example10">
|
|
<h4>Errors</h4>
|
|
<pre><code class="js"></code></pre>
|
|
<button class="btn btn-default btn-sm" type="button" onclick="example10()">Submit</button>
|
|
</li>
|
|
<li id="example11">
|
|
<h4>Errors</h4>
|
|
<pre><code class="js"></code></pre>
|
|
<button class="btn btn-default btn-sm" type="button" onclick="example11()">Submit</button>
|
|
</li>
|
|
<li id="example12">
|
|
<h4>Forms</h4>
|
|
<p>This example submits a form as a whole instead of individual arguments.
|
|
The form input names must match the function argument names.
|
|
</p>
|
|
<pre><code class="html"></code></pre>
|
|
<pre><code class="js"></code></pre>
|
|
<div class="example">
|
|
<form>
|
|
x: <input type="number" name="x" value="6"/><br/>
|
|
y: <input type="number" name="y" value="7"/>
|
|
</form>
|
|
<button class="btn btn-default btn-sm" type="button" onclick="example12()">Multiply</button>
|
|
</div>
|
|
</li>
|
|
<li id="example13">
|
|
<h4>JSON</h4>
|
|
<p>This example submits data as JSON instead of individual arguments.
|
|
The object keys must match the function argument names.
|
|
</p>
|
|
<pre><code class="js"></code></pre>
|
|
<button class="btn btn-default btn-sm" type="button" onclick="example13()">Multiply</button>
|
|
</li>
|
|
</ol>
|
|
<div id="spacer">
|
|
</div>
|
|
</div>
|
|
<div class="col-md-6" id="source">
|
|
<pre><code class="python"></code></pre>
|
|
</div>
|
|
</div>
|
|
<div class="row" id="output">
|
|
</div>
|
|
</div>
|
|
|
|
<script src="script.js"></script>
|
|
</body>
|
|
</html>
|