diff --git a/silk-workbench/silk-workbench-core/app/views/start.scala.html b/silk-workbench/silk-workbench-core/app/views/start.scala.html index bf251b9778..7877562143 100644 --- a/silk-workbench/silk-workbench-core/app/views/start.scala.html +++ b/silk-workbench/silk-workbench-core/app/views/start.scala.html @@ -16,27 +16,31 @@ } @content = { -
- - @welcome +
+
+
+ + @welcome +
+ +

+ Your current workspace contains @projects.size project(s). +

+ + + @if(!projects.exists(_.name == exampleName)) { + + } + + +
- -

- Your current workspace contains @projects.size project(s). -

- - - @if(!projects.exists(_.name == exampleName)) { - - } - - } @main(None, "start")(header)(toolbar)(content) \ No newline at end of file diff --git a/silk-workbench/silk-workbench-core/public/main.css b/silk-workbench/silk-workbench-core/public/main.css index 3c66c9d198..3901a5dc85 100644 --- a/silk-workbench/silk-workbench-core/public/main.css +++ b/silk-workbench/silk-workbench-core/public/main.css @@ -147,13 +147,16 @@ div.actions .ui-button-text { margin-left: 3px; } -#content { +main { background: #f7f7f7; +} + +#content { float: left; min-width: 300px; width: calc(100% - 20px); - height: 100%; - padding: 10px 10px; + margin: 10px 10px; + padding: 0; } #help { diff --git a/silk-workbench/silk-workbench-rules/app/views/learning/activeLearn.scala.html b/silk-workbench/silk-workbench-rules/app/views/learning/activeLearn.scala.html index da160d1cf7..0c9d3ae784 100644 --- a/silk-workbench/silk-workbench-rules/app/views/learning/activeLearn.scala.html +++ b/silk-workbench/silk-workbench-rules/app/views/learning/activeLearn.scala.html @@ -75,9 +75,20 @@ } @content = { -
-
-
Linkage Rule Candidate
+
+
+ @learnedRuleCard +
+
+ @uncertainLinksCard +
+
+} + +@learnedRuleCard = { +
+
+
Linkage Rule
@@ -90,16 +101,16 @@
Hide the current Linking Rule Candidate
-
--
+
--
-
+
- @autoReload( - context = context, - contentPath = Learning.rule(context.project.name, context.task.id).url, - activityId = ActiveLearningFactory.pluginId - ) + @autoReload( + context = context, + contentPath = Learning.rule(context.project.name, context.task.id).url, + activityId = ActiveLearningFactory.pluginId + )
+} -
-
-
Uncertain links
+@uncertainLinksCard = { +
+
+
Uncertain links
-
+
diff --git a/silk-workbench/silk-workbench-rules/public/stylesheets/editor/editor.css b/silk-workbench/silk-workbench-rules/public/stylesheets/editor/editor.css index 6fc9b75169..0b3afdb758 100644 --- a/silk-workbench/silk-workbench-rules/public/stylesheets/editor/editor.css +++ b/silk-workbench/silk-workbench-rules/public/stylesheets/editor/editor.css @@ -53,7 +53,7 @@ body{ width: auto; height: 800px; padding: 5px; - overflow: scroll; + overflow: auto; position: relative; background: url("../../img/editor/grid.png") repeat scroll 0 0; border:1px solid #d9d9d9; diff --git a/silk-workbench/silk-workbench-rules/public/stylesheets/table.css b/silk-workbench/silk-workbench-rules/public/stylesheets/table.css index 2dac2bc23d..e0795e8ed6 100644 --- a/silk-workbench/silk-workbench-rules/public/stylesheets/table.css +++ b/silk-workbench/silk-workbench-rules/public/stylesheets/table.css @@ -1,8 +1,3 @@ -body { - color: #656565; - background: #f7f7f7; -} - p { margin-top: 4px; } diff --git a/silk-workbench/silk-workbench-workspace/app/controllers/workspace/DatasetApi.scala b/silk-workbench/silk-workbench-workspace/app/controllers/workspace/DatasetApi.scala index 6e4be30530..159aec6c10 100644 --- a/silk-workbench/silk-workbench-workspace/app/controllers/workspace/DatasetApi.scala +++ b/silk-workbench/silk-workbench-workspace/app/controllers/workspace/DatasetApi.scala @@ -105,7 +105,14 @@ class DatasetApi @Inject() () extends InjectedController with ControllerUtilsTra def dataset(project: String, task: String): Action[AnyContent] = RequestUserContextAction { implicit request => implicit userContext => val context = Context.get[GenericDatasetSpec](project, task, request.path) - Ok(views.html.workspace.dataset.dataset(context)) + context.task.data match { + case dataset: GenericDatasetSpec => + if (dataset.plugin.isInstanceOf[RdfDataset]) { + Redirect(routes.DatasetApi.sparql(project, task)) + } else { + Redirect(routes.DatasetApi.table(project, task)) + } + } } def table(project: String, task: String, maxEntities: Int): Action[AnyContent] = RequestUserContextAction { implicit request => implicit userContext => diff --git a/silk-workbench/silk-workbench-workspace/app/org/silkframework/workbench/workspace/WorkbenchPluginDataset.scala b/silk-workbench/silk-workbench-workspace/app/org/silkframework/workbench/workspace/WorkbenchPluginDataset.scala index 19ab6b126d..ab3173dbbe 100644 --- a/silk-workbench/silk-workbench-workspace/app/org/silkframework/workbench/workspace/WorkbenchPluginDataset.scala +++ b/silk-workbench/silk-workbench-workspace/app/org/silkframework/workbench/workspace/WorkbenchPluginDataset.scala @@ -66,14 +66,11 @@ object WorkbenchPluginDataset { override def tabs: Seq[Tab] = { task.data match { case dataset: GenericDatasetSpec => - var tabs = Seq(Tab("Dataset", s"workspace/datasets/$project/$taskId/dataset")) if (dataset.plugin.isInstanceOf[RdfDataset]) { - tabs = tabs :+ Tab("Sparql", s"workspace/datasets/$project/$taskId/sparql") + Seq(Tab("SPARQL", s"workspace/datasets/$project/$taskId/sparql")) } else { - tabs = tabs :+ Tab("Tableview", s"workspace/datasets/$project/$taskId/table") + Seq(Tab("Tableview", s"workspace/datasets/$project/$taskId/table")) } - tabs - case _ => Seq.empty } } } diff --git a/silk-workbench/silk-workbench-workspace/app/views/workspace/activities.scala.html b/silk-workbench/silk-workbench-workspace/app/views/workspace/activities.scala.html index 2fde5c39d8..c08b72c011 100644 --- a/silk-workbench/silk-workbench-workspace/app/views/workspace/activities.scala.html +++ b/silk-workbench/silk-workbench-workspace/app/views/workspace/activities.scala.html @@ -105,7 +105,11 @@ } @content = { - @workspaceActivities(WorkspaceFactory().workspace) +
+
+ @workspaceActivities(WorkspaceFactory().workspace) +
+
} diff --git a/silk-workbench/silk-workbench-workspace/app/views/workspace/dataset/dataset.scala.html b/silk-workbench/silk-workbench-workspace/app/views/workspace/dataset/dataset.scala.html deleted file mode 100644 index 012c60b189..0000000000 --- a/silk-workbench/silk-workbench-workspace/app/views/workspace/dataset/dataset.scala.html +++ /dev/null @@ -1,25 +0,0 @@ -@import org.silkframework.dataset.rdf.RdfDataset -@import org.silkframework.dataset.DatasetSpec.GenericDatasetSpec -@import org.silkframework.workbench.Context - -@(context: Context[GenericDatasetSpec])(implicit session: play.api.mvc.Session) - -@header = { - -} - -@toolbar = { - -} - -@content = { - -@if(context.task.data.plugin.isInstanceOf[RdfDataset]) { - This is an RDF-Dataset that can be queried using the SPARQL query language. -} else { - This is not an RDF-Dataset and thus cannot be queried using SPARQL. -} - -} - -@main(Some(context), titleLabel = context.task.taskLabel())(header)(toolbar)(content) diff --git a/silk-workbench/silk-workbench-workspace/app/views/workspace/dataset/sparql.scala.html b/silk-workbench/silk-workbench-workspace/app/views/workspace/dataset/sparql.scala.html index 43f7269e04..3d258588bf 100644 --- a/silk-workbench/silk-workbench-workspace/app/views/workspace/dataset/sparql.scala.html +++ b/silk-workbench/silk-workbench-workspace/app/views/workspace/dataset/sparql.scala.html @@ -14,35 +14,57 @@ } @content = { -
- +
+ + +
+
} -LIMIT 20} else {@query} - -
- - - - - - @for(results <- queryResults.toList; - variable <- results.variables) { - - @for(results <- queryResults.toList; bindings <- results.bindings) { - +@resultTable = { +
@variable - } -
+ + + @for(results <- queryResults.toList; + variable <- results.variables) { + + + + @for(results <- queryResults.toList; bindings <- results.bindings) { + @for((variable, node) <- bindings) { - - } -
@variable + } +
@node.value - } -
+ @node.value + } + + } + + +} + +@defaultQuery = {@for((prefix, namespace) <- context.project.config.prefixes.prefixMap) {PREFIX @prefix: <@namespace> +} +SELECT * WHERE { + ?s ?p ?o +} +LIMIT 20 } @main(Some(context), titleLabel = context.task.taskLabel())(header)(toolbar)(content) \ No newline at end of file diff --git a/silk-workbench/silk-workbench-workspace/app/views/workspace/dataset/table.scala.html b/silk-workbench/silk-workbench-workspace/app/views/workspace/dataset/table.scala.html index 37712a73d4..279d89386a 100644 --- a/silk-workbench/silk-workbench-workspace/app/views/workspace/dataset/table.scala.html +++ b/silk-workbench/silk-workbench-workspace/app/views/workspace/dataset/table.scala.html @@ -6,27 +6,37 @@ @(context: Context[GenericDatasetSpec], paths: IndexedSeq[UntypedPath], entities: Seq[Entity])(implicit session: play.api.mvc.Session) @header = { + } @toolbar = { } @content = { - - - @for(path <- paths) { - - - @for(entity <- entities) { - - @for(path <- paths) { - +
@path.toString - } -
@entity.evaluate(path) + + + + @for(path <- paths) { + + + + @for(entity <- entities) { + + @for(path <- paths) { + } - - } -
@path.toString + } +
@entity.evaluate(path) + } +
+
} @main(Some(context), titleLabel = context.task.taskLabel())(header)(toolbar)(content) \ No newline at end of file diff --git a/silk-workbench/silk-workbench-workspace/app/views/workspace/workspace.scala.html b/silk-workbench/silk-workbench-workspace/app/views/workspace/workspace.scala.html index 1b9fcf0c6e..dd5c1e70c8 100644 --- a/silk-workbench/silk-workbench-workspace/app/views/workspace/workspace.scala.html +++ b/silk-workbench/silk-workbench-workspace/app/views/workspace/workspace.scala.html @@ -25,9 +25,13 @@ } @content = { -
-
- +
+
+
+
+ +
+
}