Commit 6ad651bc authored by Magnus Westergaard's avatar Magnus Westergaard
Browse files

Removed patron-client code.

parent 6e8e2e46
<?xml version="1.0" encoding="utf-8"?>
<svg width="1792" height="1792" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1024 1376v-192q0-14-9-23t-23-9h-192q-14 0-23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23-9t9-23zm256-672q0-88-55.5-163t-138.5-116-170-41q-243 0-371 213-15 24 8 42l132 100q7 6 19 6 16 0 25-12 53-68 86-92 34-24 86-24 48 0 85.5 26t37.5 59q0 38-20 61t-68 45q-63 28-115.5 86.5t-52.5 125.5v36q0 14 9 23t23 9h192q14 0 23-9t9-23q0-19 21.5-49.5t54.5-49.5q32-18 49-28.5t46-35 44.5-48 28-60.5 12.5-81zm384 192q0 209-103 385.5t-279.5 279.5-385.5 103-385.5-103-279.5-279.5-103-385.5 103-385.5 279.5-279.5 385.5-103 385.5 103 279.5 279.5 103 385.5z"/></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.71 15.71"><title>search16</title><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><path d="M9.9,0a5.49,5.49,0,0,0-5.18,5.8,5.36,5.36,0,0,0,1,2.8L0,14.29l1.41,1.42L7.1,10a5.49,5.49,0,0,0,3.11,1h.31A5.5,5.5,0,1,0,9.9,0Zm2.92,7.82A3.47,3.47,0,0,1,10.41,9,3.54,3.54,0,0,1,6.71,5.7,3.45,3.45,0,0,1,7.6,3.17,3.5,3.5,0,0,1,10,2h.2a3.5,3.5,0,0,1,2.61,5.83Z"/></g></g></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 19.12 23.61"><title>search24</title><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><path d="M19.1,7.62A8.08,8.08,0,1,0,5.66,14.1a5.58,5.58,0,0,0,.47.38L0,22.39l1.58,1.22L7.87,15.5a7.91,7.91,0,0,0,3.16.65h.46A8.07,8.07,0,0,0,19.1,7.62Zm-7.72,6.52A6.07,6.07,0,0,1,10.69,2H11a6.07,6.07,0,0,1,.34,12.14Z"/></g></g></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 19.12 23.61"><title>search24</title><g fill="#fff" id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><path d="M19.1,7.62A8.08,8.08,0,1,0,5.66,14.1a5.58,5.58,0,0,0,.47.38L0,22.39l1.58,1.22L7.87,15.5a7.91,7.91,0,0,0,3.16.65h.46A8.07,8.07,0,0,0,19.1,7.62Zm-7.72,6.52A6.07,6.07,0,0,1,10.69,2H11a6.07,6.07,0,0,1,.34,12.14Z"/></g></g></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 26 17"><title>spill</title><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><path d="M19,7a3,3,0,1,0,3,3A3,3,0,0,0,19,7Zm0,4a1,1,0,1,1,1-1A1,1,0,0,1,19,11Z"/><rect x="4.38" y="9" width="4" height="2" transform="translate(-5.2 7.44) rotate(-45)"/><rect x="8.86" y="9" width="4" height="2" transform="translate(-3.89 10.61) rotate(-45)"/><path d="M19,3H14V0H12V3H7A7,7,0,0,0,7,17H19A7,7,0,0,0,19,3Zm0,12H7A5,5,0,0,1,7,5H19a5,5,0,0,1,0,10Z"/></g></g></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" viewBox="-17159 6935 66.441 53.997">
<defs>
<style>
.cls-1 {
fill: #fff;
}
</style>
</defs>
<path id="Path_3812" data-name="Path 3812" class="cls-1" d="M-151.307-34.124q.041.877.039,1.762c0,18.012-13.711,38.784-38.785,38.784A38.588,38.588,0,0,1-210.947.3,27.76,27.76,0,0,0-207.7.489a27.352,27.352,0,0,0,16.93-5.835A13.646,13.646,0,0,1-203.5-14.814a13.6,13.6,0,0,0,2.562.246,13.679,13.679,0,0,0,3.593-.48A13.637,13.637,0,0,1-208.28-28.411c0-.06,0-.117,0-.174A13.533,13.533,0,0,0-202.1-26.88a13.621,13.621,0,0,1-6.066-11.347,13.582,13.582,0,0,1,1.846-6.851,38.7,38.7,0,0,0,28.1,14.242,13.606,13.606,0,0,1-.354-3.108,13.634,13.634,0,0,1,13.633-13.63A13.617,13.617,0,0,1-155-43.268a27.314,27.314,0,0,0,8.655-3.308,13.678,13.678,0,0,1-5.994,7.54,27.206,27.206,0,0,0,7.828-2.146,27.735,27.735,0,0,1-6.8,7.058" transform="translate(-16948.053 6982.574)"/>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><title>view 1</title><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><path d="M10,10H0V0H10ZM2,8H8V2H2Z"/><path d="M10,24H0V14H10ZM2,22H8V16H2Z"/><rect x="13" width="11" height="2"/><rect x="13" y="4" width="11" height="2"/><rect x="13" y="8" width="4" height="2"/><rect x="13" y="14" width="11" height="2"/><rect x="13" y="18" width="11" height="2"/><rect x="13" y="22" width="4" height="2"/></g></g></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 23 24"><title>view2</title><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><rect width="23" height="2"/><rect y="4" width="23" height="2"/><rect y="8" width="16" height="2"/><rect y="14" width="23" height="2"/><rect y="18" width="23" height="2"/><rect y="22" width="16" height="2"/></g></g></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 13.41 13.41"><title>x</title><g fill="#767676" id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><polygon points="12 0 6.71 5.29 1.41 0 0 1.41 5.29 6.71 0 12 1.41 13.41 6.71 8.12 12 13.41 13.41 12 8.12 6.71 13.41 1.41 12 0"/></g></g></svg>
\ No newline at end of file
.react-datepicker__tether-element-attached-top .react-datepicker__triangle, .react-datepicker__tether-element-attached-bottom .react-datepicker__triangle, .react-datepicker__year-read-view--down-arrow,
.react-datepicker__month-read-view--down-arrow {
margin-left: -8px;
position: absolute;
}
.react-datepicker__tether-element-attached-top .react-datepicker__triangle, .react-datepicker__tether-element-attached-bottom .react-datepicker__triangle, .react-datepicker__year-read-view--down-arrow,
.react-datepicker__month-read-view--down-arrow, .react-datepicker__tether-element-attached-top .react-datepicker__triangle::before, .react-datepicker__tether-element-attached-bottom .react-datepicker__triangle::before, .react-datepicker__year-read-view--down-arrow::before,
.react-datepicker__month-read-view--down-arrow::before {
box-sizing: content-box;
position: absolute;
border: 8px solid transparent;
height: 0;
width: 1px;
}
.react-datepicker__tether-element-attached-top .react-datepicker__triangle::before, .react-datepicker__tether-element-attached-bottom .react-datepicker__triangle::before, .react-datepicker__year-read-view--down-arrow::before,
.react-datepicker__month-read-view--down-arrow::before {
content: "";
z-index: -1;
border-width: 8px;
left: -8px;
border-bottom-color: #aeaeae;
}
.react-datepicker__tether-element-attached-top .react-datepicker__triangle {
top: 0;
margin-top: -8px;
}
.react-datepicker__tether-element-attached-top .react-datepicker__triangle, .react-datepicker__tether-element-attached-top .react-datepicker__triangle::before {
border-top: none;
border-bottom-color: #f0f0f0;
}
.react-datepicker__tether-element-attached-top .react-datepicker__triangle::before {
top: -1px;
border-bottom-color: #aeaeae;
}
.react-datepicker__tether-element-attached-bottom .react-datepicker__triangle, .react-datepicker__year-read-view--down-arrow,
.react-datepicker__month-read-view--down-arrow {
bottom: 0;
margin-bottom: -8px;
}
.react-datepicker__tether-element-attached-bottom .react-datepicker__triangle, .react-datepicker__year-read-view--down-arrow,
.react-datepicker__month-read-view--down-arrow, .react-datepicker__tether-element-attached-bottom .react-datepicker__triangle::before, .react-datepicker__year-read-view--down-arrow::before,
.react-datepicker__month-read-view--down-arrow::before {
border-bottom: none;
border-top-color: #fff;
}
.react-datepicker__tether-element-attached-bottom .react-datepicker__triangle::before, .react-datepicker__year-read-view--down-arrow::before,
.react-datepicker__month-read-view--down-arrow::before {
bottom: -1px;
border-top-color: #aeaeae;
}
.react-datepicker {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 0.8rem;
background-color: #fff;
color: #000;
border: 1px solid #aeaeae;
border-radius: 0.3rem;
display: inline-block;
position: relative;
}
.react-datepicker__triangle {
position: absolute;
left: 50px;
}
.react-datepicker__tether-element-attached-bottom.react-datepicker__tether-element {
margin-top: -20px;
}
.react-datepicker__header {
text-align: center;
background-color: #f0f0f0;
border-bottom: 1px solid #aeaeae;
border-top-left-radius: 0.3rem;
border-top-right-radius: 0.3rem;
padding-top: 8px;
position: relative;
}
.react-datepicker__year-dropdown-container--select,
.react-datepicker__month-dropdown-container--select,
.react-datepicker__year-dropdown-container--scroll,
.react-datepicker__month-dropdown-container--scroll {
display: inline-block;
margin: 0 2px;
}
.react-datepicker__current-month {
margin-top: 0;
color: #000;
font-weight: bold;
font-size: 0.944rem;
}
.react-datepicker__navigation {
line-height: 1.7rem;
text-align: center;
cursor: pointer;
position: absolute;
top: 10px;
width: 0;
border: 0.45rem solid transparent;
z-index: 1;
}
.react-datepicker__navigation--previous {
left: 10px;
border-right-color: #ccc;
}
.react-datepicker__navigation--previous:hover {
border-right-color: #b3b3b3;
}
.react-datepicker__navigation--next {
right: 10px;
border-left-color: #ccc;
}
.react-datepicker__navigation--next:hover {
border-left-color: #b3b3b3;
}
.react-datepicker__navigation--years {
position: relative;
top: 0;
display: block;
margin-left: auto;
margin-right: auto;
}
.react-datepicker__navigation--years-previous {
top: 4px;
border-top-color: #ccc;
}
.react-datepicker__navigation--years-previous:hover {
border-top-color: #b3b3b3;
}
.react-datepicker__navigation--years-upcoming {
top: -4px;
border-bottom-color: #ccc;
}
.react-datepicker__navigation--years-upcoming:hover {
border-bottom-color: #b3b3b3;
}
.react-datepicker__month-container {
display: inline;
float: left;
}
.react-datepicker__month {
margin: 0.4rem;
text-align: center;
}
.react-datepicker__week-number {
color: #ccc;
display: inline-block;
width: 1.7rem;
line-height: 1.7rem;
text-align: center;
margin: 0.166rem;
}
.react-datepicker__day-name,
.react-datepicker__day {
color: #000;
display: inline-block;
width: 1.7rem;
line-height: 1.7rem;
text-align: center;
margin: 0.166rem;
}
.react-datepicker__day {
cursor: pointer;
}
.react-datepicker__day:hover {
border-radius: 0.3rem;
background-color: #f0f0f0;
}
.react-datepicker__day--today {
font-weight: bold;
}
.react-datepicker__day--highlighted {
border-radius: 0.3rem;
background-color: #3dcc4a;
color: #fff;
}
.react-datepicker__day--highlighted:hover {
background-color: #32be3f;
}
.react-datepicker__day--selected, .react-datepicker__day--in-selecting-range, .react-datepicker__day--in-range {
border-radius: 0.3rem;
background-color: #216ba5;
color: #fff;
}
.react-datepicker__day--selected:hover, .react-datepicker__day--in-selecting-range:hover, .react-datepicker__day--in-range:hover {
background-color: #1d5d90;
}
.react-datepicker__day--in-selecting-range:not(.react-datepicker__day--in-range) {
background-color: rgba(33, 107, 165, 0.5);
}
.react-datepicker__month--selecting-range .react-datepicker__day--in-range:not(.react-datepicker__day--in-selecting-range) {
background-color: #f0f0f0;
color: #000;
}
.react-datepicker__day--disabled {
cursor: default;
color: #ccc;
}
.react-datepicker__day--disabled:hover {
background-color: transparent;
}
.react-datepicker__input-container {
position: relative;
display: inline-block;
}
.react-datepicker__year-read-view,
.react-datepicker__month-read-view {
border: 1px solid transparent;
border-radius: 0.3rem;
}
.react-datepicker__year-read-view:hover,
.react-datepicker__month-read-view:hover {
cursor: pointer;
}
.react-datepicker__year-read-view:hover .react-datepicker__year-read-view--down-arrow,
.react-datepicker__year-read-view:hover .react-datepicker__month-read-view--down-arrow,
.react-datepicker__month-read-view:hover .react-datepicker__year-read-view--down-arrow,
.react-datepicker__month-read-view:hover .react-datepicker__month-read-view--down-arrow {
border-top-color: #b3b3b3;
}
.react-datepicker__year-read-view--down-arrow,
.react-datepicker__month-read-view--down-arrow {
border-top-color: #ccc;
float: right;
margin-left: 20px;
top: 8px;
position: relative;
border-width: 0.45rem;
}
.react-datepicker__year-dropdown,
.react-datepicker__month-dropdown {
background-color: #f0f0f0;
position: absolute;
width: 50%;
left: 25%;
top: 30px;
text-align: center;
border-radius: 0.3rem;
border: 1px solid #aeaeae;
}
.react-datepicker__year-dropdown:hover,
.react-datepicker__month-dropdown:hover {
cursor: pointer;
}
.react-datepicker__year-dropdown--scrollable,
.react-datepicker__month-dropdown--scrollable {
height: 150px;
overflow-y: scroll;
}
.react-datepicker__year-option,
.react-datepicker__month-option {
line-height: 20px;
width: 100%;
display: block;
margin-left: auto;
margin-right: auto;
}
.react-datepicker__year-option:first-of-type,
.react-datepicker__month-option:first-of-type {
border-top-left-radius: 0.3rem;
border-top-right-radius: 0.3rem;
}
.react-datepicker__year-option:last-of-type,
.react-datepicker__month-option:last-of-type {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
border-bottom-left-radius: 0.3rem;
border-bottom-right-radius: 0.3rem;
}
.react-datepicker__year-option:hover,
.react-datepicker__month-option:hover {
background-color: #ccc;
}
.react-datepicker__year-option:hover .react-datepicker__navigation--years-upcoming,
.react-datepicker__month-option:hover .react-datepicker__navigation--years-upcoming {
border-bottom-color: #b3b3b3;
}
.react-datepicker__year-option:hover .react-datepicker__navigation--years-previous,
.react-datepicker__month-option:hover .react-datepicker__navigation--years-previous {
border-top-color: #b3b3b3;
}
.react-datepicker__year-option--selected,
.react-datepicker__month-option--selected {
position: absolute;
left: 15px;
}
.react-datepicker__close-icon {
background-color: transparent;
border: 0;
cursor: pointer;
display: inline-block;
height: 0;
outline: 0;
padding: 0;
vertical-align: middle;
}
.react-datepicker__close-icon::after {
background-color: #216ba5;
border-radius: 50%;
bottom: 0;
box-sizing: border-box;
color: #fff;
content: "\00d7";
cursor: pointer;
font-size: 12px;
height: 16px;
width: 16px;
line-height: 1;
margin: -8px auto 0;
padding: 2px;
position: absolute;
right: 7px;
text-align: center;
top: 50%;
}
.react-datepicker__today-button {
background: #f0f0f0;
border-top: 1px solid #aeaeae;
cursor: pointer;
text-align: center;
font-weight: bold;
padding: 5px 0;
clear: left;
}
.react-datepicker__tether-element {
z-index: 2147483647;
}
.react-datepicker__portal {
position: fixed;
width: 100vw;
height: 100vh;
background-color: rgba(0, 0, 0, 0.8);
left: 0;
top: 0;
justify-content: center;
align-items: center;
display: flex;
z-index: 2147483647;
}
.react-datepicker__portal .react-datepicker__day-name,
.react-datepicker__portal .react-datepicker__day {
width: 3rem;
line-height: 3rem;
}
@media (max-width: 400px), (max-height: 550px) {
.react-datepicker__portal .react-datepicker__day-name,
.react-datepicker__portal .react-datepicker__day {
width: 2rem;
line-height: 2rem;
}
}
.react-datepicker__portal .react-datepicker__current-month {
font-size: 1.44rem;
}
.react-datepicker__portal .react-datepicker__navigation {
border: 0.81rem solid transparent;
}
.react-datepicker__portal .react-datepicker__navigation--previous {
border-right-color: #ccc;
}
.react-datepicker__portal .react-datepicker__navigation--previous:hover {
border-right-color: #b3b3b3;
}
.react-datepicker__portal .react-datepicker__navigation--next {
border-left-color: #ccc;
}
.react-datepicker__portal .react-datepicker__navigation--next:hover {
border-left-color: #b3b3b3;
}
.tooltip {
position: absolute;
z-index: 1070;
display: block;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-style: normal;
font-weight: normal;
letter-spacing: normal;
line-break: auto;
line-height: 1.42857143;
text-align: left;
text-decoration: none;
text-shadow: none;
text-transform: none;
white-space: normal;
word-break: normal;
word-spacing: normal;
word-wrap: normal;
font-size: 12px;
}
.tooltip.top {
margin-top: -3px;
padding: 5px 0;
}
.tooltip.right {
margin-left: 3px;
padding: 0 5px;
}
.tooltip.bottom {
margin-top: 3px;
padding: 5px 0;
}
.tooltip.left {
margin-left: -3px;
padding: 0 5px;
}
.tooltip-inner {
max-width: 200px;
padding: 3px 8px;
color: #fff;
text-align: center;
background-color: #000;
border-radius: 4px;
}
.tooltip-arrow {
position: absolute;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
}
.tooltip.top .tooltip-arrow {
bottom: 0;
left: 50%;
margin-left: -5px;
border-width: 5px 5px 0;
border-top-color: #000;
}
.tooltip.top-left .tooltip-arrow {
bottom: 0;
right: 5px;
margin-bottom: -5px;
border-width: 5px 5px 0;
border-top-color: #000;
}
.tooltip.top-right .tooltip-arrow {
bottom: 0;
left: 5px;
margin-bottom: -5px;
border-width: 5px 5px 0;
border-top-color: #000;
}
.tooltip.right .tooltip-arrow {
top: 50%;
left: 0;
margin-top: -5px;
border-width: 5px 5px 5px 0;
border-right-color: #000;
}
.tooltip.left .tooltip-arrow {
top: 50%;
right: 0;
margin-top: -5px;
border-width: 5px 0 5px 5px;
border-left-color: #000;
}
.tooltip.bottom .tooltip-arrow {
top: 0;
left: 50%;
margin-left: -5px;
border-width: 0 5px 5px;
border-bottom-color: #000;
}
.tooltip.bottom-left .tooltip-arrow {
top: 0;
right: 5px;
margin-top: -5px;
border-width: 0 5px 5px;
border-bottom-color: #000;
}
.tooltip.bottom-right .tooltip-arrow {
top: 0;
left: 5px;
margin-top: -5px;
border-width: 0 5px 5px;
border-bottom-color: #000;
}
const isofetch = require('isomorphic-fetch')
module.exports = (app) => {
return (url, opts) => {
opts = opts || {}
opts.headers = opts.headers || {}
opts.headers[ 'Cookie' ] = app.settings.kohaSession
return isofetch(url, opts)
.then(res => {
if (res.status === 403 || res.status === 401) {
const dup = res.clone() // duplicate body for logging
return dup.json().then(json => {
if (res.status >= 400) {
console.log(`Call to ${url} with options ${JSON.stringify(opts)}:`)
console.log(`${res.status}: ${JSON.stringify(json)}`)
}
if (json.error === 'Authentication required.' || json.error === 'Authentication failure.') {
// Unauthorized; we try to renew session and then retry request.
return isofetch('http://xkoha:8081/api/v1/auth/session', {
method: 'POST',
headers: {
'Accept': 'application/json, application/xml, text/plain, text/html, *.*',
'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8'
},
body: `userid=${encodeURIComponent(process.env.KOHA_API_USER)}&password=${encodeURIComponent(process.env.KOHA_API_PASS)}`
})
.then(res => {