Improve styling of schema alignment dialog

This commit is contained in:
Antonin Delpeuch 2018-01-31 09:29:04 +00:00
parent c845105a39
commit 8b1869414d
2 changed files with 12 additions and 50 deletions

View File

@ -33,55 +33,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
var SchemaAlignment = {};
SchemaAlignment.autoAlign = function() {
var protograph = {};
var columns = theProject.columnModel.columns;
var typedCandidates = [];
var candidates = [];
for (var c = 0; c < columns.length; c++) {
var column = columns[c];
var typed = (column.reconConfig) &&
ReconciliationManager.isFreebaseIdOrMid(column.reconConfig.identifierSpace) &&
ReconciliationManager.isFreebaseId(column.reconConfig.schemaSpace);
var candidate = {
status: "unbound",
typed: typed,
index: c,
column: column
};
candidates.push(candidate);
if (typed) {
typedCandidates.push(candidate);
}
}
if (typedCandidates.length > 0) {
} else {
var queries = {};
for (var i = 0; i < candidates.length; i++) {
var candidate = candidates[i];
var name = SchemaAlignment._cleanName(candidate.column.name);
var key = "t" + i + ":search";
queries[key] = {
"query" : name,
"limit" : 10,
"type" : "/type/type,/type/property",
"type_strict" : "any"
};
}
SchemaAlignment._batchSearch(queries, function(result) {
console.log(result);
});
}
};
SchemaAlignment._cleanName = function(s) {
return s.replace(/\W/g, " ").replace(/\s+/g, " ").toLowerCase();
};

View File

@ -119,9 +119,16 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
overflow: auto;
}
.wbs-item {
border: 1px solid #c8ccd1;
margin-bottom: 5px;
padding-right: 5px;
}
.wbs-statement-group {
background: #eaecf0;
margin-bottom: 5px;
border: 1px solid #c8ccd1;
}
.wbs-statement {
@ -130,7 +137,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.wbs-right {
float: right;
width: 75%;
width: 85%;
}
.wbs-statement-group .wbs-right {
@ -194,6 +201,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
background-color: #eaf3ff;
}
.wbs-namedesc-container {
border: 1px solid #c8ccd1;
}
.wbs-namedesc {
background-color: #eaecf0;
padding: 5px;