Files
threshold-ui/ui/desktop/app/abilities/target.js
T
Lisbet Alvarez 3740bb079a Icu-11111 don't display empty modal when a target has no target address and no host sources (#1909)
* fix: 🐛 disable connect buttons & add message

✅ Closes: ICU-11111

* test: 💍 add test cases

* fix: 🐛 buttons on list view & add getter to target model

* refactor: 💡 use can ability instead and remove Promise.all

* test: 💍 fix expect number
2023-09-22 18:58:15 -04:00

17 lines
338 B
JavaScript

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import TargetAbility from 'api/abilities/target';
export default class OverrideTargetAbility extends TargetAbility {
/**
*
* @type {boolean}
*/
get canInitiateConnection() {
return this.model.address || this.model.host_sources?.length;
}
}