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)
- multiple peers send alert that should only be sent once after failed notify attempt HOT 4
- Alertmanager send resolved notification when problem not solved HOT 3
- Cannot send alerts to multiple receivers simultaneously using matchers field. HOT 8
- Unable to change time zone in Grafana Alerting Notification Template (Always in UTC) HOT 1
- bad response status 404 Not Found HOT 1
- Task: Improvements to silences
- Work around PrometheusOperatorSyncFailed, integration=opsgenie, max_runes=130? HOT 1
- config.SecretURL type returns Json.Unmarshal() error which can expose the secret url. HOT 1
- amtool does not have a way to specify a time to test with. HOT 4
- Support time_interval testing with amtool config routes test HOT 2
- AlertManager doesn't send alert to Slack HOT 1
- Docker image prom/alertmanager:v0.27.0 fails to parse webhook_url_file from msteams_config HOT 2
- An option to disable the default sorting of Alerts for a group of Alerts HOT 6
- AlertManager doesn't send some of alerts to Pagerduty HOT 3
- Alertmanager's template obtains multiple metrics HOT 1
- Silence with unused label matching All Alerts HOT 2
- matcher is not native regexp why? HOT 2
- Feature Request: Matrix Receiver
- Microsoft deprecating Teams webhooks, new "Workflows" uses incompatible schema HOT 34
- Discord webhook : Cannot send an empty message HOT 4
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.