This ember application provides endpoints to visualize linked data exposed by the Contact Hub Backend.
You will need the following things properly installed on your computer.
- Git
- Node.js (with npm)
- Ember CLI
- Google Chrome
git clone <repository-url>
this repositorycd frontend-organization-portal
npm install
npm run start
- Visit your app at http://localhost:4200.
- Visit your tests at http://localhost:4200/tests.
Make use of the many generators for code, try ember help generate
for more details
npm run test
npm run test:ember -- --server
npm run lint
npm run lint:fix
npm exec ember build
(development)npm run build
(production)
Specify what it takes to deploy your app.
Build the image: docker build -t lblod/frontend-organization-portal -f Dockerfile.fastboot .
Feature flags are used to enable/disable features in the application. They are defined in config/environment.js.
// in config/environment.js
let ENV = {
// Other configuration settings...
features: {
"new-feature": true, // Enable the 'new-feature' by default
"beta-feature": false, // Disable the 'beta-feature' by default
},
};
The configuration can be manually overridden by adding a query parameter to the URL:
?feature-new-feature=false
to disable the 'new-feature'?feature-beta-feature=true
to enable the 'beta-feature'
The overriding will be saved in a cookie, so it will persist across page reloads. The cookie can be cleared by adding ?clear-feature-overrides=true
to the URL.
The feature flags can be used in the application by injecting the features
service and calling the isEnabled
method.
import { inject as service } from "@ember/service";
export default class ExampleComponent extends Component {
@service features;
doSomething() {
if (this.features.isEnabled("new-feature")) {
// Implement the logic for the new feature
console.log("New feature is enabled!");
} else {
// Implement the logic for the default behavior without the new feature
console.log("New feature is disabled!");
}
}
}
Or in template files by using the is-feature-enabled
helper:
| Name | Description | | edit-contact-data | Enable the edition of contact site |
We use release-it
to handle our release flow.
We use lerna-changelog
to generate a basic changelog based on the merged PRs. Make sure all relevant PRs have a label, otherwise they will not be included in the changelog.
lerna-changelog
requires a Github personal access token to work properly.
The following command can be used to generate the changelog:
GITHUB_AUTH=your-access-token npx lerna-changelog
Simply run GITHUB_AUTH=your-access-token npm run release
and follow the prompts.
If you generated the changelog using lerna-changelog you can add it to the changelog file and add it to the staged changes when release-it asks if you want to commit the changes. This will ensure that the changelog change is part of the release commit.
After the new tag is created and pushed CI will take care of building the docker image.