This is an example app built using Discover's extensibility APIs to display user coding in graphs.
It demonstrates:
- App setup and construction
- UI Extension SDK initialization
- Connect API querying
- Constructing custom tools in Discover's UI
- Responding to user actions from Discover, and
- Manipulating Discover's Browse selection state
- Sync this repo locally.
- Run
yarn
on the command line to install dependencies. - Run
yarn dev
to build the code, start a file change watcher, and launch the dev server. - Navigate to
http://localhost:12345/
in a browser to verify that the app loads.
NOTE: You can change the port via the GRAPHED_RESULTS_PORT
environment variable.
- Log in to Discover.
- On the
Portal Management -> Settings -> Portal Options
page, make sure that the Discover Connect API URL is set. Test that the API service is running by checkinghttp://yourDiscoverURL/yourDiscoverPortal/health/test
. - Navigate to
Portal Home -> UI Extensions
. - Add a new extension with the following values:
- Name:
Graphed Results
- Location: Choose the location in Discover for the extension to appear:
Workspace pane
: Graphs data for the current search resultsCase home page
: Graphs data for the current case
- URL:
http://localhost:12345/
- Name:
- Click on the new extension in the list.
- On the
Organizations
andCases
pages, grant access to the extension so that the extension will be available in a case. - Open a case with access to the extension.
- Navigate to the
Security -> Features
page and grant access to the UI extension for your security group. Then, refresh your browser to make sure that the change takes effect. - Depending on the location of the extension:
- If you added the extension as a
Workspace pane
:- Navigate to the
Documents
page. - Edit a workspace and add the
Graphed Results
pane to see it load up. - Run a search to see the graphs populate.
- Navigate to the
- If you added the extension as a
Case home page
:- Navigate to the Case Home page.
- Click the extension tab in the navigation pane.
- If you added the extension as a
- Run
yarn release
to build the minified production app. - Copy the assets from the
dist/
folder to your web server.- You should see
index.html
,app.js
, and six.png
files with hashed file names in this folder.
- You should see
- In Discover, on the
Portal Management -> UI Extensions
page, click the extension. Then, update the extensionURL
to reference the new web server location.
Copyright 2021 Nuix
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.