adjusted api calls
This commit is contained in:
@@ -179,13 +179,22 @@ export class UmbDashboardExamineIndexElement extends UmbContextConsumerMixin(Lit
|
||||
return html`<uui-box headline="Index info">
|
||||
<p>Lists the properties of the ${this._indexData.name}</p>
|
||||
<uui-table class="info">
|
||||
${Object.entries(this._indexData).map((entry) => {
|
||||
//TODO: This should be providerProperties showing up here
|
||||
return html`<uui-table-row>
|
||||
<uui-table-cell style="width:0px; font-weight: bold;"> ${entry[0]} </uui-table-cell>
|
||||
<uui-table-cell> ${JSON.stringify(entry[1]).replace(/,/g, ', ')} </uui-table-cell>
|
||||
</uui-table-row>`;
|
||||
})}
|
||||
<uui-table-row>
|
||||
<uui-table-cell style="width:0px; font-weight: bold;"> documentCount </uui-table-cell>
|
||||
<uui-table-cell>${this._indexData.documentCount} </uui-table-cell>
|
||||
</uui-table-row>
|
||||
<uui-table-row>
|
||||
<uui-table-cell style="width:0px; font-weight: bold;"> fieldCount </uui-table-cell>
|
||||
<uui-table-cell>${this._indexData.fieldCount} </uui-table-cell>
|
||||
</uui-table-row>
|
||||
${this._indexData.providerProperties
|
||||
? Object.entries(this._indexData.providerProperties).map((entry) => {
|
||||
return html`<uui-table-row>
|
||||
<uui-table-cell style="width:0px; font-weight: bold;"> ${entry[0]} </uui-table-cell>
|
||||
<uui-table-cell clip-text> ${JSON.stringify(entry[1]).replace(/,/g, ', ')} </uui-table-cell>
|
||||
</uui-table-row>`;
|
||||
})
|
||||
: ''}
|
||||
</uui-table>
|
||||
</uui-box>`;
|
||||
}
|
||||
|
||||
@@ -153,8 +153,7 @@ export class UmbDashboardExamineSearcherElement extends UmbContextConsumerMixin(
|
||||
take: 9999,
|
||||
skip: 0,
|
||||
});
|
||||
const pagedSearchResults = res.items as PagedSearchResult[];
|
||||
this._searchResults = pagedSearchResults[0].items;
|
||||
this._searchResults = res.items as SearchResult[];
|
||||
this._updateFieldFilter();
|
||||
} catch (e) {
|
||||
if (e instanceof ApiError) {
|
||||
|
||||
@@ -17,12 +17,12 @@ export const Indexers: Index[] = [
|
||||
canRebuild: true,
|
||||
healthStatus: 'Healthy',
|
||||
isHealthy: true,
|
||||
/*
|
||||
documentCount: 0,
|
||||
fieldCount: 0,
|
||||
providerProperties: {
|
||||
CommitCount: 0,
|
||||
DefaultAnalyzer: 'StandardAnalyzer',
|
||||
DocumentCount: 0,
|
||||
FieldCount: 0,
|
||||
|
||||
LuceneDirectory: 'SimpleFSDirectory',
|
||||
LuceneIndexFolder: '/ /umbraco /data /temp /examineindexes /externalindex',
|
||||
DirectoryFactory:
|
||||
@@ -30,19 +30,18 @@ export const Indexers: Index[] = [
|
||||
EnableDefaultEventHandler: true,
|
||||
PublishedValuesOnly: true,
|
||||
SupportProtectedContent: false,
|
||||
},*/
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'InternalIndex',
|
||||
canRebuild: true,
|
||||
healthStatus: 'Healthy',
|
||||
isHealthy: true,
|
||||
/*
|
||||
documentCount: 0,
|
||||
fieldCount: 0,
|
||||
providerProperties: {
|
||||
CommitCount: 0,
|
||||
DefaultAnalyzer: 'CultureInvariantWhitespaceAnalyzer',
|
||||
DocumentCount: 0,
|
||||
FieldCount: 0,
|
||||
LuceneDirectory: 'SimpleFSDirectory',
|
||||
LuceneIndexFolder: '/ /umbraco /data /temp /examineindexes /internalindex',
|
||||
DirectoryFactory:
|
||||
@@ -52,29 +51,26 @@ export const Indexers: Index[] = [
|
||||
SupportProtectedContent: true,
|
||||
IncludeFields: ['id', 'nodeName', 'updateDate', 'loginName', 'email', '__Key'],
|
||||
},
|
||||
*/
|
||||
},
|
||||
{
|
||||
name: 'MemberIndex',
|
||||
canRebuild: true,
|
||||
healthStatus: 'Healthy',
|
||||
isHealthy: true,
|
||||
/*
|
||||
fieldCount: 0,
|
||||
documentCount: 0,
|
||||
providerProperties: {
|
||||
CommitCount: 0,
|
||||
DefaultAnalyzer: 'CultureInvariantWhitespaceAnalyzer',
|
||||
DirectoryFactory:
|
||||
'Umbraco.Cms.Infrastructure.Examine.ConfigurationEnabledDirectoryFactory, Umbraco.Examine.Lucene, Version=10.2.0.0, Culture=neutral, PublicKeyToken=null',
|
||||
DocumentCount: 0,
|
||||
EnableDefaultEventHandler: true,
|
||||
FieldCount: 0,
|
||||
IncludeFields: ['id', 'nodeName', 'updateDate', 'loginName', 'email', '__Key'],
|
||||
LuceneDirectory: 'SimpleFSDirectory',
|
||||
LuceneIndexFolder: '/ /umbraco /data /temp /examineindexes /membersindex',
|
||||
PublishedValuesOnly: false,
|
||||
SupportProtectedContent: false,
|
||||
},
|
||||
*/
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import { rest } from 'msw';
|
||||
import { searchResultMockData, getIndexByName, PagedIndexers } from '../data/examine.data';
|
||||
|
||||
import { umbracoPath } from '@umbraco-cms/utils';
|
||||
import { Index, PagedIndex, PagedPaged, PagedSearcher, SearchResult } from '@umbraco-cms/backend-api';
|
||||
import { Index, PagedIndex, PagedSearcher, PagedSearchResult, SearchResult } from '@umbraco-cms/backend-api';
|
||||
|
||||
export const handlers = [
|
||||
rest.get(umbracoPath('/search/index'), (_req, res, ctx) => {
|
||||
@@ -64,14 +64,9 @@ export const handlers = [
|
||||
if (searcherName) {
|
||||
return res(
|
||||
ctx.status(200),
|
||||
ctx.json<PagedPaged>({
|
||||
ctx.json<PagedSearchResult>({
|
||||
total: 0,
|
||||
items: [
|
||||
{
|
||||
total: 0,
|
||||
items: searchResultMockData,
|
||||
},
|
||||
],
|
||||
items: searchResultMockData,
|
||||
})
|
||||
);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user