Display progress percentage in window title while some long running process is occurring.
Expose recon candidates to expressions. git-svn-id: http://google-refine.googlecode.com/svn/trunk@579 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
parent
78d62d3caf
commit
80a3e62d3e
@ -143,6 +143,8 @@ public class Recon implements HasFields, Jsonizable {
|
|||||||
public Object getField(String name, Properties bindings) {
|
public Object getField(String name, Properties bindings) {
|
||||||
if ("best".equals(name)) {
|
if ("best".equals(name)) {
|
||||||
return candidates != null && candidates.size() > 0 ? candidates.get(0) : null;
|
return candidates != null && candidates.size() > 0 ? candidates.get(0) : null;
|
||||||
|
} else if ("candidates".equals(name)) {
|
||||||
|
return candidates;
|
||||||
} else if ("judgment".equals(name) || "judgement".equals(name)) {
|
} else if ("judgment".equals(name) || "judgement".equals(name)) {
|
||||||
return judgmentToString();
|
return judgmentToString();
|
||||||
} else if ("judgmentAction".equals(name) || "judgementAction".equals(name)) {
|
} else if ("judgmentAction".equals(name) || "judgementAction".equals(name)) {
|
||||||
|
@ -66,7 +66,7 @@ function resizeAll() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function initializeUI(uiState) {
|
function initializeUI(uiState) {
|
||||||
document.title = theProject.metadata.name + " - Gridworks";
|
Gridworks.setTitle();
|
||||||
|
|
||||||
var path = $("#path");
|
var path = $("#path");
|
||||||
|
|
||||||
@ -119,6 +119,14 @@ function initializeUI(uiState) {
|
|||||||
$(window).bind("resize", resizeAll);
|
$(window).bind("resize", resizeAll);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Gridworks.setTitle = function(status) {
|
||||||
|
var title = theProject.metadata.name + " - Gridworks";
|
||||||
|
if (status) {
|
||||||
|
title = status + " - " + title;
|
||||||
|
}
|
||||||
|
document.title = title;
|
||||||
|
};
|
||||||
|
|
||||||
Gridworks.reinitializeProjectData = function(f) {
|
Gridworks.reinitializeProjectData = function(f) {
|
||||||
Ajax.chainGetJSON(
|
Ajax.chainGetJSON(
|
||||||
"/command/get-project-metadata?" + $.param({ project: theProject.id }), null,
|
"/command/get-project-metadata?" + $.param({ project: theProject.id }), null,
|
||||||
|
@ -101,6 +101,7 @@ ProcessWidget.prototype._render = function(newData) {
|
|||||||
this._div.empty();
|
this._div.empty();
|
||||||
|
|
||||||
if (!newData.processes.length) {
|
if (!newData.processes.length) {
|
||||||
|
Gridworks.setTitle();
|
||||||
this._div.hide();
|
this._div.hide();
|
||||||
} else {
|
} else {
|
||||||
this._div.show();
|
this._div.show();
|
||||||
@ -129,6 +130,7 @@ ProcessWidget.prototype._render = function(newData) {
|
|||||||
if (process.status == "pending") {
|
if (process.status == "pending") {
|
||||||
div.text(process.description + " (pending)");
|
div.text(process.description + " (pending)");
|
||||||
} else {
|
} else {
|
||||||
|
Gridworks.setTitle(process.progress + "%");
|
||||||
div.text(process.description + " (" + process.progress + "%)");
|
div.text(process.description + " (" + process.progress + "%)");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user