open-consul/ui-v2/app/helpers/env.js
John Cowen 1b512badd7
ui: Improve configuration/env/feature flag usage (also add build time year detection) (#7072)
* Add new getEnvironment util/function

* Use new-ish `env` function in all the places

* Clean up ember env file, add year detection from commit date
2020-01-21 17:52:40 +00:00

7 lines
207 B
JavaScript

import { helper } from '@ember/component/helper';
import { env } from 'consul-ui/env';
export default helper(function([name, def = ''], hash) {
const val = env(name);
return val != null ? val : def;
});