From 1a4dd558dd8b7679b97eed0d42602e3d701bfa80 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 23 Oct 2024 22:40:54 +0000 Subject: [PATCH 1/3] Added HOURS option for source refresh interval. (#1190) Signed-off-by: AWSHurneyt (cherry picked from commit 1c31032b38d0c99850097b72095ed30362f6e1d0) Signed-off-by: github-actions[bot] --- .../ThreatIntelSourceDetails/ThreatIntelSourceDetails.tsx | 5 ++++- .../AddThreatIntelSource/AddThreatIntelSource.tsx | 7 +++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/public/pages/ThreatIntel/components/ThreatIntelSourceDetails/ThreatIntelSourceDetails.tsx b/public/pages/ThreatIntel/components/ThreatIntelSourceDetails/ThreatIntelSourceDetails.tsx index 2462d3d2..de21cff7 100644 --- a/public/pages/ThreatIntel/components/ThreatIntelSourceDetails/ThreatIntelSourceDetails.tsx +++ b/public/pages/ThreatIntel/components/ThreatIntelSourceDetails/ThreatIntelSourceDetails.tsx @@ -234,7 +234,10 @@ export const ThreatIntelSourceDetails: React.FC = }} onScheduleChange={onIntervalChange} readonly={isReadOnly || !enabled} - scheduleUnitOptions={[defaultIntervalUnitOptions.DAYS]} + scheduleUnitOptions={[ + defaultIntervalUnitOptions.HOURS, + defaultIntervalUnitOptions.DAYS, + ]} /> {(!isReadOnly || !enabled) && ( diff --git a/public/pages/ThreatIntel/containers/AddThreatIntelSource/AddThreatIntelSource.tsx b/public/pages/ThreatIntel/containers/AddThreatIntelSource/AddThreatIntelSource.tsx index cf72ed7f..90c3ba9f 100644 --- a/public/pages/ThreatIntel/containers/AddThreatIntelSource/AddThreatIntelSource.tsx +++ b/public/pages/ThreatIntel/containers/AddThreatIntelSource/AddThreatIntelSource.tsx @@ -99,7 +99,7 @@ export const AddThreatIntelSource: React.FC = ({ interval: { start_time: Date.now(), period: 1, - unit: 'DAYS', + unit: defaultIntervalUnitOptions.HOURS.value, }, }); const [sourceType, setSourceType] = useState<'S3_CUSTOM' | 'IOC_UPLOAD'>('S3_CUSTOM'); @@ -545,7 +545,10 @@ export const AddThreatIntelSource: React.FC = ({ unit: schedule.interval.unit, }, }} - scheduleUnitOptions={[defaultIntervalUnitOptions.DAYS]} + scheduleUnitOptions={[ + defaultIntervalUnitOptions.HOURS, + defaultIntervalUnitOptions.DAYS, + ]} onScheduleChange={onIntervalChange} /> From a3b4b6733f6fec0e4c2209bd3922507dcb6a7c65 Mon Sep 17 00:00:00 2001 From: AWSHurneyt Date: Wed, 23 Oct 2024 17:40:26 -0700 Subject: [PATCH 2/3] Fix cache cypress hashfile path. Signed-off-by: AWSHurneyt --- .github/workflows/cypress-workflow.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cypress-workflow.yml b/.github/workflows/cypress-workflow.yml index 7d0ef848..821d2436 100644 --- a/.github/workflows/cypress-workflow.yml +++ b/.github/workflows/cypress-workflow.yml @@ -120,9 +120,9 @@ jobs: uses: actions/cache@v2 with: path: ${{ matrix.cypress_cache_folder }} - key: cypress-cache-v2-${{ runner.os }}-${{ hashFiles('**/package.json') }} + key: cypress-cache-v2-${{ runner.os }}-${{ hashFiles('OpenSearch-Dashboards/plugins/security-analytics-dashboards-plugin/package.json') }} restore-keys: | - cypress-cache-v2-${{ runner.os }}-${{ hashFiles('**/package.json') }} + cypress-cache-v2-${{ runner.os }}-${{ hashFiles('OpenSearch-Dashboards/plugins/security-analytics-dashboards-plugin/package.json') }} # for now just chrome, use matrix to do all browsers later - name: Cypress tests From cd376124ebfcb43806200fef89c5ce449a0159be Mon Sep 17 00:00:00 2001 From: AWSHurneyt Date: Thu, 24 Oct 2024 22:20:39 -0700 Subject: [PATCH 3/3] Reverted change to hash path. Signed-off-by: AWSHurneyt --- .github/workflows/cypress-workflow.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cypress-workflow.yml b/.github/workflows/cypress-workflow.yml index 821d2436..7d0ef848 100644 --- a/.github/workflows/cypress-workflow.yml +++ b/.github/workflows/cypress-workflow.yml @@ -120,9 +120,9 @@ jobs: uses: actions/cache@v2 with: path: ${{ matrix.cypress_cache_folder }} - key: cypress-cache-v2-${{ runner.os }}-${{ hashFiles('OpenSearch-Dashboards/plugins/security-analytics-dashboards-plugin/package.json') }} + key: cypress-cache-v2-${{ runner.os }}-${{ hashFiles('**/package.json') }} restore-keys: | - cypress-cache-v2-${{ runner.os }}-${{ hashFiles('OpenSearch-Dashboards/plugins/security-analytics-dashboards-plugin/package.json') }} + cypress-cache-v2-${{ runner.os }}-${{ hashFiles('**/package.json') }} # for now just chrome, use matrix to do all browsers later - name: Cypress tests