-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ui: Upgrade ember-cli-api-double. Adds new staging env (#6136)
ember-cli-api-double has been upgraded for 3 things: 1. Use the correct configuration flags 2. Automatically include the necessary files to enable the api doubles without requiring a server. This can be disabled to provide custom functionality (so we can stitch our BDD style testing in with this) 3. When used statically, read the cookies from the users browser to enable basic ad-hoc double editing (e.g. CONSUL_SERVICE_COUNT=100000) Once upgraded we've now moved the config to the correct place, added a new environment (staging) to use the static-style of doubles The test environment continues to use custom cookie setting and url checking so we disable this 'auto importing' by setting 'auto-import' to false for the configuration for the addon. We also added a couple of new package script targets to explicitly serve or build the UI with the entirely static UI.
- Loading branch information
Showing
5 changed files
with
75 additions
and
176 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,48 @@ | ||
export default function(type, count, obj) { | ||
var key = ''; | ||
obj['CONSUL_ACLS_ENABLE'] = 1; | ||
switch (type) { | ||
case 'dc': | ||
key = 'CONSUL_DATACENTER_COUNT'; | ||
break; | ||
case 'service': | ||
key = 'CONSUL_SERVICE_COUNT'; | ||
break; | ||
case 'node': | ||
case 'instance': | ||
key = 'CONSUL_NODE_COUNT'; | ||
break; | ||
case 'kv': | ||
key = 'CONSUL_KV_COUNT'; | ||
break; | ||
case 'acl': | ||
key = 'CONSUL_ACL_COUNT'; | ||
obj['CONSUL_ACLS_ENABLE'] = 1; | ||
break; | ||
case 'session': | ||
key = 'CONSUL_SESSION_COUNT'; | ||
break; | ||
case 'intention': | ||
key = 'CONSUL_INTENTION_COUNT'; | ||
break; | ||
case 'policy': | ||
key = 'CONSUL_POLICY_COUNT'; | ||
obj['CONSUL_ACLS_ENABLE'] = 1; | ||
break; | ||
case 'role': | ||
key = 'CONSUL_ROLE_COUNT'; | ||
obj['CONSUL_ACLS_ENABLE'] = 1; | ||
break; | ||
case 'token': | ||
key = 'CONSUL_TOKEN_COUNT'; | ||
obj['CONSUL_ACLS_ENABLE'] = 1; | ||
break; | ||
} | ||
if (key) { | ||
obj[key] = count; | ||
export default function(type, value) { | ||
const obj = {}; | ||
if (type !== '*') { | ||
let key = ''; | ||
obj['CONSUL_ACLS_ENABLE'] = 1; | ||
switch (type) { | ||
case 'dc': | ||
key = 'CONSUL_DATACENTER_COUNT'; | ||
break; | ||
case 'service': | ||
key = 'CONSUL_SERVICE_COUNT'; | ||
break; | ||
case 'node': | ||
case 'instance': | ||
key = 'CONSUL_NODE_COUNT'; | ||
break; | ||
case 'kv': | ||
key = 'CONSUL_KV_COUNT'; | ||
break; | ||
case 'acl': | ||
key = 'CONSUL_ACL_COUNT'; | ||
obj['CONSUL_ACLS_ENABLE'] = 1; | ||
break; | ||
case 'session': | ||
key = 'CONSUL_SESSION_COUNT'; | ||
break; | ||
case 'intention': | ||
key = 'CONSUL_INTENTION_COUNT'; | ||
break; | ||
case 'policy': | ||
key = 'CONSUL_POLICY_COUNT'; | ||
obj['CONSUL_ACLS_ENABLE'] = 1; | ||
break; | ||
case 'role': | ||
key = 'CONSUL_ROLE_COUNT'; | ||
obj['CONSUL_ACLS_ENABLE'] = 1; | ||
break; | ||
case 'token': | ||
key = 'CONSUL_TOKEN_COUNT'; | ||
obj['CONSUL_ACLS_ENABLE'] = 1; | ||
break; | ||
} | ||
if (key) { | ||
obj[key] = value; | ||
} | ||
} | ||
return obj; | ||
} |
Oops, something went wrong.