Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Site 3912 #128

Merged
merged 56 commits into from
Sep 17, 2024
Merged
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
eea0aba
Changes from SITE-3986
ebrockainq Jul 30, 2024
e479417
Update B1Tab.tsx
ebrockainq Jul 30, 2024
79715bb
Create SMTPTestCases.tsx
ebrockainq Jul 30, 2024
f2e2ba0
Remove duplicate files
ebrockainq Jul 30, 2024
0fde470
Add env variables and move API calls to ServerActions
ebrockainq Jul 30, 2024
169cf1f
Improve environment variable name
ebrockainq Jul 31, 2024
cec9758
Remove env variables
ebrockainq Jul 31, 2024
b055e05
Add Loading Button, Remove Default Profile Values
ebrockainq Jul 31, 2024
3c098ef
Merge branch 'dev' into SITE-3912
ebrockainq Jul 31, 2024
8216dbe
Merge branch 'dev' into SITE-3912
ebrockainq Jul 31, 2024
9df197c
add IMAP/POP3 manual validation, attachment type field
ebrockainq Aug 1, 2024
90879f0
Fix tab data carryover, fix include filter
ebrockainq Aug 1, 2024
ab7ccf1
Add XDR endpoint fields
ebrockainq Aug 1, 2024
f7def10
Add XDR DocumentSelector handling
ebrockainq Aug 1, 2024
e6c1712
Fix incorrect emails
ebrockainq Aug 6, 2024
1a0daf1
Fix missing doc select on XDR 3
ebrockainq Aug 6, 2024
8a5d657
Add logs formatting
ebrockainq Aug 6, 2024
05bbf94
Fix reversed IMAP and POP3 icons
ebrockainq Aug 6, 2024
526a876
Add tooltip
ebrockainq Aug 6, 2024
cd68b2b
Fix XDR logs and missing manual validations
ebrockainq Aug 6, 2024
76fcb2f
Add attachment type tooltip
ebrockainq Aug 6, 2024
ed50680
Remove Tooltips add XDR API call
ebrockainq Aug 7, 2024
192a861
Add error condition, add clear button
ebrockainq Aug 7, 2024
8c6c910
Fix more info sections, censor profile password
ebrockainq Aug 9, 2024
8c315cf
Add clear selected document
ebrockainq Aug 12, 2024
ba71e8b
Remove accept/reject on API error
ebrockainq Aug 12, 2024
a983c2f
Fix XDR more info page
ebrockainq Aug 13, 2024
fbcd7ff
Merge branch 'dev' into SITE-3912
ebrockainq Aug 13, 2024
197e6b8
add tooltip and pop over for endpoint copy
ebrockainq Aug 14, 2024
e7e4854
Fix incorrect xdr email addresses
ebrockainq Aug 14, 2024
6508af3
Replace popover system and fix error handling
ebrockainq Aug 15, 2024
ab1ce43
Language improvements and fix clear button visibility trigger
ebrockainq Aug 16, 2024
ce837de
Fix language errors
ebrockainq Aug 16, 2024
1cfd062
Add clear button to XDR send
ebrockainq Aug 16, 2024
ac9ce1c
Basic xdr functionality
ebrockainq Aug 22, 2024
35ad470
Add manual validation, request/response, remining request fields,
ebrockainq Aug 23, 2024
8def1f5
add xdr document selector
ebrockainq Aug 26, 2024
1c49374
Add XDR Document Select test functionality, add colorized XML display
ebrockainq Aug 27, 2024
629fcc0
Correct document selection per sub criteria
ebrockainq Aug 28, 2024
50c98d8
Fix failure detection on empty responses
ebrockainq Aug 28, 2024
2a63ada
Banish type errors
ebrockainq Aug 28, 2024
ea5c0a1
Less restrictive clear button
ebrockainq Aug 29, 2024
9b6d1e9
Fix CORS issue with document select
ebrockainq Aug 29, 2024
d9592e3
Merge branch 'dev' into SITE-3912
ebrockainq Aug 29, 2024
b6e1fad
Update DocumentSelector.tsx
ebrockainq Aug 29, 2024
7103dd5
add prettier ignore to bugged line
ebrockainq Sep 4, 2024
228febb
Add improved warning triggers
ebrockainq Sep 5, 2024
df98ae7
Add backup content, fix criteriaMet icon on non manual tests
ebrockainq Sep 6, 2024
9712ff7
Language fix and null value handling
ebrockainq Sep 11, 2024
23ecfc7
Merge branch 'dev' into SITE-3912
ebrockainq Sep 11, 2024
63ba169
Update replacement values
ebrockainq Sep 17, 2024
3212444
Merge branch 'dev' into SITE-3912
ebrockainq Sep 17, 2024
0a8d5f7
Modify jessionid formation
ebrockainq Sep 17, 2024
471ac6e
Update ServerActions.ts
ebrockainq Sep 17, 2024
01e08b0
Alternative auth method
ebrockainq Sep 17, 2024
3efd506
Merge branch 'dev' into SITE-3912
ebrockainq Sep 17, 2024
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
9 changes: 7 additions & 2 deletions src/components/direct/test-by-criteria/ServerActions.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
'use server'
import axios from 'axios'
import { authOptions } from '@/lib/auth'
import { NextRequest, NextResponse } from 'next/server'
import _ from 'lodash'
import { getServerSession } from 'next-auth'

interface APICallData {
testCaseNumber: number | string
Expand Down Expand Up @@ -107,7 +111,8 @@ export async function handleAPICall(data: APICallData): Promise<APIResponse> {

export async function handleXDRAPICall(data: XDRAPICallData): Promise<XDRAPIResponse> {
const apiUrl = process.env.XDR_TEST_BY_CRITERIA_ENDPOINT + data.id + '/run'
const jsessionstring = 'JSESSIONID=' + data.jsession
const session = await getServerSession(authOptions)
const jsessionid = session?.user?.jsessionid ?? ''
const formattedData = {
targetEndpointTLS: data.targetEndpointTLS,
ip_address: data.ip_address,
Expand All @@ -132,7 +137,7 @@ export async function handleXDRAPICall(data: XDRAPICallData): Promise<XDRAPIResp
url: apiUrl,
headers: {
'Content-Type': 'application/json',
Cookie: jsessionstring,
Cookie: `JSESSIONID=${jsessionid}`,
},
data: JSON.stringify(formattedData),
}
Expand Down