Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
monitoring
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cylab
monitoring
Commits
58f81415
Commit
58f81415
authored
1 year ago
by
Thibault Debatty
Browse files
Options
Downloads
Patches
Plain Diff
update rack view code
parent
789ffdd1
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
resources/assets/sass/app.scss
+3
-1
3 additions, 1 deletion
resources/assets/sass/app.scss
resources/assets/sass/rack.scss
+49
-0
49 additions, 0 deletions
resources/assets/sass/rack.scss
resources/views/organization/rack.blade.php
+30
-80
30 additions, 80 deletions
resources/views/organization/rack.blade.php
with
82 additions
and
81 deletions
resources/assets/sass/app.scss
+
3
−
1
View file @
58f81415
...
...
@@ -48,4 +48,6 @@ nav.navbar {
pre
code
{
font-size
:
87
.5%
;
overflow
:
hidden
;
}
\ No newline at end of file
}
@import
"rack.scss"
;
\ No newline at end of file
This diff is collapsed.
Click to expand it.
resources/assets/sass/rack.scss
0 → 100644
+
49
−
0
View file @
58f81415
div
.rack-container
{
position
:
relative
;
padding-bottom
:
0rem
;
border-bottom
:
1px
solid
gray
;
box-shadow
:
0
10px
5px
-5px
rgba
(
0
,
0
,
0
,
0
.2
);
}
div
.rack
{
position
:
relative
;
display
:
inline
;
width
:
300px
;
border
:
1px
solid
rgba
(
0
,
0
,
0
,
0
.1
);
}
div
.server
{
position
:
absolute
;
width
:
100%
;
padding
:
0
.2rem
;
display
:
flex
;
flex-direction
:
column
;
word-wrap
:
break-word
;
background-color
:
white
;
border
:
1px
solid
rgba
(
0
,
0
,
0
,
0
.1
);
}
div
.slot
{
position
:
absolute
;
width
:
100%
;
height
:
2rem
;
padding
:
0
.2rem
;
display
:
flex
;
flex-direction
:
column
;
word-wrap
:
break-word
;
background-color
:
rgba
(
0
,
0
,
0
,
0
.01
);
border
:
1px
solid
rgba
(
0
,
0
,
0
,
0
.05
);
color
:
rgba
(
0
,
0
,
0
,
0
.2
);
}
// max rack (or server)) size should be 50u ...
@for
$size
from
1
through
50
{
div
.size-
#{
$size
}
u
{
height
:
#{
$size
*
2
}
rem
;
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
resources/views/organization/rack.blade.php
+
30
−
80
View file @
58f81415
@
extends
(
'layouts.app'
)
@
section
(
'content'
)
<
style
>
div
.
rack
{
position
:
relative
;
width
:
100
%
;
border
:
1
px
solid
rgba
(
0
,
0
,
0
,
0.1
);
}
div
.
server
{
position
:
absolute
;
width
:
100
%
;
padding
:
0.2
rem
;
display
:
flex
;
flex
-
direction
:
column
;
word
-
wrap
:
break
-
word
;
background
-
color
:
white
;
border
:
1
px
solid
rgba
(
0
,
0
,
0
,
0.1
);
}
div
.
size
-
1
u
{
height
:
2
rem
;
}
div
.
size
-
2
u
{
height
:
4
rem
;
}
div
.
size
-
3
u
{
height
:
6
rem
;
}
div
.
size
-
4
u
{
height
:
8
rem
;
}
div
.
size
-
48
u
{
height
:
96
rem
}
div
.
size
-
42
u
{
height
:
84
rem
}
div
.
slot
{
position
:
absolute
;
width
:
100
%
;
height
:
2
rem
;
padding
:
0.2
rem
;
display
:
flex
;
flex
-
direction
:
column
;
word
-
wrap
:
break
-
word
;
background
-
color
:
rgba
(
0
,
0
,
0
,
0.01
);
border
:
1
px
solid
rgba
(
0
,
0
,
0
,
0.05
);
color
:
rgba
(
0
,
0
,
0
,
0.2
);
}
</
style
>
<
div
class
=
"container-fluid pb-4"
>
<
div
class
=
"rack-container"
>
<
div
class
=
"rack size-42u"
>
@
for
(
$i
=
0
;
$i
<
42
;
$i
++
)
<
div
class
=
"slot"
style
=
"bottom: {{ 2*
$i
}}rem"
>
{{
$i
+
1
}}
</
div
>
@
endfor
<
div
class
=
"container"
>
<
div
class
=
"rack size-42u"
>
@
for
(
$i
=
0
;
$i
<
42
;
$i
++
)
<
div
class
=
"slot"
style
=
"bottom: {{ 2*
$i
}}rem"
>
{{
$i
+
1
}}
@
foreach
(
$organization
->
servers
as
$server
)
@
if
(
$server
->
size
==
0
)
@
continue
@
endif
<
div
class
=
"server size-{{
$server->size
}}u"
style
=
"bottom: {{ 2*(
$server->position
- 1) }}rem;"
>
<
p
>
<
a
href
=
"{{
$server->getUrlAttribute
() }}"
class
=
"text-decoration-none"
>
{{
$server
->
name
}}
</
a
>
{
!!
$server
->
status
()
->
badge
()
!!
}
</
p
>
</
div
>
@
endforeach
</
div
>
@
endfor
@
foreach
(
$organization
->
servers
as
$server
)
@
if
(
$server
->
size
==
0
)
@
continue
@
endif
<
div
class
=
"server size-{{
$server->size
}}u"
style
=
"bottom: {{ 2*(
$server->position
- 1) }}rem;"
>
<
p
>
<
a
href
=
"{{
$server->getUrlAttribute
() }}"
class
=
"text-decoration-none"
>
{{
$server
->
name
}}
</
a
>
{
!!
$server
->
status
()
->
badge
()
!!
}
</
p
>
<
div
class
=
"rack size-12u"
>
@
for
(
$i
=
0
;
$i
<
12
;
$i
++
)
<
div
class
=
"slot"
style
=
"bottom: {{ 2*
$i
}}rem"
>
{{
$i
+
1
}}
</
div
>
@
endfor
</
div
>
@
endforeach
</
div
>
</
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