You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by ij...@apache.org on 2013/11/07 17:59:55 UTC

svn commit: r1539711 [1/5] - in /jena/branches/jena-fuseki-new-ui/pages: ./ admin/ assets/ css/ images/ js/ js/app/ js/app/controllers/ js/app/models/ js/lib/ js/lib/codemirror/

Author: ijd
Date: Thu Nov  7 16:59:54 2013
New Revision: 1539711

URL: http://svn.apache.org/r1539711
Log:
Added qonsole for running queries from landing page

Added:
    jena/branches/jena-fuseki-new-ui/pages/css/codemirror.css
    jena/branches/jena-fuseki-new-ui/pages/css/jquery.dataTables.css
    jena/branches/jena-fuseki-new-ui/pages/css/qonsole.css
    jena/branches/jena-fuseki-new-ui/pages/images/
    jena/branches/jena-fuseki-new-ui/pages/images/Sorting icons.psd   (with props)
    jena/branches/jena-fuseki-new-ui/pages/images/back_disabled.png   (with props)
    jena/branches/jena-fuseki-new-ui/pages/images/back_enabled.png   (with props)
    jena/branches/jena-fuseki-new-ui/pages/images/back_enabled_hover.png   (with props)
    jena/branches/jena-fuseki-new-ui/pages/images/favicon.ico
      - copied unchanged from r1539587, jena/branches/jena-fuseki-new-ui/pages/assets/favicon.ico
    jena/branches/jena-fuseki-new-ui/pages/images/forward_disabled.png   (with props)
    jena/branches/jena-fuseki-new-ui/pages/images/forward_enabled.png   (with props)
    jena/branches/jena-fuseki-new-ui/pages/images/forward_enabled_hover.png   (with props)
    jena/branches/jena-fuseki-new-ui/pages/images/jena-logo-notext-small.png
      - copied unchanged from r1539587, jena/branches/jena-fuseki-new-ui/pages/assets/jena-logo-notext-small.png
    jena/branches/jena-fuseki-new-ui/pages/images/sort_asc.png   (with props)
    jena/branches/jena-fuseki-new-ui/pages/images/sort_asc_disabled.png   (with props)
    jena/branches/jena-fuseki-new-ui/pages/images/sort_both.png   (with props)
    jena/branches/jena-fuseki-new-ui/pages/images/sort_desc.png   (with props)
    jena/branches/jena-fuseki-new-ui/pages/images/sort_desc_disabled.png   (with props)
    jena/branches/jena-fuseki-new-ui/pages/images/wait30.gif   (with props)
    jena/branches/jena-fuseki-new-ui/pages/js/app/controllers/index-controller.js
    jena/branches/jena-fuseki-new-ui/pages/js/app/qonsole-config.js
    jena/branches/jena-fuseki-new-ui/pages/js/lib/codemirror/
    jena/branches/jena-fuseki-new-ui/pages/js/lib/codemirror/brace-fold.js
    jena/branches/jena-fuseki-new-ui/pages/js/lib/codemirror/codemirror.js
    jena/branches/jena-fuseki-new-ui/pages/js/lib/codemirror/comment-fold.js
    jena/branches/jena-fuseki-new-ui/pages/js/lib/codemirror/foldcode.js
    jena/branches/jena-fuseki-new-ui/pages/js/lib/codemirror/foldgutter.js
    jena/branches/jena-fuseki-new-ui/pages/js/lib/codemirror/javascript.js
    jena/branches/jena-fuseki-new-ui/pages/js/lib/codemirror/sparql.js
    jena/branches/jena-fuseki-new-ui/pages/js/lib/codemirror/xml-fold.js
    jena/branches/jena-fuseki-new-ui/pages/js/lib/codemirror/xml.js
    jena/branches/jena-fuseki-new-ui/pages/js/lib/jquery.dataTables.min.js
    jena/branches/jena-fuseki-new-ui/pages/js/lib/jquery.xdomainrequest.js
    jena/branches/jena-fuseki-new-ui/pages/js/lib/qonsole.js
Removed:
    jena/branches/jena-fuseki-new-ui/pages/assets/favicon.ico
    jena/branches/jena-fuseki-new-ui/pages/assets/jena-logo-notext-small.png
Modified:
    jena/branches/jena-fuseki-new-ui/pages/admin/data-management.html
    jena/branches/jena-fuseki-new-ui/pages/admin/documentation.html
    jena/branches/jena-fuseki-new-ui/pages/admin/index.html
    jena/branches/jena-fuseki-new-ui/pages/admin/query.html
    jena/branches/jena-fuseki-new-ui/pages/documentation.html
    jena/branches/jena-fuseki-new-ui/pages/index.html
    jena/branches/jena-fuseki-new-ui/pages/js/app/main.index.js
    jena/branches/jena-fuseki-new-ui/pages/js/app/models/dataset.js
    jena/branches/jena-fuseki-new-ui/pages/js/app/models/fuseki-server.js
    jena/branches/jena-fuseki-new-ui/pages/js/common-config.js
    jena/branches/jena-fuseki-new-ui/pages/validation.html

Modified: jena/branches/jena-fuseki-new-ui/pages/admin/data-management.html
URL: http://svn.apache.org/viewvc/jena/branches/jena-fuseki-new-ui/pages/admin/data-management.html?rev=1539711&r1=1539710&r2=1539711&view=diff
==============================================================================
--- jena/branches/jena-fuseki-new-ui/pages/admin/data-management.html (original)
+++ jena/branches/jena-fuseki-new-ui/pages/admin/data-management.html Thu Nov  7 16:59:54 2013
@@ -35,7 +35,7 @@
               <li class=""><a href="documentation.html">Documentation</a></li>
             </ul>
             <ul class="nav navbar-nav navbar-right">
-              <li><img src="../assets/jena-logo-notext-small.png" alt="Apache Jena logo" title="Apache Jena" /></li>
+              <li><img src="../images/jena-logo-notext-small.png" alt="Apache Jena logo" title="Apache Jena" /></li>
             </ul>
           </div><!-- /.navbar-collapse -->
         </div><!-- /.row -->

Modified: jena/branches/jena-fuseki-new-ui/pages/admin/documentation.html
URL: http://svn.apache.org/viewvc/jena/branches/jena-fuseki-new-ui/pages/admin/documentation.html?rev=1539711&r1=1539710&r2=1539711&view=diff
==============================================================================
--- jena/branches/jena-fuseki-new-ui/pages/admin/documentation.html (original)
+++ jena/branches/jena-fuseki-new-ui/pages/admin/documentation.html Thu Nov  7 16:59:54 2013
@@ -35,7 +35,7 @@
               <li class="active"><a href="documentation.html">Documentation</a></li>
             </ul>
             <ul class="nav navbar-nav navbar-right">
-              <li><img src="../assets/jena-logo-notext-small.png" alt="Apache Jena logo" title="Apache Jena" /></li>
+              <li><img src="../images/jena-logo-notext-small.png" alt="Apache Jena logo" title="Apache Jena" /></li>
             </ul>
           </div><!-- /.navbar-collapse -->
         </div><!-- /.row -->

Modified: jena/branches/jena-fuseki-new-ui/pages/admin/index.html
URL: http://svn.apache.org/viewvc/jena/branches/jena-fuseki-new-ui/pages/admin/index.html?rev=1539711&r1=1539710&r2=1539711&view=diff
==============================================================================
--- jena/branches/jena-fuseki-new-ui/pages/admin/index.html (original)
+++ jena/branches/jena-fuseki-new-ui/pages/admin/index.html Thu Nov  7 16:59:54 2013
@@ -35,7 +35,7 @@
               <li class=""><a href="documentation.html">Documentation</a></li>
             </ul>
             <ul class="nav navbar-nav navbar-right">
-              <li><img src="../assets/jena-logo-notext-small.png" alt="Apache Jena logo" title="Apache Jena" /></li>
+              <li><img src="../images/jena-logo-notext-small.png" alt="Apache Jena logo" title="Apache Jena" /></li>
             </ul>
           </div><!-- /.navbar-collapse -->
         </div><!-- /.row -->

Modified: jena/branches/jena-fuseki-new-ui/pages/admin/query.html
URL: http://svn.apache.org/viewvc/jena/branches/jena-fuseki-new-ui/pages/admin/query.html?rev=1539711&r1=1539710&r2=1539711&view=diff
==============================================================================
--- jena/branches/jena-fuseki-new-ui/pages/admin/query.html (original)
+++ jena/branches/jena-fuseki-new-ui/pages/admin/query.html Thu Nov  7 16:59:54 2013
@@ -35,7 +35,7 @@
               <li class=""><a href="documentation.html">Documentation</a></li>
             </ul>
             <ul class="nav navbar-nav navbar-right">
-              <li><img src="../assets/jena-logo-notext-small.png" alt="Apache Jena logo" title="Apache Jena" /></li>
+              <li><img src="../images/jena-logo-notext-small.png" alt="Apache Jena logo" title="Apache Jena" /></li>
             </ul>
           </div><!-- /.navbar-collapse -->
         </div><!-- /.row -->

Added: jena/branches/jena-fuseki-new-ui/pages/css/codemirror.css
URL: http://svn.apache.org/viewvc/jena/branches/jena-fuseki-new-ui/pages/css/codemirror.css?rev=1539711&view=auto
==============================================================================
--- jena/branches/jena-fuseki-new-ui/pages/css/codemirror.css (added)
+++ jena/branches/jena-fuseki-new-ui/pages/css/codemirror.css Thu Nov  7 16:59:54 2013
@@ -0,0 +1,263 @@
+/* BASICS */
+
+.CodeMirror {
+  /* Set height, width, borders, and global font properties here */
+  font-family: monospace;
+  height: 300px;
+}
+.CodeMirror-scroll {
+  /* Set scrolling behaviour here */
+  overflow: auto;
+}
+
+/* PADDING */
+
+.CodeMirror-lines {
+  padding: 4px 0; /* Vertical padding around content */
+}
+.CodeMirror pre {
+  padding: 0 4px; /* Horizontal padding of content */
+}
+
+.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
+  background-color: white; /* The little square between H and V scrollbars */
+}
+
+/* GUTTER */
+
+.CodeMirror-gutters {
+  border-right: 1px solid #ddd;
+  background-color: #f7f7f7;
+  white-space: nowrap;
+}
+.CodeMirror-linenumbers {}
+.CodeMirror-linenumber {
+  padding: 0 3px 0 5px;
+  min-width: 20px;
+  text-align: right;
+  color: #999;
+}
+
+/* CURSOR */
+
+.CodeMirror div.CodeMirror-cursor {
+  border-left: 1px solid black;
+  z-index: 3;
+}
+/* Shown when moving in bi-directional text */
+.CodeMirror div.CodeMirror-secondarycursor {
+  border-left: 1px solid silver;
+}
+.CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor {
+  width: auto;
+  border: 0;
+  background: #7e7;
+  z-index: 1;
+}
+/* Can style cursor different in overwrite (non-insert) mode */
+.CodeMirror div.CodeMirror-cursor.CodeMirror-overwrite {}
+
+.cm-tab { display: inline-block; }
+
+/* DEFAULT THEME */
+
+.cm-s-default .cm-keyword {color: #708;}
+.cm-s-default .cm-atom {color: #219;}
+.cm-s-default .cm-number {color: #164;}
+.cm-s-default .cm-def {color: #00f;}
+.cm-s-default .cm-variable {color: black;}
+.cm-s-default .cm-variable-2 {color: #05a;}
+.cm-s-default .cm-variable-3 {color: #085;}
+.cm-s-default .cm-property {color: black;}
+.cm-s-default .cm-operator {color: black;}
+.cm-s-default .cm-comment {color: #a50;}
+.cm-s-default .cm-string {color: #a11;}
+.cm-s-default .cm-string-2 {color: #f50;}
+.cm-s-default .cm-meta {color: #555;}
+.cm-s-default .cm-error {color: #f00;}
+.cm-s-default .cm-qualifier {color: #555;}
+.cm-s-default .cm-builtin {color: #30a;}
+.cm-s-default .cm-bracket {color: #997;}
+.cm-s-default .cm-tag {color: #170;}
+.cm-s-default .cm-attribute {color: #00c;}
+.cm-s-default .cm-header {color: blue;}
+.cm-s-default .cm-quote {color: #090;}
+.cm-s-default .cm-hr {color: #999;}
+.cm-s-default .cm-link {color: #00c;}
+
+.cm-negative {color: #d44;}
+.cm-positive {color: #292;}
+.cm-header, .cm-strong {font-weight: bold;}
+.cm-em {font-style: italic;}
+.cm-link {text-decoration: underline;}
+
+.cm-invalidchar {color: #f00;}
+
+div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}
+div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
+.CodeMirror-activeline-background {background: #e8f2ff;}
+
+/* STOP */
+
+/* The rest of this file contains styles related to the mechanics of
+   the editor. You probably shouldn't touch them. */
+
+.CodeMirror {
+  line-height: 1;
+  position: relative;
+  overflow: hidden;
+  background: white;
+  color: black;
+}
+
+.CodeMirror-scroll {
+  /* 30px is the magic margin used to hide the element's real scrollbars */
+  /* See overflow: hidden in .CodeMirror */
+  margin-bottom: -30px; margin-right: -30px;
+  padding-bottom: 30px; padding-right: 30px;
+  height: 100%;
+  outline: none; /* Prevent dragging from highlighting the element */
+  position: relative;
+  -moz-box-sizing: content-box;
+  box-sizing: content-box;
+}
+.CodeMirror-sizer {
+  position: relative;
+}
+
+/* The fake, visible scrollbars. Used to force redraw during scrolling
+   before actuall scrolling happens, thus preventing shaking and
+   flickering artifacts. */
+.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
+  position: absolute;
+  z-index: 6;
+  display: none;
+}
+.CodeMirror-vscrollbar {
+  right: 0; top: 0;
+  overflow-x: hidden;
+  overflow-y: scroll;
+}
+.CodeMirror-hscrollbar {
+  bottom: 0; left: 0;
+  overflow-y: hidden;
+  overflow-x: scroll;
+}
+.CodeMirror-scrollbar-filler {
+  right: 0; bottom: 0;
+}
+.CodeMirror-gutter-filler {
+  left: 0; bottom: 0;
+}
+
+.CodeMirror-gutters {
+  position: absolute; left: 0; top: 0;
+  padding-bottom: 30px;
+  z-index: 3;
+}
+.CodeMirror-gutter {
+  white-space: normal;
+  height: 100%;
+  -moz-box-sizing: content-box;
+  box-sizing: content-box;
+  padding-bottom: 30px;
+  margin-bottom: -32px;
+  display: inline-block;
+  /* Hack to make IE7 behave */
+  *zoom:1;
+  *display:inline;
+}
+.CodeMirror-gutter-elt {
+  position: absolute;
+  cursor: default;
+  z-index: 4;
+}
+
+.CodeMirror-lines {
+  cursor: text;
+}
+.CodeMirror pre {
+  /* Reset some styles that the rest of the page might have set */
+  -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;
+  border-width: 0;
+  background: transparent;
+  font-family: inherit;
+  font-size: inherit;
+  margin: 0;
+  white-space: pre;
+  word-wrap: normal;
+  line-height: inherit;
+  color: inherit;
+  z-index: 2;
+  position: relative;
+  overflow: visible;
+}
+.CodeMirror-wrap pre {
+  word-wrap: break-word;
+  white-space: pre-wrap;
+  word-break: normal;
+}
+.CodeMirror-code pre {
+  border-right: 30px solid transparent;
+  width: -webkit-fit-content;
+  width: -moz-fit-content;
+  width: fit-content;
+}
+.CodeMirror-wrap .CodeMirror-code pre {
+  border-right: none;
+  width: auto;
+}
+.CodeMirror-linebackground {
+  position: absolute;
+  left: 0; right: 0; top: 0; bottom: 0;
+  z-index: 0;
+}
+
+.CodeMirror-linewidget {
+  position: relative;
+  z-index: 2;
+  overflow: auto;
+}
+
+.CodeMirror-widget {}
+
+.CodeMirror-wrap .CodeMirror-scroll {
+  overflow-x: hidden;
+}
+
+.CodeMirror-measure {
+  position: absolute;
+  width: 100%;
+  height: 0;
+  overflow: hidden;
+  visibility: hidden;
+}
+.CodeMirror-measure pre { position: static; }
+
+.CodeMirror div.CodeMirror-cursor {
+  position: absolute;
+  visibility: hidden;
+  border-right: none;
+  width: 0;
+}
+.CodeMirror-focused div.CodeMirror-cursor {
+  visibility: visible;
+}
+
+.CodeMirror-selected { background: #d9d9d9; }
+.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }
+
+.cm-searching {
+  background: #ffa;
+  background: rgba(255, 255, 0, .4);
+}
+
+/* IE7 hack to prevent it from returning funny offsetTops on the spans */
+.CodeMirror span { *vertical-align: text-bottom; }
+
+@media print {
+  /* Hide the cursor when printing */
+  .CodeMirror div.CodeMirror-cursor {
+    visibility: hidden;
+  }
+}

Added: jena/branches/jena-fuseki-new-ui/pages/css/jquery.dataTables.css
URL: http://svn.apache.org/viewvc/jena/branches/jena-fuseki-new-ui/pages/css/jquery.dataTables.css?rev=1539711&view=auto
==============================================================================
--- jena/branches/jena-fuseki-new-ui/pages/css/jquery.dataTables.css (added)
+++ jena/branches/jena-fuseki-new-ui/pages/css/jquery.dataTables.css Thu Nov  7 16:59:54 2013
@@ -0,0 +1,220 @@
+
+/*
+ * Table
+ */
+table.dataTable {
+  margin: 0 auto;
+  clear: both;
+  width: 100%;
+}
+
+table.dataTable thead th {
+  padding: 3px 18px 3px 10px;
+  border-bottom: 1px solid black;
+  font-weight: bold;
+  cursor: pointer;
+  *cursor: hand;
+}
+
+table.dataTable tfoot th {
+  padding: 3px 18px 3px 10px;
+  border-top: 1px solid black;
+  font-weight: bold;
+}
+
+table.dataTable td {
+  padding: 3px 10px;
+}
+
+table.dataTable td.center,
+table.dataTable td.dataTables_empty {
+  text-align: center;
+}
+
+table.dataTable tr.odd { background-color: #E2E4FF; }
+table.dataTable tr.even { background-color: white; }
+
+table.dataTable tr.odd td.sorting_1 { background-color: #D3D6FF; }
+table.dataTable tr.odd td.sorting_2 { background-color: #DADCFF; }
+table.dataTable tr.odd td.sorting_3 { background-color: #E0E2FF; }
+table.dataTable tr.even td.sorting_1 { background-color: #EAEBFF; }
+table.dataTable tr.even td.sorting_2 { background-color: #F2F3FF; }
+table.dataTable tr.even td.sorting_3 { background-color: #F9F9FF; }
+
+
+/*
+ * Table wrapper
+ */
+.dataTables_wrapper {
+  position: relative;
+  clear: both;
+  *zoom: 1;
+}
+
+
+/*
+ * Page length menu
+ */
+.dataTables_length {
+  float: left;
+}
+
+
+/*
+ * Filter
+ */
+.dataTables_filter {
+  float: right;
+  text-align: right;
+}
+
+
+/*
+ * Table information
+ */
+.dataTables_info {
+  clear: both;
+  float: left;
+}
+
+
+/*
+ * Pagination
+ */
+.dataTables_paginate {
+  float: right;
+  text-align: right;
+}
+
+/* Two button pagination - previous / next */
+.paginate_disabled_previous,
+.paginate_enabled_previous,
+.paginate_disabled_next,
+.paginate_enabled_next {
+  height: 19px;
+  float: left;
+  cursor: pointer;
+  *cursor: hand;
+  color: #111 !important;
+}
+.paginate_disabled_previous:hover,
+.paginate_enabled_previous:hover,
+.paginate_disabled_next:hover,
+.paginate_enabled_next:hover {
+  text-decoration: none !important;
+}
+.paginate_disabled_previous:active,
+.paginate_enabled_previous:active,
+.paginate_disabled_next:active,
+.paginate_enabled_next:active {
+  outline: none;
+}
+
+.paginate_disabled_previous,
+.paginate_disabled_next {
+  color: #666 !important;
+}
+.paginate_disabled_previous,
+.paginate_enabled_previous {
+  padding-left: 23px;
+}
+.paginate_disabled_next,
+.paginate_enabled_next {
+  padding-right: 23px;
+  margin-left: 10px;
+}
+
+.paginate_enabled_previous { background: url('../images/back_enabled.png') no-repeat top left; }
+.paginate_enabled_previous:hover { background: url('../images/back_enabled_hover.png') no-repeat top left; }
+.paginate_disabled_previous { background: url('../images/back_disabled.png') no-repeat top left; }
+
+.paginate_enabled_next { background: url('../images/forward_enabled.png') no-repeat top right; }
+.paginate_enabled_next:hover { background: url('../images/forward_enabled_hover.png') no-repeat top right; }
+.paginate_disabled_next { background: url('../images/forward_disabled.png') no-repeat top right; }
+
+/* Full number pagination */
+.paging_full_numbers {
+  height: 22px;
+  line-height: 22px;
+}
+.paging_full_numbers a:active {
+  outline: none
+}
+.paging_full_numbers a:hover {
+  text-decoration: none;
+}
+
+.paging_full_numbers a.paginate_button,
+.paging_full_numbers a.paginate_active {
+  border: 1px solid #aaa;
+  -webkit-border-radius: 5px;
+  -moz-border-radius: 5px;
+  border-radius: 5px;
+  padding: 2px 5px;
+  margin: 0 3px;
+  cursor: pointer;
+  *cursor: hand;
+  color: #333 !important;
+}
+
+.paging_full_numbers a.paginate_button {
+  background-color: #ddd;
+}
+
+.paging_full_numbers a.paginate_button:hover {
+  background-color: #ccc;
+  text-decoration: none !important;
+}
+
+.paging_full_numbers a.paginate_active {
+  background-color: #99B3FF;
+}
+
+
+/*
+ * Processing indicator
+ */
+.dataTables_processing {
+  position: absolute;
+  top: 50%;
+  left: 50%;
+  width: 250px;
+  height: 30px;
+  margin-left: -125px;
+  margin-top: -15px;
+  padding: 14px 0 2px 0;
+  border: 1px solid #ddd;
+  text-align: center;
+  color: #999;
+  font-size: 14px;
+  background-color: white;
+}
+
+
+/*
+ * Sorting
+ */
+.sorting { background: url('../images/sort_both.png') no-repeat center right; }
+.sorting_asc { background: url('../images/sort_asc.png') no-repeat center right; }
+.sorting_desc { background: url('../images/sort_desc.png') no-repeat center right; }
+
+.sorting_asc_disabled { background: url('../images/sort_asc_disabled.png') no-repeat center right; }
+.sorting_desc_disabled { background: url('../images/sort_desc_disabled.png') no-repeat center right; }
+
+table.dataTable thead th:active,
+table.dataTable thead td:active {
+  outline: none;
+}
+
+
+/*
+ * Scrolling
+ */
+.dataTables_scroll {
+  clear: both;
+}
+
+.dataTables_scrollBody {
+  *margin-top: -1px;
+  -webkit-overflow-scrolling: touch;
+}

Added: jena/branches/jena-fuseki-new-ui/pages/css/qonsole.css
URL: http://svn.apache.org/viewvc/jena/branches/jena-fuseki-new-ui/pages/css/qonsole.css?rev=1539711&view=auto
==============================================================================
--- jena/branches/jena-fuseki-new-ui/pages/css/qonsole.css (added)
+++ jena/branches/jena-fuseki-new-ui/pages/css/qonsole.css Thu Nov  7 16:59:54 2013
@@ -0,0 +1,176 @@
+/* Copyright (c) 2012-2013 Epimorphics Ltd. Released under Apache License 2.0 http://www.apache.org/licenses/ */
+
+body {
+  padding-top: 60px;
+}
+
+.qonsole h2, .query-chrome label {
+  font-size: 10px;
+  color: #666666;
+  margin: 0;
+  text-transform: uppercase;
+  display: inline-block;
+  font-weight: normal;
+}
+
+.qonsole .well {
+  padding: 5px;
+}
+
+.qonsole h2+ul {
+  display: inline-block;
+}
+
+.navbar h1.brand, .navbar h2.brand {
+  line-height: 12px;
+}
+
+.navbar h1.brand {
+  font-weight: bold;
+  font-size: 16pt;
+  display: inline-block;
+}
+
+h2.brand {
+  display: inline-block;
+  font-size: 14pt;
+}
+
+.query-chrome {
+  margin-top: 1em;
+}
+
+.timeTaken {
+  font-style: italic;
+  text-transform: none;
+  color: #666;
+  margin-bottom: 5px;
+}
+
+pre.results-plain {
+  overflow: auto;
+  word-wrap: normal;
+  white-space: pre;
+}
+
+.well ul {
+  margin-bottom: 0;
+}
+
+.well ul li {
+  margin-bottom: 2px;
+  margin-top: 2px;
+}
+
+a.run-query {
+  margin-left: 10px;
+}
+
+footer {
+  font-size: smaller;
+  color: #99999f;
+  border: 1px solid #ddd;
+  border-radius: 5px;
+  padding: 5px;
+}
+
+footer p {
+  margin: 0;
+}
+
+/* Custom buttons */
+
+.btn-custom1, .btn-custom2.active {
+  background-color: hsl(201, 91%, 39%) !important;
+  background-repeat: repeat-x;
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#087ebd", endColorstr="#087ebd");
+  background-image: -khtml-gradient(linear, left top, left bottom, from(#087ebd), to(#087ebd));
+  background-image: -moz-linear-gradient(top, #087ebd, #087ebd);
+  background-image: -ms-linear-gradient(top, #087ebd, #087ebd);
+  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #087ebd), color-stop(100%, #087ebd));
+  background-image: -webkit-linear-gradient(top, #087ebd, #087ebd);
+  background-image: -o-linear-gradient(top, #087ebd, #087ebd);
+  background-image: linear-gradient(#087ebd, #087ebd);
+  border-color: #087ebd #087ebd hsl(201, 91%, 39%);
+  color: #fff !important;
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.00);
+  -webkit-font-smoothing: antialiased;
+}
+
+.btn-custom1:hover, .btn-custom2.active:hover {
+  background-color: hsl(201, 91%, 43%) !important;
+  background-repeat: repeat-x;
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#098bd1", endColorstr="#098bd1");
+  background-image: -khtml-gradient(linear, left top, left bottom, from(#098bd1), to(#098bd1));
+  background-image: -moz-linear-gradient(top, #098bd1, #098bd1);
+  background-image: -ms-linear-gradient(top, #098bd1, #098bd1);
+  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #098bd1), color-stop(100%, #098bd1));
+  background-image: -webkit-linear-gradient(top, #098bd1, #098bd1);
+  background-image: -o-linear-gradient(top, #098bd1, #098bd1);
+  background-image: linear-gradient(#098bd1, #098bd1);
+  border-color: #098bd1 #098bd1 hsl(201, 91%, 43%);
+  color: #fff !important;
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.00);
+  -webkit-font-smoothing: antialiased;
+}
+
+
+.btn-custom2 {
+  background-color: hsl(193, 32%, 75%) !important;
+  background-repeat: repeat-x;
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#aacad3", endColorstr="#aacad3");
+  background-image: -khtml-gradient(linear, left top, left bottom, from(#aacad3), to(#aacad3));
+  background-image: -moz-linear-gradient(top, #aacad3, #aacad3);
+  background-image: -ms-linear-gradient(top, #aacad3, #aacad3);
+  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #aacad3), color-stop(100%, #aacad3));
+  background-image: -webkit-linear-gradient(top, #aacad3, #aacad3);
+  background-image: -o-linear-gradient(top, #aacad3, #aacad3);
+  background-image: linear-gradient(#aacad3, #aacad3);
+  border-color: #aacad3 #aacad3 hsl(193, 32%, 75%);
+  color: #333 !important;
+  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.00);
+  -webkit-font-smoothing: antialiased;
+}
+
+.btn-custom2:hover {
+  background-color: hsl(193, 31%, 70%) !important;
+  background-repeat: repeat-x;
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#9abfca", endColorstr="#9abfca");
+  background-image: -khtml-gradient(linear, left top, left bottom, from(#9abfca), to(#9abfca));
+  background-image: -moz-linear-gradient(top, #9abfca, #9abfca);
+  background-image: -ms-linear-gradient(top, #9abfca, #9abfca);
+  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #9abfca), color-stop(100%, #9abfca));
+  background-image: -webkit-linear-gradient(top, #9abfca, #9abfca);
+  background-image: -o-linear-gradient(top, #9abfca, #9abfca);
+  background-image: linear-gradient(#9abfca, #9abfca);
+  border-color: #9abfca #9abfca hsl(193, 31%, 70%);
+  color: #333 !important;
+  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.00);
+  -webkit-font-smoothing: antialiased;
+}
+
+.auto-overflow {
+  overflow: auto;
+}
+
+.CodeMirror-foldmarker {
+  color: blue;
+  text-shadow: #b9f 1px 1px 2px, #b9f -1px -1px 2px, #b9f 1px -1px 2px, #b9f -1px 1px 2px;
+  font-family: arial;
+  line-height: .3;
+  cursor: pointer;
+}
+.CodeMirror-foldgutter {
+  width: .7em;
+}
+.CodeMirror-foldgutter-open,
+.CodeMirror-foldgutter-folded {
+  color: #555;
+  cursor: pointer;
+}
+.CodeMirror-foldgutter-open:after {
+  content: "\25BE";
+}
+.CodeMirror-foldgutter-folded:after {
+  content: "\25B8";
+}

Modified: jena/branches/jena-fuseki-new-ui/pages/documentation.html
URL: http://svn.apache.org/viewvc/jena/branches/jena-fuseki-new-ui/pages/documentation.html?rev=1539711&r1=1539710&r2=1539711&view=diff
==============================================================================
--- jena/branches/jena-fuseki-new-ui/pages/documentation.html (original)
+++ jena/branches/jena-fuseki-new-ui/pages/documentation.html Thu Nov  7 16:59:54 2013
@@ -34,7 +34,7 @@
               <li class="active"><a href="documentation.html">Documentation</a></li>
             </ul>
             <ul class="nav navbar-nav navbar-right">
-              <li><img src="assets/jena-logo-notext-small.png" alt="Apache Jena logo" title="Apache Jena" /></li>
+              <li><img src="images/jena-logo-notext-small.png" alt="Apache Jena logo" title="Apache Jena" /></li>
             </ul>
           </div><!-- /.navbar-collapse -->
         </div><!-- /row -->

Added: jena/branches/jena-fuseki-new-ui/pages/images/Sorting icons.psd
URL: http://svn.apache.org/viewvc/jena/branches/jena-fuseki-new-ui/pages/images/Sorting%20icons.psd?rev=1539711&view=auto
==============================================================================
Binary file - no diff available.

Propchange: jena/branches/jena-fuseki-new-ui/pages/images/Sorting icons.psd
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: jena/branches/jena-fuseki-new-ui/pages/images/back_disabled.png
URL: http://svn.apache.org/viewvc/jena/branches/jena-fuseki-new-ui/pages/images/back_disabled.png?rev=1539711&view=auto
==============================================================================
Binary file - no diff available.

Propchange: jena/branches/jena-fuseki-new-ui/pages/images/back_disabled.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: jena/branches/jena-fuseki-new-ui/pages/images/back_enabled.png
URL: http://svn.apache.org/viewvc/jena/branches/jena-fuseki-new-ui/pages/images/back_enabled.png?rev=1539711&view=auto
==============================================================================
Binary file - no diff available.

Propchange: jena/branches/jena-fuseki-new-ui/pages/images/back_enabled.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: jena/branches/jena-fuseki-new-ui/pages/images/back_enabled_hover.png
URL: http://svn.apache.org/viewvc/jena/branches/jena-fuseki-new-ui/pages/images/back_enabled_hover.png?rev=1539711&view=auto
==============================================================================
Binary file - no diff available.

Propchange: jena/branches/jena-fuseki-new-ui/pages/images/back_enabled_hover.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: jena/branches/jena-fuseki-new-ui/pages/images/forward_disabled.png
URL: http://svn.apache.org/viewvc/jena/branches/jena-fuseki-new-ui/pages/images/forward_disabled.png?rev=1539711&view=auto
==============================================================================
Binary file - no diff available.

Propchange: jena/branches/jena-fuseki-new-ui/pages/images/forward_disabled.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: jena/branches/jena-fuseki-new-ui/pages/images/forward_enabled.png
URL: http://svn.apache.org/viewvc/jena/branches/jena-fuseki-new-ui/pages/images/forward_enabled.png?rev=1539711&view=auto
==============================================================================
Binary file - no diff available.

Propchange: jena/branches/jena-fuseki-new-ui/pages/images/forward_enabled.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: jena/branches/jena-fuseki-new-ui/pages/images/forward_enabled_hover.png
URL: http://svn.apache.org/viewvc/jena/branches/jena-fuseki-new-ui/pages/images/forward_enabled_hover.png?rev=1539711&view=auto
==============================================================================
Binary file - no diff available.

Propchange: jena/branches/jena-fuseki-new-ui/pages/images/forward_enabled_hover.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: jena/branches/jena-fuseki-new-ui/pages/images/sort_asc.png
URL: http://svn.apache.org/viewvc/jena/branches/jena-fuseki-new-ui/pages/images/sort_asc.png?rev=1539711&view=auto
==============================================================================
Binary file - no diff available.

Propchange: jena/branches/jena-fuseki-new-ui/pages/images/sort_asc.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: jena/branches/jena-fuseki-new-ui/pages/images/sort_asc_disabled.png
URL: http://svn.apache.org/viewvc/jena/branches/jena-fuseki-new-ui/pages/images/sort_asc_disabled.png?rev=1539711&view=auto
==============================================================================
Binary file - no diff available.

Propchange: jena/branches/jena-fuseki-new-ui/pages/images/sort_asc_disabled.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: jena/branches/jena-fuseki-new-ui/pages/images/sort_both.png
URL: http://svn.apache.org/viewvc/jena/branches/jena-fuseki-new-ui/pages/images/sort_both.png?rev=1539711&view=auto
==============================================================================
Binary file - no diff available.

Propchange: jena/branches/jena-fuseki-new-ui/pages/images/sort_both.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: jena/branches/jena-fuseki-new-ui/pages/images/sort_desc.png
URL: http://svn.apache.org/viewvc/jena/branches/jena-fuseki-new-ui/pages/images/sort_desc.png?rev=1539711&view=auto
==============================================================================
Binary file - no diff available.

Propchange: jena/branches/jena-fuseki-new-ui/pages/images/sort_desc.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: jena/branches/jena-fuseki-new-ui/pages/images/sort_desc_disabled.png
URL: http://svn.apache.org/viewvc/jena/branches/jena-fuseki-new-ui/pages/images/sort_desc_disabled.png?rev=1539711&view=auto
==============================================================================
Binary file - no diff available.

Propchange: jena/branches/jena-fuseki-new-ui/pages/images/sort_desc_disabled.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: jena/branches/jena-fuseki-new-ui/pages/images/wait30.gif
URL: http://svn.apache.org/viewvc/jena/branches/jena-fuseki-new-ui/pages/images/wait30.gif?rev=1539711&view=auto
==============================================================================
Binary file - no diff available.

Propchange: jena/branches/jena-fuseki-new-ui/pages/images/wait30.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: jena/branches/jena-fuseki-new-ui/pages/index.html
URL: http://svn.apache.org/viewvc/jena/branches/jena-fuseki-new-ui/pages/index.html?rev=1539711&r1=1539710&r2=1539711&view=diff
==============================================================================
--- jena/branches/jena-fuseki-new-ui/pages/index.html (original)
+++ jena/branches/jena-fuseki-new-ui/pages/index.html Thu Nov  7 16:59:54 2013
@@ -5,12 +5,11 @@
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
     <link href="css/bootstrap.min.css" rel="stylesheet" media="screen">
     <link href="css/font-awesome.min.css" rel="stylesheet" media="screen">
+    <link href="css/codemirror.css" rel="stylesheet" media="screen">
+    <link href="css/qonsole.css" rel="stylesheet" media="screen">
+    <link href="css/jquery.dataTables.css" rel="stylesheet" media="screen">
 
     <script data-main="js/app/main.index.js" src="js/lib/require.min.js"></script>
-    <!--
-    <script src="js/lib/jquery-1.10.2.min.js"></script>
-    <script src="js/lib/bootstrap.min.js"></script>
-     -->
 
     <!--[if lt IE 9]>
       <script src="js/lib/html5shiv.js"></script>
@@ -36,11 +35,17 @@
           <div class="collapse navbar-collapse navbar-ex1-collapse">
             <ul class="nav navbar-nav">
               <li class="active"><a href="index.html">Home</a></li>
+              <li><a href="admin/index.html">Administration</a></li>
               <li><a href="validation.html">Validation</a></li>
               <li><a href="documentation.html">Documentation</a></li>
             </ul>
             <ul class="nav navbar-nav navbar-right">
-              <li><img src="assets/jena-logo-notext-small.png" alt="Apache Jena logo" title="Apache Jena" /></li>
+              <li>
+                <a class="" href="admin/server-log.html" id="server-status-light" title="current server status">
+                  <span class="server-up"></span>
+                </a>
+              </li>
+              <li><img src="images/jena-logo-notext-small.png" alt="Apache Jena logo" title="Apache Jena" /></li>
             </ul>
           </div><!-- /.navbar-collapse -->
         </div><!-- /row -->
@@ -49,13 +54,137 @@
 
     <div class="container">
       <div class="row">
-        <h1>Fuseki status</h1>
-        <p>To view or update the configuration of this Fuseki instance, please visit the <a href="admin/">admin page</a></p>
+        <h1>Welcome to Fuseki</h1>
+        <p>This is Apache Jena Fuseki (version TODO) <span class='host-details'></span>. To run
+           a SPARQL query against this RDF store, select a dataset and enter your query below. To
+           add new data, or perform other administrative tasks, see the <a href="">admin pages</a>.</p>
+
+        <div class="qonsole">
+          <div class="col-md-12 well">
+            <h2 class="">Example queries</h2>
+            <ul class="list-inline examples">
+            </ul>
+          </div>
+
+          <div class="col-md-12 well vertical">
+            <h2 class="">Prefixes</h2>
+            <ul class="list-inline prefixes">
+              <li class="keep">
+                <a data-toggle="modal" href="#prefixEditor" class="button" title="Add a SPARQL prefix">
+                  <i class="fa fa-plus-circle"></i>
+                </a>
+              </li>
+            </ul>
+          </div>
+
+          <div class="col-md-12 well">
+            <div class="query-edit">
+              <div id="query-edit-cm" class=""></div>
+            </div>
+            <div class="query-chrome">
+              <form class="form-inline" role="form">
+                <div class="form-group">
+                  <label for="sparqlEndpoint"></label>
+                  <div class="dropdown ">
+                    <a data-toggle="dropdown" class="btn btn-custom2" href="#">
+                      Select endpoint <i class="icon-collapse"></i>
+                    </a>
+                    <ul class="dropdown-menu endpoints" role="menu" aria-labelledby="dropdownMenu1">
+                    </ul>
+                  </div>
+                </div>
+                <div class="form-group">
+                  <label for="sparqlEndpoint">SPARQL endpoint</label>
+                  <input type="text" class="form-control" id="sparqlEndpoint" />
+                </div>
+                <div class="form-group">
+                  <label for="displayFormat">Results</label>
+                  <div class="dropdown ">
+                    <a data-toggle="dropdown" class="btn btn-custom2 display-format" href="#" data-value="tsv">
+                      <span>table</span> <i class="icon-collapse"></i>
+                    </a>
+                    <ul class="dropdown-menu formats  " role="menu" aria-labelledby="dropdownMenu2">
+                      <li role='presentation' class="" ><a data-value="tsv" role='menuitem' tabindex='-1' href='#'>table</a></li>
+                      <li role='presentation' class="" ><a data-value="text"role='menuitem' tabindex='-1' href='#'>plain text</a></li>
+                      <li role='presentation' class="" ><a data-value="json"role='menuitem' tabindex='-1' href='#'>JSON</a></li>
+                      <li role='presentation' class="" ><a data-value="xml"role='menuitem' tabindex='-1' href='#'>XML</a></li>
+                    </ul>
+                  </div>
+
+                </div>
+                <div class="form-group">
+                  <label>&nbsp;</label>
+                  <a href="#" class="btn btn-success run-query form-control">perform query</a>
+                </div>
+
+              </form>
+            </div>
+          </div>
+
+          <!-- results -->
+          <div id="results-block" class="row sparql sparql-results">
+            <div class="col-md-12">
+              <div class="well">
+                <div class="row">
+                  <div class="col-md-12">
+                    <span class="loadingSpinner hidden">
+                      <img src="images/wait30.gif" alt="waiting for server action to complete" />
+                    </span>
+                    <span class="timeTaken hidden"></span>
+                  </div>
+                </div>
+                <div class="row">
+                  <div class="col-md-12" id="results">
+                    <h2 class="col-md-12">Query results</h2>
+                  </div>
+                </div>
+              </div>
+            </div>
+          </div>
+
+          <div class="row clearfix"></div>
 
-        <div id="datasetSelectionList"></div>
+          <footer>
+          </footer>
+        </div><!-- /.qonsole-->
+
+        <!-- modal dialogue -->
+        <div class="modal fade" id="prefixEditor" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
+          <div class="modal-dialog">
+            <div class="modal-content">
+              <div class="modal-header">
+                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
+                <h4 class="modal-title">Add a SPARQL prefix</h4>
+              </div>
+              <div class="modal-body">
+                <form class="form-horizontal" role="form">
+                  <div class="form-group">
+                    <label for="inputPrefix" class="col-lg-2 control-label">Prefix</label>
+                    <div class="col-lg-10">
+                      <input type="text" class="form-control" id="inputPrefix" placeholder="Prefix" autofocus>
+                    </div>
+                  </div>
+                  <div class="form-group">
+                    <div class="col-lg-offset-2 col-lg-10">
+                      <button class="btn btn-sm btn-primary" id="lookupPrefix">Lookup <span></span> on prefix.cc</button>
+                    </div>
+                  </div>
+                  <div class="form-group">
+                    <label for="inputURI" class="col-lg-2 control-label">URI</label>
+                    <div class="col-lg-10">
+                      <input type="text" class="form-control" id="inputURI" placeholder="URI">
+                    </div>
+                  </div>
+                </form>
+              </div>
+              <div class="modal-footer">
+                <button type="button" class="btn btn-default" data-dismiss="modal">cancel</button>
+                <button type="button" class="btn btn-primary" data-dismiss="modal" id="addPrefix">add prefix</button>
+              </div>
+            </div><!-- /.modal-content -->
+          </div><!-- /.modal-dialog -->
+        </div><!-- /.modal -->
 
-        <h2>Query</h2>
-        <p>Qonsole will go here..</p>
       </div>
     </div>
 

Added: jena/branches/jena-fuseki-new-ui/pages/js/app/controllers/index-controller.js
URL: http://svn.apache.org/viewvc/jena/branches/jena-fuseki-new-ui/pages/js/app/controllers/index-controller.js?rev=1539711&view=auto
==============================================================================
--- jena/branches/jena-fuseki-new-ui/pages/js/app/controllers/index-controller.js (added)
+++ jena/branches/jena-fuseki-new-ui/pages/js/app/controllers/index-controller.js Thu Nov  7 16:59:54 2013
@@ -0,0 +1,46 @@
+/** Controller for the main index.html page */
+define(
+  function( require ) {
+    var Marionette = require( "marionette" ),
+        Backbone = require( "backbone" ),
+        _ = require( "underscore" ),
+        fui = require( "fui" ),
+        qonsole = require( "lib/qonsole" );
+
+    var IndexController = function() {
+      this.initEvents();
+    };
+
+    // add the behaviours defined on the controller
+    _.extend( IndexController.prototype, {
+      initEvents: function() {
+        _.bindAll( this, "onServerModelReady" );
+        fui.vent.on( "models.fuseki-server.ready", this.onServerModelReady );
+      },
+
+      /** When the fuseki server is ready, we can init the qonsole */
+      onServerModelReady: function( event ) {
+        // when ready, initialise the qonsole component
+        var datasets = fui.models.fusekiServer.datasets();
+        var endpoints = {};
+        _.each( datasets, function( ds ) {
+          var queryURL = ds.queryURL();
+          if (queryURL) {
+            endpoints[ds.name()] = queryURL;
+
+            if (!endpoints["default"]) {
+              endpoints["default"] = queryURL;
+            }
+          }
+        } );
+
+        var qonfig = require( "qonsole-config" );
+        qonfig.endpoints = endpoints;
+        qonsole.init( qonfig );
+      }
+
+    } );
+
+    return IndexController;
+  }
+);

Modified: jena/branches/jena-fuseki-new-ui/pages/js/app/main.index.js
URL: http://svn.apache.org/viewvc/jena/branches/jena-fuseki-new-ui/pages/js/app/main.index.js?rev=1539711&r1=1539710&r2=1539711&view=diff
==============================================================================
--- jena/branches/jena-fuseki-new-ui/pages/js/app/main.index.js (original)
+++ jena/branches/jena-fuseki-new-ui/pages/js/app/main.index.js Thu Nov  7 16:59:54 2013
@@ -2,12 +2,13 @@
 define( ['require', '../common-config'],
   function( require ) {
     require(
-      ['underscore', 'jquery', 'backbone', 'marionette', 'fui',
-       'sprintf',
+      ['underscore', 'jquery', 'backbone', 'marionette', 'fui', 'controllers/index-controller',
+       'sprintf', 'bootstrap',
        'models/fuseki-server', 'models/dataset',
-       'views/dataset-selection-list'
+       'views/dataset-selection-list',
+       'lib/jquery.xdomainrequest', 'lib/qonsole'
       ],
-      function( _, $, Backbone, Marionette, fui ) {
+      function( _, $, Backbone, Marionette, fui, IndexController ) {
 
         // TODO: these variables need to be set dynamically based on the current server config
         var options = {
@@ -16,6 +17,7 @@ define( ['require', '../common-config'],
         };
 
         // initialise the backbone application
+        fui.controllers.indexController = new IndexController();
         fui.start( options );
       });
   }

Modified: jena/branches/jena-fuseki-new-ui/pages/js/app/models/dataset.js
URL: http://svn.apache.org/viewvc/jena/branches/jena-fuseki-new-ui/pages/js/app/models/dataset.js?rev=1539711&r1=1539710&r2=1539711&view=diff
==============================================================================
--- jena/branches/jena-fuseki-new-ui/pages/js/app/models/dataset.js (original)
+++ jena/branches/jena-fuseki-new-ui/pages/js/app/models/dataset.js Thu Nov  7 16:59:54 2013
@@ -16,9 +16,17 @@ define(
      * server. Individual datasets have their own model.
      */
     var Dataset = Backbone.Model.extend( {
-      initialize: function( datasetDescription, baseURL ) {
+      initialize: function( datasetDescription, baseURL, mgmtURL ) {
         this.set( datasetDescription );
-        this.set( {baseURL: baseURL} );
+        this.set( {baseURL: baseURL, mgmtURL: mgmtURL} );
+      },
+
+      baseURL: function() {
+        return this.get( "baseURL" );
+      },
+
+      mgmtURL: function() {
+        return this.get( "mgmtURL" );
       },
 
       name: function() {
@@ -29,6 +37,25 @@ define(
         return this.get( "ds.services" );
       },
 
+      /** Return the first service that has the given type */
+      serviceOfType: function( serviceType ) {
+        return _.find( this.services(), function( s ) {
+          return s["srv.type"] === serviceType;
+        } );
+      },
+
+      /** Return the first endpoint of the first service that has the given type */
+      endpointOfType: function( serviceType ) {
+        var service = this.serviceOfType( serviceType );
+        return service && _.first( service["srv.endpoints"] );
+      },
+
+      /** Return the sparql query URL for this dataset, if it has one, or null */
+      queryURL: function() {
+        var qurl = this.endpointOfType( "query" );
+        return qurl ? sprintf( "%s%s/%s", this.baseURL(), this.name(), qurl ) : null;
+      },
+
       /**
        * Get the given relative path from the server, and return a promise object which will
        * complete with the JSON object denoted by the path.

Modified: jena/branches/jena-fuseki-new-ui/pages/js/app/models/fuseki-server.js
URL: http://svn.apache.org/viewvc/jena/branches/jena-fuseki-new-ui/pages/js/app/models/fuseki-server.js?rev=1539711&r1=1539710&r2=1539711&view=diff
==============================================================================
--- jena/branches/jena-fuseki-new-ui/pages/js/app/models/fuseki-server.js (original)
+++ jena/branches/jena-fuseki-new-ui/pages/js/app/models/fuseki-server.js Thu Nov  7 16:59:54 2013
@@ -20,34 +20,49 @@ define(
     var FusekiServer = Backbone.Model.extend( {
       /** This initializer occurs when the module starts, not when the constructor is invoked */
       init: function( options ) {
+        this._baseURL = sprintf( "http://%s:%s", window.location.hostname, window.location.port );
         if (options.managementPort) {
-          this._managementURL = sprintf( "http://%s:%s%s%%s", window.location.hostname,
-                                         options.managementPort, window.location.pathname );
+          this._managementURL = sprintf( "http://%s:%s%s", window.location.hostname,
+              options.managementPort, window.location.pathname );
         }
         else {
           this._managementURL = null;
         }
       },
 
-      /** Return the URL pattern for issuing commands to the management API, or null if no API defined */
+      baseURL: function() {
+        return this._baseURL;
+      },
+
+      /** Return the URL for issuing commands to the management API, or null if no API defined */
       managementURL: function() {
         return this._managementURL;
       },
 
+      /** Return the list of datasets that this server knows about. Each dataset will be a Dataset model object */
+      datasets: function() {
+        return this.get( "datasets" );
+      },
+
       /** Load and cache the remote server description. Trigger change event when done */
       loadServerDescription: function() {
         var self = this;
         return this.getJSON( "datasets" ).then( function() {
                                                   self.saveServerDescription( this );
-                                                } );
+                                                } )
+                                         .then( function() {
+                                                  fui.vent.trigger( "models.fuseki-server.ready" );
+                                                });
       },
 
       /** Store the server description in this model */
       saveServerDescription: function( serverDesc ) {
         // wrap each dataset JSON description as a dataset model
-        var baseURL = sprintf( this.managementURL(), "datasets" );
+        var mgmtURL = sprintf( "%s/%s", this.managementURL(), "datasets" );
+        var bURL = this.baseURL();
+
         var datasets = _.map( serverDesc.datasets, function( d ) {
-          return new Dataset( d, baseURL );
+          return new Dataset( d, bURL, mgmtURL );
         } );
 
         this.set( {server: serverDesc.server, datasets: datasets} );

Added: jena/branches/jena-fuseki-new-ui/pages/js/app/qonsole-config.js
URL: http://svn.apache.org/viewvc/jena/branches/jena-fuseki-new-ui/pages/js/app/qonsole-config.js?rev=1539711&view=auto
==============================================================================
--- jena/branches/jena-fuseki-new-ui/pages/js/app/qonsole-config.js (added)
+++ jena/branches/jena-fuseki-new-ui/pages/js/app/qonsole-config.js Thu Nov  7 16:59:54 2013
@@ -0,0 +1,26 @@
+/** Standalone configuration for qonsole on index page */
+
+define( [], function() {
+  return {
+    prefixes: {
+      "rdf":      "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
+      "rdfs":     "http://www.w3.org/2000/01/rdf-schema#",
+      "owl":      "http://www.w3.org/2002/07/owl#",
+      "xsd":      "http://www.w3.org/2001/XMLSchema#"
+    },
+    queries: [
+      { "name": "Selection of triples",
+        "query": "select ?subject ?predicate ?object\nwhere {\n" +
+                 "  ?subject ?predicate ?object\n}\n" +
+                 "limit 25"
+      },
+      { "name": "Selection of classes",
+        "query": "select distinct ?class ?label ?description\nwhere {\n" +
+                 "  ?class a owl:Class.\n" +
+                 "  optional { ?class rdfs:label ?label}\n" +
+                 "  optional { ?class rdfs:comment ?description}\n}\n" +
+                 "limit 25"
+      }
+    ]
+  };
+} );
\ No newline at end of file

Modified: jena/branches/jena-fuseki-new-ui/pages/js/common-config.js
URL: http://svn.apache.org/viewvc/jena/branches/jena-fuseki-new-ui/pages/js/common-config.js?rev=1539711&r1=1539710&r2=1539711&view=diff
==============================================================================
--- jena/branches/jena-fuseki-new-ui/pages/js/common-config.js (original)
+++ jena/branches/jena-fuseki-new-ui/pages/js/common-config.js Thu Nov  7 16:59:54 2013
@@ -2,8 +2,11 @@ require.config({
   baseUrl: 'js/app',
   paths: {
     'plugins':              '../lib/plugins',
+    'lib':                  '../lib',
+    'codemirror':           '../lib/codemirror',
     // lib paths
     'backbone':             '../lib/backbone',
+    'bootstrap':            '../lib/bootstrap.min',
     'jquery':               '../lib/jquery-1.10.2.min',
     'marionette':           '../lib/backbone.marionette',
     'sprintf':              '../lib/sprintf-0.7-beta1',
@@ -17,13 +20,37 @@ require.config({
       deps: ['underscore', 'jquery'],
       exports: 'Backbone'
     },
+    'bootstrap': {
+      deps: ['jquery']
+    },
+    'lib/jquery.xdomainrequest': {
+      deps: ['jquery']
+    },
+    'lib/jquery.dataTables.min': {
+      deps: ['jquery']
+    },
+    'lib/qonsole': {
+      deps: ['codemirror/brace-fold', 'codemirror/comment-fold', 'codemirror/foldgutter', 'codemirror/xml-fold',
+             'codemirror/javascript', 'codemirror/sparql', 'codemirror/xml', 'lib/jquery.dataTables.min' ],
+      exports: 'qonsole'
+    },
     'sprintf': {
       exports: 'sprintf'
     },
     'marionette': {
       deps: ['backbone'],
       exports: 'Marionette'
-    }
-
+    },
+    'codemirror/codemirror': {
+      exports: 'CodeMirror'
+    },
+    'codemirror/foldcode': {deps: ['codemirror/codemirror']},
+    'codemirror/brace-fold': {deps: ['codemirror/foldcode']},
+    'codemirror/comment-fold': {deps: ['codemirror/foldcode']},
+    'codemirror/foldgutter': {deps: ['codemirror/foldcode']},
+    'codemirror/xml-fold': {deps: ['codemirror/foldcode']},
+    'codemirror/javascript': {deps: ['codemirror/codemirror']},
+    'codemirror/sparql': {deps: ['codemirror/codemirror']},
+    'codemirror/xml': {deps: ['codemirror/codemirror']},
   }
 });

Added: jena/branches/jena-fuseki-new-ui/pages/js/lib/codemirror/brace-fold.js
URL: http://svn.apache.org/viewvc/jena/branches/jena-fuseki-new-ui/pages/js/lib/codemirror/brace-fold.js?rev=1539711&view=auto
==============================================================================
--- jena/branches/jena-fuseki-new-ui/pages/js/lib/codemirror/brace-fold.js (added)
+++ jena/branches/jena-fuseki-new-ui/pages/js/lib/codemirror/brace-fold.js Thu Nov  7 16:59:54 2013
@@ -0,0 +1,93 @@
+CodeMirror.registerHelper("fold", "brace", function(cm, start) {
+  var line = start.line, lineText = cm.getLine(line);
+  var startCh, tokenType;
+
+  function findOpening(openCh) {
+    for (var at = start.ch, pass = 0;;) {
+      var found = at <= 0 ? -1 : lineText.lastIndexOf(openCh, at - 1);
+      if (found == -1) {
+        if (pass == 1) break;
+        pass = 1;
+        at = lineText.length;
+        continue;
+      }
+      if (pass == 1 && found < start.ch) break;
+      tokenType = cm.getTokenTypeAt(CodeMirror.Pos(line, found + 1));
+      if (!/^(comment|string)/.test(tokenType)) return found + 1;
+      at = found - 1;
+    }
+  }
+
+  var startToken = "{", endToken = "}", startCh = findOpening("{");
+  if (startCh == null) {
+    startToken = "[", endToken = "]";
+    startCh = findOpening("[");
+  }
+
+  if (startCh == null) return;
+  var count = 1, lastLine = cm.lastLine(), end, endCh;
+  outer: for (var i = line; i <= lastLine; ++i) {
+    var text = cm.getLine(i), pos = i == line ? startCh : 0;
+    for (;;) {
+      var nextOpen = text.indexOf(startToken, pos), nextClose = text.indexOf(endToken, pos);
+      if (nextOpen < 0) nextOpen = text.length;
+      if (nextClose < 0) nextClose = text.length;
+      pos = Math.min(nextOpen, nextClose);
+      if (pos == text.length) break;
+      if (cm.getTokenTypeAt(CodeMirror.Pos(i, pos + 1)) == tokenType) {
+        if (pos == nextOpen) ++count;
+        else if (!--count) { end = i; endCh = pos; break outer; }
+      }
+      ++pos;
+    }
+  }
+  if (end == null || line == end && endCh == startCh) return;
+  return {from: CodeMirror.Pos(line, startCh),
+          to: CodeMirror.Pos(end, endCh)};
+});
+CodeMirror.braceRangeFinder = CodeMirror.fold.brace; // deprecated
+
+CodeMirror.registerHelper("fold", "import", function(cm, start) {
+  function hasImport(line) {
+    if (line < cm.firstLine() || line > cm.lastLine()) return null;
+    var start = cm.getTokenAt(CodeMirror.Pos(line, 1));
+    if (!/\S/.test(start.string)) start = cm.getTokenAt(CodeMirror.Pos(line, start.end + 1));
+    if (start.type != "keyword" || start.string != "import") return null;
+    // Now find closing semicolon, return its position
+    for (var i = line, e = Math.min(cm.lastLine(), line + 10); i <= e; ++i) {
+      var text = cm.getLine(i), semi = text.indexOf(";");
+      if (semi != -1) return {startCh: start.end, end: CodeMirror.Pos(i, semi)};
+    }
+  }
+
+  var start = start.line, has = hasImport(start), prev;
+  if (!has || hasImport(start - 1) || ((prev = hasImport(start - 2)) && prev.end.line == start - 1))
+    return null;
+  for (var end = has.end;;) {
+    var next = hasImport(end.line + 1);
+    if (next == null) break;
+    end = next.end;
+  }
+  return {from: cm.clipPos(CodeMirror.Pos(start, has.startCh + 1)), to: end};
+});
+CodeMirror.importRangeFinder = CodeMirror.fold["import"]; // deprecated
+
+CodeMirror.registerHelper("fold", "include", function(cm, start) {
+  function hasInclude(line) {
+    if (line < cm.firstLine() || line > cm.lastLine()) return null;
+    var start = cm.getTokenAt(CodeMirror.Pos(line, 1));
+    if (!/\S/.test(start.string)) start = cm.getTokenAt(CodeMirror.Pos(line, start.end + 1));
+    if (start.type == "meta" && start.string.slice(0, 8) == "#include") return start.start + 8;
+  }
+
+  var start = start.line, has = hasInclude(start);
+  if (has == null || hasInclude(start - 1) != null) return null;
+  for (var end = start;;) {
+    var next = hasInclude(end + 1);
+    if (next == null) break;
+    ++end;
+  }
+  return {from: CodeMirror.Pos(start, has + 1),
+          to: cm.clipPos(CodeMirror.Pos(end))};
+});
+CodeMirror.includeRangeFinder = CodeMirror.fold.include; // deprecated