Tyler Wendlandt b9f3e5e247
NET-5398: V2 unavailable UI message (#20359)
* Update ui server to include V2 Catalog flag

* Fix typo

* Add route and redirects for the unavailable warning

* Add qualtrics link

* Remove unneccessary check and redirect
2024-01-29 14:28:41 -07:00

19 lines
400 B
JavaScript

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: BUSL-1.1
*/
import Route from 'consul-ui/routing/route';
import { inject as service } from '@ember/service';
export default class UnavailableRoute extends Route {
@service('env') env;
@service() router;
beforeModel() {
if (!this.env.var('CONSUL_V2_CATALOG_ENABLED')) {
this.router.replaceWith('index');
}
}
}