Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
eduGAIN Connectivity Check
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
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
edugain
eduGAIN Connectivity Check
Commits
a917ece3
Commit
a917ece3
authored
4 years ago
by
Marco Malavolti
Browse files
Options
Downloads
Patches
Plain Diff
Enriched GUI with parameters
parent
a9eb4450
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
web/eccs2.js
+32
-9
32 additions, 9 deletions
web/eccs2.js
web/index.php
+16
-3
16 additions, 3 deletions
web/index.php
with
48 additions
and
12 deletions
web/eccs2.js
+
32
−
9
View file @
a917ece3
// Global URL
// Needed to draw the ECCS2 DataTable
//var url = "/eccs2/api/eccsresults?eccsdt=1";
var
url
=
"
/eccs2/api/eccsresults?eccsdt=1&date=
"
+
document
.
getElementById
(
"
myDate
"
).
value
;
var
table
;
var
table
;
var
url
=
"
/eccs2/api/eccsresults?eccsdt=1
"
;
// PHP Variables retrieved from eccs2.php
// idp (entityID of the IdP)
// date (date time of the check)
// reg_auth (the IdP RegistrationAuthority)
// status (the ECCS2 IdP Status)
if
(
date
)
{
url
=
url
.
concat
(
"
&date=
"
+
date
);
}
if
(
reg_auth
)
{
url
=
url
.
concat
(
"
®_auth=
"
+
reg_auth
);
}
if
(
idp
)
{
url
=
url
.
concat
(
"
&idp=
"
+
idp
);
}
if
(
status
)
{
url
=
url
.
concat
(
"
&status=
"
+
status
);
}
function
getPastResults
()
{
url
=
"
/eccs2/api/eccsresults?eccsdt=1&date=
"
+
document
.
getElementById
(
"
myDate
"
).
value
;
table
.
ajax
.
url
(
url
).
load
();
var
getUrl
=
window
.
location
;
var
baseUrl
=
getUrl
.
protocol
+
"
//
"
+
getUrl
.
host
+
"
/
"
+
getUrl
.
pathname
.
split
(
'
/
'
)[
1
];
document
.
location
.
href
=
baseUrl
;
}
// use URL constructor and return hostname
// use URL constructor and return hostname
function
getHostname
(
url
)
{
function
getHostname
(
url
)
{
...
@@ -59,11 +87,6 @@ function format ( d ) {
...
@@ -59,11 +87,6 @@ function format ( d ) {
'
</table>
'
;
'
</table>
'
;
}
}
function
getPastResults
()
{
url
=
"
/eccs2/api/eccsresults?eccsdt=1&date=
"
+
document
.
getElementById
(
"
myDate
"
).
value
;
table
.
ajax
.
url
(
url
).
load
();
}
$
(
document
).
ready
(
function
()
{
$
(
document
).
ready
(
function
()
{
// Setup - add a text input to each footer cell
// Setup - add a text input to each footer cell
$
(
'
#eccstable thead tr
'
).
clone
(
true
).
appendTo
(
'
#eccstable thead
'
);
$
(
'
#eccstable thead tr
'
).
clone
(
true
).
appendTo
(
'
#eccstable thead
'
);
...
@@ -87,7 +110,7 @@ $(document).ready(function() {
...
@@ -87,7 +110,7 @@ $(document).ready(function() {
"
url
"
:
url
,
"
url
"
:
url
,
"
dataSrc
"
:
""
"
dataSrc
"
:
""
},
},
"
lengthMenu
"
:
[[
10
,
20
,
30
,
4
0
,
50
,
100
,
-
1
],
[
10
,
20
,
30
,
4
0
,
50
,
100
,
"
All
"
]],
"
lengthMenu
"
:
[[
10
,
3
0
,
50
,
100
,
-
1
],
[
10
,
3
0
,
50
,
100
,
"
All
"
]],
"
autoWidth
"
:
false
,
"
autoWidth
"
:
false
,
"
dom
"
:
'
<"top"lip>rt<"bottom"><"clear">
'
,
"
dom
"
:
'
<"top"lip>rt<"bottom"><"clear">
'
,
"
columns
"
:
[
"
columns
"
:
[
...
...
This diff is collapsed.
Click to expand it.
web/index.php
+
16
−
3
View file @
a917ece3
...
@@ -8,8 +8,15 @@ $firstDate = str_replace($str2strip, "", $firstFile);
...
@@ -8,8 +8,15 @@ $firstDate = str_replace($str2strip, "", $firstFile);
$files
=
scandir
(
$directory
,
SCANDIR_SORT_DESCENDING
);
$files
=
scandir
(
$directory
,
SCANDIR_SORT_DESCENDING
);
$lastFile
=
$files
[
0
];
$lastFile
=
$files
[
0
];
$lastDate
=
str_replace
(
$str2strip
,
""
,
$lastFile
);
$lastDate
=
str_replace
(
$str2strip
,
""
,
$lastFile
);
$data
=
array
();
$data
[
'firstDate'
]
=
$firstDate
;
$data
[
'lastDate'
]
=
$lastDate
;
$data
[
'idp'
]
=
htmlspecialchars
(
$_GET
[
"idp"
]);
$data
[
'reg_auth'
]
=
htmlspecialchars
(
$_GET
[
"reg_auth"
]);
$data
[
'date'
]
=
htmlspecialchars
(
$_GET
[
"date"
]);
$data
[
'status'
]
=
htmlspecialchars
(
$_GET
[
"status"
]);
?>
?>
<!DOCTYPE html>
<!DOCTYPE html>
...
@@ -29,8 +36,8 @@ $lastDate = str_replace($str2strip, "", $lastFile);
...
@@ -29,8 +36,8 @@ $lastDate = str_replace($str2strip, "", $lastFile);
<input
type=
"checkbox"
name=
"status"
value=
"ERROR"
>
ERROR
</input>
<input
type=
"checkbox"
name=
"status"
value=
"ERROR"
>
ERROR
</input>
<input
type=
"checkbox"
name=
"status"
value=
"OK"
>
OK
</input>
<input
type=
"checkbox"
name=
"status"
value=
"OK"
>
OK
</input>
<input
type=
"checkbox"
name=
"status"
value=
"DISABLED"
>
DISABLED
</input>
<input
type=
"checkbox"
name=
"status"
value=
"DISABLED"
>
DISABLED
</input>
<button
style=
"float:right;
"
onclick=
"getPastResults()"
>
Go
</button>
<button
id=
"goButton
"
onclick=
"getPastResults()"
>
Go
</button>
<input
style=
"float:right;
"
type=
"date"
id=
"myDate"
min=
"
<?php
echo
$firstDate
?>
"
max=
"
<?php
echo
$lastDate
?>
"
value=
"
<?php
echo
$lastDate
?>
"
/>
<input
id=
"myDate
"
type=
"date"
id=
"myDate"
min=
"
<?php
echo
$
data
[
'
firstDate
'
]
?>
"
max=
"
<?php
echo
$
data
[
'
lastDate
'
]
?>
"
value=
"
<?php
echo
$
data
[
'
lastDate
'
]
?>
"
/>
</div>
</div>
<hr>
<hr>
<button
id=
"btn-show-all-children"
type=
"button"
>
Expand All
</button>
<button
id=
"btn-show-all-children"
type=
"button"
>
Expand All
</button>
...
@@ -50,6 +57,12 @@ $lastDate = str_replace($str2strip, "", $lastFile);
...
@@ -50,6 +57,12 @@ $lastDate = str_replace($str2strip, "", $lastFile);
</thead>
</thead>
</table>
</table>
</div>
</div>
<script
type=
"text/javascript"
>
var
date
=
"
<?php
echo
$data
[
'date'
]
?>
"
;
var
reg_auth
=
"
<?php
echo
$data
[
'reg_auth'
]
?>
"
;
var
idp
=
"
<?php
echo
$data
[
'idp'
]
?>
"
;
var
status
=
"
<?php
echo
$data
[
'status'
]
?>
"
;
</script>
<script
type=
"text/javascript"
src=
"script.js"
/></script>
<script
type=
"text/javascript"
src=
"script.js"
/></script>
</body>
</body>
</html>
</html>
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