Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
Automatically-Generated-Cyber-Security-Compliance-Engine
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
jda1g15
Automatically-Generated-Cyber-Security-Compliance-Engine
Commits
6bdd0b5e
Commit
6bdd0b5e
authored
5 years ago
by
James D'Alton
Browse files
Options
Downloads
Patches
Plain Diff
basic layout achieved
parent
a2d2da08
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/compforge/src/FormsDisplay.js
+49
-0
49 additions, 0 deletions
src/compforge/src/FormsDisplay.js
src/compforge/src/Menu.js
+47
-0
47 additions, 0 deletions
src/compforge/src/Menu.js
src/compforge/src/index.js
+50
-56
50 additions, 56 deletions
src/compforge/src/index.js
with
146 additions
and
56 deletions
src/compforge/src/FormsDisplay.js
0 → 100644
+
49
−
0
View file @
6bdd0b5e
import
React
from
'
react
'
;
import
{
Grid
}
from
'
@material-ui/core
'
;
const
FormsDisplay
=
({
formItems
})
=>
{
return
(
<
div
>
{
formItems
.
map
(
(
formItem
,
i
)
=>
<
Grid
container
direction
=
"
column
"
justify
=
"
space-evenly
"
alignItems
=
"
stretch
"
spacing
=
{
3
}
item
xs
=
{
9
}
key
=
{
i
}
>
<
FormItem
name
=
{
formItem
.
name
}
owner
=
{
formItem
.
owner
}
dateModified
=
{
formItem
.
dateModified
}
/>
<
/Grid>
)}
<
/div>
)
}
const
FormItem
=
({
name
,
owner
,
dateModified
})
=>
{
return
(
<
Grid
container
direction
=
"
row
"
spacing
=
{
3
}
>
<
Grid
item
xs
=
{
3
}
>
<
h3
>
{
name
}
<
/h3>
<
/Grid>
<
Grid
item
xs
=
{
3
}
>
<
h3
>
{
owner
}
<
/h3>
<
/Grid>
<
Grid
item
xs
=
{
3
}
>
<
div
outline
=
"
2px solid black
"
>
<
h3
>
{
dateModified
}
<
/h3>
<
/div>
<
/Grid>
<
/Grid>
)
}
export
default
FormsDisplay
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/compforge/src/Menu.js
0 → 100644
+
47
−
0
View file @
6bdd0b5e
import
React
from
'
react
'
;
import
{
Button
,
Grid
}
from
'
@material-ui/core
'
;
class
Menu
extends
React
.
Component
{
state
=
{
signedIn
:
false
}
toggleSignedInOut
=
()
=>
{
this
.
setState
(
prevState
=>
({
signedIn
:
!
prevState
.
signedIn
}))
}
render
()
{
const
{
menuItems
}
=
this
.
props
return
(
<
Grid
container
direction
=
"
column
"
justify
=
"
space-evenly
"
alignItems
=
"
stretch
"
spacing
=
{
3
}
>
{
menuItems
.
map
(
(
menuItem
,
i
)
=>
<
Grid
key
=
{
i
}
item
xs
=
{
3
}
>
<
MenuButton
key
=
{
i
}
id
=
{
menuItem
.
id
}
/>
<
/Grid>
)
}
<
/Grid >
)
}
}
const
MenuButton
=
({
id
})
=>
{
return
(
<
section
>
<
Button
variant
=
"
contained
"
color
=
"
primary
"
>
{
id
}
<
/Button>
<
/section>
)
}
export
default
Menu
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/compforge/src/index.js
+
50
−
56
View file @
6bdd0b5e
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
ReactDOM
from
'
react-dom
'
;
import
ReactDOM
from
'
react-dom
'
;
import
{
Grid
,
AppBar
,
Button
}
from
'
@material-ui/core
'
;
import
{
Grid
,
AppBar
,
Toolbar
,
Typography
,
Button
,
makeStyles
}
from
'
@material-ui/core
'
;
import
Menu
from
'
./Menu
'
import
FormsDisplay
from
'
./FormsDisplay
'
let
menuItems
=
[
let
menuItems
=
[
{
"
id
"
:
"
createForm
"
},
{
"
id
"
:
"
createForm
"
},
...
@@ -10,66 +12,58 @@ let menuItems = [
...
@@ -10,66 +12,58 @@ let menuItems = [
{
"
id
"
:
"
signOut
"
}
{
"
id
"
:
"
signOut
"
}
]
]
let
formItems
=
[
{
"
name
"
:
"
myFirstForm
"
,
"
owner
"
:
"
me!
"
,
"
dateModified
"
:
"
Today 12:32
"
},
{
"
name
"
:
"
mySecondForm
"
,
"
owner
"
:
"
me!
"
,
"
dateModified
"
:
"
Yesterday 16:04
"
},
{
"
name
"
:
"
myThirdForm
"
,
"
owner
"
:
"
me!
"
,
"
dateModified
"
:
"
Friday 14:46
"
}
]
const
useStyles
=
makeStyles
(
theme
=>
({
root
:
{
flexGrow
:
1
,
},
menuButton
:
{
marginRight
:
theme
.
spacing
(
2
),
},
title
:
{
flexGrow
:
1
,
},
}));
const
Page
=
()
=>
{
const
Page
=
()
=>
{
const
classes
=
useStyles
();
return
(
return
(
<
Grid
container
>
<
Grid
container
spacing
=
{
3
}
>
<
Grid
item
xs
=
{
12
}
>
<
Grid
item
xs
=
{
12
}
>
{
/* <AppBar /> */
}
<
AppBar
position
=
"
static
"
>
<
h1
>
header
<
/h1
>
<
Toolbar
>
<
Typography
variant
=
"
h6
"
className
=
{
classes
.
title
}
>
Compforge
<
/Typography
>
<
Button
color
=
"
inherit
"
>
Login
<
/Button
>
<
/Toolbar
>
<
/AppBar
>
<
/Grid
>
<
/Grid
>
<
Grid
item
xs
=
{
3
}
>
<
Grid
item
xs
=
{
3
}
>
<
Menu
menuItems
=
{
menuItems
}
/
>
<
Menu
menuItems
=
{
menuItems
}
/
>
<
/Grid
>
<
/Grid
>
<
Grid
item
xs
=
{
9
}
>
<
Grid
<
FormsDisplay
/>
container
item
xs
=
{
9
}
direction
=
"
column
"
justify
=
"
space-evenly
"
spacing
=
{
3
}
>
<
FormsDisplay
formItems
=
{
formItems
}
/
>
<
/Grid
>
<
/Grid
>
<
/Grid
>
<
/Grid
>
)
)
}
}
const
FormsDisplay
=
()
=>
{
return
(
<
Grid
item
xs
=
{
3
}
>
<
p
>
[
Form
name
here
]
<
/p
>
<
/Grid
>
)
}
const
MenuButton
=
({
id
})
=>
{
return
(
<
section
>
<
Button
variant
=
"
contained
"
color
=
"
primary
"
>
{
id
}
<
/Button
>
<
/section
>
)
}
class
Menu
extends
React
.
Component
{
state
=
{
signedIn
:
false
}
toggleSignedInOut
=
()
=>
{
this
.
setState
(
prevState
=>
({
signedIn
:
!
prevState
.
signedIn
}))
}
render
()
{
const
{
menuItems
}
=
this
.
props
return
(
<
div
id
=
"
menu
"
>
<
AppBar
/>
<
h2
>
Signed
{
this
.
state
.
signedIn
?
'
in
'
:
'
out
'
}
<
/h2
>
<
Button
variant
=
"
contained
"
color
=
"
primary
"
onClick
=
{
this
.
toggleSignedInOut
}
>
Sign
in
/out</
Button
>
{
menuItems
.
map
(
(
menuItem
,
i
)
=>
<
MenuButton
key
=
{
i
}
id
=
{
menuItem
.
id
}
/
>
)}
<
/div
>
)
}
}
ReactDOM
.
render
(
ReactDOM
.
render
(
<
Page
/>
,
<
Page
/>
,
document
.
getElementById
(
'
root
'
)
document
.
getElementById
(
'
root
'
)
...
...
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