This document provides information about how to use this sample integration.
This sample shows how to import components from symphony-integration-commons npm repository. Basically, these components allows you to execute several automated operations such as:
- create, edit and/or remove an instance
- choose between create a chat one on one or a chat rooms
- generate a webhook url automatically
- shows a table of created instances
There are also many other features available throught components. These components are built up with React framework altogether Redux architecture pattern. At any moment you can clone the symphony-integration-commons repo and create your own components for our own needs.
You'll build an integration sample where you can create instances that notifies you whenever a webhook is triggered.
In order to run the configurator sample you'll need Node 6.10.x and npm installed.
- Clone or download the App-Integrations-FE-Commons repository
- In the posting-location-sample folder root run
npm install
- After installing the dependencies run
npm run watch
The samples folder is set up with multiple development samples built up with webpack and eslint. Every time you change a file and save it, eslint checks your code sintaxe and webpack bundles it automatically. This sample is buit up with React and some imported components from this repo.
For The components used in the posting-location-sample are:
- TableInstance - shows a list of configured instances, as well as two action buttons (remove and edit).
- WebHookURL - shows a configured webhook url where you can copy and configure your integration.
- InputDescription - shows an input text where you can name, or edit your instance's name.
- PostingLocation - This is a complex component where you can choose between two types of webhook instances. You can set a Instant Message instance, or choose one or more rooms (you should be owner), to be notified by the webhook.
- SubmitInstance - This is an automated buttons tool that allows you to create, edit or remove configured instances.
This sample is deliverid with a bundle.json file. This file allows you to run the app directly from your symphony pod. In order to run the app with the bundle.json file you should follow these steps:
- Add the alias
127.0.0.1 localhost
to your/etc/hosts
file. - Change directory to the
samples/posting-location-sample
folder - Install packages with
npm install
- Run the app with
npm run watch
command - Visit
https://localhost:4000/bundle.json
in your browser and accept the certificate. - Visit your symphony pod, and, in the address bar, paste the following at the end of the url:
?bundle=https://localhost:4000/bundle.json
. - Reload the page and you'll see an modal window asking you to allow the appliction to run. Check the I have verified the app configurations checkbox.
- Find your application in the Symphony market on your pod, click Add, and then, Configure.