Merge branch '2.3'
# Conflicts: # composer.lock
This commit is contained in:
@@ -11,6 +11,13 @@
|
||||
|
||||
namespace CachetHQ\Cachet\Http\Controllers\Api;
|
||||
|
||||
use CachetHQ\Cachet\Integrations\Releases;
|
||||
|
||||
/**
|
||||
* This is the general api controller.
|
||||
*
|
||||
* @author James Brooks <james@bluebaytravel.co.uk>
|
||||
*/
|
||||
class GeneralController extends AbstractApiController
|
||||
{
|
||||
/**
|
||||
@@ -30,6 +37,11 @@ class GeneralController extends AbstractApiController
|
||||
*/
|
||||
public function version()
|
||||
{
|
||||
return $this->item(CACHET_VERSION);
|
||||
$latest = app(Releases::class)->latest();
|
||||
|
||||
return $this->setMetaData([
|
||||
'on_latest' => version_compare(CACHET_VERSION, $latest['tag_name']) === 1,
|
||||
'latest' => $latest,
|
||||
])->item(CACHET_VERSION);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
|
||||
namespace CachetHQ\Cachet\Http\Controllers\Dashboard;
|
||||
|
||||
use CachetHQ\Cachet\Integrations\Releases;
|
||||
use CachetHQ\Cachet\Models\Component;
|
||||
use CachetHQ\Cachet\Models\ComponentGroup;
|
||||
use CachetHQ\Cachet\Models\IncidentTemplate;
|
||||
@@ -19,7 +18,6 @@ use Exception;
|
||||
use GrahamCampbell\Binput\Facades\Binput;
|
||||
use Illuminate\Database\Eloquent\ModelNotFoundException;
|
||||
use Illuminate\Routing\Controller;
|
||||
use Illuminate\Support\Facades\Response;
|
||||
|
||||
class ApiController extends Controller
|
||||
{
|
||||
@@ -91,20 +89,4 @@ class ApiController extends Controller
|
||||
|
||||
throw new ModelNotFoundException("Incident template for $templateSlug could not be found.");
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if Cachet is up to date.
|
||||
*
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function checkVersion()
|
||||
{
|
||||
$latest = app(Releases::class)->latest();
|
||||
|
||||
return Response::json([
|
||||
'cachet_version' => CACHET_VERSION,
|
||||
'latest_version' => $latest,
|
||||
'is_latest' => version_compare(CACHET_VERSION, $latest) === 1,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -232,7 +232,6 @@ class DashboardRoutes
|
||||
$router->post('components/groups/order', 'ApiController@postUpdateComponentGroupOrder');
|
||||
$router->post('components/order', 'ApiController@postUpdateComponentOrder');
|
||||
$router->post('components/{component}', 'ApiController@postUpdateComponent');
|
||||
$router->get('system/version', 'ApiController@checkVersion');
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ class Releases
|
||||
*/
|
||||
public function latest()
|
||||
{
|
||||
$release = $this->cache->remember('version', 720, function () {
|
||||
$release = $this->cache->remember('release.latest', 720, function () {
|
||||
$headers = ['Accept' => 'application/vnd.github.v3+json', 'User-Agent' => defined('CACHET_VERSION') ? 'cachet/'.constant('CACHET_VERSION') : 'cachet'];
|
||||
|
||||
if ($this->token) {
|
||||
@@ -86,6 +86,10 @@ class Releases
|
||||
])->getBody(), true);
|
||||
});
|
||||
|
||||
return $release['tag_name'];
|
||||
return [
|
||||
'tag_name' => $release['tag_name'],
|
||||
'prelease' => $release['prerelease'],
|
||||
'draft' => $release['draft'],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,12 +20,13 @@
|
||||
],
|
||||
"require": {
|
||||
"php": ">=5.5.9",
|
||||
"laravel/framework": "5.2.36",
|
||||
"laravel/framework": "5.2.37",
|
||||
"alt-three/badger": "^3.1",
|
||||
"alt-three/bus": "^1.1",
|
||||
"alt-three/emoji": "^3.1",
|
||||
"alt-three/throttle": "^1.0",
|
||||
"alt-three/validator": "^1.5",
|
||||
"aws/aws-sdk-php": "^3.7",
|
||||
"backup-manager/laravel": "^1.1",
|
||||
"barryvdh/laravel-cors": "^0.8",
|
||||
"doctrine/dbal": "^2.5",
|
||||
|
||||
173
composer.lock
generated
173
composer.lock
generated
@@ -4,8 +4,8 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"hash": "2a0e517bd0c53545dfcdc8fae72caf7c",
|
||||
"content-hash": "2e9e42bd41d1bfad06ebe446cc3c96f1",
|
||||
"hash": "bd74187402d65466fb19617859c8d507",
|
||||
"content-hash": "3f1683299582010eced0a6ebd4daf734",
|
||||
"packages": [
|
||||
{
|
||||
"name": "alt-three/badger",
|
||||
@@ -323,6 +323,86 @@
|
||||
],
|
||||
"time": "2016-04-22 17:26:22"
|
||||
},
|
||||
{
|
||||
"name": "aws/aws-sdk-php",
|
||||
"version": "3.18.17",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/aws/aws-sdk-php.git",
|
||||
"reference": "6c7849556f556da8615d22e675710c7a086ed5d0"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/6c7849556f556da8615d22e675710c7a086ed5d0",
|
||||
"reference": "6c7849556f556da8615d22e675710c7a086ed5d0",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"guzzlehttp/guzzle": "~5.3|~6.0.1|~6.1",
|
||||
"guzzlehttp/promises": "~1.0",
|
||||
"guzzlehttp/psr7": "~1.0",
|
||||
"mtdowling/jmespath.php": "~2.2",
|
||||
"php": ">=5.5"
|
||||
},
|
||||
"require-dev": {
|
||||
"andrewsville/php-token-reflection": "^1.4",
|
||||
"aws/aws-php-sns-message-validator": "~1.0",
|
||||
"behat/behat": "~3.0",
|
||||
"doctrine/cache": "~1.4",
|
||||
"ext-dom": "*",
|
||||
"ext-json": "*",
|
||||
"ext-openssl": "*",
|
||||
"ext-pcre": "*",
|
||||
"ext-simplexml": "*",
|
||||
"ext-spl": "*",
|
||||
"nette/neon": "^2.3",
|
||||
"phpunit/phpunit": "~4.0|~5.0",
|
||||
"psr/cache": "^1.0"
|
||||
},
|
||||
"suggest": {
|
||||
"aws/aws-php-sns-message-validator": "To validate incoming SNS notifications",
|
||||
"doctrine/cache": "To use the DoctrineCacheAdapter",
|
||||
"ext-curl": "To send requests using cURL",
|
||||
"ext-openssl": "Allows working with CloudFront private distributions and verifying received SNS messages"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "3.0-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Aws\\": "src/"
|
||||
},
|
||||
"files": [
|
||||
"src/functions.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"Apache-2.0"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Amazon Web Services",
|
||||
"homepage": "http://aws.amazon.com"
|
||||
}
|
||||
],
|
||||
"description": "AWS SDK for PHP - Use Amazon Web Services in your PHP project",
|
||||
"homepage": "http://aws.amazon.com/sdkforphp",
|
||||
"keywords": [
|
||||
"amazon",
|
||||
"aws",
|
||||
"cloud",
|
||||
"dynamodb",
|
||||
"ec2",
|
||||
"glacier",
|
||||
"s3",
|
||||
"sdk"
|
||||
],
|
||||
"time": "2016-06-09 23:39:33"
|
||||
},
|
||||
{
|
||||
"name": "backup-manager/backup-manager",
|
||||
"version": "1.1.1",
|
||||
@@ -1939,16 +2019,16 @@
|
||||
},
|
||||
{
|
||||
"name": "laravel/framework",
|
||||
"version": "v5.2.36",
|
||||
"version": "v5.2.37",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/laravel/framework.git",
|
||||
"reference": "236d7c0c5b67a2348ac7831391031d93000de3ab"
|
||||
"reference": "bf199036b0e222a27e2133d841aee0d4238f804d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/laravel/framework/zipball/236d7c0c5b67a2348ac7831391031d93000de3ab",
|
||||
"reference": "236d7c0c5b67a2348ac7831391031d93000de3ab",
|
||||
"url": "https://api.github.com/repos/laravel/framework/zipball/bf199036b0e222a27e2133d841aee0d4238f804d",
|
||||
"reference": "bf199036b0e222a27e2133d841aee0d4238f804d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -2064,7 +2144,7 @@
|
||||
"framework",
|
||||
"laravel"
|
||||
],
|
||||
"time": "2016-06-06 15:18:48"
|
||||
"time": "2016-06-10 22:38:47"
|
||||
},
|
||||
{
|
||||
"name": "league/commonmark",
|
||||
@@ -2402,6 +2482,61 @@
|
||||
],
|
||||
"time": "2016-01-26 21:23:30"
|
||||
},
|
||||
{
|
||||
"name": "mtdowling/jmespath.php",
|
||||
"version": "2.3.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/jmespath/jmespath.php.git",
|
||||
"reference": "192f93e43c2c97acde7694993ab171b3de284093"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/jmespath/jmespath.php/zipball/192f93e43c2c97acde7694993ab171b3de284093",
|
||||
"reference": "192f93e43c2c97acde7694993ab171b3de284093",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.4.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.0"
|
||||
},
|
||||
"bin": [
|
||||
"bin/jp.php"
|
||||
],
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.0-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"JmesPath\\": "src/"
|
||||
},
|
||||
"files": [
|
||||
"src/JmesPath.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Michael Dowling",
|
||||
"email": "mtdowling@gmail.com",
|
||||
"homepage": "https://github.com/mtdowling"
|
||||
}
|
||||
],
|
||||
"description": "Declaratively specify how to extract elements from a JSON document",
|
||||
"keywords": [
|
||||
"json",
|
||||
"jsonpath"
|
||||
],
|
||||
"time": "2016-01-05 18:25:05"
|
||||
},
|
||||
{
|
||||
"name": "nesbot/carbon",
|
||||
"version": "1.21.0",
|
||||
@@ -4421,22 +4556,22 @@
|
||||
},
|
||||
{
|
||||
"name": "phpdocumentor/reflection-docblock",
|
||||
"version": "3.0.3",
|
||||
"version": "3.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
|
||||
"reference": "ea48fd2c79b68fba8693ae67a21cae5b5ee4cfb8"
|
||||
"reference": "9270140b940ff02e58ec577c237274e92cd40cdd"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/ea48fd2c79b68fba8693ae67a21cae5b5ee4cfb8",
|
||||
"reference": "ea48fd2c79b68fba8693ae67a21cae5b5ee4cfb8",
|
||||
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/9270140b940ff02e58ec577c237274e92cd40cdd",
|
||||
"reference": "9270140b940ff02e58ec577c237274e92cd40cdd",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.5",
|
||||
"phpdocumentor/reflection-common": "^1.0@dev",
|
||||
"phpdocumentor/type-resolver": "^0.1.5",
|
||||
"phpdocumentor/type-resolver": "^0.2.0",
|
||||
"webmozart/assert": "^1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
@@ -4462,20 +4597,20 @@
|
||||
}
|
||||
],
|
||||
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
|
||||
"time": "2016-06-10 07:04:47"
|
||||
"time": "2016-06-10 09:48:41"
|
||||
},
|
||||
{
|
||||
"name": "phpdocumentor/type-resolver",
|
||||
"version": "0.1.8",
|
||||
"version": "0.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpDocumentor/TypeResolver.git",
|
||||
"reference": "9891754231e55d42f0d16988ffb799af39f31a12"
|
||||
"reference": "b39c7a5b194f9ed7bd0dd345c751007a41862443"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9891754231e55d42f0d16988ffb799af39f31a12",
|
||||
"reference": "9891754231e55d42f0d16988ffb799af39f31a12",
|
||||
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/b39c7a5b194f9ed7bd0dd345c751007a41862443",
|
||||
"reference": "b39c7a5b194f9ed7bd0dd345c751007a41862443",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -4484,7 +4619,7 @@
|
||||
},
|
||||
"require-dev": {
|
||||
"mockery/mockery": "^0.9.4",
|
||||
"phpunit/phpunit": "^5.2"
|
||||
"phpunit/phpunit": "^5.2||^4.8.24"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
@@ -4509,7 +4644,7 @@
|
||||
"email": "me@mikevanriel.com"
|
||||
}
|
||||
],
|
||||
"time": "2016-03-28 10:02:29"
|
||||
"time": "2016-06-10 07:14:17"
|
||||
},
|
||||
{
|
||||
"name": "phpspec/prophecy",
|
||||
|
||||
28
public/build/dist/css/all-20deff324c.css
vendored
Executable file
28
public/build/dist/css/all-20deff324c.css
vendored
Executable file
File diff suppressed because one or more lines are too long
23
public/build/dist/css/all-7f58a0ca27.css
vendored
23
public/build/dist/css/all-7f58a0ca27.css
vendored
File diff suppressed because one or more lines are too long
2
public/build/dist/js/all-44a798f50b.js → public/build/dist/js/all-0bf8973998.js
vendored
Normal file → Executable file
2
public/build/dist/js/all-44a798f50b.js → public/build/dist/js/all-0bf8973998.js
vendored
Normal file → Executable file
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"dist/css/all.css": "dist/css/all-7f58a0ca27.css",
|
||||
"dist/js/all.js": "dist/js/all-44a798f50b.js"
|
||||
"dist/css/all.css": "dist/css/all-20deff324c.css",
|
||||
"dist/js/all.js": "dist/js/all-0bf8973998.js"
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 38 KiB |
@@ -370,9 +370,9 @@ $(function() {
|
||||
$.ajax({
|
||||
async: true,
|
||||
dataType: 'json',
|
||||
url: '/dashboard/api/system/version',
|
||||
url: '/api/v1/version',
|
||||
}).done(function (result) {
|
||||
if (result.is_latest == false) {
|
||||
if (result.meta.on_latest === false) {
|
||||
$('#update-alert').removeClass('hidden');
|
||||
}
|
||||
});
|
||||
|
||||
2
resources/assets/sass/pages/_login.scss
vendored
2
resources/assets/sass/pages/_login.scss
vendored
@@ -1,6 +1,4 @@
|
||||
body.login {
|
||||
background: $sidebar-background-color url("/img/login-background.png") center;
|
||||
|
||||
.form-bg {
|
||||
border-radius: 10px;
|
||||
margin: auto;
|
||||
|
||||
@@ -107,9 +107,9 @@
|
||||
@if(Session::get('setup.done'))
|
||||
@include('dashboard.partials.welcome-modal')
|
||||
<script>
|
||||
$(function() {
|
||||
$('#welcome-modal').modal('show');
|
||||
});
|
||||
(function() {
|
||||
$('#welcome-modal').modal('show');
|
||||
}());
|
||||
</script>
|
||||
@endif
|
||||
@stop
|
||||
|
||||
Reference in New Issue
Block a user