vault/ui/app/models/aws/lease-config.js
Angel Garbarino a81b482158
Prep for configuration.edit refactor (#27948)
* move files around

* move fetches to config to the configuration.index route

* working... for aws, lots of clean up left

* move error handling to parent route

* standarize configModel param

* add test coverage

* welp a miss for non configurable engines

* pr comments

* remove mirage interrupts and test actual api

* update configuration details test to test for template only things

* api error coverage
2024-08-05 13:39:10 -06:00

27 lines
612 B
JavaScript

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: BUSL-1.1
*/
import Model, { attr } from '@ember-data/model';
import { expandAttributeMeta } from 'vault/utils/field-to-attrs';
export default class AwsLeaseConfig extends Model {
@attr('string') backend; // dynamic path of secret -- set on response from value passed to queryRecord
@attr({
label: 'Max Lease TTL',
editType: 'ttl',
})
leaseMax;
@attr({
label: 'Default Lease TTL',
editType: 'ttl',
})
lease;
get attrs() {
const keys = ['lease', 'leaseMax'];
return expandAttributeMeta(this, keys);
}
}