diff --git a/notebook/static/notebook/js/about.js b/notebook/static/notebook/js/about.js index af8a23c39..4f60592b9 100644 --- a/notebook/static/notebook/js/about.js +++ b/notebook/static/notebook/js/about.js @@ -8,19 +8,27 @@ require([ 'use strict'; $('#notebook_about').click(function () { // use underscore template to auto html escape - var text = 'You are using Jupyter notebook.

'; - text = text + 'The version of the notebook server is '; - text = text + _.template('<%- version %>')({ version: sys_info.notebook_version }); - if (sys_info.commit_hash) { - text = text + _.template('-<%- hash %>')({ hash: sys_info.commit_hash }); + if (sys_info) { + var text = 'You are using Jupyter notebook.

'; + text = text + 'The version of the notebook server is '; + text = text + _.template('<%- version %>')({ version: sys_info.notebook_version }); + if (sys_info.commit_hash) { + text = text + _.template('-<%- hash %>')({ hash: sys_info.commit_hash }); + } + text = text + _.template(' and is running on:
Python <%- pyver %>
')({ + pyver: sys_info.sys_version }); + var kinfo = $('
').attr('id', '#about-kinfo').text('Waiting for kernel to be available...'); + var body = $('
'); + body.append($('

').text('Server Information:')); + body.append($('

').html(text)); + body.append($('

').text('Current Kernel Information:')); + body.append(kinfo); + } else { + var text = 'Could not access sys_info variable for version information.'; + var body = $('
'); + body.append($('

').text('Cannot find sys_info!')); + body.append($('

').html(text)); } - text = text + _.template(' and is running on:

Python <%- pyver %>
')({ pyver: sys_info.sys_version }); - var kinfo = $('
').attr('id', '#about-kinfo').text('Waiting for kernel to be available...'); - var body = $('
'); - body.append($('

').text('Server Information:')); - body.append($('

').html(text)); - body.append($('

').text('Current Kernel Information:')); - body.append(kinfo); dialog.modal({ title: 'About Jupyter Notebook', body: body,