Skip to content

Commit

Permalink
Impl [General] Hide unimplemented UI elements (#188)
Browse files Browse the repository at this point in the history
  • Loading branch information
mariana-furyk authored Jul 27, 2020
1 parent dea909e commit a2809f7
Show file tree
Hide file tree
Showing 5 changed files with 83 additions and 54 deletions.
28 changes: 17 additions & 11 deletions src/components/CreateJobPage/createJobPage.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,26 @@
padding: 18px;
background-color: $white;

.header-link {
display: flex;
align-items: center;
.header {
&-link {
display: flex;
align-items: center;

&__title {
margin: 0 18px;
font-weight: 500;
font-size: 20px;
line-height: 23px;
color: $primary
}

&__title {
margin: 0 18px;
font-weight: 500;
font-size: 20px;
line-height: 23px;
color: $primary
&__icon {
margin-bottom: -4px;
}
}

&__icon {
margin-bottom: -4px;
&-buttons {
display: none;
}
}
}
Expand Down
99 changes: 59 additions & 40 deletions src/components/FilterMenu/FilterMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,46 +91,65 @@ const FilterMenu = ({
return (
<>
<div className="filters">
{filters.map(filter =>
filter === 'tree' ? (
<ArtifactFilterTree
key={filter}
value={valueFilterTree || 'Latest'}
label="Tree:"
items={itemsFilterTree}
match={match}
onChange={handleChangeArtifactFilterTree}
page={page}
/>
) : filter === 'labels' || filter === 'name' ? (
<Input
type="text"
label={filter === 'labels' ? 'labels:' : 'name:'}
placeholder={filter === 'labels' ? 'key1=value1,…' : ''}
key={filter}
onChange={filter === 'labels' ? setLabels : setName}
value={filter === 'labels' ? labels : name}
onKeyDown={onKeyDown}
/>
) : (
<Select
options={selectOptions[filter]}
label={`${filter.replace(/([A-Z])/g, ' $1')}:`}
key={filter}
selectedId={
(filter === 'status' && stateFilter) ||
(filter === 'groupBy' && groupFilter)
}
selectType={filter === 'status' ? 'checkbox' : ''}
match={match}
onClick={
(filter === 'status' && setStateFilter) ||
(filter === 'groupBy' && setGroupFilter)
}
page={page}
/>
)
)}
{filters.map(filter => {
switch (filter) {
case 'tree':
return (
<ArtifactFilterTree
key={filter}
value={valueFilterTree || 'Latest'}
label="Tree:"
items={itemsFilterTree}
match={match}
onChange={handleChangeArtifactFilterTree}
page={page}
/>
)
case 'labels':
return (
<Input
type="text"
label="labels:"
placeholder="key1=value1,…"
key={filter}
onChange={setLabels}
value={labels}
onKeyDown={onKeyDown}
/>
)
case 'name':
return (
<Input
type="text"
label="name:"
key={filter}
onChange={setName}
value={name}
onKeyDown={onKeyDown}
/>
)
default:
return (
<Select
className={filter === 'period' ? 'period-filter' : ''}
options={selectOptions[filter]}
label={`${filter.replace(/([A-Z])/g, ' $1')}:`}
key={filter}
selectedId={
(filter === 'status' && stateFilter) ||
(filter === 'groupBy' && groupFilter)
}
selectType={filter === 'status' ? 'checkbox' : ''}
match={match}
onClick={
(filter === 'status' && setStateFilter) ||
(filter === 'groupBy' && setGroupFilter)
}
page={page}
/>
)
}
})}
{page === FUNCTIONS_PAGE && (
<CheckBox
className="filters-checkbox"
Expand Down
4 changes: 4 additions & 0 deletions src/components/FilterMenu/filterMenu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
.filters-checkbox {
margin-bottom: 15px;
}

.period-filter {
display: none;
}
}

.buttons {
Expand Down
2 changes: 1 addition & 1 deletion src/components/ScheduleJob/ScheduleJob.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const ScheduleJob = ({ handleRunJob, match, setOpenScheduleJob }) => {
})
const [date, setDate] = useState('')
const [time, setTime] = useState('')
const [isRecurring, setIsRecurring] = useState('')
const [isRecurring, setIsRecurring] = useState('recurring')
const [recurringState, recurringDispatch] = useReducer(
recurringReducer,
initialState
Expand Down
4 changes: 2 additions & 2 deletions src/components/ScheduleJobSimple/scheduleJobSimple.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
min-width: 230px;

&_container {
display: flex;
display: none;
}
}

Expand All @@ -16,7 +16,7 @@
}

.checkbox_container {
display: flex;
display: none;
margin: 23px 0;
padding: 10px 10px 10px 0;
}
Expand Down

0 comments on commit a2809f7

Please sign in to comment.