Commit b90ea37e3f13c099209a35f3dae0c1a68023cbae
1 parent
1e6f524d
Exists in
colab
and in
2 other branches
Include notify push url on Repository#show view
Signed-off-by: Heitor Reis <marcheing@gmail.com>
Showing
5 changed files
with
16 additions
and
0 deletions
Show diff stats
app/views/repositories/show.html.erb
| @@ -37,6 +37,13 @@ | @@ -37,6 +37,13 @@ | ||
| 37 | <%= @kalibro_configuration.name %> | 37 | <%= @kalibro_configuration.name %> |
| 38 | </p> | 38 | </p> |
| 39 | 39 | ||
| 40 | +<% if repository_owner? @repository.id %> | ||
| 41 | + <p> | ||
| 42 | + <strong><%= t('repository.show.notify_push_url') %>:</strong> | ||
| 43 | + <%= repository_notify_push_url(@repository.id) %> | ||
| 44 | + </p> | ||
| 45 | +<% end %> | ||
| 46 | + | ||
| 40 | <p><strong> <%= t('repository.show.date_processing') %>: </strong></p> | 47 | <p><strong> <%= t('repository.show.date_processing') %>: </strong></p> |
| 41 | 48 | ||
| 42 | <%= form_tag(repository_state_with_date_path(@repository.id), method: "get", remote: true) do %> | 49 | <%= form_tag(repository_state_with_date_path(@repository.id), method: "get", remote: true) do %> |
config/locales/views/repository/en.yml
| @@ -38,3 +38,4 @@ en: | @@ -38,3 +38,4 @@ en: | ||
| 38 | metric_results: "Tree Metric Results" | 38 | metric_results: "Tree Metric Results" |
| 39 | loading: "Loading data. Please, wait." | 39 | loading: "Loading data. Please, wait." |
| 40 | date_processing: "Retrieve the closest processing information from" | 40 | date_processing: "Retrieve the closest processing information from" |
| 41 | + notify_push_url: 'Notify Push Url for Gitlab' |
config/locales/views/repository/pt.yml
| @@ -38,3 +38,4 @@ pt: | @@ -38,3 +38,4 @@ pt: | ||
| 38 | metric_results: "Resultados de Métrica" | 38 | metric_results: "Resultados de Métrica" |
| 39 | loading: "Carregando os dados. Por favor, aguarde." | 39 | loading: "Carregando os dados. Por favor, aguarde." |
| 40 | date_processing: "Obtenha a informação de processamento mais próxima a" | 40 | date_processing: "Obtenha a informação de processamento mais próxima a" |
| 41 | + notify_push_url: 'Url para notificações do Gitlab' |
features/repository/show/repository_info.feature
| @@ -19,6 +19,7 @@ Feature: Show Repository | @@ -19,6 +19,7 @@ Feature: Show Repository | ||
| 19 | And I should see "Description" | 19 | And I should see "Description" |
| 20 | And I should see "License" | 20 | And I should see "License" |
| 21 | And I should see the given repository's content | 21 | And I should see the given repository's content |
| 22 | + And I should not see "Notify Push Url for Gitlab" | ||
| 22 | 23 | ||
| 23 | @kalibro_configuration_restart @kalibro_processor_restart @javascript | 24 | @kalibro_configuration_restart @kalibro_processor_restart @javascript |
| 24 | Scenario: With a ready processing and asking to reprocess | 25 | Scenario: With a ready processing and asking to reprocess |
| @@ -32,6 +33,7 @@ Feature: Show Repository | @@ -32,6 +33,7 @@ Feature: Show Repository | ||
| 32 | And I wait up for a ready processing | 33 | And I wait up for a ready processing |
| 33 | When I visit the repository show page | 34 | When I visit the repository show page |
| 34 | Then I should see the sample repository name | 35 | Then I should see the sample repository name |
| 36 | + And I should see the correct notify push url | ||
| 35 | And I should see "State" | 37 | And I should see "State" |
| 36 | And I should see "Creation Date" | 38 | And I should see "Creation Date" |
| 37 | And I should see "PREPARING time" | 39 | And I should see "PREPARING time" |
features/step_definitions/repository_steps.rb
| @@ -281,3 +281,8 @@ end | @@ -281,3 +281,8 @@ end | ||
| 281 | Then(/^I should get a not found error$/) do | 281 | Then(/^I should get a not found error$/) do |
| 282 | expect(page.driver.status_code).to eq(404) | 282 | expect(page.driver.status_code).to eq(404) |
| 283 | end | 283 | end |
| 284 | + | ||
| 285 | +Then(/^I should see the correct notify push url$/) do | ||
| 286 | + step "I should see \"Notify Push Url for Gitlab\"" | ||
| 287 | + expect(page).to have_selector("input[value=\"#{repository_notify_push_url(host: Capybara.current_session.server.host, port: Capybara.current_session.server.port, locale: :en, id: @repository.id)}\"]") | ||
| 288 | +end |