show link for direct execution
This commit is contained in:
parent
a6517301d5
commit
d4f3ed98f5
|
@ -92,7 +92,7 @@ class CCPExecutionForm extends HTMLElement{
|
|||
<button id="execute_method_button" class="btn btn-info">Execute</button>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<div class="">
|
||||
<div class="mb-3">
|
||||
<label>Generate code for:</label>
|
||||
<div class="d-flex">
|
||||
<select name="language-selector" class="form-control" style="padding:2px">
|
||||
|
@ -107,7 +107,8 @@ class CCPExecutionForm extends HTMLElement{
|
|||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
<div class="">
|
||||
</div>
|
||||
<div>
|
||||
<label>Direct link</label>
|
||||
<div class="d-flex">
|
||||
<a name="direct_link_method" href="${window.location.href}">${window.location.href}</a>
|
||||
|
@ -115,7 +116,6 @@ class CCPExecutionForm extends HTMLElement{
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
@ -120,8 +120,9 @@ class CCPExecutionHistory extends HTMLElement {
|
|||
<li></li>
|
||||
</ul>
|
||||
<div class="d-flex justify-content-end" style="gap: 3px;">
|
||||
<div class="d-flex align-items-middle" style="gap:5px">
|
||||
<label>Generate code for:</label>
|
||||
<select name="language-selector" class="form-control" style="max-width:10rem;height:inherit;padding:2px">
|
||||
<select name="language-selector" class="form-control">
|
||||
<option value="text/python" data-ext="py" title="Generate plain Python3">Python 3</option>
|
||||
<option value="text/plain+r" data-ext="r" title="Generate plain R">R</option>
|
||||
<option value="application/vnd.jupyter+python" data-ext="ipynb" title="Generate Jupyter notebook with Python 3 cells">Jupyter Python3</option>
|
||||
|
@ -133,6 +134,13 @@ class CCPExecutionHistory extends HTMLElement {
|
|||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
<div class="d-flex align-items-middle" style="gap:5px">
|
||||
<label>Direct link</label>
|
||||
<div class="d-flex">
|
||||
<a name="direct_link_execution" href="${window.location.href}">${window.location.href}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</details>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -657,6 +665,10 @@ class CCPExecutionHistory extends HTMLElement {
|
|||
this.generateCode(id, lang, `${id}.${ext}`)
|
||||
}
|
||||
},
|
||||
{
|
||||
target : "a[name=direct_link_execution]",
|
||||
apply : (e,d)=>e.href = e.textContent = window.location.origin + window.location.path + "?execution=" + d.id
|
||||
},
|
||||
{
|
||||
target : "div[name=logterminalcontainer]",
|
||||
apply : (e,d)=>{
|
||||
|
|
Loading…
Reference in New Issue