Skip to content
Open
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
68 changes: 39 additions & 29 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"@module-federation/vite": "^1.2.6",
"@monaco-editor/react": "^4.7.0",
"@reduxjs/toolkit": "^1.9.5",
"axios": "1.13.5",
"axios": "^1.15.0",
"bfj": "^9.1.3",
"camelcase": "^6.3.0",
"chart.js": "^4.4.2",
Expand All @@ -25,11 +25,11 @@
"final-form-arrays": "^3.1.0",
"fs-extra": "^10.0.0",
"identity-obj-proxy": "^3.0.0",
"iguazio.dashboard-react-controls": "3.2.19",
"iguazio.dashboard-react-controls": "3.2.20",
"is-wsl": "^1.1.0",
"js-base64": "^2.6.4",
"js-yaml": "^4.1.0",
"lodash": "^4.17.23",
"lodash": "^4.18.1",
"moment": "^2.30.1",
"pretty-bytes": "^6.1.1",
"prismjs": "^1.29.0",
Expand Down Expand Up @@ -168,7 +168,7 @@
"stylelint-order": "^4.0.0",
"stylelint-scss": "^3.17.2",
"url-loader": "4.1.1",
"vite": "^6.2.0",
"vite": "^6.4.2",
"vite-plugin-commonjs": "^0.10.4",
"vite-plugin-eslint": "^1.8.1",
"vite-plugin-svgr": "^4.3.0",
Expand Down
6 changes: 3 additions & 3 deletions src/common/DatePicker/DatePicker.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ import { isTargetElementInContainerElement } from '../../utils/checkElementsPosi

const defaultProps = {
date: new Date(),
dateTo: null
setExternalInvalid: () => {}
}

const DatePicker = ({
className = '',
customOptions = null,
date = defaultProps.date,
dateTo = defaultProps.dateTo,
dateTo = null,
disabled = false,
excludeCustomRange = false,
externalInvalid = null,
Expand All @@ -72,7 +72,7 @@ const DatePicker = ({
required = false,
requiredText = 'This field is required',
selectedOptionId = '',
setExternalInvalid = () => {},
setExternalInvalid = defaultProps.setExternalInvalid,
timeFrameLimit = Infinity,
tip = '',
type = 'date',
Expand Down
49 changes: 41 additions & 8 deletions src/components/ActionBar/ActionBar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,13 @@ import {
REQUEST_CANCELED,
TAG_FILTER_ALL_ITEMS
} from '../../constants'
import { CUSTOM_RANGE_DATE_OPTION } from '../../utils/datePicker.util'
import {
ANY_TIME_DATE_OPTION,
CUSTOM_RANGE_DATE_OPTION,
datePickerFutureOptions,
datePickerPastOptions,
getDatePickerFilterValue
} from '../../utils/datePicker.util'
import { FILTERS_CONFIG } from '../../types'
import { getCloseDetailsLink } from '../../utils/link-helper.util'
import { setFieldState } from 'igz-controls/utils/form.util'
Expand Down Expand Up @@ -189,13 +195,36 @@ const ActionBar = ({
[filtersConfig, setSearchParams, withoutSearchParams]
)

const updateRelativeTimeValue = useCallback(
filters => {
if (
filters[DATES_FILTER]?.initialSelectedOptionId &&
filters[DATES_FILTER].initialSelectedOptionId !== CUSTOM_RANGE_DATE_OPTION &&
filters[DATES_FILTER].initialSelectedOptionId !== ANY_TIME_DATE_OPTION
) {
const isFuture = filtersConfig[DATES_FILTER]?.isFuture
const options = isFuture ? datePickerFutureOptions : datePickerPastOptions

filters[DATES_FILTER] = getDatePickerFilterValue(
options,
filters[DATES_FILTER].initialSelectedOptionId,
isFuture
)
formRef.current.change(DATES_FILTER, filters[DATES_FILTER])
dispatch(setFilters({ relativeDateChange: Date.now() }))
}
},
[dispatch, filtersConfig]
)

const applyFilters = useCallback(
async (formValues, filters, actionCanBePerformedChecked) => {
const actionCanBePerformed =
actionCanBePerformedChecked || (await performDetailsActionHelper(changes, dispatch, true))
const newFilters = { ...filters, ...formValues }

if (actionCanBePerformed) {
const newFilters = { ...filters, ...formValues }

if (closeParamName) {
navigate(getCloseDetailsLink(closeParamName, true, selectedItemName), { replace: true })
}
Expand All @@ -216,6 +245,7 @@ const ActionBar = ({
if (withoutSearchParams) {
setLocalFilters(newFilters)
} else {
updateRelativeTimeValue(newFilters)
saveFilters(newFilters)
}

Expand All @@ -228,17 +258,18 @@ const ActionBar = ({
[
changes,
dispatch,
updateRelativeTimeValue,
closeParamName,
filtersStore.groupBy,
saveFilters,
withoutSearchParams,
removeSelectedItem,
setSelectedRowData,
toggleAllRows,
handleRefresh,
navigate,
selectedItemName,
withoutSearchParams,
setLocalFilters
setLocalFilters,
saveFilters
]
)

Expand All @@ -258,6 +289,7 @@ const ActionBar = ({
if (withoutSearchParams) {
setLocalFilters(newFilters)
} else {
updateRelativeTimeValue(newFilters)
saveFilters(formState.values)
}

Expand All @@ -269,11 +301,12 @@ const ActionBar = ({
changes,
dispatch,
cancelRequest,
saveFilters,
handleRefresh,
filters,
updateRelativeTimeValue,
withoutSearchParams,
setLocalFilters
handleRefresh,
setLocalFilters,
saveFilters
]
)

Expand Down
3 changes: 2 additions & 1 deletion src/components/Alerts/Alerts.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ const Alerts = () => {

const alertsFilters = useFiltersFromSearchParams(
alertsFiltersConfig,
parseAlertsQueryParamsCallback
parseAlertsQueryParamsCallback,
params.projectName
)

const {
Expand Down
4 changes: 3 additions & 1 deletion src/components/Details/details.util.js
Original file line number Diff line number Diff line change
Expand Up @@ -313,10 +313,12 @@ export const generateRealTimePipelinesContent = selectedItem => {
rootFunction: {
value: selectedItem.name,
status: selectedItem.state.value,
statusLabel: selectedItem.state.label,
className: selectedItem.state.className,
link: generateNuclioLink(
`/projects/${selectedItem.project}/real-time-functions/${nuclioFunctionName}`
)
),
linkIsExternal: true
},
childFunction: {
value: selectedItem.childFunctions ?? selectedItem.function_refs ?? [],
Expand Down
6 changes: 5 additions & 1 deletion src/components/FunctionsPage/Functions.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,11 @@ const Functions = ({ isAllVersions = false }) => {
}
}, [selectedFunction.node_selector])

const functionsFilters = useFiltersFromSearchParams(functionsFiltersConfig)
const functionsFilters = useFiltersFromSearchParams(
functionsFiltersConfig,
undefined,
params.projectName
)

const terminateDeleteTasksPolling = useCallback(() => {
terminatePollRef?.current?.()
Expand Down
6 changes: 5 additions & 1 deletion src/components/FunctionsPageOld/FunctionsOld.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,11 @@ const Functions = () => {
}
}, [])

const functionsFilters = useFiltersFromSearchParams(functionsFiltersConfig)
const functionsFilters = useFiltersFromSearchParams(
functionsFiltersConfig,
undefined,
params.projectName
)

const terminateDeleteTasksPolling = useCallback(() => {
terminatePollRef?.current?.()
Expand Down
6 changes: 4 additions & 2 deletions src/components/Jobs/Jobs.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ const Jobs = () => {
parseQueryParamsCallback: parseScheduledQueryParamsCallback
}
}
}, [params.jobName])
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [params.jobName, params.projectName, selectedTab])

const {
abortControllerRef,
Expand Down Expand Up @@ -197,7 +198,8 @@ const Jobs = () => {

const filters = useFiltersFromSearchParams(
initialTabData[selectedTab]?.filtersConfig,
initialTabData[selectedTab]?.parseQueryParamsCallback
initialTabData[selectedTab]?.parseQueryParamsCallback,
`${params.projectName}+${selectedTab}`
)

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const MonitoringApplicationsPage = () => {
const params = useParams()
const navigate = useNavigate()
const filtersConfig = useMemo(() => getFiltersConfig(), [])
const filters = useFiltersFromSearchParams(filtersConfig)
const filters = useFiltersFromSearchParams(filtersConfig, undefined, params.projectName)
const [, setSearchParams] = useSearchParams()
const contentRef = useRef(null)

Expand Down
Loading
Loading