mirror of https://github.com/rancher/dashboard.git
21 lines
386 B
JavaScript
21 lines
386 B
JavaScript
import day from 'dayjs';
|
|
|
|
export default {
|
|
|
|
_availableActions() {
|
|
return this._standardActions.filter(a => ['viewInApi', 'promptRemove'].includes(a.action));
|
|
},
|
|
|
|
state() {
|
|
return this.isExpired ? 'expired' : 'active';
|
|
},
|
|
|
|
isExpired() {
|
|
// Keep this updated, don't trust `expired`
|
|
const expiry = day(this.expiresAt);
|
|
|
|
return expiry.isBefore(day());
|
|
}
|
|
|
|
};
|