mirror of
https://github.com/grafana/grafana.git
synced 2025-09-20 12:33:26 +08:00
public/app/features/*: Fix some misspell issues
This commit is contained in:
@ -67,7 +67,7 @@ export function updateDashboardPermission(
|
|||||||
|
|
||||||
const updated = toUpdateItem(item);
|
const updated = toUpdateItem(item);
|
||||||
|
|
||||||
// if this is the item we want to update, update it's permisssion
|
// if this is the item we want to update, update it's permission
|
||||||
if (itemToUpdate === item) {
|
if (itemToUpdate === item) {
|
||||||
updated.permission = level;
|
updated.permission = level;
|
||||||
}
|
}
|
||||||
|
@ -481,7 +481,7 @@ export class Explore extends React.PureComponent<ExploreProps, ExploreState> {
|
|||||||
} else {
|
} else {
|
||||||
// Modify query only at index
|
// Modify query only at index
|
||||||
nextQueries = initialQueries.map((query, i) => {
|
nextQueries = initialQueries.map((query, i) => {
|
||||||
// Synchronise all queries with local query cache to ensure consistency
|
// Synchronize all queries with local query cache to ensure consistency
|
||||||
// TODO still needed?
|
// TODO still needed?
|
||||||
return i === index
|
return i === index
|
||||||
? {
|
? {
|
||||||
|
@ -88,7 +88,7 @@ export default class PlaceholdersBuffer {
|
|||||||
orders.push({ index: parts.length - 1, order });
|
orders.push({ index: parts.length - 1, order });
|
||||||
textOffset += part.length + match.length;
|
textOffset += part.length + match.length;
|
||||||
}
|
}
|
||||||
// Ensures string serialisation still works if no placeholders were parsed
|
// Ensures string serialization still works if no placeholders were parsed
|
||||||
// and also accounts for the remainder of text with placeholders
|
// and also accounts for the remainder of text with placeholders
|
||||||
parts.push(text.slice(textOffset));
|
parts.push(text.slice(textOffset));
|
||||||
return {
|
return {
|
||||||
|
@ -112,7 +112,7 @@ export function updateFolderPermission(itemToUpdate: DashboardAcl, level: Permis
|
|||||||
|
|
||||||
const updated = toUpdateItem(item);
|
const updated = toUpdateItem(item);
|
||||||
|
|
||||||
// if this is the item we want to update, update it's permisssion
|
// if this is the item we want to update, update it's permission
|
||||||
if (itemToUpdate === item) {
|
if (itemToUpdate === item) {
|
||||||
updated.permission = level;
|
updated.permission = level;
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@ import { getBackendSrv } from 'app/core/services/backend_srv';
|
|||||||
type ThunkResult<R> = ThunkAction<R, StoreState, undefined, any>;
|
type ThunkResult<R> = ThunkAction<R, StoreState, undefined, any>;
|
||||||
|
|
||||||
export enum ActionTypes {
|
export enum ActionTypes {
|
||||||
LoadOrganization = 'LOAD_ORGANISATION',
|
LoadOrganization = 'LOAD_ORGANIZATION',
|
||||||
SetOrganizationName = 'SET_ORGANIZATION_NAME',
|
SetOrganizationName = 'SET_ORGANIZATION_NAME',
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -19,9 +19,9 @@ interface SetOrganizationNameAction {
|
|||||||
payload: string;
|
payload: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const organisationLoaded = (organisation: Organization) => ({
|
const organizationLoaded = (organization: Organization) => ({
|
||||||
type: ActionTypes.LoadOrganization,
|
type: ActionTypes.LoadOrganization,
|
||||||
payload: organisation,
|
payload: organization,
|
||||||
});
|
});
|
||||||
|
|
||||||
export const setOrganizationName = (orgName: string) => ({
|
export const setOrganizationName = (orgName: string) => ({
|
||||||
@ -33,10 +33,10 @@ export type Action = LoadOrganizationAction | SetOrganizationNameAction;
|
|||||||
|
|
||||||
export function loadOrganization(): ThunkResult<void> {
|
export function loadOrganization(): ThunkResult<void> {
|
||||||
return async dispatch => {
|
return async dispatch => {
|
||||||
const organisationResponse = await getBackendSrv().get('/api/org');
|
const organizationResponse = await getBackendSrv().get('/api/org');
|
||||||
dispatch(organisationLoaded(organisationResponse));
|
dispatch(organizationLoaded(organizationResponse));
|
||||||
|
|
||||||
return organisationResponse;
|
return organizationResponse;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -99,7 +99,7 @@ class MetricsPanelCtrl extends PanelCtrl {
|
|||||||
.then(this.issueQueries.bind(this))
|
.then(this.issueQueries.bind(this))
|
||||||
.then(this.handleQueryResult.bind(this))
|
.then(this.handleQueryResult.bind(this))
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
// if cancelled keep loading set to true
|
// if canceled keep loading set to true
|
||||||
if (err.cancelled) {
|
if (err.cancelled) {
|
||||||
console.log('Panel request cancelled', err);
|
console.log('Panel request cancelled', err);
|
||||||
return;
|
return;
|
||||||
|
Reference in New Issue
Block a user