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