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
2f9e1954
Commit
2f9e1954
authored
5 years ago
by
Tibo
Browse files
Options
Downloads
Patches
Plain Diff
Show sensorsNOK
parent
acb1588d
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
web/app/Server.php
+10
-0
10 additions, 0 deletions
web/app/Server.php
web/resources/views/organization/dashboard.blade.php
+2
-4
2 additions, 4 deletions
web/resources/views/organization/dashboard.blade.php
with
12 additions
and
4 deletions
web/app/Server.php
+
10
−
0
View file @
2f9e1954
...
...
@@ -101,6 +101,16 @@ class Server extends Model
return
$status_array
;
}
public
function
getSensorsNOK
()
{
$sensorsNOK
=
[];
foreach
(
$this
->
getSensors
()
as
$sensor
)
{
if
(
$sensor
->
status
()
>
0
)
{
$sensorsNOK
[]
=
$sensor
;
}
}
return
$sensorsNOK
;
}
public
function
statusString
()
{
switch
(
$this
->
status
())
{
case
0
:
...
...
This diff is collapsed.
Click to expand it.
web/resources/views/organization/dashboard.blade.php
+
2
−
4
View file @
2f9e1954
...
...
@@ -16,11 +16,9 @@
</
div
>
<
div
class
=
"card-body"
>
<
ul
>
@
foreach
(
$server
->
getSensors
()
as
$sensor
)
@
if
(
$sensor
->
status
()
>
0
)
<
ul
class
=
"list-unstyled"
>
@
foreach
(
$server
->
getSensorsNOK
()
as
$sensor
)
<
li
>
{{
$sensor
->
getName
()
}}
</
li
>
@
endif
@
endforeach
</
ul
>
...
...
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