From a4a9433d2bdd049d730567cbaabe851ae3431a9e Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Tue, 3 May 2016 13:41:04 +0200 Subject: [PATCH] Improved caller log view. --- .gitlab-ci.yml | 11 +++++++++++ .../javascripts/app/views/cti/index.jst.eco | 18 ++++++++++++++---- db/migrate/20160422000003_create_cti_log.rb | 3 ++- 3 files changed, 27 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index dd51077c6..141f56096 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -167,6 +167,17 @@ job_integration_clearbit: - ruby -I test test/integration/clearbit_test.rb - rake db:drop +job_integration_sipgate: + stage: test + tags: + - core + script: + - export RAILS_ENV=test + - rake db:create + - rake db:migrate + - ruby -I test test/integration/sipgate_controller_test.rb + - rake db:drop + job_integration_es_mysql: stage: test tags: diff --git a/app/assets/javascripts/app/views/cti/index.jst.eco b/app/assets/javascripts/app/views/cti/index.jst.eco index 50ff63788..a6a30cecf 100644 --- a/app/assets/javascripts/app/views/cti/index.jst.eco +++ b/app/assets/javascripts/app/views/cti/index.jst.eco @@ -38,11 +38,16 @@ <% end %> <% end %> <% end %> - <% if !shown: %> + <% if !shown && item.from_comment: %> + <% shown = true %> <% if item.from_comment: %><%= item.from_comment %><% end %>
<% end %> - <%= item.from %> + <% if shown: %> + <%= item.from %> + <% else: %> + <%= item.from %> + <% end %> <% shown = false %> @@ -59,11 +64,16 @@ <% end %> <% end %> <% end %> - <% if !shown: %> + <% if !shown && item.to_comment: %> + <% shown = true %> <% if item.to_comment: %><%= item.to_comment %><% end %>
<% end %> - <%= item.to %> + <% if shown: %> + <%= item.to %> + <% else: %> + <%= item.to %> + <% end %> <% if item.state_human: %> diff --git a/db/migrate/20160422000003_create_cti_log.rb b/db/migrate/20160422000003_create_cti_log.rb index 483bdb7db..85b75aa77 100644 --- a/db/migrate/20160422000003_create_cti_log.rb +++ b/db/migrate/20160422000003_create_cti_log.rb @@ -12,7 +12,8 @@ class CreateCtiLog < ActiveRecord::Migration t.timestamp :start, null: true t.timestamp :end, null: true t.boolean :done, null: false, default: true - t.timestamps null: false + t.text :preferences, limit: 500.kilobytes + 1, null: true + t.timestamps null: false end add_index :cti_logs, [:call_id], unique: true add_index :cti_logs, [:direction]