Module: Deployed::LogOutputHelper
- Defined in:
- app/helpers/deployed/log_output_helper.rb
Instance Method Summary collapse
- #deploy_output_intro ⇒ Object
- #deploy_output_kamal_version ⇒ Object
- #deploy_output_missing_config ⇒ Object
- #deploy_output_resize_handler ⇒ Object
- #deploy_output_spinner ⇒ Object
Instance Method Details
#deploy_output_intro ⇒ Object
5 6 7 8 9 10 11 |
# File 'app/helpers/deployed/log_output_helper.rb', line 5 def deploy_output_intro output = <<~HTML <div>Ready... Set... Deploy!</div> HTML output.html_safe end |
#deploy_output_kamal_version ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'app/helpers/deployed/log_output_helper.rb', line 13 def deploy_output_kamal_version output = <<~HTML <div> Using <span class="text-slate-300">kamal #{::Kamal::VERSION}</span> </div> HTML output.html_safe end |
#deploy_output_missing_config ⇒ Object
23 24 25 26 27 28 29 30 31 |
# File 'app/helpers/deployed/log_output_helper.rb', line 23 def deploy_output_missing_config return unless Deployed::Config.requires_init output = <<~HTML <div class="text-red-500">WARNING: ./config/deploy.yml file not detected</div> HTML output.html_safe end |
#deploy_output_resize_handler ⇒ Object
46 47 48 49 50 51 52 53 54 |
# File 'app/helpers/deployed/log_output_helper.rb', line 46 def deploy_output_resize_handler output = <<~ICON <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6"> <path stroke-linecap="round" stroke-linejoin="round" d="M6.75 12a.75.75 0 11-1.5 0 .75.75 0 011.5 0zM12.75 12a.75.75 0 11-1.5 0 .75.75 0 011.5 0zM18.75 12a.75.75 0 11-1.5 0 .75.75 0 011.5 0z" /> </svg> ICON output.html_safe end |
#deploy_output_spinner ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'app/helpers/deployed/log_output_helper.rb', line 33 def deploy_output_spinner output = <<~HTML <div id="spinner" class="hidden mt-2 pb-4"> <svg class="animate-spin -ml-1 h-5 w-5 text-white" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"> <circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle> <path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path> </svg> </div> HTML output.html_safe end |