mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Prettier: Upgrade to 2 (#30387)
* Updated package json but not updated source files * Update eslint plugin * updated files
This commit is contained in:
@@ -106,7 +106,7 @@ export class CentrifugeLiveChannel<TMessage = any, TPublish = any> implements Li
|
||||
};
|
||||
|
||||
this.getPresence = () => {
|
||||
return this.subscription!.presence().then(v => {
|
||||
return this.subscription!.presence().then((v) => {
|
||||
return {
|
||||
users: Object.keys(v.presence),
|
||||
};
|
||||
|
||||
@@ -81,7 +81,7 @@ export class DashboardChangedModal extends PureComponent<Props, State> {
|
||||
<div>This dashboard has been modifed by another session</div>
|
||||
)}
|
||||
<br />
|
||||
{options.map(opt => {
|
||||
{options.map((opt) => {
|
||||
return (
|
||||
<div key={opt.label} onClick={opt.action} className={styles.radioItem}>
|
||||
<h3>{opt.label}</h3>
|
||||
|
||||
@@ -26,7 +26,7 @@ export function registerLiveFeatures() {
|
||||
name: 'testdata',
|
||||
support: {
|
||||
getChannelConfig: (path: string) => {
|
||||
return channels.find(c => c.path === path);
|
||||
return channels.find((c) => c.path === path);
|
||||
},
|
||||
getSupportedPaths: () => channels,
|
||||
},
|
||||
|
||||
@@ -17,9 +17,7 @@ export const sessionId =
|
||||
'/' +
|
||||
Date.now().toString(16) +
|
||||
'/' +
|
||||
Math.random()
|
||||
.toString(36)
|
||||
.substring(2, 15);
|
||||
Math.random().toString(36).substring(2, 15);
|
||||
|
||||
export class CentrifugeSrv implements GrafanaLiveSrv {
|
||||
readonly open = new Map<string, CentrifugeLiveChannel>();
|
||||
@@ -39,7 +37,7 @@ export class CentrifugeSrv implements GrafanaLiveSrv {
|
||||
});
|
||||
this.centrifuge.connect(); // do connection
|
||||
this.connectionState = new BehaviorSubject<boolean>(this.centrifuge.isConnected());
|
||||
this.connectionBlocker = new Promise<void>(resolve => {
|
||||
this.connectionBlocker = new Promise<void>((resolve) => {
|
||||
if (this.centrifuge.isConnected()) {
|
||||
return resolve();
|
||||
}
|
||||
@@ -103,7 +101,7 @@ export class CentrifugeSrv implements GrafanaLiveSrv {
|
||||
this.open.set(id, channel);
|
||||
|
||||
// Initialize the channel in the background
|
||||
this.initChannel(scope, channel).catch(err => {
|
||||
this.initChannel(scope, channel).catch((err) => {
|
||||
channel?.shutdownWithError(err);
|
||||
this.open.delete(id);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user