From 1779ac40c9bad7977b04406e41b2203602891a32 Mon Sep 17 00:00:00 2001 From: James Brooks Date: Fri, 7 Aug 2015 10:31:21 +0100 Subject: [PATCH 1/5] Added the ability to sort and order API results. Closes #756 --- app/Http/Controllers/Api/AbstractApiController.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/Api/AbstractApiController.php b/app/Http/Controllers/Api/AbstractApiController.php index a18612aa..596cb249 100644 --- a/app/Http/Controllers/Api/AbstractApiController.php +++ b/app/Http/Controllers/Api/AbstractApiController.php @@ -159,7 +159,15 @@ abstract class AbstractApiController extends BaseController ], ]; - return $this->setMetaData($pagination)->setData(AutoPresenter::decorate($paginator->getCollection()))->respond(); + $items = $paginator->getCollection(); + + if ($sortBy = $request->get('sort')) { + $direction = $request->has('order') && $request->get('order') == 'desc'; + + $items = $items->sortBy($sortBy, SORT_REGULAR, $direction); + } + + return $this->setMetaData($pagination)->setData(AutoPresenter::decorate($items->values()->all()))->respond(); } /** From fbfa62d0879742b0f51021217fd41eaeb80a3525 Mon Sep 17 00:00:00 2001 From: James Brooks Date: Sat, 8 Aug 2015 14:56:05 +0100 Subject: [PATCH 2/5] Show y axis labels in metrics. Closes #824 --- resources/views/partials/metrics.blade.php | 1 - 1 file changed, 1 deletion(-) diff --git a/resources/views/partials/metrics.blade.php b/resources/views/partials/metrics.blade.php index e348c5d0..9c6f1a98 100644 --- a/resources/views/partials/metrics.blade.php +++ b/resources/views/partials/metrics.blade.php @@ -62,7 +62,6 @@ new Chart(ctx).Line(data, { tooltipTemplate: "{!! $metric->name !!}: <%= value %>{!! $metric->suffix !!}", scaleShowVerticalLines: true, - scaleShowLabels: false, responsive: true, maintainAspectRatio: false }); From e3a3f9795759af5718cfc3ab81640d935349fc7e Mon Sep 17 00:00:00 2001 From: James Brooks Date: Sat, 8 Aug 2015 17:12:31 +0100 Subject: [PATCH 3/5] Condensed the readme further --- README.md | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 267c116c..aa5baeee 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,10 @@ Theses extra dependencies are required to develop Cachet: You can now find our documentation at [https://docs.cachethq.io](https://docs.cachethq.io). +- [Installing Cachet](https://docs.cachethq.io/docs/installing-cachet) +- [Getting started with Docker](https://docs.cachethq.io/docs/get-started-with-docker) +- [Getting started with Vagrant](https://docs.cachethq.io/docs/get-started-with-vagrant) + ### Demo Account To test out the demo, you may login to the [Dashboard](https://demo.cachethq.io/dashboard) with the following: @@ -47,22 +51,6 @@ To test out the demo, you may login to the [Dashboard](https://demo.cachethq.io/ The demo is reset every half hour. -## What Cachet is not - -Here is a list of things that Cachet is not or does not do: - -1. It does not monitor your services. It works only as a way to display the status of your services. *However, Cachet is able to receive updates from third-party services via its API.* -2. It does not work on a plugin system. There are no monitoring services to extend. -3. It's not a Twitter clone. - -## Installation Support - -We've moved our installation guides for Apache, Nginx, Docker and Vagrant to our documentation page. - -- [Installing Cachet](https://docs.cachethq.io/docs/installing-cachet) -- [Getting started with Docker](https://docs.cachethq.io/docs/get-started-with-docker) -- [Getting started with Vagrant](https://docs.cachethq.io/docs/get-started-with-vagrant) - ## Translations A special thank you to our [translators](https://crowdin.com/project/cachet/activity_stream), who have allowed us to share Cachet with the world. If you'd like to contribute translations, please check out our [CrowdIn project](https://crowdin.com/project/cachet). From 9df14837b9b688e1fe4c82034661acac53961ea0 Mon Sep 17 00:00:00 2001 From: Graham Campbell Date: Sat, 8 Aug 2015 17:37:25 +0100 Subject: [PATCH 4/5] Updated phpunit --- composer.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.lock b/composer.lock index 02fe496d..c6373ab7 100644 --- a/composer.lock +++ b/composer.lock @@ -3790,16 +3790,16 @@ }, { "name": "phpunit/phpunit", - "version": "4.8.1", + "version": "4.8.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "25468d02f8224d6b5ee62407bedbd4cea1f5dd2e" + "reference": "748c6963c0a8c983fa69ee8884c885d0e98209bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/25468d02f8224d6b5ee62407bedbd4cea1f5dd2e", - "reference": "25468d02f8224d6b5ee62407bedbd4cea1f5dd2e", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/748c6963c0a8c983fa69ee8884c885d0e98209bf", + "reference": "748c6963c0a8c983fa69ee8884c885d0e98209bf", "shasum": "" }, "require": { @@ -3858,7 +3858,7 @@ "testing", "xunit" ], - "time": "2015-08-07 09:43:11" + "time": "2015-08-07 12:56:50" }, { "name": "phpunit/phpunit-mock-objects", From 324f8703cec427b11b1073c7fa04a8ccf5135d94 Mon Sep 17 00:00:00 2001 From: Graham Campbell Date: Sat, 8 Aug 2015 17:38:09 +0100 Subject: [PATCH 5/5] Removed old docker files --- .dockerignore | 1 - docker-compose.yml | 18 ------------------ 2 files changed, 19 deletions(-) delete mode 100644 .dockerignore delete mode 100644 docker-compose.yml diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index 6b8710a7..00000000 --- a/.dockerignore +++ /dev/null @@ -1 +0,0 @@ -.git diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index 908842e2..00000000 --- a/docker-compose.yml +++ /dev/null @@ -1,18 +0,0 @@ -mysql: - image: mysql:5.6 - environment: - - MYSQL_ROOT_PASSWORD=cachet - - MYSQL_DATABASE=cachet - - MYSQL_USER=cachet - - MYSQL_PASSWORD=cachet -cachet: - build: . - ports: - - 80:8000 - links: - - mysql:mysql - environment: - - DB_HOST=mysql - - DB_DATABASE=cachet - - DB_USERNAME=cachet - - DB_PASSWORD=cachet