Files
Lisbet Alvarez 3ba93927fe Update copyright headers (#3146)
* empty commit

* Add missing copyright headers

* chore: 🤖 update copywrite config file with correct year

* Add missing copyright headers

* empty commit (gh action merge checks are stuck)
2026-01-28 17:09:06 -08:00

36 lines
957 B
JavaScript

/**
* Copyright IBM Corp. 2021, 2026
* SPDX-License-Identifier: BUSL-1.1
*/
import Controller from '@ember/controller';
import { service } from '@ember/service';
import { action } from '@ember/object';
import { loading } from 'ember-loading';
import { notifyError } from 'core/decorators/notify';
export default class ClusterUrlController extends Controller {
// =services
@service router;
@service('cluster-url') clusterUrlService;
// =actions
/**
* Points the API to the specified clusterUrl. When the main process receives
* the clusterUrl, it is expected that the renderer will be restarted.
* @param {string} clusterUrl
*/
@action
@loading
@notifyError(() => 'errors.cluster-url-verification-failed.description', {
catch: true,
log: { origin: 'setClusterUrl' },
})
async setClusterUrl(clusterUrl) {
await this.clusterUrlService.setClusterUrl(clusterUrl);
this.router.replaceWith('index');
}
}