Skip to content

Commit

Permalink
Merge branch 'main' into eui-theme-search-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mdefazio authored Dec 16, 2024
2 parents 3cb5c1a + c4b5a37 commit 9ce32c1
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,9 @@ function formatStatus(id: string, status: ServiceStatus): FormattedStatus {
},
};
}

/**
* Maps status to health color for frontend views
*/
export const STATUS_LEVEL_UI_ATTRS: Record<ServiceStatusLevelId, StatusUIAttributes> = {
critical: {
title: i18n.translate('core.status.redTitle', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,14 @@ const FieldTopValuesBucket: React.FC<FieldTopValuesBucketProps> = ({
);
};

// copied from x-pack/plugins/banners/server/utils.ts
const hexColorRegexp = /^#([0-9a-f]{6}|[0-9a-f]{3})$/i;
const isHexColor = (color: string) => {
return hexColorRegexp.test(color);
};

const getPercentageColor = (euiTheme: EuiThemeComputed, color: string) =>
euiTheme.themeName?.toLowerCase().includes('borealis')
euiTheme.themeName?.toLowerCase().includes('borealis') && isHexColor(color)
? makeHighContrastColor(color)(euiTheme)
: color; // FIXME: remove in 9.x when Borealis becomes the default theme

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
}

.savedObjectsManagementImportSummary__createdCount {
color: $euiColorSuccessText;
color: $euiColorTextSuccess;
}

.savedObjectsManagementImportSummary__errorCount {
color: $euiColorDangerText;
color: $euiColorTextDanger;
}

.savedObjectsManagementImportSummary__icon {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default function ({ getService }: FtrProviderContext) {
const ml = getService('ml');
const inferenceId = 'my-elser-model';
const taskType = 'sparse_embedding';
const service = 'elser';
const service = 'elasticsearch';
const modelId = '.elser_model_2';

describe('Inference endpoints', function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
const endpoint = 'endpoint-1';
const taskType = 'sparse_embedding';
const modelConfig = {
service: 'elser',
service: 'elasticsearch',
service_settings: {
num_allocations: 1,
num_threads: 1,
model_id: '.elser_model_2',
},
};

Expand Down

0 comments on commit 9ce32c1

Please sign in to comment.