mirror of
https://github.com/prometheus/alertmanager
synced 2025-02-15 18:17:15 +00:00
* Allow week to start at Monday or Sunday Signed-off-by: Martin Schimandl <martin.schimandl@gmail.com> * refactor from Int to DataType Signed-off-by: Martin Schimandl <martin.schimandl@gmail.com> * refactor to use name 'firstDayOfWeek' everywhere Signed-off-by: Martin Schimandl <martin.schimandl@gmail.com> * CSS fine tuning Signed-off-by: Martin Schimandl <martin.schimandl@gmail.com> * Check firstDayOfWeek with case statements Signed-off-by: Martin Schimandl <martin.schimandl@gmail.com> * Change default to Sunday. Use radio buttons Signed-off-by: Martin Schimandl <martin.schimandl@gmail.com> * Update ui/app/src/Views/Settings/Views.elm Co-authored-by: Andrey Kuzmin <unsoundscapes@gmail.com> Signed-off-by: Martin Schimandl <martin.schimandl@gmail.com> * Regenerate assets_vfsdata.go Signed-off-by: Martin Schimandl <martin.schimandl@gmail.com> Signed-off-by: Martin Schimandl <martin.schimandl@gmail.com> Co-authored-by: Andrey Kuzmin <unsoundscapes@gmail.com>
40 lines
1.6 KiB
HTML
40 lines
1.6 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
|
<link rel="icon" type="image/x-icon" href="favicon.ico" />
|
|
<title>Alertmanager</title>
|
|
</head>
|
|
<body>
|
|
<script>
|
|
// If there is no trailing slash at the end of the path in the url,
|
|
// add one. This ensures assets like script.js are loaded properly
|
|
if (location.pathname.substr(-1) != '/') {
|
|
location.pathname = location.pathname + '/';
|
|
console.log('added slash');
|
|
}
|
|
</script>
|
|
<script src="script.js"></script>
|
|
<script>
|
|
var app = Elm.Main.init({
|
|
flags: {
|
|
production: true,
|
|
firstDayOfWeek: JSON.parse(localStorage.getItem('firstDayOfWeek')),
|
|
defaultCreator: localStorage.getItem('defaultCreator'),
|
|
groupExpandAll: JSON.parse(localStorage.getItem('groupExpandAll'))
|
|
}
|
|
});
|
|
app.ports.persistDefaultCreator.subscribe(function(name) {
|
|
localStorage.setItem('defaultCreator', name);
|
|
});
|
|
app.ports.persistGroupExpandAll.subscribe(function(expanded) {
|
|
localStorage.setItem('groupExpandAll', JSON.stringify(expanded));
|
|
});
|
|
app.ports.persistFirstDayOfWeek.subscribe(function(firstDayOfWeek) {
|
|
localStorage.setItem('firstDayOfWeek', JSON.stringify(firstDayOfWeek));
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|