2018-09-25 16:28:26 +00:00
|
|
|
/* eslint-env node */
|
|
|
|
'use strict';
|
2018-04-03 14:16:57 +00:00
|
|
|
|
2021-12-17 03:44:29 +00:00
|
|
|
module.exports = function (environment) {
|
2022-11-09 23:15:31 +00:00
|
|
|
const ENV = {
|
2018-04-03 14:16:57 +00:00
|
|
|
modulePrefix: 'vault',
|
2022-10-18 15:46:02 +00:00
|
|
|
environment,
|
2018-04-03 14:16:57 +00:00
|
|
|
rootURL: '/ui/',
|
2019-10-14 18:23:29 +00:00
|
|
|
serviceWorkerScope: '/v1/sys/storage/raft/snapshot',
|
2022-10-18 15:46:02 +00:00
|
|
|
locationType: 'history',
|
2018-04-03 14:16:57 +00:00
|
|
|
EmberENV: {
|
|
|
|
FEATURES: {
|
|
|
|
// Here you can enable experimental features on an ember canary build
|
|
|
|
// e.g. 'with-controller': true
|
|
|
|
},
|
|
|
|
EXTEND_PROTOTYPES: {
|
2022-03-17 00:36:48 +00:00
|
|
|
Date: false, // Prevent Ember Data from overriding Date.parse.
|
|
|
|
String: false, // Prevent user from using an Ember string method on string. ex: "foo".capitalize();
|
2018-04-03 14:16:57 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
APP: {
|
2018-08-16 17:48:24 +00:00
|
|
|
// endpoints that the UI polls
|
|
|
|
POLLING_URLS: ['sys/health', 'sys/replication/status', 'sys/seal-status'],
|
|
|
|
// endpoints that UI uses to determine the cluster state
|
|
|
|
// calls to these endpoints will always go to the root namespace
|
2019-07-02 22:41:23 +00:00
|
|
|
// these also need to be updated in the open-api-explorer engine
|
2020-10-05 21:34:52 +00:00
|
|
|
NAMESPACE_ROOT_URLS: [
|
|
|
|
'sys/health',
|
|
|
|
'sys/seal-status',
|
|
|
|
'sys/license/features',
|
|
|
|
'sys/internal/counters/config',
|
|
|
|
],
|
2018-11-28 23:14:42 +00:00
|
|
|
// number of records to show on a single page by default - this is used by the client-side pagination
|
|
|
|
DEFAULT_PAGE_SIZE: 100,
|
2018-04-03 14:16:57 +00:00
|
|
|
},
|
|
|
|
flashMessageDefaults: {
|
|
|
|
timeout: 7000,
|
|
|
|
sticky: false,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
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;
|
2022-01-11 22:28:37 +00:00
|
|
|
if (process.env.MIRAGE_DEV_HANDLER !== undefined) {
|
|
|
|
ENV['ember-cli-mirage'] = {
|
|
|
|
enabled: true,
|
|
|
|
handler: process.env.MIRAGE_DEV_HANDLER,
|
|
|
|
};
|
|
|
|
}
|
2018-04-03 14:16:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
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';
|
2018-09-25 16:28:26 +00:00
|
|
|
ENV.APP.autoboot = false;
|
|
|
|
ENV.flashMessageDefaults.timeout = 50;
|
2021-01-07 20:18:36 +00:00
|
|
|
ENV['ember-cli-mirage'] = {
|
|
|
|
enabled: false,
|
|
|
|
};
|
2018-04-03 14:16:57 +00:00
|
|
|
}
|
2018-04-05 21:36:33 +00:00
|
|
|
if (environment !== 'production') {
|
2019-01-18 22:04:40 +00:00
|
|
|
ENV.APP.DEFAULT_PAGE_SIZE = 15;
|
2018-04-05 21:36:33 +00:00
|
|
|
}
|
2018-04-03 14:16:57 +00:00
|
|
|
|
2018-07-20 21:48:25 +00:00
|
|
|
ENV.welcomeMessage = process.env.UI_AUTH_WELCOME;
|
2018-04-03 14:16:57 +00:00
|
|
|
|
|
|
|
return ENV;
|
|
|
|
};
|