open-vault/ui/app/components/pki/pki-cert-popup.js
Hamid Ghaf 27bb03bbc0
adding copyright header (#19555)
* adding copyright header

* fix fmt and a test
2023-03-15 09:00:52 -07:00

30 lines
620 B
JavaScript

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import Component from '@glimmer/component';
import { action } from '@ember/object';
/**
* @module PkiCertPopup
* PkiCertPopup component is the hotdog menu button that allows you to see details or revoke a certificate.
*
* @example
* ```js
* <PkiCertPopup @item={{@item}}/>
* ```
* @param {class} item - the PKI cert in question.
*/
export default class PkiCertPopup extends Component {
get item() {
return this.args.item || null;
}
@action
delete(item) {
item.save({ adapterOptions: { method: 'revoke' } });
}
}