mywatch 0.2.0 → 0.2.1
raw patch · 5 files changed
+12/−3 lines, 5 files
Files
- ChangeLog.md +6/−0
- README.md +1/−1
- mywatch.cabal +1/−1
- src/Application.hs +3/−0
- static/mywatch.js +1/−1
ChangeLog.md view
@@ -1,3 +1,9 @@+0.2.1+=====++ * Compress all responses with gzip if acceptable++ 0.2.0 =====
README.md view
@@ -68,7 +68,7 @@ Sproxy Configuration ==================== -* To access the service allow `GET` for `/`, `/static/%` and `/severlist.json`.+* To access the service allow `GET` for `/`, `/static/%` and `/serverlist.json`. * To see processes on a particular MySQL server allow `GET` and `HEAD` for `/server/:server/processlist.json`. * To kill processes allow `DELETE` for `/server/:server/process/%`
mywatch.cabal view
@@ -1,5 +1,5 @@ name: mywatch-version: 0.2.0+version: 0.2.1 synopsis: Web application to view and kill MySQL queries description: View and kill queries on multiple MySQL servers.
src/Application.hs view
@@ -28,6 +28,7 @@ import Web.Scotty (ScottyM, ActionM, middleware, json, file, addroute, get, delete, status, text, param, scottyApp) import qualified Data.HashMap.Lazy as HM+import qualified Network.Wai.Middleware.Gzip as Gzip import LogFormat (logFormat) @@ -42,6 +43,8 @@ myProcess :: Pools -> Middleware -> FilePath -> ScottyM () myProcess ps logger dataDir = do middleware logger++ middleware $ Gzip.gzip Gzip.def {Gzip.gzipFiles = Gzip.GzipCompress} middleware $ staticPolicy (hasPrefix "static" >-> addBase dataDir) get "/" $ file (dataDir ++ "/" ++ "index.html")
static/mywatch.js view
@@ -19,7 +19,7 @@ function commonError(jqXHR, textStatus, errorThrown) { plBody.empty(); main.hide();- infoHead.text('An error has occured');+ infoHead.text('An error has occurred'); infoAlert.text((0 == jqXHR.readyState) ? 'Service unavailable' : errorThrown); infoAlert.removeClass().addClass('alert alert-danger'); info.show();