You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2015/10/18 18:44:53 UTC
[1/2] jena git commit: JENA-868: Don't include admin section anymore.
Repository: jena
Updated Branches:
refs/heads/master a0c15cb53 -> cbb1d4ee8
JENA-868: Don't include admin section anymore.
Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/16d79fd5
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/16d79fd5
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/16d79fd5
Branch: refs/heads/master
Commit: 16d79fd5c6f57fedb8bb48cc8b37a2d5773efa9a
Parents: a0c15cb
Author: Andy Seaborne <an...@apache.org>
Authored: Sun Oct 18 17:39:57 2015 +0100
Committer: Andy Seaborne <an...@apache.org>
Committed: Sun Oct 18 17:40:51 2015 +0100
----------------------------------------------------------------------
.../org/apache/jena/fuseki/mgt/ActionServerStatus.java | 10 +++++-----
.../src/test/java/org/apache/jena/fuseki/TestAdmin.java | 2 +-
2 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/jena/blob/16d79fd5/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionServerStatus.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionServerStatus.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionServerStatus.java
index d8f5b1e..9deffab 100644
--- a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionServerStatus.java
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionServerStatus.java
@@ -90,11 +90,11 @@ public class ActionServerStatus extends ActionCtl
// .startObject()
// .key(JsonConst.port).value(port)
// .finishObject() ;
- builder
- .key(JsonConst.admin)
- .startObject()
- .key(JsonConst.port).value(requestPort)
- .finishObject() ;
+// builder
+// .key(JsonConst.admin)
+// .startObject()
+// .key(JsonConst.port).value(requestPort)
+// .finishObject() ;
builder
.key(JsonConst.version).value(versionStr)
http://git-wip-us.apache.org/repos/asf/jena/blob/16d79fd5/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/TestAdmin.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/TestAdmin.java b/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/TestAdmin.java
index e233120..17bc77f 100644
--- a/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/TestAdmin.java
+++ b/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/TestAdmin.java
@@ -88,7 +88,7 @@ public class TestAdmin extends BaseTest {
@Test public void server_1() {
JsonValue jv = httpGetJson(ServerTest.urlRoot+"$/"+opServer) ;
JsonObject obj = jv.getAsObject() ;
- assertTrue(obj.hasKey(JsonConst.admin)) ;
+ // Now optional : assertTrue(obj.hasKey(JsonConst.admin)) ;
assertTrue(obj.hasKey(JsonConst.datasets)) ;
assertTrue(obj.hasKey(JsonConst.uptime)) ;
assertTrue(obj.hasKey(JsonConst.startDT)) ;
[2/2] jena git commit: JENA-1050: Correctly handle port numbers.
Posted by an...@apache.org.
JENA-1050: Correctly handle port numbers.
Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/cbb1d4ee
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/cbb1d4ee
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/cbb1d4ee
Branch: refs/heads/master
Commit: cbb1d4ee8a244adbb96b3fef207f025f846d84ec
Parents: 16d79fd
Author: Andy Seaborne <an...@apache.org>
Authored: Sun Oct 18 17:44:38 2015 +0100
Committer: Andy Seaborne <an...@apache.org>
Committed: Sun Oct 18 17:44:38 2015 +0100
----------------------------------------------------------------------
.../main/webapp/js/app/models/fuseki-server.js | 52 +++++++++++++-------
1 file changed, 33 insertions(+), 19 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/jena/blob/cbb1d4ee/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/models/fuseki-server.js
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/models/fuseki-server.js b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/models/fuseki-server.js
index f61a7a1..9c09574 100644
--- a/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/models/fuseki-server.js
+++ b/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/models/fuseki-server.js
@@ -87,10 +87,14 @@ define(
var mgmtURL = bURL;
if (serverDesc.admin) {
- mgmtURL = bURL.replace( ":" + window.location.port, ":" + serverDesc.admin.port );
- this._managementURL = mgmtURL;
+ // This is too simple. window.location.port may be empty and matches protocol.
+ //mgmtURL = bURL.replace( ":" + window.location.port, ":" + serverDesc.admin.port );
+ //console.log("managementURL -- s/"+window.location.port+"/"+serverDesc.admin.port+"/") ;
+ var path = window.location.pathname.replace( /\/[^/]*$/, "" ) ;
+ mgmtURL = sprintf( "%s//%s:%s%s", window.location.protocol, window.location.hostname, serverDesc.admin, path );
}
-
+ this._managementURL = mgmtURL ;
+
var datasets = _.map( serverDesc.datasets, function( d ) {
return new Dataset( d, bURL, mgmtURL + DATASETS_MANAGEMENT_PATH );
} );
@@ -137,22 +141,32 @@ define(
/** Extract the server root path from the current window href */
currentRootPath: function() {
var path = window.location.pathname.replace( /\/[^/]*$/, "" );
- /*
- console.log("window.location="+window.location) ;
- console.log("window.location.href="+window.location.href) ;
- console.log("window.location.protocol="+window.location.protocol) ;
- console.log("window.location.host="+window.location.host) ;
- console.log("window.location.hostname="+window.location.hostname) ;
- console.log("window.location.port="+window.location.port) ;
- console.log("window.location.pathname="+window.location.pathname) ;
- console.log("window.location.origin="+window.location.origin) ;
- console.log("window.location.hash="+window.location.hash) ;
- console.log("window.location.search="+window.location.search) ;
- console.log("path='"+path+"'") ;
- */
- var path2=sprintf( "%s//%s:%s%s", window.location.protocol, window.location.hostname, window.location.port, path );
- return path2 ;
- // See JENA-868 : port remapping.
+
+ /*
+ console.log("window.location="+window.location) ;
+ console.log("window.location.href="+window.location.href) ;
+ console.log("window.location.protocol="+window.location.protocol) ;
+ console.log("window.location.host="+window.location.host) ;
+ console.log("window.location.hostname="+window.location.hostname) ;
+ console.log("window.location.port="+window.location.port) ;
+ console.log("window.location.pathname="+window.location.pathname) ;
+ console.log("window.location.origin="+window.location.origin) ;
+ console.log("window.location.hash="+window.location.hash) ;
+ console.log("window.location.search="+window.location.search) ;
+ console.log("path='"+path+"'") ;
+ */
+
+ var path2 ;
+ var port = window.location.port ;
+ //console.log("port='"+port+"'") ;
+ if ( !port || 0 === port.length ) {
+ // No explicit port.
+ path2 = sprintf( "%s//%s%s", window.location.protocol, window.location.hostname, path ) ;
+ } else {
+ path2 = sprintf( "%s//%s:%s%s", window.location.protocol, window.location.hostname, window.location.port, path );
+ }
+ //console.log("path2='"+path2+"'") ;
+ return path2 ;
}
} );