mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: deprecate/remove folderId from more typescript (#81194)
This commit is contained in:
@@ -153,7 +153,7 @@ const dashboard = {
|
|||||||
},
|
},
|
||||||
meta: {
|
meta: {
|
||||||
canSave: true,
|
canSave: true,
|
||||||
folderId: 1,
|
folderUid: 'abc',
|
||||||
folderTitle: 'super folder',
|
folderTitle: 'super folder',
|
||||||
},
|
},
|
||||||
} as DashboardModel;
|
} as DashboardModel;
|
||||||
|
|||||||
@@ -13,6 +13,10 @@ exports[`PanelAlertTabContent Will render alerts belonging to panel and a button
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
"condition": "C",
|
"condition": "C",
|
||||||
|
"folder": {
|
||||||
|
"title": "super folder",
|
||||||
|
"uid": "abc",
|
||||||
|
},
|
||||||
"name": "mypanel",
|
"name": "mypanel",
|
||||||
"queries": [
|
"queries": [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ const setupTestContext = (options: Partial<Props>) => {
|
|||||||
timezone: 'utc',
|
timezone: 'utc',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
folderId: 1,
|
folderUid: 'abc',
|
||||||
folderTitle: 'test',
|
folderTitle: 'test',
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -18,8 +18,6 @@ export interface SaveDashboardOptions {
|
|||||||
dashboard: DashboardModel;
|
dashboard: DashboardModel;
|
||||||
/** Set a commit message for the version history. */
|
/** Set a commit message for the version history. */
|
||||||
message?: string;
|
message?: string;
|
||||||
/** The id of the folder to save the dashboard in. */
|
|
||||||
folderId?: number;
|
|
||||||
/** The UID of the folder to save the dashboard in. Overrides `folderId`. */
|
/** The UID of the folder to save the dashboard in. Overrides `folderId`. */
|
||||||
folderUid?: string;
|
folderUid?: string;
|
||||||
/** Set to `true` if you want to overwrite existing dashboard with newer version,
|
/** Set to `true` if you want to overwrite existing dashboard with newer version,
|
||||||
|
|||||||
@@ -17,9 +17,7 @@ interface APIQuery {
|
|||||||
limit?: number;
|
limit?: number;
|
||||||
page?: number;
|
page?: number;
|
||||||
type?: DashboardSearchItemType;
|
type?: DashboardSearchItemType;
|
||||||
// DashboardIds []int64
|
|
||||||
dashboardUID?: string[];
|
dashboardUID?: string[];
|
||||||
folderIds?: number[];
|
|
||||||
folderUIDs?: string[];
|
folderUIDs?: string[];
|
||||||
sort?: string;
|
sort?: string;
|
||||||
starred?: boolean;
|
starred?: boolean;
|
||||||
@@ -27,7 +25,7 @@ interface APIQuery {
|
|||||||
|
|
||||||
// Internal object to hold folderId
|
// Internal object to hold folderId
|
||||||
interface LocationInfoEXT extends LocationInfo {
|
interface LocationInfoEXT extends LocationInfo {
|
||||||
folderId?: number;
|
folderUid?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class SQLSearcher implements GrafanaSearcher {
|
export class SQLSearcher implements GrafanaSearcher {
|
||||||
@@ -36,7 +34,6 @@ export class SQLSearcher implements GrafanaSearcher {
|
|||||||
kind: 'folder',
|
kind: 'folder',
|
||||||
name: 'General',
|
name: 'General',
|
||||||
url: '/dashboards',
|
url: '/dashboards',
|
||||||
folderId: 0,
|
|
||||||
},
|
},
|
||||||
}; // share location info with everyone
|
}; // share location info with everyone
|
||||||
|
|
||||||
@@ -182,14 +179,14 @@ export class SQLSearcher implements GrafanaSearcher {
|
|||||||
kind: 'folder',
|
kind: 'folder',
|
||||||
name: hit.folderTitle,
|
name: hit.folderTitle,
|
||||||
url: hit.folderUrl!,
|
url: hit.folderUrl!,
|
||||||
folderId: hit.folderId,
|
folderUid: hit.folderUid,
|
||||||
};
|
};
|
||||||
} else if (k === 'folder') {
|
} else if (k === 'folder') {
|
||||||
this.locationInfo[hit.uid] = {
|
this.locationInfo[hit.uid] = {
|
||||||
kind: k,
|
kind: k,
|
||||||
name: hit.title!,
|
name: hit.title!,
|
||||||
url: hit.url,
|
url: hit.url,
|
||||||
folderId: hit.id,
|
folderUid: hit.folderUid,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ export enum DashboardSearchItemType {
|
|||||||
* extraneous properties
|
* extraneous properties
|
||||||
*/
|
*/
|
||||||
export interface DashboardSearchHit extends WithAccessControlMetadata {
|
export interface DashboardSearchHit extends WithAccessControlMetadata {
|
||||||
|
/** @deprecated use folderUid */
|
||||||
folderId?: number;
|
folderId?: number;
|
||||||
folderTitle?: string;
|
folderTitle?: string;
|
||||||
folderUid?: string;
|
folderUid?: string;
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ export interface DashboardMeta {
|
|||||||
canStar?: boolean;
|
canStar?: boolean;
|
||||||
canAdmin?: boolean;
|
canAdmin?: boolean;
|
||||||
url?: string;
|
url?: string;
|
||||||
folderId?: number;
|
|
||||||
folderUid?: string;
|
folderUid?: string;
|
||||||
canMakeEditable?: boolean;
|
canMakeEditable?: boolean;
|
||||||
provisioned?: boolean;
|
provisioned?: boolean;
|
||||||
|
|||||||
Reference in New Issue
Block a user