mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-21 04:10:17 +08:00
add running indication for notebook icon in dashboard
This commit is contained in:
parent
03ffca6d88
commit
a9201807a9
17
IPython/html/static/style/style.min.css
vendored
17
IPython/html/static/style/style.min.css
vendored
@ -8794,6 +8794,23 @@ input.engine_num_input {
|
||||
.notebook_icon:before.pull-right {
|
||||
margin-left: .3em;
|
||||
}
|
||||
.running_notebook_icon:before {
|
||||
display: inline-block;
|
||||
font: normal normal normal 14px/1 FontAwesome;
|
||||
font-size: inherit;
|
||||
text-rendering: auto;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
transform: translate(0, 0);
|
||||
content: "\f02d";
|
||||
color: #5cb85c;
|
||||
}
|
||||
.running_notebook_icon:before.pull-left {
|
||||
margin-right: .3em;
|
||||
}
|
||||
.running_notebook_icon:before.pull-right {
|
||||
margin-left: .3em;
|
||||
}
|
||||
.file_icon:before {
|
||||
display: inline-block;
|
||||
font: normal normal normal 14px/1 FontAwesome;
|
||||
|
@ -382,11 +382,16 @@ define([
|
||||
NotebookList.prototype.add_link = function (model, item) {
|
||||
var path = model.path,
|
||||
name = model.name;
|
||||
var running = (model.type == 'notebook' && this.sessions[path] !== undefined);
|
||||
|
||||
item.data('name', name);
|
||||
item.data('path', path);
|
||||
item.data('type', model.type);
|
||||
item.find(".item_name").text(name);
|
||||
var icon = NotebookList.icons[model.type];
|
||||
if (running) {
|
||||
icon = 'running_' + icon;
|
||||
}
|
||||
var uri_prefix = NotebookList.uri_prefixes[model.type];
|
||||
item.find(".item_icon").addClass(icon).addClass('icon-fixed-width');
|
||||
var link = item.find("a.item_link")
|
||||
@ -398,7 +403,6 @@ define([
|
||||
)
|
||||
);
|
||||
|
||||
var running = (model.type == 'notebook' && this.sessions[path] !== undefined);
|
||||
item.find(".item_buttons .running-indicator").css('visibility', running ? '' : 'hidden');
|
||||
|
||||
// directory nav doesn't open new tabs
|
||||
|
@ -164,6 +164,12 @@ input.engine_num_input {
|
||||
.icon(@fa-var-book)
|
||||
}
|
||||
|
||||
.running_notebook_icon:before {
|
||||
.icon(@fa-var-book);
|
||||
color: @brand-success
|
||||
}
|
||||
|
||||
|
||||
.file_icon:before {
|
||||
.icon(@fa-var-file-o)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user