Files
threshold-ui/ui/desktop/app/components/settings-card/logs/index.js
T
Priya Patel 392e49bf49 refactor: 💡 window postmessage pattern -> contextbridge boundary api (#3167)
* refactor: 💡 postmessage pattern -> contextbridge boundary api

* refactor: 💡 use sinon stub for boundary api mock test helper

* refactor: 💡 updated tests

* refactor: 💡 renamed boundary mock api

* chore: 🤖 addressed feedback

* refactor: 💡 updated context bridge name, added nested objects
2026-03-13 15:14:38 -07:00

32 lines
641 B
JavaScript

/**
* Copyright IBM Corp. 2021, 2026
* SPDX-License-Identifier: BUSL-1.1
*/
import Component from '@glimmer/component';
import { action } from '@ember/object';
export default class SettingsCardLogsComponent extends Component {
// =attributes
/**
* Returns the list of available log levels
* @return {string[]}
*/
get logLevels() {
return ['error', 'warn', 'info', 'debug'];
}
// =methods
/**
* Sets the log level to the selected value
* @param value
* @return {Promise<void>}
*/
@action
async selectLogLevel({ target: { value } }) {
await window.desktop.logging.setLogLevel(value);
}
}