Chelsea Shaw c5d39c816a
UI: Use HDS::Toast for flash messages (#25459)
* Move global-flash to HDS-specified area

* Add flash-toast component

* use flash toast for flash messages

* Use spacing vars

* Remove unnecessary key

* Cleanup + tests

* Remove nondeterministic build warning

* add changelog

* I wish this was automatic
2024-02-15 18:06:51 -06:00

23 lines
653 B
JavaScript

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: BUSL-1.1
*/
import Route from '@ember/routing/route';
import { service } from '@ember/service';
export default class OpenApiExplorerIndex extends Route {
@service flashMessages;
afterModel() {
const warning = `The "Try it out" functionality in this API explorer will make requests to this Vault server on your behalf.
IF YOUR TOKEN HAS THE PROPER CAPABILITIES, THIS WILL CREATE AND DELETE ITEMS ON THE VAULT SERVER.
Your token will also be shown on the screen in the example curl command output.`;
this.flashMessages.warning(warning, {
sticky: true,
});
}
}