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) {
|
||||
if ("best".equals(name)) {
|
||||
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)) {
|
||||
return judgmentToString();
|
||||
} else if ("judgmentAction".equals(name) || "judgementAction".equals(name)) {
|
||||
|
@ -66,7 +66,7 @@ function resizeAll() {
|
||||
}
|
||||
|
||||
function initializeUI(uiState) {
|
||||
document.title = theProject.metadata.name + " - Gridworks";
|
||||
Gridworks.setTitle();
|
||||
|
||||
var path = $("#path");
|
||||
|
||||
@ -119,6 +119,14 @@ function initializeUI(uiState) {
|
||||
$(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) {
|
||||
Ajax.chainGetJSON(
|
||||
"/command/get-project-metadata?" + $.param({ project: theProject.id }), null,
|
||||
|
@ -101,6 +101,7 @@ ProcessWidget.prototype._render = function(newData) {
|
||||
this._div.empty();
|
||||
|
||||
if (!newData.processes.length) {
|
||||
Gridworks.setTitle();
|
||||
this._div.hide();
|
||||
} else {
|
||||
this._div.show();
|
||||
@ -129,6 +130,7 @@ ProcessWidget.prototype._render = function(newData) {
|
||||
if (process.status == "pending") {
|
||||
div.text(process.description + " (pending)");
|
||||
} else {
|
||||
Gridworks.setTitle(process.progress + "%");
|
||||
div.text(process.description + " (" + process.progress + "%)");
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user