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
9a5955ea
Verified
Commit
9a5955ea
authored
5 years ago
by
David Beniamine
Browse files
Options
Downloads
Patches
Plain Diff
Small graphical improvements
parent
4bd42da0
Branches
Branches containing commit
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
+46
-23
46 additions, 23 deletions
wol/www/index.php
with
46 additions
and
23 deletions
wol/www/index.php
+
46
−
23
View file @
9a5955ea
...
@@ -15,6 +15,10 @@
...
@@ -15,6 +15,10 @@
- You should have received a copy of the GNU General Public License
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
-->
<?php
$school_name
=
shell_exec
(
'CreoleGet libelle_etab'
);
$title
=
"
$school_name
— Interface de gestion"
;
?>
<head>
<head>
<meta
charset=
"utf-8"
>
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
...
@@ -22,14 +26,17 @@
...
@@ -22,14 +26,17 @@
<link
rel=
"stylesheet"
href=
"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
integrity=
"sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u"
crossorigin=
"anonymous"
>
<link
rel=
"stylesheet"
href=
"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
integrity=
"sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u"
crossorigin=
"anonymous"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"https://cdn.datatables.net/1.10.19/css/jquery.dataTables.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"https://cdn.datatables.net/1.10.19/css/jquery.dataTables.css"
>
<script
type=
"text/javascript"
charset=
"utf8"
src=
"https://cdn.datatables.net/1.10.19/js/jquery.dataTables.js"
></script>
<script
type=
"text/javascript"
charset=
"utf8"
src=
"https://cdn.datatables.net/1.10.19/js/jquery.dataTables.js"
></script>
<title>
<?
echo
"
$title
"
;
?>
</title>
</head>
</head>
<body>
<body>
<div
id=
"box"
class=
"container"
style=
"font-size:large"
>
<div
id=
"box"
class=
"container"
style=
"font-size:large"
>
<div
id=
"content"
>
<div
id=
"content"
>
<h1>
Interface de gestion des postes
</h1>
<h1>
<?
echo
"
$title
"
;
?>
</h1>
<p>
Bienvenue sur l'interface de gestion de l'école :
<code>
<?
echo
"
$school_name
"
;
?>
</code>
.
</p>
<?php
<?php
ini_set
(
'display_errors'
,
1
);
ini_set
(
'display_errors'
,
1
);
ini_set
(
'display_startup_errors'
,
1
);
ini_set
(
'display_startup_errors'
,
1
);
...
@@ -45,30 +52,43 @@ if(!isset($action)){
...
@@ -45,30 +52,43 @@ if(!isset($action)){
if
(
empty
(
$lines
)){
if
(
empty
(
$lines
)){
echo
"Impossible de récupérer le registre, code
$code
"
;
echo
"Impossible de récupérer le registre, code
$code
"
;
}
else
if
(
$n
==
1
){
}
else
if
(
$n
==
1
){
echo
"
$n
poste est enregistré sur
c
e serveur"
;
echo
"
$n
poste est enregistré sur
l
e serveur"
;
}
else
{
}
else
{
echo
"
$n
postes sont enregistrés sur
c
e serveur"
;
echo
"
$n
postes sont enregistrés sur
l
e serveur"
;
}
}
?>
?>
</p>
</p>
<h2>
Actions globables
</h2>
<h2>
Actions globales
</h2>
<p>
Les actions de cette sectiode cette sectionappliquées sur la totalité des postes du parc.
<br
/>
Vous avez la possibilité de lancer les mêmes actions invididuellement sur les différents postes dans la section suivante.
</p>
<ul>
<li>
Mettre à jour les configurations des postes (scripts d'adaptation de Primtux pour Grenoble) :
<form
action=
"index.php"
method=
"post"
>
<form
action=
"index.php"
method=
"post"
>
<input
type=
"hidden"
name=
"action"
value=
"upgradeAll"
>
<input
type=
"hidden"
name=
"action"
value=
"upgradeAll"
>
<input
type=
"submit"
value=
"M
ettr
e à jour
tous les postes
"
title=
"Mettre à jour tous les postes (config)"
>
<input
type=
"submit"
value=
"M
is
e à jour
config
"
title=
"Mettre à jour tous les postes (config)"
>
</form>
</form>
</li>
<li>
Mettre à jour les configuration et les paquets
<code>
apt
</code>
:
<form
action=
"index.php"
method=
"post"
>
<form
action=
"index.php"
method=
"post"
>
<input
type=
"hidden"
name=
"action"
value=
"upgradeAllApt"
>
<input
type=
"hidden"
name=
"action"
value=
"upgradeAllApt"
>
<input
type=
"submit"
value=
"M
ettr
e à jour
tous les postes avec mises à jour
APT"
title=
"Mettre à jour tous les postes (config + APT)"
>
<input
type=
"submit"
value=
"M
is
e à jour
config +
APT"
title=
"Mettre à jour tous les postes (config + APT)"
>
</form>
</form>
</li>
<li>
Voir le dernier log de mise à jour des postes depuis le serveur :
<form
action=
"index.php"
method=
"post"
>
<form
action=
"index.php"
method=
"post"
>
<input
type=
"hidden"
name=
"action"
value=
"getLogAll"
>
<input
type=
"hidden"
name=
"action"
value=
"getLogAll"
>
<input
type=
"submit"
value=
"
Voir le dernier l
og de mise à jour"
title=
"Voir le dernier log de mise à jour"
>
<input
type=
"submit"
value=
"
L
og de mise à jour"
title=
"Voir le dernier log de mise à jour"
>
</form>
</form>
<h2>
Gestion des postes
</h2>
</li>
</ul>
<h2>
Actions ciblées
</h2>
<p>
<p>
Vous pouvez trier la table ci dessous en cliquant sur la colonne que vous voulez.
Vous pouvez trier la table ci dessous en cliquant sur la colonne que vous voulez.
<br
/>
<br
/>
Cliquer une deuxième fois pour inverser l'ordre de tri.
<br
/>
Cliquer une deuxième fois inverser l'ordre de tri.
Il est aussi possible de filtrer la table pour ne voir qu'une partie des postes (par exemple pour trouver un poste par IP ou non d'hôte).
<br
/>
Veuillez noter que la table est paginée, la totalité des resultats n'est pas forcément affichée.
</p>
</p>
<div
class=
"col-sm-12"
>
<div
class=
"col-sm-12"
>
<table
class=
"table table-striped table-bordered table-hover"
style=
"text-align:center;"
>
<table
class=
"table table-striped table-bordered table-hover"
style=
"text-align:center;"
>
...
@@ -92,6 +112,9 @@ if(!isset($action)){
...
@@ -92,6 +112,9 @@ if(!isset($action)){
if
(
$line
!=
""
){
if
(
$line
!=
""
){
$entry
=
explode
(
' '
,
$line
);
$entry
=
explode
(
' '
,
$line
);
$nb_infos
=
count
(
$entry
);
$nb_infos
=
count
(
$entry
);
if
(
$nb_infos
<
2
){
continue
;
}
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 date mac name [num_apt_upgrade deb_version pt_version git_branch git_update] ip
echo
"<tr>"
;
echo
"<tr>"
;
...
@@ -99,7 +122,7 @@ if(!isset($action)){
...
@@ -99,7 +122,7 @@ if(!isset($action)){
echo
"<td> "
.
$entry
[
$nb_infos
-
1
]
.
"</td>"
;
echo
"<td> "
.
$entry
[
$nb_infos
-
1
]
.
"</td>"
;
echo
"<td>"
.
$entry
[
1
]
.
"</td>"
;
echo
"<td>"
.
$entry
[
1
]
.
"</td>"
;
#echo "<td>".$entry[0]."</td>";
#echo "<td>".$entry[0]."</td>";
if
(
$nb_infos
>
4
){
if
(
$nb_infos
>
5
){
echo
"<td>"
.
$entry
[
4
]
.
"</td>"
;
echo
"<td>"
.
$entry
[
4
]
.
"</td>"
;
echo
"<td>"
.
str_replace
(
'_'
,
' '
,
$entry
[
5
])
.
"</td>"
;
echo
"<td>"
.
str_replace
(
'_'
,
' '
,
$entry
[
5
])
.
"</td>"
;
echo
"<td>"
.
$entry
[
3
]
.
"</td>"
;
echo
"<td>"
.
$entry
[
3
]
.
"</td>"
;
...
@@ -111,7 +134,7 @@ if(!isset($action)){
...
@@ -111,7 +134,7 @@ if(!isset($action)){
echo
"<td>NA</td>"
;
echo
"<td>NA</td>"
;
}
}
# Last seen
# Last seen
echo
"<td>"
.
$entry
[
0
]
.
"</td>"
;
echo
"<td>"
.
preg_replace
(
'/(\d{4})(\d{2})(\d{2})/'
,
'$1/$2/$3'
,
$entry
[
0
]
)
.
"</td>"
;
echo
"<td>"
;
echo
"<td>"
;
# Actions
# Actions
?>
?>
...
...
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