Conversation
| } | ||
|
|
||
| /** | ||
| * @return array<class-string, array{name:string,warnings:array<string,string>}> |
Check failure
Code scanning / Psalm
InvalidReturnType
| $results[$provider::class]['warnings'][$category][] = $warning->getText(); | ||
| } | ||
| } | ||
| return $results; |
Check failure
Code scanning / Psalm
InvalidReturnStatement
| */ | ||
| public function getAll(): array { | ||
| $results = []; | ||
| $providerRegistrations = $this->coordinator->getRegistrationContext()->getAccountWarningsProviders(); |
Check notice
Code scanning / Psalm
PossiblyNullReference
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Stub for now Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This is a temporary solution, we’ll need to add the list in array format so that the UI can do something nice with it. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
b55394a to
3298503
Compare
| * @method \DateTime getTimestamp() | ||
| * @method void setTimestamp(\DateTime $timestamp) | ||
| */ | ||
| class ClientDiagnostic extends Entity { |
Check notice
Code scanning / Psalm
PropertyNotSetInConstructor
| ]; | ||
|
|
||
| /** @var int */ | ||
| protected $authtokenid; |
Check notice
Code scanning / Psalm
PropertyNotSetInConstructor
| protected $authtokenid; | ||
|
|
||
| /** @var string json-encoded*/ | ||
| protected $diagnostic; |
Check notice
Code scanning / Psalm
PropertyNotSetInConstructor
| protected $diagnostic; | ||
|
|
||
| /** @var \DateTime */ | ||
| public $timestamp; |
Check notice
Code scanning / Psalm
PropertyNotSetInConstructor
|
To test current version:
$ curl 'https://nextcloud.local/index.php/settings/accountwarnings' --compressed -H 'User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/118.0' -H 'Accept: application/json, text/plain, */*' -H 'Accept-Language: fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3' -H 'Accept-Encoding: gzip, deflate, br' -H 'requesttoken: RP+Iy80p7CpIAe9nm7AvBPVDUImk1zVapcKvKc6iodE=:I8/QmIhGmhkjc7cq0oVmfrIVZdzwok0T8KqYGqLu97s=' -H 'Connection: keep-alive' -H 'Cookie: nc_sameSiteCookielax=true; nc_sameSiteCookiestrict=true; __Host-nc_sameSiteCookielax=true; __Host-nc_sameSiteCookiestrict=true; oc0jgqj12wso=cd292f3de00c5dc05b53fe76014218cb; oc_sessionPassphrase=80lIfOj9C4k2O1Ez50FgVRE8DK195jqBsGppHfHxmaOYl4eLLkFC29%2Fh%2F6OuwSnezNTMkjghKAXw2HFdfLDxzuC0Em0C7UgnQ6Sv7ULtg0TPNHbJutf10TuFgJOVFft1; oc7sh4belq6y=a9453df81f6cf17f754d487d30ee8e45; ocmm5cagww7k=0243cb2330f4ece1638ff797bc712d8d; ocb483ivlvw3=7067c45e40e464e1efb1a37c1772d678; ocd6z2qt3ed4=d42ca7a29d04e0cb6b4e9a6730b75377; ocno0q30p5zb=4cd77e8ba87bbb36afaedcbd95566798; oc9vsucyughg=1013a59f75cfd29da19c5bf38875d400; oc7m24rvn3az=414572e055a44be404db457f5b17ff82; oca71g0c9utv=75d6a35ca8043847a5633029124c28ed; nc_username=admin; nc_token=vOoO4v0tTd1N15avMtv%2FcV6PXJDoMVbH; nc_session_id=75d6a35ca8043847a5633029124c28ed' -H 'Sec-Fetch-Dest: empty' -H 'Sec-Fetch-Mode: cors' -H 'Sec-Fetch-Site: same-origin' -H 'DNT: 1' -H 'Sec-GPC: 1' -H 'TE: trailers'|jq .
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 326 100 326 0 0 440 0 --:--:-- --:--:-- --:--:-- 440
{
"OCA\\Settings\\AccountWarnings\\ClientDiagnosticWarningsProvider": {
"name": "Client errors",
"warnings": {
"warning": [
"Account \"admin\" had 3 conflicts on client testdiag, oldest one on 2023-09-24 22:00:00",
"Account admin had 1 failed upload on client testdiag on 2023-09-24 22:01:40"
]
}
},
"OCA\\Settings\\AccountWarnings\\OutdatedClientWarningsProvider": {
"name": "Outdated clients",
"warnings": {
"warning": [
"2 users are using outdated client version \"Example Desktop client 3.5.0\""
]
}
},
"OCA\\Settings\\AccountWarnings\\QuotaWarningsProvider": {
"name": "Quota",
"warnings": {
"warning": [
"2 accounts are using more than 90% of their quota: admin,user1"
],
"error": [
"1 account is using more than 98% of their quota: alice"
]
}
}
} |
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
|
Last commit moves |
Summary
TODO
Checklist