Skip to content

Commit

Permalink
JHP-89: Changed the action labels to Start Jupyter Notebook and `St…
Browse files Browse the repository at this point in the history
…art Jupyter Dashboard` for clarity and consistency as the batch launch plugin is already contains a 'Processing Dashboard' action
  • Loading branch information
andylassiter committed May 28, 2024
1 parent e89f8b8 commit 6bdd6ae
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 14 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed

- [JHP-89]: Changed the action labels to `Start Jupyter Notebook` and `Start Jupyter Dashboard` for clarity and
consistency as the batch launch plugin is already contains a 'Processing Dashboard' action.

### Fixed

- [JHP-88]: Cleanup the User Authorization table and modal in the plugin preferences page. Usernames were not being
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ XNAT.compute.computeEnvironmentConfigs = getObject(XNAT.compute.computeEnvironme
}

const startButton = {
label: 'Start Jupyter',
label: 'Start Notebook',
isDefault: true,
close: false,
action: function(obj) {
Expand Down Expand Up @@ -328,7 +328,7 @@ XNAT.compute.computeEnvironmentConfigs = getObject(XNAT.compute.computeEnvironme
data: JSON.stringify(serverStartRequest),
beforeSend: function () {
XNAT.app.activityTab.start(
'Start Jupyter Notebook Server' +
'Start Jupyter Notebook' +
`<div class="actions"><a id="open-nb-${eventTrackingId}" class="icn open" style="display: none;"><i class="fa fa-external-link"></i></a>`,
eventTrackingId,
'XNAT.plugin.jupyterhub.servers.activityTabCallback', 1000);
Expand All @@ -346,7 +346,7 @@ XNAT.compute.computeEnvironmentConfigs = getObject(XNAT.compute.computeEnvironme
const buttons = (computeEnvironmentConfigs.length === 0) ? [cancelButton] : [cancelButton, startButton];

XNAT.dialog.open({
title: 'Start Jupyter',
title: 'Start Jupyter Notebook',
content: spawn('form#server-start-request-form'),
maxBtn: true,
width: 500,
Expand Down Expand Up @@ -516,7 +516,7 @@ XNAT.compute.computeEnvironmentConfigs = getObject(XNAT.compute.computeEnvironme
data: JSON.stringify(serverStartRequest),
beforeSend: function () {
XNAT.app.activityTab.start(
'Start Dashboard' +
'Start Jupyter Dashboard' +
`<div class="actions"><a id="open-nb-${eventTrackingId}" class="icn open" style="display: none;"><i class="fa fa-external-link"></i></a>`,
eventTrackingId,
'XNAT.plugin.jupyterhub.servers.activityTabCallback', 1000);
Expand All @@ -534,7 +534,7 @@ XNAT.compute.computeEnvironmentConfigs = getObject(XNAT.compute.computeEnvironme
const buttons = (dashboardConfigs.length === 0) ? [cancelButton] : [cancelButton, startButton];

XNAT.dialog.open({
title: 'Start Dashboard',
title: 'Start Jupyter Dashboard',
content: spawn('form#server-start-request-form'),
maxBtn: true,
width: 400,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ XNAT.plugin.jupyterhub.topnav = getObject(XNAT.plugin.jupyterhub.topnav || {});
const eventTrackingId = XNAT.plugin.jupyterhub.servers.generateEventTrackingId()
XNAT.plugin.jupyterhub.servers.stopServer(window.username, server['name'], eventTrackingId).then(() => {
XNAT.app.activityTab.start(
`Stop ${isDashboard(server) ? 'Dashboard' : 'Jupyter Notebook Server'}`,
`Stop Jupyter ${isDashboard(server) ? 'Dashboard' : 'Notebook'}`,
eventTrackingId,
'XNAT.plugin.jupyterhub.servers.activityTabCallback',
2000);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<li class="yuimenuitem">
<a class="yuimenuitemlabel" id="start-jupyter-server" style="display: none" onclick="XNAT.plugin.jupyterhub.servers.startServerForExperiment()">
Start Jupyter
Start Jupyter Notebook
</a>
</li>

<li class="yuimenuitem">
<a class="yuimenuitemlabel" id="start-dashboard" style="display: none" onclick="XNAT.plugin.jupyterhub.servers.startDashboardForExperiment()">
Start Dashboard
Start Jupyter Dashboard
</a>
</li>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<li class="yuimenuitem">
<a class="yuimenuitemlabel" id="start-jupyter-server" style="display: none" onclick="XNAT.plugin.jupyterhub.servers.startServerForExperiment()">
Start Jupyter
Start Jupyter Notebook
</a>
</li>

<li class="yuimenuitem">
<a class="yuimenuitemlabel" id="start-dashboard" style="display: none" onclick="XNAT.plugin.jupyterhub.servers.startDashboardForExperiment()">
Start Dashboard
Start Jupyter Dashboard
</a>
</li>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<li class="yuimenuitem">
<a class="yuimenuitemlabel" id="start-jupyter-server" style="display: none" onclick="XNAT.plugin.jupyterhub.servers.startServerForProject()">
Start Jupyter
Start Jupyter Notebook
</a>
</li>

<li class="yuimenuitem">
<a class="yuimenuitemlabel" id="start-dashboard" style="display: none" onclick="XNAT.plugin.jupyterhub.servers.startDashboardForProject()">
Start Dashboard
Start Jupyter Dashboard
</a>
</li>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<li class="yuimenuitem">
<a class="yuimenuitemlabel" id="start-jupyter-server" style="display: none" onclick="XNAT.plugin.jupyterhub.servers.startServerForSubject()">
Start Jupyter
Start Jupyter Notebook
</a>
</li>

<li class="yuimenuitem">
<a class="yuimenuitemlabel" id="start-dashboard" style="display: none" onclick="XNAT.plugin.jupyterhub.servers.startDashboardForSubject()">
Start Dashboard
Start Jupyter Dashboard
</a>
</li>

Expand Down

0 comments on commit 6bdd6ae

Please sign in to comment.