Commit 6a8ad086 authored by Iliya Manolov's avatar Iliya Manolov Committed by Łukasz Nowak

Removing the %erp5_url magic

@luke @Tyagov 

In Jupyter notebooks users could enter the url of their `Base_executeJupyter` function, but [it now gets filled in automatically](https://lab.nexedi.com/nexedi/slapos/blob/2f2a5ad0/software/ipython_notebook/template/ERP5kernel.py.jinja#L10). This makes the `%erp5_url` magic redundant which is why we can remove it. This commit also removes all mentions of `%erp5_url` in the kernel output and `custom.js`.

/reviewed-on nexedi/slapos!185
parent 30f4121f
...@@ -47,7 +47,7 @@ md5sum = d7d4a7e19d55bf14007819258bf42100 ...@@ -47,7 +47,7 @@ md5sum = d7d4a7e19d55bf14007819258bf42100
[erp5-kernel] [erp5-kernel]
<= download-file-base <= download-file-base
filename = ERP5kernel.py.jinja filename = ERP5kernel.py.jinja
md5sum = b5bb94181f7faee42ad18a909a648fe5 md5sum = f7be6c3ef9cdfaaea3b8756895a22081
[kernel-json] [kernel-json]
<= download-file-base <= download-file-base
...@@ -57,7 +57,7 @@ md5sum = ab6e78ea20855e07d388b5b86d1770fe ...@@ -57,7 +57,7 @@ md5sum = ab6e78ea20855e07d388b5b86d1770fe
[custom-js] [custom-js]
<= download-file-base <= download-file-base
filename = custom.js.jinja filename = custom.js.jinja
md5sum = 13561a9d86c488be752795e7bc23474a md5sum = 584aa839aa20263ba885537b74c83abd
[instance-jupyter] [instance-jupyter]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
......
...@@ -184,12 +184,8 @@ notebooks. \n' % magic_value ...@@ -184,12 +184,8 @@ notebooks. \n' % magic_value
if check_attributes: if check_attributes:
self.response = 'You have entered all required magics. You may now use your notebook.' self.response = 'You have entered all required magics. You may now use your notebook.'
else: else:
self.response = '''You have these required magics remaining: %s. \nYour current \ self.response = '''You have these required magics remaining: %s. \n''' % (
backend url is %s (you can change it with %serp5_url)''' % ( ', '.join(map(str, missing_attributes)))
', '.join(map(str, missing_attributes)),
str(self.url),
'%'
)
# Display response to frontend before moving forward # Display response to frontend before moving forward
self.display_response(response=(self.response + '\n')) self.display_response(response=(self.response + '\n'))
......
...@@ -85,12 +85,11 @@ $([IPython.events]).on('notebook_loaded.Notebook', function(){ ...@@ -85,12 +85,11 @@ $([IPython.events]).on('notebook_loaded.Notebook', function(){
var kernelname = IPython.notebook.kernel_selector.current_selection; var kernelname = IPython.notebook.kernel_selector.current_selection;
var display_text="<div class='output_subarea output_text output_result'>\ var display_text="<div class='output_subarea output_text output_result'>\
<pre>Follow these steps to customize your notebook with ERP5 kernel :-</br>\ <pre>Follow these steps to customize your notebook with ERP5 kernel :-</br>\
1. Add <b>%erp5_url &lt;your_erp5_url&gt;/erp5/Base_executeJupyter</b>.</br>\ 1. Make sure you have 'erp5_data_notebook' business template installed in your ERP5</br>\
Make sure you have 'erp5_data_notebook' business template installed in your ERP5</br>\ 2. <b>%erp5_user &lt;your_erp5_username&gt;</b></br>\
2. <b>%notebook_set_reference &lt;your_notebook_refernce&gt;</b></br>\ 3. <b>%erp5_password &lt;your_erp5_password&gt;</b></br>\
4. <b>%notebook_set_reference &lt;your_notebook_reference&gt;</b></br>\
It would be better to set the reference to match with erp5 reference pattern.</br>\ It would be better to set the reference to match with erp5 reference pattern.</br>\
3. <b>%erp5_user &lt;your_erp5_username&gt;</b></br>\
4. <b>%erp5_password &lt;your_erp5_password&gt;</b></br>\
5. As soon as you see 'Please Proceed' message you can now access your erp5 using notebook.</br>\ 5. As soon as you see 'Please Proceed' message you can now access your erp5 using notebook.</br>\
<p><u>OTHER USEFUL MAGICS</u> -</br>\ <p><u>OTHER USEFUL MAGICS</u> -</br>\
<b>%my_notebooks</b> -This is used to display all the notebooks created by the specific user.</br>\ <b>%my_notebooks</b> -This is used to display all the notebooks created by the specific user.</br>\
......
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