Comments (3)
This is not the right place to report a Debian-specific bug. Please use the Debian bug tracker.
from alertmanager.
Okay. Thank you.
I'll just drop it here incase if anyone comes looking. I've fixed the above issue by editing generate-ui.sh in a way that it generates what it needs to generate, then takes script.js into account and then gets rid of everything. It then downloads the files from repo and uses script.js to do the job. A cheesy way but it can be improved further if anyone wants it:
#!/bin/bash
set -euo pipefail
ELMDISTURL=https://github.com/elm/compiler/releases/download/0.19.1/binary-for-linux-64-bit.gz
DATEPICKER_CSS_URL=https://raw.githubusercontent.com/elm-community/elm-datepicker/master/css/elm-datepicker.css
BOOTSTRAP_URL=https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css
SRCDIR=/usr/share/gocode/src/github.com/prometheus/alertmanager/ui/app
DSTDIR=/usr/share/prometheus/alertmanager/ui
echo "Installing dependencies..." >&2
apt update
apt install -yy curl uglifyjs git \
golang-github-prometheus-alertmanager-dev
#/usr/share/fonts-font-awesome/
TMPDIR=$(mktemp -d)
echo "Downloading Elm tools..." >&2
curl --location $ELMDISTURL | gunzip -c - > $TMPDIR/elm
chmod +x $TMPDIR/elm
echo "Compiling source code..." >&2
ln -s $SRCDIR/src $SRCDIR/elm.json $TMPDIR
(cd $TMPDIR; ./elm make src/Main.elm --optimize --output $TMPDIR/app.js)
echo "Optimising source code..." >&2
uglifyjs $TMPDIR/app.js \
--compress 'pure_funcs="F2,F3,F4,F5,F6,F7,F8,F9,A2,A3,A4,A5,A6,A7,A8,A9",pure_getters,keep_fargs=false,unsafe_comps,unsafe' \
--mangle --output $TMPDIR/script.js
echo "Installing in Alertmanager directory..." >&2
mkdir -p $DSTDIR
cp $TMPDIR/script.js $DSTDIR
cp $SRCDIR/index.html $SRCDIR/favicon.ico $DSTDIR
rm -rf $TMPDIR
# Step 1: Clone the repository
echo "Cloning Alertmanager repository..."
git clone https://github.com/prometheus/alertmanager /tmp/alertmanager_repo
sleep 1
# Step 2: Backup script.js, delete other files inside /usr/share/prometheus/alertmanager/ui/
echo "Backing up script.js and deleting other files inside /usr/share/prometheus/alertmanager/ui/..."
mv /usr/share/prometheus/alertmanager/ui/script.js /tmp
rm -rf /usr/share/prometheus/alertmanager/ui/*
sleep 1
# Step 3: Move content of cloned repository to /usr/share/prometheus/alertmanager/ui/
echo "Moving contents of cloned repository to /usr/share/prometheus/alertmanager/ui/..."
mv /tmp/alertmanager_repo/ui/app/* /usr/share/prometheus/alertmanager/ui/
sleep 1
# Step 4: Move script.js back to /usr/share/prometheus/alertmanager/ui/
echo "Moving script.js back to /usr/share/prometheus/alertmanager/ui/..."
mv /tmp/script.js /usr/share/prometheus/alertmanager/ui/
sleep 1
# Step 5: Rename bootstrap-4.0.0-alpha.6-dist to bootstrap
echo "Renaming bootstrap-4.0.0-alpha.6-dist to bootstrap..."
mv /usr/share/prometheus/alertmanager/ui/lib/bootstrap-4.0.0-alpha.6-dist /usr/share/prometheus/alertmanager/ui/lib/bootstrap
sleep 1
# Step 6: Rename font-awesome-4.7.0 to font-awesome
echo "Renaming font-awesome-4.7.0 to font-awesome..."
mv /usr/share/prometheus/alertmanager/ui/lib/font-awesome-4.7.0 /usr/share/prometheus/alertmanager/ui/lib/font-awesome
sleep 1
echo "Deleting repo as its no longer needed"
rm -rf /tmp/alertmanager_repo
echo "Alertmanager restart required. Other than that, if you haven't seen any error above, the installation is completed!"
echo "Alertmanager updated successfully!"
from alertmanager.
You probably also would have stumbled across https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1067469, if you had checked the Debian bug tracker.
from alertmanager.
Related Issues (20)
- How can I get a week's worth of alert history for Prometheus, Alertmanager via python script? HOT 2
- Assistance Needed with Prometheus and Alertmanager Configuration HOT 3
- Some alerts going to a webhook crash alertmanager - panic: runtime error: invalid memory address or nil pointer dereference HOT 4
- `route.ID()` returns conflicting IDs
- Different aggregation groups can share the same nflog HOT 1
- docker image does not recognise timezone appropriately HOT 7
- Feature request: Please sign your releases HOT 1
- Wrong Alertmanager version for v1 API removal in the logs? HOT 1
- How to fix non unique GroupKeys? HOT 5
- Have a way to mute alert until it's resolved to receive a resolved notification once it's fixed HOT 11
- FR: sort matchers on silences page HOT 1
- Update docs to note api/v1 deprecation and removal HOT 1
- Go stdlib vuln - please upgrade go version HOT 4
- AlertManager not respecting repeat_interval timer setting on duplicate alert HOT 1
- `amtool` ZSH completion is broken
- Prometheus Alertmanager not sending email notifications HOT 3
- Alerts are not triggering to its target communications HOT 2
- [UI] Feature: Localtime / Timezone option
- multiple peers send alert that should only be sent once after failed notify attempt HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from alertmanager.