Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/verify-binary-installation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: 'Install Dashboards with Plugin via Binary'

on: [push, pull_request]
env:
OPENSEARCH_VERSION: '3.1.0'
OPENSEARCH_VERSION: '3.2.0'
CI: 1
# avoid warnings like "tput: No value for $TERM and no -T specified"
TERM: xterm
Expand Down
4 changes: 2 additions & 2 deletions opensearch_dashboards.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "anomalyDetectionDashboards",
"version": "3.1.0.0",
"opensearchDashboardsVersion": "3.1.0",
"version": "3.2.0.0",
"opensearchDashboardsVersion": "3.2.0",
"configPath": [
"anomaly_detection_dashboards"
],
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "anomaly-detection-dashboards",
"version": "3.1.0.0",
"version": "3.2.0.0",
"description": "OpenSearch Anomaly Detection Dashboards Plugin",
"main": "index.js",
"config": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,11 @@ export const SuggestParametersDialog: React.FC<SuggestParametersDialogProps> = (
{suggestMode === 'provided' && (
<EuiFormRow
label="Forecasting interval"
helpText="A valid interval is from 1 to 60 minutes."
helpText="A valid interval is from 1 minute to 30 days."
>
<EuiFieldNumber
min={1}
max={60}
max={43200} // 30 days
value={providedInterval}
onChange={(e) => setProvidedInterval(Number(e.target.value))}
append="minutes"
Expand All @@ -195,11 +195,13 @@ export const SuggestParametersDialog: React.FC<SuggestParametersDialogProps> = (
buttonContent="Advanced"
paddingSize="m"
>
<EuiFormRow label="Shingle size">
<EuiFormRow
label="Shingle size"
helpText="A valid shingle size is from 4 to 128.">
<EuiFieldNumber
value={shingleSize}
onChange={(e) => setShingleSize(Number(e.target.value))}
min={1}
min={4}
max={128}
/>
</EuiFormRow>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ export function ForecasterActionsCell(props: ForecasterActionsCellProps) {
isListLoading: false,
isRequestingToClose: false,
affectedForecasters: [forecaster],
// affectedMonitors: getMonitorsForAction([forecaster], allMonitors),
});
closePopover();
};
Expand All @@ -120,7 +119,6 @@ export function ForecasterActionsCell(props: ForecasterActionsCellProps) {
isListLoading: false,
isRequestingToClose: false,
affectedForecasters: [forecaster],
// affectedMonitors: getMonitorsForAction([forecaster], allMonitors),
actionText: isCancel ? 'cancel' : undefined,
});
closePopover();
Expand Down Expand Up @@ -254,8 +252,6 @@ export function ForecasterActionsCell(props: ForecasterActionsCellProps) {
};
};

// console.log("modalType", modalType);
console.log("confirmModalState", confirmModalState);
// Update the modal rendering section
let modal;

Expand Down Expand Up @@ -285,11 +281,12 @@ export function ForecasterActionsCell(props: ForecasterActionsCellProps) {
);
break;
case FORECASTER_ACTION.DELETE:
const forecastToDelete = confirmModalState.affectedForecasters[0];
modal = (
<ConfirmDeleteForecastersModal
forecasterId={forecasterId}
forecasterName={forecasterName}
forecasterState={forecasterState}
forecasterId={forecastToDelete.id}
forecasterName={forecastToDelete.name}
forecasterState={forecastToDelete.curState}
onStopForecasters={(forecasterId: string, forecasterName: string) => handleStopForecasterJob(forecasterId, forecasterName)}
onDeleteForecasters={(forecasterId: string, forecasterName: string) => handleDeleteForecasterJob(forecasterId, forecasterName)}
onHide={handleHideModal}
Expand Down Expand Up @@ -318,7 +315,6 @@ export function ForecasterActionsCell(props: ForecasterActionsCellProps) {
modal = null;
}

console.log("modal", modal);

return (
<>
Expand Down
9 changes: 0 additions & 9 deletions public/pages/ForecastersList/containers/List/List.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,6 @@ export const ForecastersList = (props: ListProps) => {

const intializeForecasters = async () => {
// wait until selected data source is ready before doing dispatch calls if mds is enabled
console.log("intializeForecasters state.selectedDataSourceId", state.selectedDataSourceId);
//if (!dataSourceEnabled || (state.selectedDataSourceId && state.selectedDataSourceId !== "")) {
dispatch(
getForecasterList(
getAllForecastersQueryParamsWithDataSourceId(
Expand Down Expand Up @@ -306,7 +304,6 @@ export const ForecastersList = (props: ListProps) => {
state.selectedForecasterStates
);

console.log('curSelectedForecasters', curSelectedForecasters);
setForecastersToDisplay(curSelectedForecasters);

setIsLoadingFinalForecasters(false);
Expand Down Expand Up @@ -457,26 +454,20 @@ export const ForecastersList = (props: ListProps) => {

// Refresh data if user is selecting an index filter
const handleIndexChange = (options: EuiComboBoxOptionProps[]): void => {
console.log('handleIndexChange called with options:', options);

let indices: string[];
indices =
options.length == 0
? ALL_INDICES
: options.map((option) => {
console.log('Processing index option:', option);
return option.label;
}).slice(0, MAX_SELECTED_INDICES);

console.log('Setting indices to:', indices);

setState((prevState) => {
console.log('Previous state for index change:', prevState);
const newState = {
...prevState,
selectedIndices: indices,
};
console.log('New state for index change:', newState);
return newState;
});
};
Expand Down
6 changes: 4 additions & 2 deletions server/routes/forecast.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { Router } from '../router';
import {
SORT_DIRECTION,
CUSTOM_FORECAST_RESULT_INDEX_PREFIX,
CUSTOM_FORECAST_RESULT_INDEX_WILDCARD,
MAX_FORECASTER,
FORECASTER_DOC_FIELDS,
} from '../utils/constants';
import {
Expand Down Expand Up @@ -735,7 +735,9 @@ export default class ForecastService {
this.client
);
const response = await callWithRequest('forecast.searchForecaster', {
body: {},
body: {
size: MAX_FORECASTER,
},
});
const totalForecasters = get(response, 'hits.total.value', 0);

Expand Down
19 changes: 18 additions & 1 deletion test/setup.jest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,24 @@ jest.mock('@elastic/eui/lib/services/accessibility/html_id_generator', () => ({
}));

// address issue: https://github.com/opensearch-project/anomaly-detection-dashboards-plugin/issues/832
jest.mock('@osd/monaco', () => ({}));
// jest.mock('@osd/monaco', () => ({}));
// Provide a minimal monaco mock for tests
jest.mock('@osd/monaco', () => ({
monaco: {
languages: {
CompletionItemKind: {
Function: 1, // matches Monaco API:contentReference[oaicite:4]{index=4}
Operator: 11,
Module: 8,
Keyword: 17,
Variable: 4,
Field: 3,
Class: 5,
Value: 13,
},
},
},
}));

//for mocking window.scroll(0,0)
const noop = () => {};
Expand Down
Loading