-
Notifications
You must be signed in to change notification settings - Fork 6
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
GO-128 Download messages from FS #483
Conversation
app/models/fs/message.rb
Outdated
delivered_at: message.delivered_at | ||
) | ||
|
||
associated_message_draft.destroy if associated_message_draft |
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.
Nebude tu rovnaky problem so stracajucimi sa tagmi?
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.
Bude, myslim na to, ale logiku toho by som vyladila v tom otvorenom PR najprv a potom to lahko preklopim aj sem. Nech to neriesime teraz na dvoch miestach.
end | ||
|
||
def self.collapsed? | ||
# TODO urcit podmienky: odoslana sprava s potvrdenkou by mohla byt collapsed |
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.
Kedze ta dorucenka je extremne dolezita pre nich, tak skor prave naopak.
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.
Je to tu zle naformulovane, mala som na mysli, ze podanie by mohlo byt collapsed v pripade, ze uz prisla dorucenka. Toto su zatial rychle komentare v ramci draftu, doladim este.
} | ||
</style> | ||
|
||
<table class="min-w-full divide-y divide-gray-300"> |
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.
Mas screen ako toto vyzera?
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.
<td> | ||
<b> | ||
<time class="md:hidden" datetime="<%= message.delivered_at %>"> | ||
<%= ApplicationController.helpers.nice_datetime_with_time(message.delivered_at, keep_year: true) %> |
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.
Toto sa neda volat priamo cez nice_datetime_with_time
?
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.
Nie, lebo to nevolame z controllera, tak nie su bezne dostupne veci vo view k dispozicii
def self.build_html_visualization(message) | ||
return [ActionController::Base.new.render_to_string('fs/messages/_submission', layout: false, locals: { message: message }), build_html_visualization_from_form(message)].compact.join('<hr>') if message.outbox? | ||
|
||
# TODO: Vieme aj lepsie identifikovat? Nejake dalsie typy v tejto kategorii neexistuju? |
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.
Toto tu je otvorena vec. FS API v response vracia aj message_type
, da sa identifikovat aj podla toho (ale tiez to je trochu len take hadanie, ked nemame nejaku dokumentaciu k tomu). Nevieme ako casto sa mozu zmenit bud tieto nazvy alebo message_type
.
Samotna dorucenka si myslim, ze problem nie je (tam by som sa spolahla aj na message_type
), ale tieto negativne verzie su narocnejsie. Nevieme ani kolko typov existuje.
<tr> | ||
<th>Dôvod zmeny stavu podania:</th> | ||
<td> | ||
<b><!--TODO tato informacia z API neprichadza, nachadza sa to vsak vo vnutri, v XML (vyplnene to je napr. v pripade odmietnuteho podania). Parsovat/neparsovat, kde?--></b> |
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.
Tiez otvorena vec. Napr. v pripade nepodarenych podani, ktore sme skusali v zaciatkoch implementacie sme vdaka tomuto vycitali, kde bol problem v podani. Chyba bola uvedena v tomto policku na portali.
Je to vsak podla vsetkeho vyparsovane priamo z XML obsahu.
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.
Toto tiez prosim @celuchmarek keby sa skusis este posprtat v tom, ci to nahodou nevieme ziskat jednoducho v response alebo to treba naozaj len parsovat.
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.
písali sme na Slacku
<tr> | ||
<th>Obdobie:</th> | ||
<td> | ||
<b><!--TODO zistit co tu byva vyplnene (zatial sme videli iba prazdne)--></b> |
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.
Toto asi bude potrebne overit s nejakym vacsim FS userom, nech zistime, co tu zvykne byt vyplnene.
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.
@celuchmarek Jano spominal, ze k tomuto by sme mozno vedeli vycitat nejake info aj z XSDciek k response/WSDL. Vedel by si skusit popatrat?
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.
V response toho môže byť viac. Všetky fieldy sú tam optional. Teraz máme v tom api iba tie, čo som dostával pri volaní, viem tam ale pomerne ľahko dohodiť všetky. Napr. obdobie je v popise API, takže pridáme do FS API a zistíme, či to aj z FS reálne vracia.
Otestovane na podani & spatvzati podania. |
Tu este je potrebne upravit implementaciu spracovania stiahnutej spravy podla zmien v #477. |
# Conflicts: # app/models/message.rb # db/schema.rb
…Rule for adding tag 'S potvrdenkou'
Spravy sa oznacuju za precitane, len tie, ktore stiahneme. Takze get na cely zoznam sprav v priecinku neoznacuje nic za precitane. |
Za mna sme nevyhnutne blockery, ktore sme identifikovali odstranili. Co zostava otvorene:
Oznacovanie vlakien s potvrdenkou tagom vieme vyriesit pomocou automation. Rovnako je mozne nastavit automation tak, aby bol pridany tag na vlakno po stiahnuti potvrdenky. (aby bolo mozne filtrovat vlakna, kde uz potvrdenka prisla a tiez vlakna, v ktorych uz boli potrebne dokumenty stiahnute lokalne) Problem este mame s nasadenim. Ten gem |
@celuchmarek vyzera, ze tam treba dost vela libs ale teda asi staci skusit dockerfile obohatit |
@luciajanikova @jsuchal ten Grover s Chromium som rozbehal pre Docker container na x86 archhitektúre (čiže aj náš cluster). Skúšal som na virtuálke, čo mám doma - vyrobilo mi to PDF z html stránky. Na Macu s arm64 mi to v dockeri nefunguje, ale to asi nevadí. Ten jeden pridaný ENV som už nastavil aj na gitlabe. Povedzte, či môže byť. |
@luciajanikova tebe ten grover ide na macu? |
ano, ale mimo dockera |
@@ -1,7 +1,8 @@ | |||
FROM ruby:3.3.0 | |||
|
|||
# Install packages | |||
RUN apt-get update && apt-get install -y build-essential nodejs libpq-dev npm fop=1:2.* libsaxon-java libsaxonb-java chromium | |||
RUN apt-get update && apt-get install -y build-essential nodejs libpq-dev npm fop=1:2.* libsaxon-java libsaxonb-java chromium \ | |||
&& apt-get -y install libx11-xcb1 libxcomposite1 libasound2 libatk1.0-0 libatk-bridge2.0-0 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgbm1 libgcc1 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 |
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.
Este som sem dolozila podla https://ploi.io/documentation/server/how-to-install-puppeteer-on-ubuntu, nestacilo len chromium. Pozri prosim @celuchmarek, ci sme s tym ok.
Uz je to co potrebujeme funkcne takto.
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.
Toto moze celkom nafuknut ten image ale teda skusme co to spravi.
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.
čo už, aj tak má ten image už cez 3GB, takže už je to jedno.
# TODO ponastavovat v BetterUptime | ||
BetterUptimeApi.ping_heartbeat('FS_SYNC') |
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.
@celuchmarek pridame heartbeat? Mozem skusit aj ja ponastavovat, ale povedz, aby som ti nebabrala do toho pripadne.
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.
Jj, môžeš pridať a nastaviť. Todo comment vyhoď, to nastavíš hneď.
Video ukazka na mojej FS schranke importovanej do GO:
fs_go.mp4