Skip to content

Commit

Permalink
Default initial port fix, installation docs edit
Browse files Browse the repository at this point in the history
  • Loading branch information
nikitaeverywhere committed Apr 17, 2017
1 parent 2bddb50 commit 7e2d475
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 12 deletions.
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,20 @@ Preview
Installation
------------

Download the latest release and import XML file to Caché (iKnow-enabled namespace). Then, open your
browser at `http://localhost:57772/EntityBrowser/` web page (change the host/port respectively to
your server's addresses and always add the trailing slash `/` at the end of the URL).
Download the latest release XML and import it into iKnow-enabled namespace (for example, SAMPLES).
Then, open your browser at `http://127.0.0.1:57772/EntityBrowser/` web page (change the host/port
respectively to your server's addresses and always append the trailing slash `/` at the end of the
URL).

To delete the application, simply delete the `EntityBrowser` package, the web application will be
deleted automatically as well as it gets created during installation.
deleted automatically if it wasn't modified since installation as well as it gets created during the
installation.

Currently, to use iKnowEntityBrowser in different namespaces, you need to import the project to each
iKnow-enabled namespace, and manually set up web application (for example, you can clone
`/EntityBrowser` application and name it `/EntityBrowserUser`). Change the settings inside
application as well in this case. Currently we are working under possibility to change the namespace
from the UI interface.

Usage
-----
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "iknow-entity-browser",
"version": "1.1.2",
"version": "1.1.3",
"description": "Visualizer for iKnow entities",
"main": "gulpfile.babel.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ <h1>General Settings</h1>
<b>Data source:</b>
<input type="text" value="http://localhost" id="settings.host" autosize
placeholder="http://host.name"/>:<input id="settings.port" autosize
type="number" placeholder="port" value="57772"/>/<input id="settings.webAppName"
type="number" placeholder="port" value=""/>/<input id="settings.webAppName"
autosize type="text" placeholder="app name" value="EntityBrowser"/>/api/domain/
<input id="settings.domain" autosize type="text" placeholder="domain" value="1"
/>/<span id="querySetting"><select id="settings.queryType" title="Query Type">
Expand Down
2 changes: 1 addition & 1 deletion src/static/js/settings/values.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const unsaveableSettings = new Set([]);
const settings = {
compact: false,
host: "",
port: 57772,
port: +location.port || 57772,
webAppName: "EntityBrowser",
domain: "1",
queryType: "related",
Expand Down
10 changes: 5 additions & 5 deletions src/static/js/source/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import { httpGet } from "../utils";
import { getOption } from "../settings/values";

export function getData (callback) {
let https = (getOption("host") || "").indexOf("https://") === 0;
let https = (getOption("host") || location.href).indexOf("https:") === 0,
port = getOption("port") || +location.port || 57772;
httpGet(`${ getOption("host") || `http://${ location.hostname }` }${
getOption("port") === (https ? 443 : 80) ? "" : ":" + getOption("port")
}/${ getOption("webAppName") }/api/domain/${ encodeURIComponent(getOption("domain")) }/${
encodeURIComponent(getOption("queryType"))
}/${
port === (https ? 443 : 80) ? "" : ":" + port
}/${ getOption("webAppName") || "EntityBrowser" }/api/domain/${
encodeURIComponent(getOption("domain")) }/${ encodeURIComponent(getOption("queryType")) }/${
encodeURIComponent(getOption("seed"))
}`, callback);
}

0 comments on commit 7e2d475

Please sign in to comment.