👷 Work in progress... First release in plan for June 2018 but feel free to help 👷
Everyone is welcome to contribute to Suricate. You have several possibilities:
- Report a bug
- Suggest a feature
- Developp a feature and create a pull request
- Download and install maven
- Run the following commands
### Under "suricate" folder
## Switch to backend project
$ cd backend
## Create the binary
$ mvn package
## Run project
# Default environment
$ java -jar ./target/monitoring.jar
# Dev environment
$ java -jar -Dspring.profiles.active=dev ./target/monitoring.jar
- Download and install NodeJs (this soft allow you to use NPM packages)
- Run the following commands
### Under "suricate" folder
## Switch to frontend project
$ cd frontend
## import dependencies
$ npm install
## Run the project
$ npm start
The application is accessible on http://localhost:4200/
If you have no access create a new account on the application.
With the default Spring profile the backend
- use an H2 in memory database
- load all widgets from GitHub
- Use Database user access
In development you can override some configurations :
- Database
- Authentication provider
- Widget folder path
Follow the style you see used in the primary repository!
Consistency with the rest of the project always trumps other considerations. It doesn’t matter if you have your own style or if the rest of the code breaks with the greater community - just follow along.
Don't forget to include licence header in all files
/*
* Copyright 2012-2018 the original author or authors.
*
* 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.
*/
-
In the Settings/Preferences dialog (Ctrl+Alt+S), click Copyright under Editor, and then click Copyright Profiles. The Copyright Profiles page opens.
-
Click on the Add Button :
- Choose a name : Apache 2
- Under Copyright text copy/paste the licence text above
- Then click on Apply
-
Then click Copyright and select the Apache 2 copright as Default and click on Apply.
-
Verify that you have (under Copyright > Formatting) for Java, JavaScript and TypeScript Use default settings select.
With the default properties an H2-Console is available :
- URL : http://localhost:8080/h2-console
- Database access : jdbc:h2:mem:dev;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
- Database Username : sa
- Database Password :
You can override database properties by uncommenting and filling the following lines (file : resources/application-dev.yml)
# datasource:
# url:
# driverClassName:
# username:
# password:
Two types of authentication providers has been implemented : LDAP and DATABASE
By default authentication is set to DATABASE
You can override these properties by changing database to ldap in the following lines (file : resources/application-dev.yml) and by uncommenting and filling the ldap properties
### Security (ldap | database) ###
provider: database
### LDAP Authentication ###
# ldap:
# url:
# userSearchFilter:
# firstNameAttributName:
# lastNameAttributName:
# mailAttributName:
In development it could be easier to have the Widget repository in local follow the steps if you want to manage it locally :
- Clone the repo from GitHub : Widget Repository
- Open the file in backend project located at : resources/application-dev.yml
- Add the Widget Repository path to the following line : widgets.local.folderPath:
#### Example :
widgets.local.folderPath: C:\\my\\widget\\folder\\path
When launching the backend with -Dspring.profiles.active=#env# argument
- If widgets.local.folderPath in resources/application-#env#.yml is not blank, the repository used is the local one
- Else we get the repository from GitHub