Commit c2b541a6 authored by Cyril L'Orphelin's avatar Cyril L'Orphelin
Browse files

Merge branch 'develop' into 'master'

VO Id Cards : Correctif de la gestion des différents support de Policy...

See merge request opsportal/sf3!212
parents 4582bd82 47ab7ef6
......@@ -37,12 +37,13 @@ php-image-test:
- php vendor/phpunit/phpunit/phpunit --configuration phpunit.xml.dist --coverage-text
- sed -n '/system-out/!p' logfile.xml > logfile.xml
php-image-build:
stage: php
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
stage: php
script:
- docker login -u "$OPENSHIFT_USER" -p "$OPENSHIFT_TOKEN" $CI_REGISTRY
- docker build --pull -t "$IMAGE_PHP" -f ./docker/php-fpm/Dockerfile .
- docker login -u "$GITLAB_USER" -p "$GITLAB_TOKEN" $CI_REGISTRY
- docker cp -a $(docker create "$IMAGE_PHP"):/var/www/html/web/build php-build
- docker push "$IMAGE_PHP"
artifacts:
......@@ -55,11 +56,11 @@ php-image-build:
- tags
nginx-image-build:
stage: nginx
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
stage: nginx
script:
- docker login -u "$OPENSHIFT_USER" -p "$OPENSHIFT_TOKEN" $CI_REGISTRY
- docker build --pull -t "$IMAGE_NGINX" -f ./docker/nginx/Dockerfile .
- docker login -u "$GITLAB_USER" -p "$GITLAB_TOKEN" $CI_REGISTRY
- docker push "$IMAGE_NGINX"
only:
- develop
......
......@@ -8,7 +8,7 @@
</div>
<div class="card-body">
<h1 class="font-weight-light">
<h1 class="font-weight-light" id="permission">
You don't have permission to access this page with this credential
<br/>
</h1>
......
......@@ -31,7 +31,7 @@
<tr style="vertical-align: top">
<td align="center" style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse !important;vertical-align: top;width: 100%;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px">
<div align="center">
<a href="https://operations-portal.egi.eu/downtimes/subscription" target="_blank"><img align="center" alt="Image" border="0" class="center fullwidth" src="http://operations-portal.egi.eu/images/logo_final.png" style="outline: none;text-decoration: none;-ms-interpolation-mode: bicubic;clear: both;display: block;border: none;height: auto;line-height: 100%;margin: 0 auto;float: none;width: 100% !important;max-width: 250px" title="Image" width="250"></a>
<a href="https://operations-portal.egi.eu/downtimes/subscription" target="_blank"><img align="center" alt="Image" border="0" class="center fullwidth" src="https://operations-portal.egi.eu/build/images/logo_final.png" style="outline: none;text-decoration: none;-ms-interpolation-mode: bicubic;clear: both;display: block;border: none;height: auto;line-height: 100%;margin: 0 auto;float: none;width: 100% !important;max-width: 250px" title="Image" width="250"></a>
</div>
</td>
</tr>
......
......@@ -129,7 +129,7 @@
<tbody><tr style="vertical-align: top">
<td style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse !important;vertical-align: top;width: 100%;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px" align="center">
<div align="center">
<img class="center fullwidth" style="outline: none;text-decoration: none;-ms-interpolation-mode: bicubic;clear: both;display: block;border: none;height: auto;line-height: 100%;margin: 0 auto;float: none;width: 100% !important;max-width: 250px" align="center" border="0" src="http://operations-portal.egi.eu/images/logo_final.png" alt="Image" title="Image" width="250">
<img class="center fullwidth" style="outline: none;text-decoration: none;-ms-interpolation-mode: bicubic;clear: both;display: block;border: none;height: auto;line-height: 100%;margin: 0 auto;float: none;width: 100% !important;max-width: 250px" align="center" border="0" src="https://operations-portal.egi.eu/build/images/logo_final.png" alt="Image" title="Image" width="250">
</div>
</td>
</tr>
......
......@@ -26,6 +26,9 @@
<div class="form-group col">
{{ form_row(form_ticket.expirationDate) }}
</div>
<div class="form-group col">
{{ form_row(form_ticket.dateProb) }}
</div>
</div>
</div>
</div>
......@@ -51,4 +54,5 @@
</div>
</div>
</div>
</div>
{% extends "::base_bootstrap_4.html.twig" %}
{% block title %}Operations portal - SLA{% endblock %}
{% block stylesheets %}
<style>
button.button1{
display:inline-block;
padding:0.5em 0.5em;
border:0.16em solid #ccc;
border-radius: 4px;
margin:0 0.3em 0.3em 0;
box-sizing: border-box;
text-decoration:none;
text-transform:uppercase;
font-family:'Roboto',sans-serif;
font-weight:400;
color:#FFFFFF;
text-align:center;
transition: all 0.15s;
}
button.button1:hover{
color: #BBBBBB;
border-color: #a8a4a4;
}
button.button1:active{
color:#BBBBBB;
border-color:#BBBBBB;
}
@media all and (max-width:30em){
button.button1{
display:block;
margin:0.4em auto;
}
}
</style>
{% endblock %}
{% block body %}
<div class="row border-bottom">
<div class="ml-3">
<h3>Fedcloud badges
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#help">
<i class="fas fa-question-circle" data-toggle="modal" data-target="#help" ></i>
</button>
</h3>
<!-- ********************************* Title Help popin start ************************************ -->
<div class="modal fade col-8" id="help" aria-hidden="true" tabindex="-1">
<div class="modal-dialog modal-sm" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Help</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body small">
<ul >
<li class="m-2 p-2">
<button class="button1" ><i class="fas fa-star" style="color: #d58512"></i><i class="fas fa-star" style="color: #d58512"></i></button>
A site obtains a double star
<ul><li>if certified</li><li>if used by scientific communities through Service Level Agreement</li><li>and if availability/reliability >=98% for 3 consecutive months</li></ul>
</li>
<li >
<button class="button1"><i class="fas fa-star" style="color: #002a80"></i></button>
A site obtains a simple star
<ul><li>if certified</li><li>if used by scientific communities through Service Level Agreement</li><li>and if availability/reliability >=95% for 3 consecutive months</li></ul>
</li>
<li >
<button class="button1"><i class="fas fa-star-half-alt" style="color: #9cc2cb"></i></button>
in other cases sites obtain an half star
</li>
<li class="m-2 p-2">
Test VOs excluded from the calculation: dteam, fedcloud.egi.eu, ops, vo.access.egi.eu, cms, vo.panosc.eu
</li>
<li class="m-2 p-2">Click on the badges to get details</li>
</ul>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</div>
<!-- ********************************* Title Help popin end ************************************ -->
</div>
</div>
<div class="row">
<div class="m-4 pl-4">
<!-- ********************************* Main datas table start ************************************ -->
<table class="table dataTable">
<thead>
<tr>
<th>Fedcloud Site</th>
{% for keymonth1, month in tabMonths1 %}
<th>{{ month }}</th>
{% endfor %}
</tr>
</thead>
<tbody>
{% for keyres1, result1 in results1 %}
<tr>
<th>{{ keyres1 }}</th>
{% for keymonth1, month1 in tabMonths1 %}
{% if tabMonths1[keymonth1-2] is defined and tabMonths1[keymonth1-1] and result1[tabMonths1[keymonth1-2]]["av"] is defined and result1[tabMonths1[keymonth1-1]]["av"] is defined and result1[tabMonths1[keymonth1]]["av"] is defined and result1[tabMonths1[keymonth1-2]]["re"] is defined and result1[tabMonths1[keymonth1-1]]["re"] is defined and result1[tabMonths1[keymonth1]]["re"] is defined %}
{% set resultAv= min(result1[tabMonths1[keymonth1-2]]["av"] , result1[tabMonths1[keymonth1-1]]["av"] , result1[tabMonths1[keymonth1]]["av"]) %}
{% set resultRe= min(result1[tabMonths1[keymonth1-2]]["re"], result1[tabMonths1[keymonth1-1]]["re"] , result1[tabMonths1[keymonth1]]["re"]) %}
{% set order = resultAv + resultRe %}
{% set title %}
<!-- ********************************* Details full datas popin start ************************************ -->
<div class="modal col-4" id="a_{{ keyres1}}_{{ month1 }}" tabindex="-1" role="dialog">
<div class="modal-dialog modal-sm" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">{{ keyres1}}</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<table class="table table-striped">
<thead>
<tr>
<th>Month</th>
<th>Av</th>
<th>Re</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{ tabMonths1[keymonth1-2] }}</td>
{% if result1[tabMonths1[keymonth1-2]]["av"] > 98 %}
<td><span class="badge badge-success">{{ result1[tabMonths1[keymonth1-2]]["av"] }}</span> </td>
{% elseif result1[tabMonths1[keymonth1-2]]["av"] > 95 %}
<td><span class="badge badge-warning">{{ result1[tabMonths1[keymonth1-2]]["av"] }}</span> </td>
{% else %}
<td><span class="badge badge-danger">{{ result1[tabMonths1[keymonth1-2]]["av"] }}</span> </td>
{% endif %}
{% if result1[tabMonths1[keymonth1-2]]["re"] > 98 %}
<td><span class="badge badge-success">{{ result1[tabMonths1[keymonth1-2]]["re"] }}</span> </td>
{% elseif result1[tabMonths1[keymonth1-2]]["re"] > 95 %}
<td><span class="badge badge-warning">{{ result1[tabMonths1[keymonth1-2]]["re"] }}</span> </td>
{% else %}
<td><span class="badge badge-danger">{{ result1[tabMonths1[keymonth1-2]]["re"] }}</span> </td>
{% endif %}
</tr>
<tr>
<td>{{ tabMonths1[keymonth1-1] }}</td>
{% if result1[tabMonths1[keymonth1-1]]["av"] > 98 %}
<td><span class="badge badge-success">{{ result1[tabMonths1[keymonth1-1]]["av"] }}</span> </td>
{% elseif result1[tabMonths1[keymonth1-1]]["av"] > 95 %}
<td><span class="badge badge-warning">{{ result1[tabMonths1[keymonth1-1]]["av"] }}</span> </td>
{% else %}
<td><span class="badge badge-danger">{{ result1[tabMonths1[keymonth1-1]]["av"] }}</span> </td>
{% endif %}
{% if result1[tabMonths1[keymonth1-1]]["re"] > 98 %}
<td><span class="badge badge-success">{{ result1[tabMonths1[keymonth1-1]]["re"] }}</span> </td>
{% elseif result1[tabMonths1[keymonth1-1]]["re"] > 95 %}
<td><span class="badge badge-warning">{{ result1[tabMonths1[keymonth1-1]]["re"] }}</span> </td>
{% else %}
<td><span class="badge badge-danger">{{ result1[tabMonths1[keymonth1-1]]["re"] }}</span> </td>
{% endif %}
</tr>
<tr>
<td>{{ tabMonths1[keymonth1] }}</td>
{% if result1[tabMonths1[keymonth1]]["av"] > 98 %}
<td><span class="badge badge-success">{{ result1[tabMonths1[keymonth1]]["av"] }}</span> </td>
{% elseif result1[tabMonths1[keymonth1]]["av"] > 95 %}
<td><span class="badge badge-warning">{{ result1[tabMonths1[keymonth1]]["av"] }}</span> </td>
{% else %}
<td><span class="badge badge-danger">{{ result1[tabMonths1[keymonth1]]["av"] }}</span> </td>
{% endif %}
{% if result1[tabMonths1[keymonth1]]["re"] > 98 %}
<td><span class="badge badge-success">{{ result1[tabMonths1[keymonth1]]["re"] }}</span> </td>
{% elseif result1[tabMonths1[keymonth1]]["re"] > 95 %}
<td><span class="badge badge-warning">{{ result1[tabMonths1[keymonth1]]["re"] }}</span> </td>
{% else %}
<td><span class="badge badge-danger">{{ result1[tabMonths1[keymonth1]]["re"] }}</span> </td>
{% endif %}
</tr>
</tbody>
</table>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- ********************************* Details full datas popin end ************************************ -->
{% endset %}
{% if resultAv >= 98 and resultRe >= 98 %}
<td data-order="{{ order }}"> <button class="button1" data-toggle="modal" data-target="#a_{{ keyres1}}_{{ month1 }}"><i class="fas fa-star" style="color: #d58512"></i><i class="fas fa-star" style="color: #d58512"></i></button>{{ title }}</td>
{% elseif resultAv >= 95 and resultAv < 98 and resultRe >= 95 and resultRe < 98 %}
<td data-order="{{ order }}"> <button class="button1" data-toggle="modal" data-target="#a_{{ keyres1}}_{{ month1 }}"><i class="fas fa-star" style="color: #002a80"></i></button>{{ title }}</td>
{% else %}
<td data-order="{{ order }}"> <button class="button1" data-toggle="modal" data-target="#a_{{ keyres1}}_{{ month1 }}"><i class="fas fa-star-half-alt" style="color: #9cc2cb"></i></button>{{ title }}</td>
{% endif %}
{% else %}
{% set title %}
<!-- ********************************* Details empty datas popin start ************************************ -->
<div class="modal col-4 fade" id="a_{{ keyres1}}_{{ month1 }}" aria-hidden="true" tabindex="-1">
<div class="modal-dialog modal-sm" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">{{ keyres1}}</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
Unknown results
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- ********************************* Details empty datas popin end ************************************ -->
{% endset %}
<td data-order="0"> <button class="button1" data-toggle="modal" data-target="#a_{{ keyres1}}_{{ month1 }}"><i class="fas fa-star-half-alt" style="color: #9cc2cb"></i></button>{{ title }}</td>
{% endif %}
{% endfor %}
</tr>
{% endfor %}
</tbody>
</table>
<!-- ********************************* Main datas table end ************************************ -->
</div>
</div>
{% endblock %}
{% block javascripts %}
<script>
$(document).ready(function () {
$('.dataTable').DataTable();
});
</script>
{% endblock %}
{% extends "::base_bootstrap_4.html.twig" %}
{% block title %}Operations portal - SLA{% endblock %}
{% block body %}
<div class="row border-bottom" >
<div class="ml-3">
<h2>
SLA reports {% if isSuUser %} Admin {% endif %}
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#help">
<i class="fas fa-question-circle m-1" ></i>&nbsp;</button>
</h2>
<div class="modal fade col-8" id="help" aria-hidden="true" tabindex="-1">
<div class="modal-dialog modal-sm" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Help</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<ul>
<li> This table summarizes the availabilities and reliabilities of a given SLA group per month.
</li>
<li> Each SLA group has defined thresholds mentioned at the end of each line : for example <span class="badge badge-light text-dark border ">95</span><span class="badge badge-light text-dark border ">95</span>
</li>
<li>If one of the metrics is under the threshold the violation counter is incremented and the color of the badge is red <span class="badge badge-danger ">65</span></li>
<li>Otherwise the badge is green <span class="badge badge-success border ">98</span></li>
</ul>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</div>
{% if not isSuUser %}
<div class="col-md-8 col-md-offset-8 text-right">
<a href="{{ path("slaReportsSu", {group: group , group2: group2 }) }}" class="float-right btn-sm btn-primary">Admin page</a>
</div>
{% endif %}
</div>
</div>
<div class="row">
<div class="m-4 pl-4">
<p> {% if group or group2 %}
{% set groupBackwardParam = group2 ? group : null %}
<a href="{{ path(isSuUser ? 'slaReportsSu' : 'slaReports', {group: groupBackwardParam }) }}"> < Backwards</a>
{% endif %}
</p>
<table class="table dataTable">
<thead>
<tr>
<th>SLA Reports</th>
{% if group2 %} <th>Site</th> {% endif %}
{% for keymonth1, month in tabMonths %}
<th colspan="2">{{ month }}</th>
{% endfor %}
{% if group2 %}
<th>Violations</th>
<th colspan="2">Thresholds</th>
<th></th>
{% endif %}
</tr>
<tr>
<th> </th>
{% if group2 %} <th></th> {% endif %}
{% for keymonth1, month in tabMonths %}
<th>Av</th>
<th>Re</th>
{% endfor %}
{% if group2 %}
<th></th>
<th>Av</th>
<th>Re</th>
<th> </th>
{% endif %}
</tr>
</thead>
<tbody>
{% for keyres1, result1 in results %}
<tr>
{% set violation = 0 %}
{% set groupParam = group ? group : keyres1 %}
{% set group2Param = group2 ? null : (group ? keyres1 : null) %}
<th class="text-nowrap">
{% if group2 %}
{{ keyres1 }}
{% else %}
<a href="{{ path(isSuUser ? 'slaReportsSu' : 'slaReports', {group: groupParam , group2: group2Param }) }}">{{ keyres1 }}</a>
{% endif %}
</th>
{% if group2 and rodWebsite %}
<th>
{{ rodWebsite[keyres1]['site'] }}
</th>
{% endif %}
{% for keymonth1, month1 in tabMonths %}
{% if result1[month1]["av"] is defined %}
{% if result1[month1]["av"] >= tabThresholds[keyres1]["av"] %}
<td><span class="badge badge-success av">{{ result1[month1]["av"] }}</span> </td>
{% else %}
<td><span class="badge badge-danger av">{{ result1[month1]["av"] }}</span> </td>
{% set violation=violation+1 %}
{% endif %}
{% else %}
<td><span class="badge badge-default">N.A</span></td>
{% endif %}
{% if result1[month1]["re"] is defined %}
{% if result1[month1]["re"] >= tabThresholds[keyres1]["re"] %}
<td><span class="badge badge-success re">{{ result1[month1]["re"] }}</span> </td>
{% else %}
<td><span class="badge badge-danger re">{{ result1[month1]["re"] }}</span> </td>
{% set violation=violation+1 %}
{% endif %}
{% else %}
<td><span class="badge badge-default">N.A</span></td>
{% endif %}
{% endfor %}
{% if group2 %}
<td><span class="badge badge-dark text-white violation">{{ violation }}</span> </td>
<td><span class="badge badge-light text-dark border thresholdsAvailability">{{ tabThresholds[keyres1]["av"]}}</span> </td>
<td><span class="badge badge-light text-dark border thresholdsReliability">{{ tabThresholds[keyres1]["re"]}}</span> </td>
<td>
{% if isSuUser %}
<a href="#" class="editThresholds" data-name="{{ rodWebsite[keyres1]['site'] }}"><i class="far fa-edit"></i></a>
{% endif %}
</td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
<div id="modalSlaSettings" class="modal fade mt-250px" tabindex="-1" role="dialog">
<div class="modal-dialog modal-sm w-50" role="document">
<div class="modal-content">
<form id="slaSettingsForm" method="post">
<div class="modal-header">
<h3 class="modal-title text-center">Modify Thresholds</h3>
</div>
<div class="modal-body">
<div class="alert alert-danger alert-dismissible collapse fade show" role="alert">
<strong>Error!</strong> <span class="message"></span>
<!--<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>-->
</div>
{{ form_widget(form.id) }}
<div class="row">
<div class="form-group col-lg-5">
<label for="thresholds_availability">{{ form_label(form.website_name) }}</label>
{{ form_widget(form.website_name) }}
{{ form_errors(form.website_name) }}
</div>
</div>
<div class="row">
<div class="form-group col-lg-5">
<label for="thresholds_availability">{{ form_label(form.thresholds_availability) }}</label>
{{ form_widget(form.thresholds_availability, {'type':'number'}) }}
{{ form_errors(form.thresholds_availability) }}
</div>
<div class="form-group col-lg-5">
<label for="thresholds_reliability">{{ form_label(form.thresholds_reliability) }}</label>
{{ form_widget(form.thresholds_reliability, {'type':'number'}) }}
{{ form_errors(form.thresholds_reliability) }}
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="float-right btn-sm btn btn-secondary" data-dismiss="modal">Close
</button>
{{ form_widget(form.saveSlaSettings) }}
</div>
</form>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div><!-- /.modal -->
{% endblock %}
{% block javascripts %}
<script>
$(document).ready(function () {
// Hierarchical Level 3
{% if group2 %}
var options ={
"columnDefs": [ {
"targets": 17,