Compare commits

...

5 Commits

Author SHA1 Message Date
Marco Lettere a51e2cd358 Merge pull request 'master' (#11) from master into prod
Reviewed-on: #11
2024-04-10 18:06:49 +02:00
dcore94 05ef785cf0 added support for bash scripts generation 2024-04-10 12:28:47 +02:00
dcore94 79ec13cdc5 added support for generating bash scripts 2024-04-10 12:21:14 +02:00
dcore94 ff613b70c2 show place holder instead of full link 2024-04-09 13:22:14 +02:00
dcore94 f8902077ec show place holder instead of full link 2024-04-09 13:16:51 +02:00
2 changed files with 9 additions and 6 deletions

View File

@ -111,7 +111,9 @@ class CCPExecutionForm extends HTMLElement{
<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>
<option value="text/julia" data-ext="jl" title="Generate Julia 1.9.0 code (HTTP 1.10.0, JSON3 1.13.2)">Julia 1.9.0</option>
</select>
<option value="application/x-sh+curl" data-ext="sh" title="Generate Bash script (curl)">Bash (curl)</option>
<option value="application/x-sh+wget" data-ext="sh" title="Generate Bash script (wget)">Bash (wget)</option>
</select>
<button name="codegen" title="Generate code" class="btn btn-primary ccp-toolbar-button ccp-toolbar-button-small">
<svg viewBox="0 96 960 960">
<path d="M320 814 80 574l242-242 43 43-199 199 197 197-43 43Zm318 2-43-43 199-199-197-197 43-43 240 240-242 242Z"></path>
@ -120,9 +122,8 @@ class CCPExecutionForm extends HTMLElement{
</div>
</div>
<div>
<label>Direct link</label>
<div class="d-flex">
<a name="direct_link_method" href="${window.location.href}">${window.location.href}</a>
<a name="direct_link_method" class="text-truncate" href="${window.location.href}">Direct link</a>
</div>
</div>
</div>
@ -430,7 +431,7 @@ class CCPExecutionForm extends HTMLElement{
},
{
target: "a[name=direct_link_method]",
apply : (e,d)=>e.href = e.textContent = window.location.origin + window.location.pathname + "?method=" + d.id
apply : (e,d)=>e.href = window.location.origin + window.location.pathname + "?method=" + d.id
}
]
}

View File

@ -127,6 +127,8 @@ class CCPExecutionHistory extends HTMLElement {
<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>
<option value="text/julia" data-ext="jl" title="Generate Julia 1.9.0 code (HTTP 1.10.0, JSON3 1.13.2)">Julia 1.9.0</option>
<option value="application/x-sh+curl" data-ext="sh" title="Generate Bash script (curl)">Bash (curl)</option>
<option value="application/x-sh+wget" data-ext="sh" title="Generate Bash script (wget)">Bash (wget)</option>
</select>
<button data-index="0" name="codegen" title="Generate code" class="btn btn-primary ccp-toolbar-button ccp-toolbar-button-small">
<svg viewBox="0 96 960 960">
@ -136,7 +138,7 @@ class CCPExecutionHistory extends HTMLElement {
</div>
<div class="d-flex align-items-middle" style="gap:5px">
<div class="d-flex">
<a name="direct_link_execution" href="${window.location.href}">${window.location.href}</a>
<a class="text-truncate" name="direct_link_execution" href="${window.location.href}">Direct link</a>
</div>
</div>
</div>
@ -667,7 +669,7 @@ class CCPExecutionHistory extends HTMLElement {
},
{
target : "a[name=direct_link_execution]",
apply : (e,d)=>e.href = e.textContent = window.location.origin + window.location.pathname + "?execution=" + d.id
apply : (e,d)=>e.href = window.location.origin + window.location.pathname + "?execution=" + d.id
},
{
target : "div[name=logterminalcontainer]",