* fix: 🐛 host modal renders whenever there is an error ✅ Closes: ICU-11231 * test: 💍 add test case to make sure fix is working properly * fix: 🐛 toggle flag back to false and remove @tracked * fix: 🐛 host modal should also close after host connection error * refactor: 💡 change toggle to toggleModal * test: 💍 rename toggle in test cases
24 lines
488 B
JavaScript
24 lines
488 B
JavaScript
/**
|
|
* Copyright (c) HashiCorp, Inc.
|
|
* SPDX-License-Identifier: MPL-2.0
|
|
*/
|
|
|
|
import Controller from '@ember/controller';
|
|
import { tracked } from '@glimmer/tracking';
|
|
import { action } from '@ember/object';
|
|
|
|
export default class ScopesScopeProjectsTargetsTargetController extends Controller {
|
|
// =attributes
|
|
|
|
queryParams = [{ isConnecting: { type: 'boolean' } }];
|
|
|
|
@tracked isConnecting = false;
|
|
|
|
// =methods
|
|
|
|
@action
|
|
toggleModal(value) {
|
|
this.isConnecting = value;
|
|
}
|
|
}
|