1
0
Fork 0
mirror of synced 2024-06-27 18:50:47 +12:00

feat: add new console

This commit is contained in:
Christy Jacob 2022-11-17 22:51:55 +05:30
parent 080abbbb79
commit e0c363e8e5
6 changed files with 59 additions and 12 deletions

@ -1 +1 @@
Subproject commit de73c020a7798e580c48197816124ca4783e115b
Subproject commit 2f6ba45084bbc41666a6424a504cccb93c979e95

View file

@ -23,7 +23,8 @@ App::get('/v1/project/usage')
->inject('response')
->inject('dbForProject')
->action(function (string $range, Response $response, Database $dbForProject) {
var_dump("Getting usage");
var_dump($range);
$usage = [];
if (App::getEnv('_APP_USAGE_STATS', 'enabled') == 'enabled') {
$periods = [

View file

@ -73,7 +73,7 @@ App::post('/v1/projects')
->inject('dbForConsole')
->inject('cache')
->inject('pools')
->action(function (string $projectId, string $name, string $teamId, string $description, string $logo, string $url, string $legalName, string $legalCountry, string $legalState, string $legalCity, string $legalAddress, string $legalTaxId, Response $response, Database $dbForConsole, Cache $cache, Group $pools) {
->action(function (string $projectId, string $name, string $teamId, string $region, string $description, string $logo, string $url, string $legalName, string $legalCountry, string $legalState, string $legalCity, string $legalAddress, string $legalTaxId, Response $response, Database $dbForConsole, Cache $cache, Group $pools) {
$team = $dbForConsole->getDocument('teams', $teamId);

View file

@ -59,6 +59,7 @@
"utopia-php/domains": "1.1.*",
"utopia-php/framework": "0.25.*",
"utopia-php/image": "0.5.*",
"utopia-php/dsn": "0.1.*",
"utopia-php/locale": "0.4.*",
"utopia-php/logger": "0.3.*",
"utopia-php/messaging": "0.1.*",

61
composer.lock generated
View file

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "a2a79fc2e9ebdd4d05afa6632c642686",
"content-hash": "9fe0bbf14cd780146eed867f2d50e955",
"packages": [
{
"name": "adhocore/jwt",
@ -1943,6 +1943,53 @@
},
"time": "2020-02-23T07:40:02+00:00"
},
{
"name": "utopia-php/dsn",
"version": "0.1.0",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/dsn.git",
"reference": "17a5935eab1b89fb4b95600db50a1b6d5faa6cea"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/dsn/zipball/17a5935eab1b89fb4b95600db50a1b6d5faa6cea",
"reference": "17a5935eab1b89fb4b95600db50a1b6d5faa6cea",
"shasum": ""
},
"require": {
"php": ">=8.0"
},
"require-dev": {
"laravel/pint": "1.2.*",
"phpunit/phpunit": "^9.3",
"squizlabs/php_codesniffer": "^3.6",
"vimeo/psalm": "4.0.1"
},
"type": "library",
"autoload": {
"psr-4": {
"Utopia\\DSN\\": "src/DSN"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "A simple library for parsing and managing Data Source Names ( DSNs )",
"keywords": [
"dsn",
"framework",
"php",
"upf",
"utopia"
],
"support": {
"issues": "https://github.com/utopia-php/dsn/issues",
"source": "https://github.com/utopia-php/dsn/tree/0.1.0"
},
"time": "2022-10-26T10:06:20+00:00"
},
{
"name": "utopia-php/framework",
"version": "0.25.0",
@ -2581,16 +2628,16 @@
},
{
"name": "utopia-php/swoole",
"version": "0.4.0",
"version": "0.5.0",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/swoole.git",
"reference": "536e1f3e78fc0197e4a8ed81b1bf2636a3bc4538"
"reference": "c2a3a4f944a2f22945af3cbcb95b13f0769628b1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/swoole/zipball/536e1f3e78fc0197e4a8ed81b1bf2636a3bc4538",
"reference": "536e1f3e78fc0197e4a8ed81b1bf2636a3bc4538",
"url": "https://api.github.com/repos/utopia-php/swoole/zipball/c2a3a4f944a2f22945af3cbcb95b13f0769628b1",
"reference": "c2a3a4f944a2f22945af3cbcb95b13f0769628b1",
"shasum": ""
},
"require": {
@ -2626,9 +2673,9 @@
],
"support": {
"issues": "https://github.com/utopia-php/swoole/issues",
"source": "https://github.com/utopia-php/swoole/tree/0.4.0"
"source": "https://github.com/utopia-php/swoole/tree/0.5.0"
},
"time": "2022-10-08T14:32:43+00:00"
"time": "2022-10-19T22:19:07+00:00"
},
{
"name": "utopia-php/system",

View file

@ -607,8 +607,6 @@ services:
- _APP_REDIS_PORT
- _APP_REDIS_USER
- _APP_REDIS_PASS
- _APP_INFLUXDB_HOST
- _APP_INFLUXDB_PORT
- _APP_CONNECTIONS_DB_CONSOLE
- _APP_CONNECTIONS_DB_PROJECT
- _APP_CONNECTIONS_CACHE