Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
ce-deploy-ui
Manage
Activity
Members
Labels
Plan
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ccce
dev
ce-deploy-ui
Commits
bba958ed
Commit
bba958ed
authored
4 years ago
by
John Sparger
Browse files
Options
Downloads
Patches
Plain Diff
IOCListView now shows IOCTable on larger screens
parent
1afbff1d
No related branches found
No related tags found
2 merge requests
!25
IOCListView now has tabs to prefilter on all or currentUsers IOCs. The currentUser is hardcoded
,
!9
Ioc table
Pipeline
#64430
failed
4 years ago
Stage: build
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/components/IOC/IOCTable.js
+14
-14
14 additions, 14 deletions
src/components/IOC/IOCTable.js
src/views/IOC/IOCListView.js
+13
-3
13 additions, 3 deletions
src/views/IOC/IOCListView.js
with
27 additions
and
17 deletions
src/components/IOC/IOCTable.js
+
14
−
14
View file @
bba958ed
import
React
,
{
useEffect
}
from
'
react
'
;
import
{
CustomTable
}
from
"
../common/table/CustomTable
"
;
import
{
CheckCircleOutline
,
ErrorOutline
,
RotateRightOutlined
,
ScheduleOutlined
}
from
"
@material-ui/icons
"
;
import
{
Brightness1
,
CheckCircleOutline
,
ErrorOutline
,
RadioButtonUnchecked
,
RotateRightOutlined
,
ScheduleOutlined
}
from
"
@material-ui/icons
"
;
import
{
theme
}
from
"
../../Theme
"
;
import
{
useGetIOCs
}
from
'
../../api/Hooks
'
;
import
{
Container
}
from
'
@material-ui/core
'
;
...
...
@@ -17,23 +17,23 @@ const columns = [
]
export
const
deploymentStatusIcon
s
=
{
"
ok
"
:
<
CheckCircleOutline
/>
,
"
down
"
:
<
ErrorOutline
/>
,
"
un
deployed
"
:
<
RotateRightOutlined
/>
,
"
un
reachable
"
:
<
ScheduleOutlined
/>
,
}
const
statusBulbColor
s
=
{
"
ok
"
:
theme
.
palette
.
success
.
light
,
"
down
"
:
theme
.
palette
.
text
.
disabled
,
"
un
reachable
"
:
theme
.
palette
.
secondary
.
light
,
"
un
deployed
"
:
theme
.
palette
.
text
.
disabled
,
}
;
export
const
deploymentStatusColor
s
=
{
"
ok
"
:
theme
.
palette
.
status
.
ok
,
"
down
"
:
theme
.
palette
.
status
.
fail
,
"
un
deployed
"
:
theme
.
palette
.
status
.
progress
,
"
un
reachable
"
:
theme
.
palette
.
status
.
neutral
,
const
statusBulbIcon
s
=
{
"
ok
"
:
<
Brightness1
/>
,
"
down
"
:
<
Brightness1
/>
,
"
un
reachable
"
:
<
ErrorOutline
/>
,
"
un
deployed
"
:
<
RadioButtonUnchecked
/>
,
}
function
createTableRow
({
id
,
name
,
git
,
version
,
host
,
status
})
{
const
iconStyle
=
{
fill
:
deploymentS
tatusColors
[
status
]
};
const
statusIcon
=
React
.
cloneElement
(
deploymentS
tatusIcons
[
status
],
{
style
:
iconStyle
});
const
iconStyle
=
{
fill
:
s
tatus
Bulb
Colors
[
status
]
};
const
statusIcon
=
React
.
cloneElement
(
s
tatus
Bulb
Icons
[
status
],
{
style
:
iconStyle
});
return
{
id
:
id
,
...
...
This diff is collapsed.
Click to expand it.
src/views/IOC/IOCListView.js
+
13
−
3
View file @
bba958ed
import
{
IconButton
,
useTheme
}
from
"
@material-ui/core
"
;
import
{
Hidden
,
IconButton
,
useTheme
}
from
"
@material-ui/core
"
;
import
{
AddBox
}
from
"
@material-ui/icons
"
;
import
React
,
{
useEffect
,
useState
}
from
"
react
"
import
{
useGetIOCs
}
from
"
../../api/Hooks
"
;
...
...
@@ -7,6 +7,7 @@ import { SearchableIOCList } from "../../components/IOC/IOCList";
import
{
CreateIOC
}
from
"
../../components/IOC/CreateIOC
"
;
import
{
SimpleModal
}
from
"
../../components/common/SimpleModal/SimpleModal
"
;
import
{
useCreateIOC
}
from
"
../../api/Hooks
"
;
import
{
SearchableIOCTable
}
from
"
../../components/IOC/IOCTable
"
;
export
function
IOCListView
()
{
...
...
@@ -30,14 +31,23 @@ export function IOCListView() {
let
content
=
<
h1
>
Loading
IOCs
...
<
/h1
>
if
(
iocs
&&
!
iocs
.
isPromise
)
{
const
abcIOCs
=
iocs
.
sort
((
a
,
b
)
=>
a
.
name
.
localeCompare
(
b
.
name
));
content
=
<
SearchableIOCList
iocs
=
{
abcIOCs
}
/>
;
content
=
(
<>
<
Hidden
smUp
>
<
SearchableIOCList
iocs
=
{
abcIOCs
}
/
>
<
/Hidden
>
<
Hidden
xsDown
>
<
SearchableIOCTable
iocs
=
{
abcIOCs
}
/
>
<
/Hidden
>
<
/
>
);
}
return
(
<
div
>
{
content
}
<
SimpleModal
open
=
{
iocFormOpen
}
setOpen
=
{
setIOCFormOpen
}
>
<
CreateIOC
submitCallback
=
{
closeModal
}
hook
=
{
useCreateIOC
}
/
>
<
CreateIOC
submitCallback
=
{
closeModal
}
hook
=
{
useCreateIOC
}
/
>
<
/SimpleModal
>
<
/div
>
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment