open-nomad/ui/app/services/config.js
2023-04-10 15:36:59 +00:00

20 lines
494 B
JavaScript

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import { equal } from '@ember/object/computed';
import Service from '@ember/service';
import { get } from '@ember/object';
import config from '../config/environment';
export default class ConfigService extends Service {
unknownProperty(path) {
return get(config, path);
}
@equal('environment', 'development') isDev;
@equal('environment', 'production') isProd;
@equal('environment', 'test') isTest;
}