Skip to content

Commit

Permalink
Revert .opensearch_dashboards index references to .kibana (#67)
Browse files Browse the repository at this point in the history
Signed-off-by: David Cui <[email protected]>
  • Loading branch information
davidcui1225 authored May 28, 2021
1 parent 8c3b56f commit 5ba1a9d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions dashboards-reports/server/routes/reportSource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,21 +54,21 @@ export default function (router: IRouter) {
let responseParams;
if (request.params.reportSourceType === 'dashboard') {
const params: RequestParams.Search = {
index: '.opensearch_dashboards',
index: '.kibana',
q: 'type:dashboard',
size: DEFAULT_MAX_SIZE,
};
responseParams = params;
} else if (request.params.reportSourceType === 'visualization') {
const params: RequestParams.Search = {
index: '.opensearch_dashboards',
index: '.kibana',
q: 'type:visualization',
size: DEFAULT_MAX_SIZE,
};
responseParams = params;
} else if (request.params.reportSourceType === 'search') {
const params: RequestParams.Search = {
index: '.opensearch_dashboards',
index: '.kibana',
q: 'type:search',
size: DEFAULT_MAX_SIZE,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -399,13 +399,13 @@ function mockSavedSearch(columns = '"category", "customer_gender"') {
"columns": [ ${columns} ],
"sort": [],
"version": 1,
"opensearchDashboardsSavedObjectMeta": {
"searchSourceJSON": "{\\"highlightAll\\":true,\\"version\\":true,\\"query\\":{\\"query\\":\\"\\",\\"language\\":\\"kuery\\"},\\"indexRefName\\":\\"opensearchDashboardsSavedObjectMeta.searchSourceJSON.index\\",\\"filter\\":[]}"
"kibanaSavedObjectMeta": {
"searchSourceJSON": "{\\"highlightAll\\":true,\\"version\\":true,\\"query\\":{\\"query\\":\\"\\",\\"language\\":\\"kuery\\"},\\"indexRefName\\":\\"kibanaSavedObjectMeta.searchSourceJSON.index\\",\\"filter\\":[]}"
}
},
"references": [
{
"name": "opensearchDashboardsSavedObjectMeta.searchSourceJSON.index",
"name": "kibanaSavedObjectMeta.searchSourceJSON.index",
"type": "index-pattern",
"id": "ff959d40-b880-11e8-a6d9-e546fe2bba5f"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,15 @@ async function populateMetaData(
// Get saved search info
let resIndexPattern: any = {};
const ssParams = {
index: '.opensearch_dashboards',
index: '.kibana',
id: 'search:' + metaData.saved_search_id,
};
const ssInfos = await callCluster(client, 'get', ssParams, isScheduledTask);

metaData.sorting = ssInfos._source.search.sort;
metaData.type = ssInfos._source.type;
metaData.filters =
ssInfos._source.search.opensearchDashboardsSavedObjectMeta.searchSourceJSON;
ssInfos._source.search.kibanaSavedObjectMeta.searchSourceJSON;

// Get the list of selected columns in the saved search.Otherwise select all the fields under the _source
await getSelectedFields(ssInfos._source.search.columns);
Expand All @@ -110,7 +110,7 @@ async function populateMetaData(
client,
'get',
{
index: '.opensearch_dashboards',
index: '.kibana',
id: 'index-pattern:' + item.id,
},
isScheduledTask
Expand Down
2 changes: 1 addition & 1 deletion dashboards-reports/server/utils/validationHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ const validateSavedObject = async (
else {
savedObjectId = `${getType(source)}:${getId(url)}`;
const params: RequestParams.Exists = {
index: '.opensearch_dashboards',
index: '.kibana',
id: savedObjectId,
};
exist = await client.callAsCurrentUser('exists', params);
Expand Down

0 comments on commit 5ba1a9d

Please sign in to comment.