saml_settings_test.mustache 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <%
  2. # Copyright (C) 2015 - present Instructure, Inc.
  3. #
  4. # This file is part of Canvas.
  5. #
  6. # Canvas is free software: you can redistribute it and/or modify it under
  7. # the terms of the GNU Affero General Public License as published by the Free
  8. # Software Foundation, version 3 of the License.
  9. #
  10. # Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
  11. # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  12. # A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
  13. # details.
  14. #
  15. # You should have received a copy of the GNU Affero General Public License along
  16. # with this program. If not, see <http://www.gnu.org/licenses/>.
  17. %>
  18. <% debugging = presenter.saml_debugging? %>
  19. <div class="debugging">
  20. <h2 style="margin-top: 10px">
  21. {{#t}}SAML Debugging{{/t}}
  22. </h2>
  23. <div id="saml_debug_console">
  24. <p>
  25. <%= t 'saml_debug_instructions', <<-TEXT
  26. Once you start debugging all info about the next attempted SAML login attempt
  27. will be collected. Click "Refresh" to see if more data has been collected or
  28. "Stop Debugging" to clear the collected data and stop the current debug attempt.
  29. TEXT
  30. %>
  31. </p>
  32. <p>
  33. <a href="<%= account_saml_testing_url(account) %>"
  34. id="start_saml_debugging"
  35. class="btn"
  36. style="<%= hidden(!debugging) %>">
  37. {{#t}}Start Debugging{{/t}}
  38. </a>
  39. <a href="<%= account_saml_testing_url(account) %>"
  40. id="refresh_saml_debugging"
  41. class="btn"
  42. style="<%= hidden(debugging) %>">
  43. {{#t}}Refresh{{/t}}
  44. </a>
  45. <a href="<%= account_saml_testing_stop_url(account) %>"
  46. id="stop_saml_debugging"
  47. class="btn"
  48. style="<%= hidden(debugging) %>">
  49. {{#t}}Stop Debugging{{/t}}
  50. </a>
  51. </p>
  52. <div id="saml_debug_info" style="<%= hidden(debugging) %>">
  53. <% if debugging %>
  54. <% if presenter.saml_configs.size <= 0 %>
  55. {{#t}}A SAML configuration is required to test SAML{{/t}}
  56. <% else %>
  57. <% presenter.saml_configs.each do |config| %>
  58. <%= render partial: 'saml_testing',
  59. locals: { config: config } %>
  60. <% end %>
  61. <% end %>
  62. <% end %>
  63. </div>
  64. </div>
  65. </div>