Skip to content

Commit d862dc9

Browse files
committed
Add links github repo
1 parent bb66186 commit d862dc9

File tree

4 files changed

+14
-11
lines changed

4 files changed

+14
-11
lines changed

resources/jupyter/extensions/tooling-extension/jupyter_tooling/open-tools-widget.js

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ define([
77
"./tooling-shared-components",
88
], function (Jupyter, $, dialog, utils, require, sharedComponents) {
99
// -------- GLOBAL VARIABLES -----------------------
10-
var basePathRegex = "^(.*?)/(tree|notebooks|edit|terminals)/";
10+
var basePathRegex = "^(.*?)/(tree|notebooks/|edit/|terminals/)";
1111
var basePath =
1212
window.location.pathname.match(basePathRegex) == null
1313
? ""
@@ -129,16 +129,21 @@ define([
129129
}
130130
}
131131

132+
docs_button = '<form action="https://github.com/ml-tooling/ml-workspace#features" target="_blank" style="display: inline-block;margin-left: 2px;"><button class="btn btn-default btn-sm"> <i class="fa-github fa"></i> Docs</button></form>'
133+
132134
tools_dropwdown =
133-
'<div id="start-tool-btn" class="btn-group" style="float: right; margin-right: 2px; margin-left: 2px;"> \
135+
'<div id="start-tool-btn" class="btn-group" style="float: right; margin-left: 2px;"> \
134136
<button class="dropdown-toggle btn btn-default btn-xs" data-toggle="dropdown" style="padding: 5px 10px;" aria-expanded="false"> \
135137
<span>Open Tool</span> <span class="caret"></span> </button> \
136138
<ul id="start-tool" class="dropdown-menu" style="right: 0; left: auto;">' +
137139
tools_menu_items +
138-
" </ul> </div>";
140+
'<li role="presentation" class="divider"></li>' +
141+
'<li><div style="display: block;padding: 3px 20px;clear: both;font-weight: 400;line-height: 1.42857143;color: #333333;white-space: nowrap;"><div>Do you like ML Workspace?</div><span style="display: block; color: #gray; padding: initial; font-size: 12px;"><a href="https://github.com/ml-tooling/ml-workspace" style="color: #333333;font-weight: 550;" target="_blank">Give us a star</a> or <a href="https://twitter.com/mltooling" style="color: #333333;font-weight: 550;" target="_blank">follow us on Twitter!</a></span></div></li>' +
142+
" </ul> </div>";
139143

144+
$("#header-container").append(docs_button);
140145
$("#header-container").append(tools_dropwdown);
141-
146+
142147
$("#ssh-access").click(function () {
143148
components.getSSHSetupCommand(window.location.origin, function (data) {
144149
dialog.modal({
@@ -201,7 +206,7 @@ define([
201206
).text();
202207
window.open(
203208
basePath +
204-
"terminals/" +
209+
"terminals/new/" +
205210
selecteTool.trim().toLowerCase().replace(/\W/g, "_"),
206211
"_blank"
207212
);

resources/jupyter/extensions/tooling-extension/jupyter_tooling/tooling-notebook-widget.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ define([
77
"./tooling-shared-components",
88
], function (Jupyter, $, dialog, utils, require, sharedComponents) {
99
// -------- GLOBAL VARIABLES -----------------------
10-
11-
var basePathRegex = "^(.*?)/(tree|notebooks|edit|terminals)/";
10+
var basePathRegex = "^(.*?)/(tree|notebooks/|edit/|terminals/)";
1211
var basePath =
1312
window.location.pathname.match(basePathRegex) == null
1413
? ""

resources/jupyter/extensions/tooling-extension/jupyter_tooling/tooling-shared-components.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ define([
66
"exports",
77
"module",
88
], function (Jupyter, $, dialog, require, exports, module) {
9-
var basePathRegex = "^(.*?)/(tree|notebooks|edit|terminals)/";
9+
var basePathRegex = "^(.*?)/(tree|notebooks/|edit/|terminals/)";
1010
var basePath =
1111
window.location.pathname.match(basePathRegex) == null
1212
? ""
@@ -596,7 +596,7 @@ define([
596596
click: function () {
597597
// TODO: Copy cleanup command to clipboard?
598598
// Open Terminal
599-
window.open(basePath + "terminals/cleanup", "_blank");
599+
window.open(basePath + "terminals/new/cleanup", "_blank");
600600
},
601601
},
602602
},

resources/jupyter/extensions/tooling-extension/jupyter_tooling/tooling-tree-widget.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ define([
77
"./tooling-shared-components",
88
], function (Jupyter, $, dialog, utils, require, sharedComponents) {
99
// -------- GLOBAL VARIABLES -----------------------
10-
11-
var basePathRegex = "^(.*?)/(tree|notebooks|edit|terminals)/";
10+
var basePathRegex = "^(.*?)/(tree|notebooks/|edit/|terminals/)";
1211
var basePath =
1312
window.location.pathname.match(basePathRegex) == null
1413
? ""

0 commit comments

Comments
 (0)