Skip to content
Merged
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
24 changes: 15 additions & 9 deletions .cypress/integration/1_detectors.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,16 +207,22 @@ describe('Detectors', () => {
// Create test index
cy.createIndex(cypressIndexDns, sample_dns_index_settings).then(() =>
cy
.request('POST', '_plugins/_security_analytics/rules/_search?prePackaged=true', {
from: 0,
size: 5000,
query: {
nested: {
path: 'rule',
query: { bool: { must: [{ match: { 'rule.category': 'dns' } }] } },
.request(
'POST',
`${Cypress.env(
'opensearch_url'
)}/_plugins/_security_analytics/rules/_search?pre_packaged=true`,
{
from: 0,
size: 5000,
query: {
nested: {
path: 'rule',
query: { bool: { must: [{ match: { 'rule.category': 'dns' } }] } },
},
},
},
})
}
)
.should('have.property', 'status', 200)
);

Expand Down
2 changes: 1 addition & 1 deletion .cypress/integration/2_rules.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ describe('Rules', () => {

it('...can be imported with log type', () => {
getImportButton().click({ force: true });
getImportRuleFilePicker().selectFile('./cypress/fixtures/sample_aws_s3_rule_to_import.yml');
getImportRuleFilePicker().selectFile('./.cypress/fixtures/sample_aws_s3_rule_to_import.yml');
// Check that AWS S3 log type is set.
cy.contains('AWS S3');
});
Expand Down
3 changes: 1 addition & 2 deletions .cypress/support/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@ Cypress.Commands.add(
}
Cypress.log({ message: `Select combobox items: ${items.join(' | ')}` });
items.map((item) => {
cy.wrap(subject).type(item);
cy.get(`[title="${item}"]`).click({ force: true });
cy.wrap(subject).type(item + '{downarrow}{enter}');
});
}
);
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/cypress-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ on:
- "*"
env:
OPENSEARCH_DASHBOARDS_VERSION: 'main'
OPENSEARCH_VERSION: '3.0.0-alpha1-SNAPSHOT'
OPENSEARCH_VERSION: '3.0.0-beta1-SNAPSHOT'
SECURITY_ANALYTICS_BRANCH: 'main'
GRADLE_VERSION: '7.6.1'
jobs:
tests:
name: Run Cypress E2E tests
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
include:
Expand Down
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.0.0-alpha1'
OPENSEARCH_VERSION: '3.0.0-beta1'
CI: 1
# avoid warnings like "tput: No value for $TERM and no -T specified"
TERM: xterm
Expand Down
4 changes: 2 additions & 2 deletions cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports = defineConfig({
responseTimeout: 300000,
env: {
opensearch_url: 'localhost:9200',
opensearch_dashboards: 'http://localhost:5601',
opensearch_dashboards: 'localhost:5601',
security_enabled: false,
},
fixturesFolder: '.cypress/fixtures',
Expand All @@ -18,7 +18,7 @@ module.exports = defineConfig({
// We've imported your old cypress plugins here.
// You may want to clean this up later by importing these.
setupNodeEvents(on, config) {
return require('./.cypress/plugins/index.js')(on, config);
return require('./.cypress/plugins/index.ts')(on, config);
},
specPattern: '.cypress/integration/*.spec.js',
supportFile: '.cypress/support/index.js',
Expand Down
2 changes: 1 addition & 1 deletion opensearch_dashboards.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "securityAnalyticsDashboards",
"version": "3.0.0.0-alpha1",
"version": "3.0.0.0-beta1",
"opensearchDashboardsVersion": "3.0.0",
"configPath": ["opensearch_security_analytics"],
"requiredPlugins": ["data", "navigation", "opensearchDashboardsUtils", "contentManagement"],
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": "opensearch_security_analytics_dashboards",
"version": "3.0.0.0-alpha1",
"version": "3.0.0.0-beta1",
"description": "OpenSearch Dashboards plugin for Security Analytics",
"main": "index.js",
"license": "Apache-2.0",
Expand Down
70 changes: 35 additions & 35 deletions public/pages/Overview/components/Widgets/Summary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,41 +149,41 @@ export const Summary: React.FC<SummaryProps> = ({
)}
</EuiFlexItem>
)}
{/*<EuiFlexItem>*/}
{/* {activeAlerts === 0 && totalFindings === 0 ? (*/}
{/* <EuiEmptyPrompt*/}
{/* title={*/}
{/* <EuiText size="s">*/}
{/* <h2>No alerts and findings found</h2>*/}
{/* </EuiText>*/}
{/* }*/}
{/* body={*/}
{/* <>*/}
{/* <p>*/}
{/* <EuiText size="s">*/}
{/* Adjust the time range to see more results or create a <br />*/}
{/* detector to generate findings.*/}
{/* </EuiText>*/}
{/* </p>*/}
{/* <EuiSmallButton*/}
{/* href={`#${ROUTES.DETECTORS_CREATE}`}*/}
{/* fill={true}*/}
{/* data-test-subj={'detectorsCreateButton'}*/}
{/* iconType="plus"*/}
{/* iconSide="left"*/}
{/* iconGap="s"*/}
{/* >*/}
{/* Create a detector*/}
{/* </EuiSmallButton>*/}
{/* </>*/}
{/* }*/}
{/* />*/}
{/* ) : (*/}
{/* <div id="chart-container">*/}
{/* <canvas id={SUMMARY_VIEW_CHART}></canvas>*/}
{/* </div>*/}
{/* )}*/}
{/*</EuiFlexItem>*/}
<EuiFlexItem>
{activeAlerts === 0 && totalFindings === 0 ? (
<EuiEmptyPrompt
title={
<EuiText size="s">
<h2>No alerts and findings found</h2>
</EuiText>
}
body={
<>
<p>
<EuiText size="s">
Adjust the time range to see more results or create a <br />
detector to generate findings.
</EuiText>
</p>
<EuiSmallButton
href={`#${ROUTES.DETECTORS_CREATE}`}
fill={true}
data-test-subj={'detectorsCreateButton'}
iconType="plus"
iconSide="left"
iconGap="s"
>
Create a detector
</EuiSmallButton>
</>
}
/>
) : (
<div id="chart-container">
<canvas id={SUMMARY_VIEW_CHART}></canvas>
</div>
)}
</EuiFlexItem>
</EuiFlexGroup>
</WidgetContainer>
);
Expand Down
20 changes: 10 additions & 10 deletions public/pages/Overview/containers/Overview/Overview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -298,16 +298,16 @@ export const Overview: React.FC<OverviewProps> = (props) => {
</EuiFlexItem>
</>
)}
<EuiFlexItem>
<Summary
alerts={state.overviewViewModel.alerts}
findings={state.overviewViewModel.findings}
startTime={dateTimeFilter.startTime}
endTime={dateTimeFilter.endTime}
timeUnit={timeUnit}
loading={loading}
/>
</EuiFlexItem>
{/*<EuiFlexItem>*/}
{/* <Summary*/}
{/* alerts={state.overviewViewModel.alerts}*/}
{/* findings={state.overviewViewModel.findings}*/}
{/* startTime={dateTimeFilter.startTime}*/}
{/* endTime={dateTimeFilter.endTime}*/}
{/* timeUnit={timeUnit}*/}
{/* loading={loading}*/}
{/* />*/}
{/*</EuiFlexItem>*/}

<EuiFlexItem>
<EuiFlexGrid columns={2} gutterSize="m">
Expand Down
Loading