mirror of
https://github.com/appwrite/appwrite
synced 2026-05-22 16:38:32 +00:00
Merge branch '0.16.x' into feat-variables-api
This commit is contained in:
commit
8a2f8ed6ee
18 changed files with 6372 additions and 6050 deletions
|
|
@ -123,7 +123,7 @@
|
|||
data-analytics-category="console/navigation"
|
||||
data-analytics-label="Users Link">
|
||||
<i class="icon-users"></i>
|
||||
Users
|
||||
Authentication
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
|
|
|
|||
|
|
@ -583,6 +583,11 @@ $logs = $this->getParam('logs', null);
|
|||
<input id="id" type="text" autocomplete="off" placeholder="" data-ls-bind="{{project-collection.$id}}" disabled data-forms-copy class="margin-bottom-no" />
|
||||
</div>
|
||||
|
||||
<label>Database ID</label>
|
||||
<div class="input-copy margin-bottom">
|
||||
<input type="text" autocomplete="off" placeholder="" data-ls-bind="{{router.params.databaseId}}" disabled data-forms-copy class="margin-bottom-no" />
|
||||
</div>
|
||||
|
||||
<ul class="margin-bottom-large text-fade text-size-small">
|
||||
<li class="margin-bottom-small"><i class="icon-angle-circled-right margin-start-tiny margin-end-tiny"></i>
|
||||
<button data-ls-ui-trigger="open-json"
|
||||
|
|
|
|||
|
|
@ -348,6 +348,11 @@ $logs = $this->getParam('logs', null);
|
|||
<input type="text" autocomplete="off" placeholder="" data-ls-bind="{{router.params.collection}}" disabled data-forms-copy class="margin-bottom-no" />
|
||||
</div>
|
||||
|
||||
<label>Database ID</label>
|
||||
<div class="input-copy margin-bottom">
|
||||
<input type="text" autocomplete="off" placeholder="" data-ls-bind="{{router.params.databaseId}}" disabled data-forms-copy class="margin-bottom-no" />
|
||||
</div>
|
||||
|
||||
<ul class="margin-bottom-large text-fade text-size-small" data-ls-if="({{project-document.$id}})">
|
||||
<li class="margin-bottom-small"><i class="icon-angle-circled-right margin-start-tiny margin-end-tiny"></i>
|
||||
<button data-ls-ui-trigger="open-json"
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ $smtpEnabled = $this->getParam('smtpEnabled', false);
|
|||
<a data-ls-attrs="href=/console/home?project={{router.params.project}}" class="back text-size-small link-return-animation--start"><i class="icon-left-open"></i> Home</a>
|
||||
<br />
|
||||
|
||||
<span>Users</span>
|
||||
<span>Authentication</span>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@
|
|||
data-scope="console"
|
||||
data-event="submit"
|
||||
data-success="alert,redirect"
|
||||
data-success-param-alert="Password Reset Completed"
|
||||
data-success-param-url="/auth/signin"
|
||||
data-success-param-alert-text="Password Reset Completed"
|
||||
data-success-param-redirect-url="/auth/signin"
|
||||
data-failure="alert"
|
||||
data-failure-param-alert-text="Password Reset Failed"
|
||||
data-failure-param-alert-classname="error">
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@
|
|||
}
|
||||
],
|
||||
"require-dev": {
|
||||
"appwrite/sdk-generator": "0.18.8",
|
||||
"appwrite/sdk-generator": "0.20.0",
|
||||
"phpunit/phpunit": "9.5.20",
|
||||
"squizlabs/php_codesniffer": "^3.6",
|
||||
"swoole/ide-helper": "4.8.9",
|
||||
|
|
|
|||
63
package-lock.json
generated
63
package-lock.json
generated
|
|
@ -9,8 +9,8 @@
|
|||
"version": "0.1.0",
|
||||
"license": "BSD-3-Clause",
|
||||
"dependencies": {
|
||||
"chart.js": "^3.8.0",
|
||||
"markdown-it": "^12.3.2",
|
||||
"chart.js": "^3.8.2",
|
||||
"markdown-it": "^13.0.1",
|
||||
"pell": "^1.0.6",
|
||||
"prismjs": "^1.28.0",
|
||||
"turndown": "^7.1.1"
|
||||
|
|
@ -549,9 +549,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/chart.js": {
|
||||
"version": "3.8.0",
|
||||
"resolved": "https://registry.npmjs.org/chart.js/-/chart.js-3.8.0.tgz",
|
||||
"integrity": "sha512-cr8xhrXjLIXVLOBZPkBZVF6NDeiVIrPLHcMhnON7UufudL+CNeRrD+wpYanswlm8NpudMdrt3CHoLMQMxJhHRg=="
|
||||
"version": "3.8.2",
|
||||
"resolved": "https://registry.npmjs.org/chart.js/-/chart.js-3.8.2.tgz",
|
||||
"integrity": "sha512-7rqSlHWMUKFyBDOJvmFGW2lxULtcwaPLegDjX/Nu5j6QybY+GCiQkEY+6cqHw62S5tcwXMD8Y+H5OBGoR7d+ZQ=="
|
||||
},
|
||||
"node_modules/chokidar": {
|
||||
"version": "2.1.8",
|
||||
|
|
@ -1067,9 +1067,12 @@
|
|||
}
|
||||
},
|
||||
"node_modules/entities": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/entities/-/entities-2.1.0.tgz",
|
||||
"integrity": "sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==",
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/entities/-/entities-3.0.1.tgz",
|
||||
"integrity": "sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q==",
|
||||
"engines": {
|
||||
"node": ">=0.12"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/fb55/entities?sponsor=1"
|
||||
}
|
||||
|
|
@ -2606,9 +2609,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/linkify-it": {
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-3.0.3.tgz",
|
||||
"integrity": "sha512-ynTsyrFSdE5oZ/O9GEf00kPngmOfVwazR5GKDq6EYfhlpFug3J2zybX56a2PRRpc9P+FuSoGNAwjlbDs9jJBPQ==",
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-4.0.1.tgz",
|
||||
"integrity": "sha512-C7bfi1UZmoj8+PQx22XyeXCuBlokoyWQL5pWSP+EI6nzRylyThouddufc2c1NDIcP9k5agmN9fLpA7VNJfIiqw==",
|
||||
"dependencies": {
|
||||
"uc.micro": "^1.0.1"
|
||||
}
|
||||
|
|
@ -2862,13 +2865,13 @@
|
|||
}
|
||||
},
|
||||
"node_modules/markdown-it": {
|
||||
"version": "12.3.2",
|
||||
"resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-12.3.2.tgz",
|
||||
"integrity": "sha512-TchMembfxfNVpHkbtriWltGWc+m3xszaRD0CZup7GFFhzIgQqxIfn3eGj1yZpfuflzPvfkt611B2Q/Bsk1YnGg==",
|
||||
"version": "13.0.1",
|
||||
"resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-13.0.1.tgz",
|
||||
"integrity": "sha512-lTlxriVoy2criHP0JKRhO2VDG9c2ypWCsT237eDiLqi09rmbKoUetyGHq2uOIRoRS//kfoJckS0eUzzkDR+k2Q==",
|
||||
"dependencies": {
|
||||
"argparse": "^2.0.1",
|
||||
"entities": "~2.1.0",
|
||||
"linkify-it": "^3.0.1",
|
||||
"entities": "~3.0.1",
|
||||
"linkify-it": "^4.0.1",
|
||||
"mdurl": "^1.0.1",
|
||||
"uc.micro": "^1.0.5"
|
||||
},
|
||||
|
|
@ -5484,9 +5487,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"chart.js": {
|
||||
"version": "3.8.0",
|
||||
"resolved": "https://registry.npmjs.org/chart.js/-/chart.js-3.8.0.tgz",
|
||||
"integrity": "sha512-cr8xhrXjLIXVLOBZPkBZVF6NDeiVIrPLHcMhnON7UufudL+CNeRrD+wpYanswlm8NpudMdrt3CHoLMQMxJhHRg=="
|
||||
"version": "3.8.2",
|
||||
"resolved": "https://registry.npmjs.org/chart.js/-/chart.js-3.8.2.tgz",
|
||||
"integrity": "sha512-7rqSlHWMUKFyBDOJvmFGW2lxULtcwaPLegDjX/Nu5j6QybY+GCiQkEY+6cqHw62S5tcwXMD8Y+H5OBGoR7d+ZQ=="
|
||||
},
|
||||
"chokidar": {
|
||||
"version": "2.1.8",
|
||||
|
|
@ -5924,9 +5927,9 @@
|
|||
}
|
||||
},
|
||||
"entities": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/entities/-/entities-2.1.0.tgz",
|
||||
"integrity": "sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w=="
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/entities/-/entities-3.0.1.tgz",
|
||||
"integrity": "sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q=="
|
||||
},
|
||||
"errno": {
|
||||
"version": "0.1.8",
|
||||
|
|
@ -7178,9 +7181,9 @@
|
|||
}
|
||||
},
|
||||
"linkify-it": {
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-3.0.3.tgz",
|
||||
"integrity": "sha512-ynTsyrFSdE5oZ/O9GEf00kPngmOfVwazR5GKDq6EYfhlpFug3J2zybX56a2PRRpc9P+FuSoGNAwjlbDs9jJBPQ==",
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-4.0.1.tgz",
|
||||
"integrity": "sha512-C7bfi1UZmoj8+PQx22XyeXCuBlokoyWQL5pWSP+EI6nzRylyThouddufc2c1NDIcP9k5agmN9fLpA7VNJfIiqw==",
|
||||
"requires": {
|
||||
"uc.micro": "^1.0.1"
|
||||
}
|
||||
|
|
@ -7413,13 +7416,13 @@
|
|||
}
|
||||
},
|
||||
"markdown-it": {
|
||||
"version": "12.3.2",
|
||||
"resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-12.3.2.tgz",
|
||||
"integrity": "sha512-TchMembfxfNVpHkbtriWltGWc+m3xszaRD0CZup7GFFhzIgQqxIfn3eGj1yZpfuflzPvfkt611B2Q/Bsk1YnGg==",
|
||||
"version": "13.0.1",
|
||||
"resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-13.0.1.tgz",
|
||||
"integrity": "sha512-lTlxriVoy2criHP0JKRhO2VDG9c2ypWCsT237eDiLqi09rmbKoUetyGHq2uOIRoRS//kfoJckS0eUzzkDR+k2Q==",
|
||||
"requires": {
|
||||
"argparse": "^2.0.1",
|
||||
"entities": "~2.1.0",
|
||||
"linkify-it": "^3.0.1",
|
||||
"entities": "~3.0.1",
|
||||
"linkify-it": "^4.0.1",
|
||||
"mdurl": "^1.0.1",
|
||||
"uc.micro": "^1.0.5"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,8 +17,8 @@
|
|||
"gulp-less": "^5.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"chart.js": "^3.8.0",
|
||||
"markdown-it": "^12.3.2",
|
||||
"chart.js": "^3.8.2",
|
||||
"markdown-it": "^13.0.1",
|
||||
"pell": "^1.0.6",
|
||||
"prismjs": "^1.28.0",
|
||||
"turndown": "^7.1.1"
|
||||
|
|
|
|||
11
public/dist/scripts/app.js
vendored
11
public/dist/scripts/app.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load diff
|
|
@ -57,7 +57,7 @@ window.addEventListener("load", async () => {
|
|||
const realtime = window.ls.container.get('realtime');
|
||||
const sleep = ms => new Promise(resolve => setTimeout(resolve, ms));
|
||||
let current = {};
|
||||
window.ls.container.get('console').subscribe(['project', 'console'], response => {
|
||||
window.ls.container.get('console').client.subscribe(['project', 'console'], response => {
|
||||
if (response.events.includes('stats.connections')) {
|
||||
for (let project in response.payload) {
|
||||
current[project] = response.payload[project] ?? 0;
|
||||
|
|
|
|||
|
|
@ -2,16 +2,28 @@
|
|||
"use strict";
|
||||
|
||||
window.ls.container.set('console', function (window) {
|
||||
var sdk = new window.Appwrite();
|
||||
var client = new Appwrite.Client();
|
||||
var endpoint = window.location.origin + '/v1';
|
||||
|
||||
sdk
|
||||
client
|
||||
.setEndpoint(endpoint)
|
||||
.setProject('console')
|
||||
.setLocale(APP_ENV.LOCALE)
|
||||
;
|
||||
|
||||
return sdk;
|
||||
return {
|
||||
client: client,
|
||||
account: new Appwrite.Account(client),
|
||||
avatars: new Appwrite.Avatars(client),
|
||||
databases: new Appwrite.Databases(client),
|
||||
functions: new Appwrite.Functions(client),
|
||||
health: new Appwrite.Health(client),
|
||||
locale: new Appwrite.Locale(client),
|
||||
projects: new Appwrite.Projects(client),
|
||||
storage: new Appwrite.Storage(client),
|
||||
teams: new Appwrite.Teams(client),
|
||||
users: new Appwrite.Users(client)
|
||||
}
|
||||
}, true);
|
||||
|
||||
})(window);
|
||||
|
|
@ -2,17 +2,28 @@
|
|||
"use strict";
|
||||
|
||||
window.ls.container.set('sdk', function (window, router) {
|
||||
var sdk = new window.Appwrite();
|
||||
var client = new Appwrite.Client();
|
||||
var endpoint = window.location.origin + '/v1';
|
||||
|
||||
sdk
|
||||
client
|
||||
.setEndpoint(endpoint)
|
||||
.setProject(router.params.project || '')
|
||||
.setLocale(APP_ENV.LOCALE)
|
||||
.setMode('admin')
|
||||
;
|
||||
|
||||
return sdk;
|
||||
return {
|
||||
client: client,
|
||||
account: new Appwrite.Account(client),
|
||||
avatars: new Appwrite.Avatars(client),
|
||||
databases: new Appwrite.Databases(client),
|
||||
functions: new Appwrite.Functions(client),
|
||||
health: new Appwrite.Health(client),
|
||||
locale: new Appwrite.Locale(client),
|
||||
storage: new Appwrite.Storage(client),
|
||||
teams: new Appwrite.Teams(client),
|
||||
users: new Appwrite.Users(client)
|
||||
}
|
||||
}, false);
|
||||
|
||||
})(window);
|
||||
|
|
@ -203,6 +203,12 @@
|
|||
let params = [];
|
||||
let match;
|
||||
|
||||
let indexOfArguments = functionAsString.indexOf('(');
|
||||
|
||||
if (indexOfArguments !== -1) {
|
||||
functionAsString = functionAsString.slice(indexOfArguments, -1);
|
||||
}
|
||||
|
||||
functionAsString = functionAsString.replaceAll('={}', "");
|
||||
functionAsString = functionAsString.replaceAll('=[]', "");
|
||||
functionAsString = functionAsString.replace(REGEX_COMMENTS, "");
|
||||
|
|
@ -259,7 +265,7 @@
|
|||
let args = getParams(target);
|
||||
|
||||
return target.apply(
|
||||
target,
|
||||
container.get(scope),
|
||||
args.map(function(value) {
|
||||
let result = getValue(value, prefix, data);
|
||||
|
||||
|
|
|
|||
|
|
@ -27,8 +27,8 @@ class AttributeEmail extends Attribute
|
|||
->addRule('format', [
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'String format.',
|
||||
'default' => APP_DATABASE_ATTRIBUTE_EMAIL,
|
||||
'example' => APP_DATABASE_ATTRIBUTE_EMAIL,
|
||||
'default' => 'email',
|
||||
'example' => 'email',
|
||||
'array' => false,
|
||||
'require' => true,
|
||||
])
|
||||
|
|
|
|||
|
|
@ -35,8 +35,8 @@ class AttributeEnum extends Attribute
|
|||
->addRule('format', [
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'String format.',
|
||||
'default' => APP_DATABASE_ATTRIBUTE_ENUM,
|
||||
'example' => APP_DATABASE_ATTRIBUTE_ENUM,
|
||||
'default' => 'enum',
|
||||
'example' => 'enum',
|
||||
'array' => false,
|
||||
'require' => true,
|
||||
])
|
||||
|
|
|
|||
|
|
@ -27,8 +27,8 @@ class AttributeIP extends Attribute
|
|||
->addRule('format', [
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'String format.',
|
||||
'default' => APP_DATABASE_ATTRIBUTE_IP,
|
||||
'example' => APP_DATABASE_ATTRIBUTE_IP,
|
||||
'default' => 'ip',
|
||||
'example' => 'ip',
|
||||
'array' => false,
|
||||
'require' => true,
|
||||
])
|
||||
|
|
|
|||
|
|
@ -27,8 +27,8 @@ class AttributeURL extends Attribute
|
|||
->addRule('format', [
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'String format.',
|
||||
'default' => APP_DATABASE_ATTRIBUTE_URL,
|
||||
'example' => APP_DATABASE_ATTRIBUTE_URL,
|
||||
'default' => 'url',
|
||||
'example' => 'url',
|
||||
'array' => false,
|
||||
'required' => true,
|
||||
])
|
||||
|
|
|
|||
Loading…
Reference in a new issue