Skip to content

Commit

Permalink
Release 0.1.0
Browse files Browse the repository at this point in the history
* added compatibility with kibana 5.4.x
* improved build script
  • Loading branch information
trampi committed Aug 14, 2017
1 parent d843514 commit 48eef80
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 9 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ Start elasticsearch on your machine and run the following commands
npm install
cd plugins
git clone [email protected]:stagemonitor/stagemonitor-kibana.git
cd stagemonitor-kibana
npm install
cd ..
cd ../..
npm start

Access Kibana under https://localhost:5601 -> the lazy optimizations may take some minutes for the initial pageload.
12 changes: 12 additions & 0 deletions build-all.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash

if [ -z "$1" ]; then
echo "Usage: ./build-all.sh PLUGIN_VERSION"
exit
fi;


for KIBANA_VERSION in 5.4.0 5.4.1 5.4.2 5.4.3 5.5.0 5.5.1
do
./build.sh ${KIBANA_VERSION} $1
done
31 changes: 26 additions & 5 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,38 @@

echo "building archive ..."

if [ -z "$1" ]; then
echo "Usage: ./build.sh KIBANA_VERSION PLUGIN_VERSION"
exit
else
VERSION_KIBANA="$1"
fi;

if [ -z "$2" ]; then
echo "Usage: ./build.sh KIBANA_VERSION PLUGIN_VERSION"
exit
else
VERSION_PLUGIN="$2"
fi;

FILENAME=/tmp/stagemonitor-kibana-${VERSION_PLUGIN}_-_${VERSION_KIBANA}.zip


echo "building archive for $VERSION_KIBANA ..."

BASEDIR=$(dirname "$0")
rm -rf /tmp/kibana
rm /tmp/stagemonitor-kibana.zip
rm -rf /tmp/kibana > /dev/null || true
rm $FILENAME > /dev/null || true

mkdir /tmp/kibana
cp -r "$BASEDIR" /tmp/kibana/stagemonitor-kibana
sed "s/@@VERSION@@/$VERSION_KIBANA/g" /tmp/kibana/stagemonitor-kibana/package.json.template > /tmp/kibana/stagemonitor-kibana/package.json
rm -rf /tmp/kibana/stagemonitor-kibana/.git

cd /tmp
zip -r stagemonitor-kibana.zip kibana
zip -r $FILENAME kibana > /dev/null

echo ""
echo "The built archive is here: /tmp/stagemonitor-kibana.zip"
echo "The built archive is here: $FILENAME"
echo "Install it in kibana with:"
echo "\$KIBANA_DIR/bin/kibana-plugin install /tmp/stagemonitor-kibana.zip"
echo "\$KIBANA_DIR/bin/kibana-plugin install file://$FILENAME"
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"name": "stagemonitor-kibana",
"version": "5.5.0",
"version": "5.4.0",
"dependencies": {
"dagre-d3-webpack": "0.4.17"
"dagre-d3-webpack": "0.4.17",
"flat": "^4.0.0"
}
}
8 changes: 8 additions & 0 deletions package.json.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "stagemonitor-kibana",
"version": "@@VERSION@@",
"dependencies": {
"dagre-d3-webpack": "0.4.17",
"flat": "^4.0.0"
}
}
14 changes: 13 additions & 1 deletion public/app.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'ui/autoload/all';
import modules from 'ui/modules';
import { uiModules } from 'ui/modules';
import uiRoutes from 'ui/routes';

Expand All @@ -21,7 +22,18 @@ uiRoutes
controllerAs: 'ctrl'
});

uiModules
let realUiModule;
if (modules) {
// kibana 5.4.x
realUiModule = modules;
console.log('5.4.x');
} else {
// kibana 5.5.x
realUiModule = uiModules;
console.log('5.5.x');
}

realUiModule
.get('app/stagemonitor', ['elasticsearch', 'kibana'])
.service('elasticsearchService', ElasticsearchService)
.controller('traceListController', traceListController)
Expand Down

0 comments on commit 48eef80

Please sign in to comment.