Skip to content

Commit 7e2d475

Browse files
Default initial port fix, installation docs edit
1 parent 2bddb50 commit 7e2d475

File tree

5 files changed

+20
-12
lines changed

5 files changed

+20
-12
lines changed

README.md

+12-4
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,20 @@ Preview
1515
Installation
1616
------------
1717

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

2223
To delete the application, simply delete the `EntityBrowser` package, the web application will be
23-
deleted automatically as well as it gets created during installation.
24+
deleted automatically if it wasn't modified since installation as well as it gets created during the
25+
installation.
26+
27+
Currently, to use iKnowEntityBrowser in different namespaces, you need to import the project to each
28+
iKnow-enabled namespace, and manually set up web application (for example, you can clone
29+
`/EntityBrowser` application and name it `/EntityBrowserUser`). Change the settings inside
30+
application as well in this case. Currently we are working under possibility to change the namespace
31+
from the UI interface.
2432

2533
Usage
2634
-----

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "iknow-entity-browser",
3-
"version": "1.1.2",
3+
"version": "1.1.3",
44
"description": "Visualizer for iKnow entities",
55
"main": "gulpfile.babel.js",
66
"scripts": {

src/static/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ <h1>General Settings</h1>
158158
<b>Data source:</b>
159159
<input type="text" value="http://localhost" id="settings.host" autosize
160160
placeholder="http://host.name"/>:<input id="settings.port" autosize
161-
type="number" placeholder="port" value="57772"/>/<input id="settings.webAppName"
161+
type="number" placeholder="port" value=""/>/<input id="settings.webAppName"
162162
autosize type="text" placeholder="app name" value="EntityBrowser"/>/api/domain/
163163
<input id="settings.domain" autosize type="text" placeholder="domain" value="1"
164164
/>/<span id="querySetting"><select id="settings.queryType" title="Query Type">

src/static/js/settings/values.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const unsaveableSettings = new Set([]);
2525
const settings = {
2626
compact: false,
2727
host: "",
28-
port: 57772,
28+
port: +location.port || 57772,
2929
webAppName: "EntityBrowser",
3030
domain: "1",
3131
queryType: "related",

src/static/js/source/index.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ import { httpGet } from "../utils";
22
import { getOption } from "../settings/values";
33

44
export function getData (callback) {
5-
let https = (getOption("host") || "").indexOf("https://") === 0;
5+
let https = (getOption("host") || location.href).indexOf("https:") === 0,
6+
port = getOption("port") || +location.port || 57772;
67
httpGet(`${ getOption("host") || `http://${ location.hostname }` }${
7-
getOption("port") === (https ? 443 : 80) ? "" : ":" + getOption("port")
8-
}/${ getOption("webAppName") }/api/domain/${ encodeURIComponent(getOption("domain")) }/${
9-
encodeURIComponent(getOption("queryType"))
10-
}/${
8+
port === (https ? 443 : 80) ? "" : ":" + port
9+
}/${ getOption("webAppName") || "EntityBrowser" }/api/domain/${
10+
encodeURIComponent(getOption("domain")) }/${ encodeURIComponent(getOption("queryType")) }/${
1111
encodeURIComponent(getOption("seed"))
1212
}`, callback);
1313
}

0 commit comments

Comments
 (0)