mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: Let kbn util infer types (#26907)
* Chore: Let kbn util infer types Type fixes where needed * Address review comments + test fix * Modify kbn method and property names to pascalCase
This commit is contained in:
@@ -37,7 +37,7 @@ const timeRangeValidationEvents: ValidationEvents = {
|
||||
return true;
|
||||
}
|
||||
try {
|
||||
kbn.interval_to_seconds(value);
|
||||
kbn.intervalToSeconds(value);
|
||||
return true;
|
||||
} catch {
|
||||
return false;
|
||||
@@ -125,7 +125,7 @@ export class ApiKeysPage extends PureComponent<Props, any> {
|
||||
|
||||
// make sure that secondsToLive is number or null
|
||||
const secondsToLive = this.state.newApiKey['secondsToLive'];
|
||||
this.state.newApiKey['secondsToLive'] = secondsToLive ? kbn.interval_to_seconds(secondsToLive) : null;
|
||||
this.state.newApiKey['secondsToLive'] = secondsToLive ? kbn.intervalToSeconds(secondsToLive) : null;
|
||||
this.props.addApiKey(this.state.newApiKey, openModal, this.props.includeExpired);
|
||||
this.setState((prevState: State) => {
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user