-
-
Notifications
You must be signed in to change notification settings - Fork 293
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
191 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ name = "Pluto" | |
uuid = "c3e4b0f8-55cb-11ea-2926-15256bba5781" | ||
license = "MIT" | ||
authors = ["Fons van der Plas <[email protected]>", "MikoΕaj Bochenski <[email protected]>"] | ||
version = "0.3.3" | ||
version = "0.3.4" | ||
|
||
[deps] | ||
HTTP = "cd3eb016-35fb-5094-929b-558a96fad6f3" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
document.addEventListener("DOMContentLoaded", () => { | ||
|
||
/* REMOTE NOTEBOOK LIST */ | ||
|
||
window.remoteNotebookList = null | ||
|
||
function updateRemoteNotebooks(list) { | ||
remoteNotebookList = list | ||
|
||
var listEl = document.querySelector("ul.running") | ||
listEl.innerHTML = "" | ||
document.body.classList.add("nosessions") | ||
list.forEach(nb => { | ||
document.body.classList.remove("nosessions") | ||
var a = document.createElement("a") | ||
a.href = "/edit?uuid=" + nb.uuid | ||
a.innerText = nb.shortpath | ||
|
||
var li = document.createElement("li") | ||
li.appendChild(a) | ||
|
||
listEl.appendChild(li) | ||
}) | ||
console.log(list) | ||
} | ||
|
||
/* SERVER CONNECTION */ | ||
|
||
function onUpdate(update, byMe) { | ||
var message = update.message | ||
|
||
switch (update.type) { | ||
case "notebook_list": | ||
// TODO: catch exception | ||
updateRemoteNotebooks(message.notebooks) | ||
break | ||
default: | ||
console.error("Received unknown update type!") | ||
break | ||
} | ||
} | ||
|
||
function onEstablishConnection(){ | ||
// on socket success | ||
// TODO: we should when exactly this happens | ||
document.body.classList.remove("loading") | ||
} | ||
|
||
function onConnect() { | ||
console.info("connected") | ||
} | ||
|
||
function onDisconnect() { | ||
console.info("disconnected") | ||
} | ||
|
||
window.client = new PlutoConnection(onUpdate, onEstablishConnection, onConnect, onDisconnect) | ||
client.initialize() | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0ee82d7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JuliaRegistrator register()
0ee82d7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Registration pull request created: JuliaRegistries/General/11371
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if Julia TagBot is installed, or can be done manually through the github interface, or via:
0ee82d7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#30