Files
threshold-ui/ui/admin/app/components/form/credential-library/index.js
T

22 lines
615 B
JavaScript
Raw Normal View History

2021-07-18 14:31:45 -04:00
import Component from '@glimmer/component';
import { options } from 'api/models/credential-library';
import { computed } from '@ember/object';
export default class FormCredentialLibraryIndexComponent extends Component {
// =properties
/**
* @type {object}
*/
httpMethods = options.http_methods;
/**
* Only allow HTTP request body field if http_method is set to POST.
* @type {boolean}
*/
@computed('args.model.attributes.http_method', 'isSaving')
get cannotSaveHttpRequestBody() {
return (
!this.args.model.attributes.http_method?.match(/post/i) || this.isSaving
);
2021-07-18 14:31:45 -04:00
}
}