Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lblod/frontend-organization-portal
Frontend for the OrganisatiePortaal application
https://github.com/lblod/frontend-organization-portal
Last synced: 22 days ago
JSON representation
Frontend for the OrganisatiePortaal application
- Host: GitHub
- URL: https://github.com/lblod/frontend-organization-portal
- Owner: lblod
- License: mit
- Created: 2021-03-17T08:47:13.000Z (almost 4 years ago)
- Default Branch: development
- Last Pushed: 2024-04-15T16:51:20.000Z (9 months ago)
- Last Synced: 2024-04-16T06:37:03.343Z (9 months ago)
- Language: JavaScript
- Homepage:
- Size: 6.99 MB
- Stars: 3
- Watchers: 10
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# frontend-organization-portal
This ember application provides endpoints to visualize linked data exposed by the Contact Hub Backend.
## Prerequisites
You will need the following things properly installed on your computer.
- [Git](https://git-scm.com/)
- [Node.js](https://nodejs.org/) (with npm)
- [Ember CLI](https://cli.emberjs.com/release/)
- [Google Chrome](https://google.com/chrome/)## Installation
- `git clone ` this repository
- `cd frontend-organization-portal`
- `npm install`## Running / Development
- `npm run start`
- Visit your app at [http://localhost:4200](http://localhost:4200).
- Visit your tests at [http://localhost:4200/tests](http://localhost:4200/tests).### Code Generators
Make use of the many generators for code, try `ember help generate` for more details
### Running Tests
- `npm run test`
- `npm run test:ember -- --server`### Linting
- `npm run lint`
- `npm run lint:fix`### Building
- `npm exec ember build` (development)
- `npm run build` (production)### Deploying
Specify what it takes to deploy your app.
## Further Reading / Useful Links
* [ember.js](https://emberjs.com/)
* [ember-cli](https://cli.emberjs.com/release/)
* Development Browser Extensions
* [ember inspector for chrome](https://chrome.google.com/webstore/detail/ember-inspector/bmdblncegkenkacieihfhpjfppoconhi)
* [ember inspector for firefox](https://addons.mozilla.org/en-US/firefox/addon/ember-inspector/)## Docker
Build the image: docker build -t lblod/frontend-organization-portal -f Dockerfile.fastboot .
## Reference
### Feature flags
Feature flags are used to enable/disable features in the application. They are defined in [config/environment.js](config/environment.js).
```javascript
// 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.
```javascript
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:
```handlebars
{{#if (is-feature-enabled "new-feature")}}
New feature is enabled!
{{else}}
New feature is disabled!
{{/if}}
```### List of feature flags
| Name | Description |
| edit-contact-data | Enable the edition of contact site |