Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
eole-wol
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
primtux-eole
Grenoble
eole-wol
Commits
e5b3d84a
Verified
Commit
e5b3d84a
authored
3 years ago
by
David Beniamine
Browse files
Options
Downloads
Patches
Plain Diff
Fix bad column alignment
parent
ef0499dc
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
wol/www/index.php
+27
-7
27 additions, 7 deletions
wol/www/index.php
with
27 additions
and
7 deletions
wol/www/index.php
+
27
−
7
View file @
e5b3d84a
...
@@ -107,23 +107,43 @@ if(!isset($action)){
...
@@ -107,23 +107,43 @@ if(!isset($action)){
$registry
=
array
();
$registry
=
array
();
foreach
(
$lines
as
$line
){
foreach
(
$lines
as
$line
){
if
(
$line
!=
""
){
if
(
$line
!=
""
){
$entry
=
explode
(
' '
,
$line
);
$entry
=
explode
(
' '
,
preg_replace
(
"/\s\s+/"
,
" "
,
$line
)
)
;
$nb_infos
=
count
(
$entry
);
$nb_infos
=
count
(
$entry
);
if
(
$nb_infos
<
2
){
if
(
$nb_infos
<
2
){
continue
;
continue
;
}
}
# Remove and shift lines with double IPS
if
(
filter_var
(
$entry
[
4
],
FILTER_VALIDATE_IP
,
FILTER_FLAG_IPV4
))
{
if
(
$entry
[
4
]
!=
$entry
[
3
])
{
$entry
[
3
]
=
$entry
[
3
]
.
" ou "
.
$entry
[
4
];
}
unset
(
$entry
[
4
]);
$entry
=
array_values
(
$entry
);
}
# Add aditionnal IPS to IP field
if
(
$nb_infos
>
9
)
{
for
(
$i
=
9
;
$i
<
$nb_infos
;
$i
++
)
{
if
(
$entry
[
$i
]
!=
"NA"
&&
strpos
(
$entry
[
3
],
$entry
[
$i
])
===
false
)
{
$entry
[
3
]
.
=
" ou "
.
$entry
[
$i
];
}
}
}
array_push
(
$registry
,
$entry
);
array_push
(
$registry
,
$entry
);
# Format date mac name [num_apt_upgrade deb_version pt_version git_branch git_update] ip
# Format
# 0 1 2 3 4 5 6 7 8
# date mac name "ip [ou ip2]" num_apt_upgrade deb_version pt_version git_branch git_update
echo
"<tr>"
;
echo
"<tr>"
;
# Name
echo
"<td>"
.
$entry
[
2
]
.
"</td>"
;
echo
"<td>"
.
$entry
[
2
]
.
"</td>"
;
echo
"<td> "
.
$entry
[
$nb_infos
-
1
]
.
"</td>"
;
# IPs
echo
"<td> "
.
$entry
[
3
]
.
"</td>"
;
# MAC
echo
"<td>"
.
$entry
[
1
]
.
"</td>"
;
echo
"<td>"
.
$entry
[
1
]
.
"</td>"
;
#echo "<td>".$entry[0]."</td>";
if
(
$nb_infos
>
5
){
if
(
$nb_infos
>
5
){
echo
"<td>"
.
$entry
[
5
]
.
"</td>"
;
echo
"<td>"
.
$entry
[
6
]
.
"</td>"
;
echo
"<td>"
.
$entry
[
4
]
.
"</td>"
;
echo
"<td>"
.
$entry
[
4
]
.
"</td>"
;
echo
"<td>"
.
str_replace
(
'_'
,
' '
,
$entry
[
5
])
.
"</td>"
;
echo
"<td> branche "
.
$entry
[
7
]
.
", "
.
$entry
[
8
]
.
" commits en retard</td>"
;
echo
"<td>"
.
$entry
[
3
]
.
"</td>"
;
echo
"<td> branche "
.
$entry
[
6
]
.
", "
.
$entry
[
7
]
.
" commits en retard</td>"
;
}
else
{
}
else
{
echo
"<td>NA</td>"
;
echo
"<td>NA</td>"
;
echo
"<td>NA</td>"
;
echo
"<td>NA</td>"
;
...
...
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