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);
|
||||
|
||||
Reference in new issue
Block a user