Changeset View
Changeset View
Standalone View
Standalone View
assets/src/bundles/origin/visits-reporting.js
/** | /** | ||||
* Copyright (C) 2018 The Software Heritage developers | * Copyright (C) 2018-2021 The Software Heritage developers | ||||
* See the AUTHORS file at the top-level directory of this distribution | * See the AUTHORS file at the top-level directory of this distribution | ||||
* License: GNU Affero General Public License version 3, or any later version | * License: GNU Affero General Public License version 3, or any later version | ||||
* See top-level LICENSE file for more information | * See top-level LICENSE file for more information | ||||
*/ | */ | ||||
import {createVisitsHistogram} from './visits-histogram'; | import {createVisitsHistogram} from './visits-histogram'; | ||||
import {updateCalendar} from './visits-calendar'; | import {updateCalendar} from './visits-calendar'; | ||||
import './visits-reporting.css'; | import './visits-reporting.css'; | ||||
▲ Show 20 Lines • Show All 115 Lines • ▼ Show 20 Lines | allVisits.forEach((v, i) => { | ||||
$('#swh-last-full-visit')[0].innerHTML = visitLink; | $('#swh-last-full-visit')[0].innerHTML = visitLink; | ||||
} | } | ||||
} | } | ||||
if (i === allVisits.length - 1) { | if (i === allVisits.length - 1) { | ||||
$('#swh-last-visit').append($(visitLink)); | $('#swh-last-visit').append($(visitLink)); | ||||
} | } | ||||
}); | }); | ||||
if ($('#swh-full-visits').prop('checked')) { | |||||
showFullVisits(); | |||||
} else if ($('#swh-all-visits').prop('checked')) { | |||||
showAllVisits(); | |||||
} else { | |||||
// display full visits pointing to different snapshots by default | // display full visits pointing to different snapshots by default | ||||
showFullVisitsDifferentSnapshots(); | showFullVisitsDifferentSnapshots(); | ||||
} | |||||
}); | }); | ||||
} | } |