fix: 🐛 minor UI changes, ent flag for worker filter (#2517)
This commit is contained in:
1 parent
857bf01596
commit
0ff91f9182
6 files changed
+97
-44
No files matched your search
@@ -7,6 +7,7 @@ import ApplicationSerializer from './application';
|
||||
import {
|
||||
TYPE_HOST_CATALOG_PLUGIN_AWS,
|
||||
TYPE_HOST_CATALOG_PLUGIN_AZURE,
|
||||
TYPE_CREDENTIAL_DYNAMIC,
|
||||
} from '../models/host-catalog';
|
||||
|
||||
// These fields are Azure specific
|
||||
@@ -41,7 +42,7 @@ const AWSfieldsWithCredentialType = {
|
||||
|
||||
export default class HostCatalogSerializer extends ApplicationSerializer {
|
||||
serialize(snapshot) {
|
||||
const { compositeType } = snapshot.record;
|
||||
const { compositeType, credentialType } = snapshot.record;
|
||||
const serialized = super.serialize(...arguments);
|
||||
|
||||
// This is a hack to remove the worker_filter field from the serialized data if the compositeType is not AWS
|
||||
@@ -50,6 +51,11 @@ export default class HostCatalogSerializer extends ApplicationSerializer {
|
||||
delete serialized.worker_filter;
|
||||
}
|
||||
|
||||
// By default, disable credential rotation for dynamic credentials
|
||||
if (credentialType === TYPE_CREDENTIAL_DYNAMIC) {
|
||||
serialized.attributes.disable_credential_rotation = true;
|
||||
}
|
||||
|
||||
switch (compositeType) {
|
||||
case 'static':
|
||||
return this.serializeStatic(...arguments);
|
||||
|
||||
@@ -212,6 +212,8 @@ host-catalog:
|
||||
help:
|
||||
static: Provide a list of hosts and host sets with static addresses
|
||||
plugin: Automate discovery of target hosts and services on Azure or AWS
|
||||
role_arn: The ARN (Amazon Resource Name) used by this instance.
|
||||
disable_credential_rotation: Credential rotation is automatically disabled when you use dynamic credentials.
|
||||
types:
|
||||
static: Static
|
||||
unknown: Plugin
|
||||
@@ -228,7 +230,7 @@ host-catalog:
|
||||
dynamic-credential:
|
||||
edit: Dynamic Credentials
|
||||
label: Use Assume Role (Dynamic Credentials)
|
||||
help: Specify an Assume Role used to generate credentials to use with this AWS Host Catalog.
|
||||
help: Specify a role used to generate credentials to use with this AWS Host Catalog.
|
||||
form:
|
||||
aws_region:
|
||||
label: AWS Region
|
||||
@@ -479,7 +481,7 @@ storage-bucket:
|
||||
help: The base path where session recordings will be stored.
|
||||
role_arn:
|
||||
label: Role ARN
|
||||
help: The ARN (Assume Role Name) used by this instance that the worker runs on.
|
||||
help: The ARN (Amazon Resource Name) used by this instance that the worker runs on.
|
||||
role_external_id:
|
||||
label: Role external ID
|
||||
help: Used to provide access to this account if you have this configured.
|
||||
|
||||
Reference in new issue
Block a user