You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by mi...@apache.org on 2017/01/10 04:52:02 UTC
zeppelin git commit: [ZEPPELIN-1723] Math formula support library
path error
Repository: zeppelin
Updated Branches:
refs/heads/master 2c6f14aa0 -> afcf575d6
[ZEPPELIN-1723] Math formula support library path error
### What is this PR for?
When user set `ZEPPELIN_SERVER_CONTEXT_PATH`, web cannot find MathJax library because root location is set to `/`.
### What type of PR is it?
Bug Fix
### What is the Jira issue?
[ZEPPELIN-1723](https://issues.apache.org/jira/browse/ZEPPELIN-1723)
### How should this be tested?
1. Checkout remote branch, and cherry-pick one commit from #1863 which is needed to try out this PR:
```
$ ./dev/test_zeppelin_pr.py 1865
$ git cherry-pick dbae64d
$ mvn clean package -DskipTests -pl '!zeppelin-distribution,!alluxio,!ignite,!lens,!kylin,!scio,!hbase,!pig,!file,!flink,!cassandra,!elasticsearch,!bigquery,!postgresql,!jdbc,!python,!angular,!sh,!livy'
```
2. Set `ZEPPELIN_SERVER_CONTEXT_PATH` in conf/zeppelin-env.sh and start Zeppelin
3. See if error occurs in browser inspection console.
4. Test if you can use Math function with pegdown md interpreter:
```
%md
When \\(a \\ne 0\\), there are two solutions to \\(ax^2 + bx + c = 0\\) and they are
$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$
```
### Screenshots (if appropriate)
### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? no
Author: Mina Lee <mi...@apache.org>
Closes #1865 from minahlee/ZEPPELIN-1723 and squashes the following commits:
2b06b21 [Mina Lee] Fix mathjax loading in dev mode
ccf4494 [Mina Lee] Add MathJax root location config
Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo
Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/afcf575d
Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/afcf575d
Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/afcf575d
Branch: refs/heads/master
Commit: afcf575d677e2133501804a77cc584561d348da8
Parents: 2c6f14a
Author: Mina Lee <mi...@apache.org>
Authored: Mon Jan 9 19:27:58 2017 +0900
Committer: Mina Lee <mi...@apache.org>
Committed: Tue Jan 10 13:51:56 2017 +0900
----------------------------------------------------------------------
zeppelin-web/src/index.html | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/afcf575d/zeppelin-web/src/index.html
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/index.html b/zeppelin-web/src/index.html
index fb2677f..b6be595 100644
--- a/zeppelin-web/src/index.html
+++ b/zeppelin-web/src/index.html
@@ -103,7 +103,7 @@ limitations under the License.
<!-- endbuild -->
<script type="text/x-mathjax-config">
- MathJax.Hub.Config({
+ var config = {
extensions: ["tex2jax.js"],
jax: ["input/TeX", "output/HTML-CSS"],
tex2jax: {
@@ -113,7 +113,12 @@ limitations under the License.
},
"HTML-CSS": { availableFonts: ["TeX"] },
messageStyle: "none"
- });
+ }
+ // add root only if it's not dev mode
+ if (Number(location.port) !== 9000) {
+ config.root = '.';
+ }
+ MathJax.Hub.Config(config);
</script>
<!-- build:js(.) scripts/vendor.js -->