open-nomad/ui/config/environment.js
Michael Lange 1eb689aca9 Merge remote-tracking branch 'origin/master' into f-ui/alloc-fs
* origin/master: (32 commits)
  Added additional test cases and fixed go test case
  update changelog
  Add Mirage-toggling via environment variable (#5899)
  changelog: Add entries for windows fixes
  fifo: Safer access to Conn
  run post-run/post-stop task runner hooks
  Fail alloc if alloc runner prestart hooks fail
  address review comments
  changelog
  Missed one revert of backwards compatibility for node drain
  Improve test cases for detecting content type
  Undo removal of node drain compat changes
  Updated with suggestions.
  fifo: Close connections and cleanup lock handling
  logmon: Add windows compatibility test
  client: defensive against getting stale alloc updates
  Infer content type in alloc fs stat endpoint
  appveyor: Run logmon tests
  fifo: Require that fifos do not exist for create
  vendor: Use dani fork of go-winio
  ...
2019-07-02 16:40:09 -07:00

74 lines
1.7 KiB
JavaScript

/* eslint-env node */
let USE_MIRAGE = true;
if (process.env.USE_MIRAGE) {
USE_MIRAGE = process.env.USE_MIRAGE == 'true';
}
module.exports = function(environment) {
var ENV = {
modulePrefix: 'nomad-ui',
environment: environment,
rootURL: '/ui/',
locationType: 'auto',
EmberENV: {
FEATURES: {
// Here you can enable experimental features on an ember canary build
// e.g. 'with-controller': true
'ember-routing-router-service': true,
},
EXTEND_PROTOTYPES: {
// Prevent Ember Data from overriding Date.parse.
Date: false,
},
},
APP: {
blockingQueries: true,
mirageScenario: 'allocationFileExplorer', // FIXME for stable preview links only
mirageWithNamespaces: true,
mirageWithTokens: true,
mirageWithRegions: true,
},
};
if (environment === 'development') {
// ENV.APP.LOG_RESOLVER = true;
// ENV.APP.LOG_ACTIVE_GENERATION = true;
// ENV.APP.LOG_TRANSITIONS = true;
// ENV.APP.LOG_TRANSITIONS_INTERNAL = true;
// ENV.APP.LOG_VIEW_LOOKUPS = true;
ENV['ember-cli-mirage'] = {
enabled: USE_MIRAGE,
excludeFilesFromBuild: !USE_MIRAGE,
};
}
if (environment === 'test') {
// Testem prefers this...
ENV.locationType = 'none';
// keep test console output quieter
ENV.APP.LOG_ACTIVE_GENERATION = false;
ENV.APP.LOG_VIEW_LOOKUPS = false;
ENV.APP.rootElement = '#ember-testing';
ENV.APP.autoboot = false;
ENV.browserify = {
tests: true,
};
ENV['ember-cli-mirage'] = {
trackRequests: true,
};
}
// if (environment === 'production') {
// }
return ENV;
};