-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Device expiry implementation #57
Conversation
Well, a bad red cross means expired (red cross BAD / green check OK), seems quite logic. to me :) |
What i see, it is is not clear at all. Users are going to be completly lost with this. |
So tell me how you would implement this view..
…On Thu, Mar 7, 2024 at 7:07 PM Sebastien Chaumontet < ***@***.***> wrote:
Well, a bad red cross means expired (red cross BAD / green check OK),
seems quite logic. to me :) The column is named Not Expired, if it's Green
it's not expired, if it's red , it's expired. Can evaluate if call the
column Live or if you prefer, but Unexpired is not a nice label, Not
expired is quite explicit
What i see, it is is not clear at all. Users are going to be completly
lost with this.
More over it is not an option of the configuration like the other
chek/cross but a status. So it should be more at the begining of the line i
think.
Maybe we need to find other icons ...
—
Reply to this email directly, view it on GitHub
<#57 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AL3TFMKRTTJQQ4YV5OZLV2LYXCUH3AVCNFSM6AAAAABELKUZFCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBUGE2DCNJVGY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Some ideas of icons: https://www.google.com/search?q=expired&tbm=isch&chips=q:expired,g_1:icon:t4tNJzcaTj4%3D&rlz=1C5CHFA_enFR914FR914&hl=en&sa=X&ved=2ahUKEwjt49aX3uKEAxXwuCcCHSDNBlwQ4lYoBnoECAEQPQ&biw=1680&bih=963 We need to agrre on something usable before implementing it. So feel free to propose options. |
This states free and seems ok Valid not expired Expired icon They are SVG, so they can be big or small.. i resized them to 20x16 |
Looks nice. |
Hi @skizzofly do you have time to complete updates of this PR? |
Hi, I was waiting for a confirmation for the title and the icons ..
Is Expiration and the two icons i posted ok?
Let me know
…On Sat, Mar 9, 2024 at 8:07 PM Sebastien Chaumontet < ***@***.***> wrote:
Hi @skizzofly <https://github.com/skizzofly> do you have time to complete
updates of this PR?
—
Reply to this email directly, view it on GitHub
<#57 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AL3TFMOZRKFG7D6AQL2VOEDYXNMXVAVCNFSM6AAAAABELKUZFCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBWHE2TAOBWGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
"Expiration" and the 2 icons looks ok to me yes. |
Hi Seb, I just committed the cosmetic fixes with bef76e4
<bef76e4>
1) Changed column title as requested,
2) New icons
3) A static tooltip text, translated in the available languages when
mosueover the icon.
…On Sat, Mar 9, 2024 at 8:25 PM Sebastien Chaumontet < ***@***.***> wrote:
"Expiration" and the 2 icons looks ok to me yes.
—
Reply to this email directly, view it on GitHub
<#57 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AL3TFMMPY5KLRPNU3GOK6BDYXNO3JAVCNFSM6AAAAABELKUZFCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBWHE2TKMZTG4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Can you please move this column between the edit and trash button as it is not parameters? Please also fix other comments. |
Instead of "The current device is: Valid" we can say: "This device will expire in x days". What do you think? |
the "Will expire in x days tooltip " is in my opinion too much work for a
useless information,
It requires math (conversion from seconds to days) that in the long term
could overload the server for a non so vital information..
IF it's absolutely a vital feature and required for the release i can think
about it.
I Will move the column with no problems
…On Sat, Mar 9, 2024 at 11:49 PM Sebastien Chaumontet < ***@***.***> wrote:
Instead of "The current device is: Valid" we can say: "This device will
expire in x days". What do you think?
—
Reply to this email directly, view it on GitHub
<#57 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AL3TFMMNHPD3CTKIPF4DLJLYXOGXFAVCNFSM6AAAAABELKUZFCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBXGAYDANZUGQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
It looks nice. |
About the expiration date i think it needs to be known by the user. So without calculating the expiration date can be write in the tooltip. |
Maybe a sentence? Edit: added registration keyword |
A very nice thing would be to be able to click on the device to renew the expiration for one year. At least we need some explicit message somewhere to explain how to renew the device. And also explain what is the risk of device expired. |
I think now it's ok Regarding the update, it's correct that the user goes in Edit, reviews the info, and more important flags the Yes we can write a disclamier someware. Apart these minor cosmetic issues, did you give an eye to the logic? |
Qucikly but you need to comit you change, fix other reported small issues, then squash and finally push. |
You are going to the good way i think :) Maybe adding a general information message at the bottom. |
Good evening, |
When you speak about device expired, can you please replace it by device registration expired? Can you please keep the sentence at the bottom of the table in all cases? Can you please remove the Warning for it? |
Seb, i am sorry but i really do not see the repeorted issues.. |
Did you check the fixes?
…On Thu, Mar 14, 2024 at 12:04 AM Sebastien Chaumontet < ***@***.***> wrote:
Any chances to fix reported issues?
—
Reply to this email directly, view it on GitHub
<#57 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AL3TFMMFTKO6KGVMYL4UQZTYYDLPFAVCNFSM6AAAAABELKUZFCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJWGA2TGNBXGY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
You did not commit anything since my last message / last check. |
There is no review started..
Did you submit it?
Il ven 15 mar 2024, 18:51 Sebastien Chaumontet ***@***.***>
ha scritto:
… You did not commit anything since my last message / last check.
See the begingin of this conversation for review part. #57
<#57>
—
Reply to this email directly, view it on GitHub
<#57 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AL3TFMJGFWU2ZYG2HQFHDJTYYMYLXAVCNFSM6AAAAABELKUZFCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBQGE2TSNBWGQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Ok NOW i see all
Il ven 15 mar 2024, 18:59 Sebastien Chaumontet ***@***.***>
ha scritto:
… ***@***.**** commented on this pull request.
------------------------------
In index.php
<#57 (comment)>:
> $req2->bindParam(':us', $_SESSION['user']);
+ $req2->bindParam(':ti', $ttime);
Fix indentation here.
------------------------------
In index.php
<#57 (comment)>:
> if ($req->rowCount() == 1) { // if device already registred
$result = $req->fetch();
if ($result['dev_userid'] == $_SESSION['user']) {
$upd = true;
} // if owned by the user then update
else {
- $error = $lang['error_devexists'];
+ $ttime=time()-31536000; //1 year;
Can you please try to have this as a constant and not repeat the same
value multiple time?
You can also say this is 365 * 24 * 60 * 60 instead of putting this number
a bit unreadable.
------------------------------
In language/english.php
<#57 (comment)>:
> "table_update" => "Update",
"table_delete" => "Delete",
"table_new" => "Add new",
+ "table_tt_expiration" =>"Expiration Status: Green Valid, Red Expired",
Please add space before the second string as for the others
------------------------------
In index.php
<#57 (comment)>:
> @@ -735,17 +748,25 @@ function devicelist()
fillindevice();
} else {
if ($upd) {
- $ins = $dbh->prepare('UPDATE devices SET dev_type=:dt, dev_actype=:ty, dev_acreg=:re, dev_accn=:cn, dev_notrack=:nt, dev_noident=:ni WHERE dev_id=:de AND dev_userid=:us');
+ if ($trf) {
+ $ins = $dbh->prepare('UPDATE devices SET dev_type=:dt, dev_actype=:ty, dev_acreg=:re, dev_accn=:cn, dev_notrack=:nt, dev_noident=:ni, dev_updatetime=:ti, dev_userid=:us WHERE dev_id=:de');
+ //Transfer expired device
+ }
+ else {
Please put } else { //Transfer expired device on a single line.
------------------------------
In index.php
<#57 (comment)>:
> } else {
- $ins = $dbh->prepare('INSERT INTO devices (dev_id, dev_type, dev_actype, dev_acreg, dev_accn, dev_userid, dev_notrack, dev_noident) VALUES (:de, :dt, :ty, :re, :cn, :us, :nt, :ni)');
+ $ins = $dbh->prepare('INSERT INTO devices (dev_id, dev_type, dev_actype, dev_acreg, dev_accn, dev_userid, dev_notrack, dev_noident,dev_updatetime) VALUES (:de, :dt, :ty, :re, :cn, :us, :nt, :ni, :ti)');
sapece missing before dev_updatetime
------------------------------
In language/czech.php
<#57 (comment)>:
> "table_update" => "Aktualizace",
"table_delete" => "Výmaz",
"table_new" => "Přidat nové",
+ "table_tt_expiration" =>"Platnost registrace tohoto zařízení vyprší:",
+ "expiry_disclaimer" =>"Zařízení s vypršenou registrací si mohou ostatní uživatelé zdarma zaregistrovat, obnovit zařízení s prošlou platností na další rok, upravit a ověřit své zařízení, zkontrolovat data, zkontrolovat certifikaci vlastnictví zařízení a stisknout Odeslat",
+ "expiry_warning" =>"Upozornění: Platnost registrace některých vašich zařízení vypršela, zkontrolujte je",
Sapce missing before "Upozornění
------------------------------
In language/dutch.php
<#57 (comment)>:
> "table_noident" => "Ident.",
"table_update" => "Update",
"table_delete" => "Verwijder",
"table_new" => "Toevoegen",
+ "table_tt_expiration" =>"Deze apparaatregistratie verloopt na de volgende periode:",
+ "expiry_disclaimer" =>"Apparaten met een verlopen registratie kunnen gratis door andere gebruikers worden geregistreerd, een verlopen apparaat met nog een jaar verlengen, uw apparaat bewerken en valideren, de gegevens bekijken, de eigendomscertificering van het apparaat controleren en op Verzenden drukken",
+ "expiry_warning" =>"Waarschuwing: sommige van uw apparaatregistraties zijn VERLOPEN. Controleer ze alstublieft",
again sapce missing
------------------------------
In language/english.php
<#57 (comment)>:
> "table_update" => "Update",
"table_delete" => "Delete",
"table_new" => "Add new",
+ "table_tt_expiration" =>"This device registration is going to expire the:",
+ "expiry_disclaimer" =>"Devices with expired registration are free to be registered by other users, to renew for another year an expired device, edit and validate your device, review the data, check the device ownership certification and press submit",
+ "expiry_warning" =>"Warning: Some of your devices registration are EXPIRED, please review them",
again
------------------------------
In language/french.php
<#57 (comment)>:
> "table_update" => "Modifier",
"table_delete" => "Supprimer",
"table_new" => "Ajouter",
+ "table_tt_expiration" =>"L'enregistrement de cet appareil va expirer :",
+ "expiry_disclaimer" =>"Les appareils dont l'enregistrement a expiré peuvent être enregistrés librement par d'autres utilisateurs, renouveler pour une année supplémentaire un appareil expiré, modifier et valider votre appareil, examiner les données, vérifier la certification de propriété de l'appareil et appuyer sur Soumettre.",
+ "expiry_warning" =>"Avertissement : L'enregistrement de certains de vos appareils est EXPIRÉ, veuillez les vérifier",
again
------------------------------
In language/german.php
<#57 (comment)>:
> "table_update" => "Aktualisieren",
"table_delete" => "Löschen",
"table_new" => "Hinzufügen",
+ "table_tt_expiration" =>"Diese Geräteregistrierung läuft ab:",
+ "expiry_disclaimer" =>"Geräte mit abgelaufener Registrierung können von anderen Benutzern kostenlos registriert werden, ein abgelaufenes Gerät um ein weiteres Jahr verlängern, Ihr Gerät bearbeiten und validieren, die Daten überprüfen, die Eigentumsbescheinigung des Geräts überprüfen und auf Senden klicken",
+ "expiry_warning" =>"Warnung: Einige Ihrer Geräteregistrierungen sind ABGELAUFEN. Bitte überprüfen Sie sie",
again
------------------------------
In templates/devicelist.html.twig
<#57 (comment)>:
> <tr>
<td>
<a href="/?a=updatedev&devid={{ device.dev_id }}">
<img src="/pict/mod.gif" title="{{ lang.table_update }}" class="devbutton">
</a>
</td>
+ <TD class="tab2"><iMG SRC="/pict/ex{{ device.dev_expired }}.png" title="{{ lang.table_tt_expiration }} {{ (device.dev_updatetime+expirationdelta)|date('j F, Y') }} "></TD>
Please write TD il lower case as all others
—
Reply to this email directly, view it on GitHub
<#57 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AL3TFMI3CCRLZ645BICKM7TYYMZHLAVCNFSM6AAAAABELKUZFCVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTSMRTGAZTONZXG4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Sorry for that! I thought you were seeing it as you reply on some of them. But it was maybe just my screenshot. |
Yeah its why i did not understand what you wanted :)
I fixed the screenshot issues three days ago
Il ven 15 mar 2024, 19:07 Sebastien Chaumontet ***@***.***>
ha scritto:
… Sorry for that! I thought you were seeing it as you reply on some of them.
But it was maybe just my screenshot.
—
Reply to this email directly, view it on GitHub
<#57 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AL3TFMOOZQYQPIAXLKYM5B3YYM2F3AVCNFSM6AAAAABELKUZFCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBQGE4DINRVHE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hi with e959115 i commited the changes requested, if it's all ok i will squash it Please note that in devicelist.html.twig the TD's in the first part of the tables are all lowercase, and in the second part of the table they are uppercase, i am not sure if there is a logic in this, anyway i did as you told me, lowering the case of my addon. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
commited with e959115
Seb, did you check my commits? |
There is still 2 small reviews to fix. |
Seb, if the fixes are regarding the comment and the 15 month i commited it with aec3279 IF the changes are other, i do not see them, so be sure to submit them.. |
fixed with 8ebe58f |
It seems we are now good! |
Device expiry implmentation Cosmetic fixes Device expiry, cosmetic fixes centralized expireseconds, fix indent code made costant expirationdelta Code Review commit Added comments, and modified from 12 to 15 months the expirationdelta brace and comment fx
squashed into 6d2f41b |
@skizzofly about the database_schema_upgrade.sql.txt can you please provide a version which randomize by 2 months the expiration date, so it will not be predictable (someone will not be able to try all device to get it for his own at the initial expiry time)? |
Seb, the dev_updatetime is NOT the expiry date , but the timestamp that the device was updated. |
As required.. generates some random numbers around the current time stamp. |
Not everyday, bit once this will be announced, some will see this and maybe put an alarm for the D day next year to be able to get lot of ownership. |
Thanks! I'm going to try this. |
@skizzofly thank you for your contribution and what you are doing |
@flightenthusiast , maybe this will solve a long timed problem.. our club has such a problem with a glider registered in south africa.. the owner is disappeared and does not reply to mails and no one knows where he is , we tried to contact him but there is no trace of him.. they sold us his device leggily (via LXNav and we have the invoice) but still is registered. @snip try the script on a copy of the DB before going in production . ;) Ceers. |
I just put it in production. Thanks a lot @skizzofly. |
Seb, I'm happy to have helped..
in some time i will also contribute to the Italian localization
Ceers.
…On Mon, Apr 1, 2024 at 5:43 PM Sebastien Chaumontet < ***@***.***> wrote:
I just put it in production. Thanks a lot @skizzofly
<https://github.com/skizzofly>.
—
Reply to this email directly, view it on GitHub
<#57 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AL3TFMMF3HMV6RGOMOOOWU3Y3F6CLAVCNFSM6AAAAABELKUZFCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMZQGAZDCMZRGQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
This modification, permits a device expiration if after one year the record into the OGN DB is not updated.
To renew another year the owner has to go under update, click the check box that he owns the device and save, this will lock the device for the next 365 days.
The expiration status is shown on the device list table, green check is still valid, red X is expired and can be transferred.
Once expired, the device is free to be transferred to an other owner, this to automate device transferring due to inactive accounts
The API's are untouched, a expired device will still show up.
This modification should also loose some work of the admin team, if a flarm owner is really dead or sold the glider, the new owner has to wait for expiry, he will not know if it expired or not, but he can time to time try to transfer the device, if it's denied, means device is still in force of the old user.
database_schema_upgrade.sql.txt
INSTALL.md