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
7f703bad
Commit
7f703bad
authored
3 years ago
by
Marco Malavolti
Browse files
Options
Downloads
Patches
Plain Diff
Added UNKNOWN status
parent
2eb817e3
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
api.py
+8
-4
8 additions, 4 deletions
api.py
eccs.py
+4
-0
4 additions, 0 deletions
eccs.py
web/eccs.css
+8
-3
8 additions, 3 deletions
web/eccs.css
web/eccs.js
+5
-1
5 additions, 1 deletion
web/eccs.js
web/index.php
+5
-3
5 additions, 3 deletions
web/index.php
with
30 additions
and
11 deletions
api.py
+
8
−
4
View file @
7f703bad
...
...
@@ -87,8 +87,8 @@ class EccsResults(Resource):
file_path
=
f
"
{
e_p
.
ECCS_OUTPUTDIR
}
/eccs_
{
date
}
.log
"
if
'
status
'
in
request
.
args
:
status
=
request
.
args
[
'
status
'
].
upper
()
if
(
status
not
in
[
'
OK
'
,
'
DISABLED
'
,
'
ERROR
'
]):
return
jsonify
(
error
=
"
Incorrect status provided. It can be
'
OK
'
,
'
DISABLED
'
,
'
ERROR
'"
)
if
(
status
not
in
[
'
OK
'
,
'
DISABLED
'
,
'
ERROR
'
,
'
UNKNOWN
'
]):
return
jsonify
(
error
=
"
Incorrect status provided. It can be
'
OK
'
,
'
DISABLED
'
,
'
ERROR
'
,
'
UNKNOWN
'
"
)
if
'
idp
'
in
request
.
args
:
idp
=
request
.
args
[
'
idp
'
]
if
(
not
existsInFile
(
file_path
,
idp
,
"
entityID
"
,
eccsDataTable
,
date
)):
...
...
@@ -232,7 +232,7 @@ class FedStats(Resource):
return
jsonify
(
error
=
f
'
FileNotFound: ECCS script has not been executed on
{
date
}
yet
'
)
if
(
reg_auth
):
resultDict
=
{
'
date
'
:
date
,
'
registrationAuthority
'
:
reg_auth
,
'
OK
'
:
0
,
'
ERROR
'
:
0
,
'
DISABLED
'
:
0
}
resultDict
=
{
'
date
'
:
date
,
'
registrationAuthority
'
:
reg_auth
,
'
OK
'
:
0
,
'
ERROR
'
:
0
,
'
DISABLED
'
:
0
,
'
UNKNOWN
'
:
0
}
for
line
in
lines
:
# Strip the line feed and carriage return characters
...
...
@@ -248,13 +248,15 @@ class FedStats(Resource):
resultDict
[
'
ERROR
'
]
=
resultDict
[
'
ERROR
'
]
+
1
if
(
aux
[
'
status
'
]
==
"
DISABLED
"
):
resultDict
[
'
DISABLED
'
]
=
resultDict
[
'
DISABLED
'
]
+
1
if
(
aux
[
'
status
'
]
==
"
UNKNOWN
"
):
resultDict
[
'
UNKNOWN
'
]
=
resultDict
[
'
UNKNOWN
'
]
+
1
results
.
append
(
resultDict
)
return
jsonify
(
results
)
else
:
for
name
,
regAuth
in
regAuthDict
.
items
():
resultDict
=
{
'
date
'
:
date
,
'
registrationAuthority
'
:
regAuth
,
'
OK
'
:
0
,
'
ERROR
'
:
0
,
'
DISABLED
'
:
0
}
resultDict
=
{
'
date
'
:
date
,
'
registrationAuthority
'
:
regAuth
,
'
OK
'
:
0
,
'
ERROR
'
:
0
,
'
DISABLED
'
:
0
,
'
UNKNOWN
'
:
0
}
for
line
in
lines
:
# Strip the line feed and carriage return characters
...
...
@@ -270,6 +272,8 @@ class FedStats(Resource):
resultDict
[
'
ERROR
'
]
=
resultDict
[
'
ERROR
'
]
+
1
if
(
aux
[
'
status
'
]
==
"
DISABLED
"
):
resultDict
[
'
DISABLED
'
]
=
resultDict
[
'
DISABLED
'
]
+
1
if
(
aux
[
'
status
'
]
==
"
UNKNOWN
"
):
resultDict
[
'
UNKNOWN
'
]
=
resultDict
[
'
UNKNOWN
'
]
+
1
results
.
append
(
resultDict
)
return
jsonify
(
results
)
...
...
This diff is collapsed.
Click to expand it.
eccs.py
+
4
−
0
View file @
7f703bad
...
...
@@ -112,6 +112,10 @@ def check(idp,test):
elif
(
check_result_sp1
==
check_result_sp2
==
"
DISABLED
"
):
store_eccs_result
(
idp
,
sp
,
check_results
,
'
DISABLED
'
,
test
)
elif
((
check_result_sp1
==
check_result_sp2
==
check_result_sp3
==
"
OK
"
)
or
(
check_result_sp1
==
"
Unable-To-Check
"
or
check_result_sp2
==
"
Unable-To-Check
"
)):
store_eccs_result
(
idp
,
sp
,
check_results
,
'
UNKNOWN
'
,
test
)
else
:
store_eccs_result
(
idp
,
sp
,
check_results
,
'
ERROR
'
,
test
)
...
...
This diff is collapsed.
Click to expand it.
web/eccs.css
+
8
−
3
View file @
7f703bad
...
...
@@ -7,7 +7,7 @@ tr.shown td.details-control {
background
:
url('./details_close.png')
no-repeat
center
center
;
}
#lbl-error
,
#lbl-ok
,
#lbl-disabled
{
#lbl-error
,
#lbl-ok
,
#lbl-disabled
,
#lbl-unknown
{
position
:
relative
;
top
:
-1px
;
padding
:
5px
;
...
...
@@ -23,15 +23,20 @@ tr.shown td.details-control {
background-color
:
#72F81B
;
}
#lbl-unknown
{
background-color
:
#AAAAAA
;
}
#lbl-disabled
{
margin-left
:
2px
;
}
#inner-table
{
padding-left
:
40px
;
padding-left
:
40px
;
background-color
:
white
;
}
#inner-table
tr
td
{
border
:
0
;
}
...
...
@@ -72,7 +77,7 @@ input[type=checkbox] {
transform
:
scale
(
1.5
);
}
#error
,
#ok
,
#disabled
{
#error
,
#ok
,
#disabled
,
#unknown
{
position
:
relative
;
bottom
:
-2px
;
}
...
...
This diff is collapsed.
Click to expand it.
web/eccs.js
+
5
−
1
View file @
7f703bad
...
...
@@ -142,7 +142,7 @@ function SHA1(msg) {
}
// PHP Variables retrieved from
eccs
.php
// PHP Variables retrieved from
index
.php
// idp (entityID of the IdP)
// date (date time of the check)
// reg_auth (the IdP RegistrationAuthority)
...
...
@@ -338,6 +338,10 @@ $(document).ready(function() {
//$('td', row).css('background-color', '#00CE00'); // NEW ECCS2
$
(
'
td
'
,
row
).
css
(
'
background-color
'
,
'
#72F81B
'
);
// OLD ECCS
}
if
(
data
.
status
==
"
UNKNOWN
"
)
{
$
(
'
td
'
,
row
).
css
(
'
background-color
'
,
'
#AAAAAA
'
);
}
},
"
order
"
:
[[
1
,
'
asc
'
]]
}
);
...
...
This diff is collapsed.
Click to expand it.
web/index.php
+
5
−
3
View file @
7f703bad
...
...
@@ -54,6 +54,8 @@ $data['check_result'] = htmlspecialchars($_GET["check_result"]);
<input
id=
"error"
type=
"checkbox"
name=
"status"
value=
"ERROR"
/>
<label
id=
"lbl-ok"
for=
"ok"
>
OK
</label>
<input
id=
"ok"
type=
"checkbox"
name=
"status"
value=
"OK"
/>
<label
id=
"lbl-unknown"
for=
"unknown"
>
UNKNOWN
</label>
<input
id=
"unknown"
type=
"checkbox"
name=
"status"
value=
"UNKNOWN"
/>
<label
id=
"lbl-disabled"
for=
"disabled"
>
DISABLED
</label>
<input
id=
"disabled"
type=
"checkbox"
name=
"status"
value=
"DISABLE"
/>
</div>
<!-- END boxStatus -->
...
...
@@ -76,9 +78,9 @@ $data['check_result'] = htmlspecialchars($_GET["check_result"]);
<thead>
<tr>
<th></th>
<th>
DisplayName
</th>
<th>
EntityID
</th>
<th>
Registration Authority
</th>
<th>
DisplayName
</th>
<th>
EntityID
</th>
<th>
Registration Authority
</th>
</tr>
</thead>
</table>
...
...
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