Skip to content

Commit 5eea64a

Browse files
committed
merged development
2 parents fc1379b + f04d60d commit 5eea64a

File tree

118 files changed

+4130
-1309
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+4130
-1309
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"final-form-arrays": "^3.1.0",
2525
"fs-extra": "^10.0.0",
2626
"identity-obj-proxy": "^3.0.0",
27-
"iguazio.dashboard-react-controls": "2.2.20",
27+
"iguazio.dashboard-react-controls": "2.2.22",
2828
"is-wsl": "^1.1.0",
2929
"js-base64": "^2.5.2",
3030
"js-yaml": "^4.1.0",
@@ -128,7 +128,7 @@
128128
"body-parser": "^1.19.0",
129129
"case-sensitive-paths-webpack-plugin": "^2.4.0",
130130
"chai": "^4.3.4",
131-
"chromedriver": "^132.0.0",
131+
"chromedriver": "^134.0.0",
132132
"css-loader": "^6.5.1",
133133
"cucumber-html-reporter": "^5.3.0",
134134
"eslint": "^8.57.0",

src/api/artifacts-api.js

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import {
2828
TAG_FILTER_ALL_ITEMS,
2929
TAG_FILTER_LATEST
3030
} from '../constants'
31+
import localStorageService from '../utils/localStorageService'
3132

3233
const fetchArtifacts = (project, filters, config = {}, withLatestTag, withExactName) => {
3334
const params = {}
@@ -38,7 +39,7 @@ const fetchArtifacts = (project, filters, config = {}, withLatestTag, withExactN
3839

3940
if (filters?.iter === SHOW_ITERATIONS) {
4041
params['best-iteration'] = true
41-
} else if (!isNil(filters.iter) && !isEmpty(filters.iter)) {
42+
} else if (!isNil(filters?.iter) && !isEmpty(filters?.iter)) {
4243
params.iter = filters.iter
4344
}
4445

@@ -62,7 +63,22 @@ const fetchArtifacts = (project, filters, config = {}, withLatestTag, withExactN
6263

6364
const artifactsApi = {
6465
addTag: (project, tag, data) => mainHttpClient.put(`/projects/${project}/tags/${tag}`, data),
65-
buildFunction: data => mainHttpClient.post('/build/function', data),
66+
buildFunction: data => {
67+
const headers = {}
68+
const mlrunVersion = localStorageService.getStorageValue('mlrunVersion')
69+
70+
if (mlrunVersion) {
71+
headers['x-mlrun-client-version'] = mlrunVersion
72+
}
73+
74+
return mainHttpClient.post(
75+
`/projects/${data.function.metadata.project}/nuclio/${data.function.metadata.name}/deploy`,
76+
data,
77+
{
78+
headers
79+
}
80+
)
81+
},
6682
deleteArtifact: (project, key, uid, deletion_strategy, secrets = {}) => {
6783
const config = {
6884
params: {

src/api/functions-api.js

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ such restriction.
1919
*/
2020
import { functionTemplatesHttpClient, mainHttpClient, mainHttpClientV2 } from '../httpClient'
2121
import { DATES_FILTER, NAME_FILTER, SHOW_UNTAGGED_FILTER } from '../constants'
22+
import localStorageService from '../utils/localStorageService'
2223

2324
const functionsApi = {
2425
createNewFunction: (project, data) =>
@@ -30,7 +31,22 @@ const functionsApi = {
3031
}),
3132
deleteSelectedFunction: (funcName, project) =>
3233
mainHttpClientV2.delete(`/projects/${project}/functions/${funcName}`),
33-
deployFunction: data => mainHttpClient.post('/build/function', data),
34+
deployFunction: data => {
35+
const headers = {}
36+
const mlrunVersion = localStorageService.getStorageValue('mlrunVersion')
37+
38+
if (mlrunVersion) {
39+
headers['x-mlrun-client-version'] = mlrunVersion
40+
}
41+
42+
return mainHttpClient.post(
43+
`/projects/${data.function.metadata.project}/nuclio/${data.function.metadata.name}/deploy`,
44+
data,
45+
{
46+
headers
47+
}
48+
)
49+
},
3450
getFunctions: (project, filters, config = {}, hash) => {
3551
const newConfig = {
3652
...config,

src/common/FormTagFilter/formTagFilters.scss

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
position: relative;
88
display: flex;
99
flex-direction: column;
10-
width: auto;
10+
width: 100%;
1111
min-width: 200px;
1212
height: 60px;
1313
color: $mulledWine;
@@ -20,7 +20,8 @@
2020
}
2121

2222
&__input {
23-
width: 196px;
23+
width: 100%;
24+
min-width: 196px;
2425
height: 100%;
2526
padding: 10px;
2627
color: $mulledWine;
@@ -36,9 +37,9 @@
3637
}
3738

3839
&__dropdown {
40+
align-items: normal;
3941
width: 100%;
4042
max-height: 400px;
41-
align-items: normal;
4243
overflow-y: auto;
4344
background-color: $white;
4445
border: $primaryBorder;

src/common/ProjectDetailsHeader/ProjectDetailsHeader.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,11 @@ import { getDateAndTimeByFormat } from '../../utils/'
2424
import { PROJECT_MONITOR, PROJECT_QUICK_ACTIONS_PAGE } from '../../constants'
2525

2626
import './ProjectDetailsHeader.scss'
27+
import { useSelector } from 'react-redux'
2728

2829
const ProjectDetailsHeader = ({ projectData, projectName }) => {
2930
const location = useLocation()
31+
const frontendSpec = useSelector(store => store.appStore.frontendSpec)
3032

3133
return (
3234
<div className="project-details">
@@ -48,10 +50,12 @@ const ProjectDetailsHeader = ({ projectData, projectName }) => {
4850
{getDateAndTimeByFormat(projectData.metadata.created, 'MM/DD/YYYY, HH:mm:ss A')}
4951
</span>
5052
</li>
51-
<li>
52-
<span className="project-details__details-label">Owner:</span>
53-
<span>{projectData.spec.owner}</span>
54-
</li>
53+
{!frontendSpec.ce?.version && (
54+
<li>
55+
<span className="project-details__details-label">Owner:</span>
56+
<span>{projectData.spec.owner}</span>
57+
</li>
58+
)}
5559
<li>
5660
<span className="project-details__details-label">Status:</span>
5761
<div>

src/common/TabsSlider/TabsSlider.js

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,17 @@ import classnames from 'classnames'
2424

2525
import { Tip } from 'igz-controls/components'
2626

27-
import { SLIDER_STYLE_1, SLIDER_STYLE_2, SLIDER_TABS } from '../../types'
27+
import { SLIDER_TABS } from '../../types'
2828
import { generateUrlFromRouterPath } from '../../utils/link-helper.util'
2929

3030
import { ReactComponent as Arrow } from 'igz-controls/images/arrow.svg'
3131

32-
import './tabsSlider.scss'
33-
3432
const TabsSlider = ({
33+
fontSize = 'sm',
3534
initialTab = '',
3635
isDetailsPopUp = false,
3736
onClick = () => {},
3837
skipLink = false,
39-
sliderStyle = SLIDER_STYLE_1,
4038
tabsList
4139
}) => {
4240
const [selectedTab, setSelectedTab] = useState(initialTab)
@@ -50,7 +48,6 @@ const TabsSlider = ({
5048
const menuOffsetHalfWidth = 2
5149
const tabOffset = 1.5
5250

53-
const tabsSliderClassNames = classnames('tabs-slider', sliderStyle)
5451
const leftArrowClassNames = classnames(
5552
'tabs-slider__arrow',
5653
'tabs-slider__arrow_left',
@@ -161,7 +158,7 @@ const TabsSlider = ({
161158
}, [isDetailsPopUp, params.tab, selectedTab, tabsList])
162159

163160
return (
164-
<div className={tabsSliderClassNames}>
161+
<div className="content-menu">
165162
<div
166163
className={leftArrowClassNames}
167164
onClick={() => {
@@ -170,46 +167,51 @@ const TabsSlider = ({
170167
>
171168
<Arrow />
172169
</div>
173-
<div className="tabs-slider__tabs-wrapper" ref={tabsWrapperRef}>
170+
<div className="content-menu__tabs-wrapper" ref={tabsWrapperRef}>
174171
<div
175172
ref={tabsRef}
176-
className="tabs-slider__tabs"
173+
className="content-menu__tabs"
177174
style={{
178175
transform: `translateX(${-scrolledWidth}px)`
179176
}}
180177
>
181178
{tabsList.map(tab => {
182179
const tabClassName = classnames(
183-
'tabs-slider__tab',
184-
selectedTab === tab.id && 'tabs-slider__tab_active'
180+
'content-menu__tab',
181+
`content-menu__tab-${fontSize}`,
182+
selectedTab === tab.id && 'content-menu__tab_active'
185183
)
186184

187185
return (
188186
!tab.hidden &&
189187
(!skipLink ? (
190-
<Link
191-
className={tabClassName}
192-
data-tab={tab.id}
193-
to={generateUrlFromRouterPath(
194-
`${window.location.pathname?.replace(/^$|([^/]+$)/, tab.id)}${location.search ?? ''}${tab.query ?? ''}`
195-
)}
196-
onClick={() => onSelectTab(tab)}
197-
key={tab.id}
198-
>
199-
{tab.icon && <div className="tabs-slider__tab-icon">{tab.icon}</div>}
200-
{tab.label}
201-
{tab.tip && <Tip className="tabs-slider__tab-tip" text={tab.tip} />}
202-
</Link>
188+
<div className={tabClassName}>
189+
<Link
190+
className={
191+
(tab.icon && 'content-menu__tab-icon') || (tab.tip && 'content-menu__tab-tip')
192+
}
193+
data-tab={tab.id}
194+
to={generateUrlFromRouterPath(
195+
`${window.location.pathname?.replace(/^$|([^/]+$)/, tab.id)}${location.search ?? ''}${tab.query ?? ''}`
196+
)}
197+
onClick={() => onSelectTab(tab)}
198+
key={tab.id}
199+
>
200+
{tab.icon && <div>{tab.icon}</div>}
201+
{tab.label}
202+
{tab.tip && <Tip text={tab.tip} />}
203+
</Link>
204+
</div>
203205
) : (
204206
<div
205207
className={tabClassName}
206208
data-tab={tab.id}
207209
key={tab.id}
208210
onClick={() => onSelectTab(tab.id)}
209211
>
210-
{tab.icon && <div className="tabs-slider__tab-icon">{tab.icon}</div>}
212+
{tab.icon && <div className="content-menu_tab-icon">{tab.icon}</div>}
211213
{tab.label}
212-
{tab.tip && <Tip className="tabs-slider__tab-tip" text={tab.tip} />}
214+
{tab.tip && <Tip className="content-menu__tab-tip" text={tab.tip} />}
213215
</div>
214216
))
215217
)
@@ -224,10 +226,10 @@ const TabsSlider = ({
224226
}
225227

226228
TabsSlider.propTypes = {
229+
fontSize: PropTypes.oneOf(['sm', 'md', 'lg']),
227230
initialTab: PropTypes.string,
228231
onClick: PropTypes.func,
229232
skipLink: PropTypes.bool,
230-
sliderStyle: PropTypes.oneOf([SLIDER_STYLE_1, SLIDER_STYLE_2]),
231233
tabsList: SLIDER_TABS.isRequired
232234
}
233235

src/common/TabsSlider/tabsSlider.scss

Lines changed: 0 additions & 123 deletions
This file was deleted.

0 commit comments

Comments
 (0)