Improve styling of schema alignment dialog
This commit is contained in:
parent
c845105a39
commit
8b1869414d
@ -33,55 +33,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
|
|
||||||
var SchemaAlignment = {};
|
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) {
|
SchemaAlignment._cleanName = function(s) {
|
||||||
return s.replace(/\W/g, " ").replace(/\s+/g, " ").toLowerCase();
|
return s.replace(/\W/g, " ").replace(/\s+/g, " ").toLowerCase();
|
||||||
};
|
};
|
||||||
|
@ -119,9 +119,16 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.wbs-item {
|
||||||
|
border: 1px solid #c8ccd1;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
padding-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
.wbs-statement-group {
|
.wbs-statement-group {
|
||||||
background: #eaecf0;
|
background: #eaecf0;
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
|
border: 1px solid #c8ccd1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wbs-statement {
|
.wbs-statement {
|
||||||
@ -130,7 +137,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
|
|
||||||
.wbs-right {
|
.wbs-right {
|
||||||
float: right;
|
float: right;
|
||||||
width: 75%;
|
width: 85%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wbs-statement-group .wbs-right {
|
.wbs-statement-group .wbs-right {
|
||||||
@ -194,6 +201,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
background-color: #eaf3ff;
|
background-color: #eaf3ff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.wbs-namedesc-container {
|
||||||
|
border: 1px solid #c8ccd1;
|
||||||
|
}
|
||||||
|
|
||||||
.wbs-namedesc {
|
.wbs-namedesc {
|
||||||
background-color: #eaecf0;
|
background-color: #eaecf0;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
|
Loading…
Reference in New Issue
Block a user