Segnalazione #70
App dansguardian
0%
Description
Porting del vecchio plugin dansguardian
Associated revisions
Draft dansguardian/apps.py. refs: #70
Draft dansguardian main view. refs: #70
Add dansguardian urls to main urls.py. refs: #70
Install dansguardian app. refs: #70
Use the same string as the old plugin. refs: #70
The main view is an edit one, not a list one. refs: #70
dansguardian form and formset. refs: #70
dansguardian views (not complete). refs: #70
Generalize the field type. refs: #70
Template. refs: #70
Add form_valid() and get_success_url(). refs: #70
Merge branch 'master' into t70. refs: #70
Old code seems to allow the configuration of 'allowed_sites' only. refs: #70
Some UI love. refs: #70
Merge branch 'master' into t70. refs: #70
Add deletion checkbox, supported by django itself. refs: #70
Simplify the code by doing what the old code did: delete everything and recreate POSTed data. refs: #70
First tests for dansguardian. refs: #70
Accept also 301. refs: #70
Show messages upon click. refs: #70
Enclose messages in a div with an id to allow injecting messages via js. refs: #70
Fix text sizes. refs: #70
Refactor inject_message() javascript function, put it in base.html, and use it in dansguardian/edit.html. refs: #70
Refactor even more, create a octonect_functions.js file and load it in base.html. refs: #70
Test request.current_app. refs: #70
Add skipped test (not complete, very WIP). Finish and enable it when it's clear how to isolate octofussd database from tests. refs: #70
Isolated the database for the test, to be continued. refs: #70
Port the modifications from firewall to dansguardian. refs: #70
Render the forms adding a button. refs: #70
Override cursor. refs: #70
Give an id to the buttons, related to the form prefix. refs: #70
Add form_prefix attribute to both <span> elements because both can be target of the click, depending on the user mouse pointer position. refs: #70
Delete content of the right input text elements. refs: #70
Start to fix the test. refs: #70
Fix the test. refs: #70
Add many tests for the various use cases. refs: #70
Cleaner. refs: #70
History
Updated by Mark Caglienzi over 7 years ago
- Status changed from Nuovo to In elaborazione
- Assignee set to Mark Caglienzi
Updated by Mark Caglienzi over 7 years ago
- Ho riutilizzato codice e template dell'app firewall, dato che mi sembrava molto simile
- Una cosa che ho cambiato è relativa alle "pagine" disponibili. Nell'interfaccia di octofussd sono presenti
allowed_sites
,banned_sites
, ecc.. mentre il codice vecchio mi pare che facesse lavorare solo suallowed_sites
, viste anche le stringhe di documentazione/output - Quindi ho reso visibile solo quel ramo (ma con una modifica di un paio di righe diventa tutto disponibile)
Mergiato in master e pushato
Resta da capire:- Come far funzionare la cancellazione di voci, che ho provato e non funziona (problema comune all'app firewall)
Updated by Mark Caglienzi over 7 years ago
- Fixata la cancellazione di voci
- Aggiunto
can_delete=True
alla creazione del Formset in modo da avere esplicitamente un checkbox di cancellazione - Semplificato il codice della view, che cancella tutto e ricrea le voci POSTate (come faceva il codice vecchio)
- Un po' di UI love, con injection dei messages via javascript alla pressione del bottone Restart
- Questo codice è una semplice funzione, che è stata messa in
js/octonet_functions.js
, caricato inbase.html
- Iniziata la testsuite di dansguardian
- A fine giornata ho committato un work in progress per testare la creazione e cancellazione delle voci, isolando l'ambiente di test dal database di
octofussd
.
Resta da finire questa parte di test
Nel frattempo ho mergiato il codice in master e ho pushato
Updated by Mark Caglienzi over 7 years ago
- Reintegrato la parte di codice che cancella le voci dal firewall (più sicura in un ambiente non transazionale)
- Tutti i messaggi sono nei messages anziché in posti casuali della pagina
- Per ogni riga c'è un bottone di cancellazione che via javascript vuota i campi relativi
- Se durante POST c'è una voce con
name
ovalue
vuoti, viene cancellata - Portate le migliorie di UI anche all'app firewall (i relativi commit sono stati taggati anche con #69 per correlarli al relativo ticket)
- Aggiunti test per provare tutti i vari casi possibili in dansguardian (e alcuni non passano con errori su
MockTree
che non sono riuscito a debuggare, potrebbe essere un problema dei test o diMockTree
stesso, piuttosto che del codice di backend vero e proprio, dato che provando col browser a fare le varie azioni sembra tutto ok)
Per evitare di lasciare il branch con le migliorie anche di UI al di fuori di master, ho comunque mergiato e pushato.
Updated by Mark Caglienzi over 7 years ago
- Status changed from In elaborazione to Commenti
- Assignee changed from Mark Caglienzi to Enrico Zini
Updated by Enrico Zini over 7 years ago
- Status changed from Commenti to Chiuso
Direi che ci sia tutto
Dummy dansguardian Django app. refs: #70