Cleanup, fixed typos and improved error handling.
This commit is contained in:
parent
d6ee7025ab
commit
a0caaa06e9
12 changed files with 20 additions and 14 deletions
|
@ -23,9 +23,7 @@ class Index extends App.ControllerSubContent
|
||||||
url: "#{@apiPath}/monitoring/health_check"
|
url: "#{@apiPath}/monitoring/health_check"
|
||||||
success: (data) =>
|
success: (data) =>
|
||||||
@stopLoading()
|
@stopLoading()
|
||||||
console.log('111', data, @data)
|
|
||||||
return if @data && data.token is @data.token && data.healthy is @data.healthy && data.message is @data.message
|
return if @data && data.token is @data.token && data.healthy is @data.healthy && data.message is @data.message
|
||||||
console.log('222')
|
|
||||||
@data = data
|
@data = data
|
||||||
@render()
|
@render()
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<form>
|
<form autocomplete="off">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
|
|
|
@ -77,12 +77,12 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="action-controls">
|
<div class="action-controls">
|
||||||
<% if !calendar.default: %>
|
<% if !calendar.default: %>
|
||||||
<div class="sla-toggle btn btn--danger btn--secondary js-delete"><%- @T('Delete') %></div>
|
<div class="btn btn--danger btn--secondary js-delete"><%- @T('Delete') %></div>
|
||||||
<div class="sla-toggle btn btn--secondary js-default"><%- @T('Set as Default') %></div>
|
<div class="btn btn--secondary js-default"><%- @T('Set as Default') %></div>
|
||||||
<% else: %>
|
<% else: %>
|
||||||
<div class="btn btn--danger btn--secondary is-disabled"><%- @T('Delete') %></div>
|
<div class="btn btn--danger btn--secondary is-disabled"><%- @T('Delete') %></div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<div class="sla-edit btn js-edit"><%- @T('Edit') %></div>
|
<div class="btn js-edit"><%- @T('Edit') %></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="page-content">
|
<div class="page-content">
|
||||||
<form role="form" class="ticket-create">
|
<form role="form" class="ticket-create" autocomplete="off">
|
||||||
<input type="hidden" name="form_id" value="<%= @form_id %>"/>
|
<input type="hidden" name="form_id" value="<%= @form_id %>"/>
|
||||||
|
|
||||||
<div class="ticket-form-top"></div>
|
<div class="ticket-form-top"></div>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<form>
|
<form autocomplete="off">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<% if @buttonClose: %>
|
<% if @buttonClose: %>
|
||||||
|
|
|
@ -68,7 +68,7 @@ returns calendar object
|
||||||
|
|
||||||
=begin
|
=begin
|
||||||
|
|
||||||
returnes preset of ical feeds
|
returns preset of ical feeds
|
||||||
|
|
||||||
feeds = Calendar.ical_feeds
|
feeds = Calendar.ical_feeds
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,9 @@ returns
|
||||||
items = SearchIndexBackend.search(query, limit, 'Organization')
|
items = SearchIndexBackend.search(query, limit, 'Organization')
|
||||||
organizations = []
|
organizations = []
|
||||||
items.each { |item|
|
items.each { |item|
|
||||||
organizations.push Organization.lookup(id: item[:id])
|
organization = Organization.lookup(id: item[:id])
|
||||||
|
next if !organization
|
||||||
|
organizations.push organization
|
||||||
}
|
}
|
||||||
return organizations
|
return organizations
|
||||||
end
|
end
|
||||||
|
|
|
@ -11,7 +11,7 @@ class Permission < ApplicationModel
|
||||||
|
|
||||||
permissions = Permission.with_parents('some_key.sub_key')
|
permissions = Permission.with_parents('some_key.sub_key')
|
||||||
|
|
||||||
returnes
|
returns
|
||||||
|
|
||||||
['some_key.sub_key', 'some_key']
|
['some_key.sub_key', 'some_key']
|
||||||
|
|
||||||
|
|
|
@ -143,7 +143,9 @@ returns
|
||||||
end
|
end
|
||||||
tickets = []
|
tickets = []
|
||||||
items.each { |item|
|
items.each { |item|
|
||||||
tickets.push Ticket.lookup(id: item[:id])
|
ticket = Ticket.lookup(id: item[:id])
|
||||||
|
next if !ticket
|
||||||
|
tickets.push ticket
|
||||||
}
|
}
|
||||||
return tickets
|
return tickets
|
||||||
end
|
end
|
||||||
|
|
|
@ -61,7 +61,9 @@ returns
|
||||||
items = SearchIndexBackend.search(query, limit, 'User')
|
items = SearchIndexBackend.search(query, limit, 'User')
|
||||||
users = []
|
users = []
|
||||||
items.each { |item|
|
items.each { |item|
|
||||||
users.push User.lookup(id: item[:id])
|
user = User.lookup(id: item[:id])
|
||||||
|
next if !user
|
||||||
|
users.push user
|
||||||
}
|
}
|
||||||
return users
|
return users
|
||||||
end
|
end
|
||||||
|
|
|
@ -55,7 +55,7 @@ types:
|
||||||
restart_auto -> app is restarting
|
restart_auto -> app is restarting
|
||||||
config_changed -> config has changed
|
config_changed -> config has changed
|
||||||
|
|
||||||
returnes
|
returns
|
||||||
|
|
||||||
{
|
{
|
||||||
event: 'maintenance'
|
event: 'maintenance'
|
||||||
|
|
|
@ -4,6 +4,8 @@ require 'test_helper'
|
||||||
|
|
||||||
class EmailProcessTest < ActiveSupport::TestCase
|
class EmailProcessTest < ActiveSupport::TestCase
|
||||||
test 'process simple' do
|
test 'process simple' do
|
||||||
|
Ticket.destroy_all
|
||||||
|
|
||||||
files = [
|
files = [
|
||||||
{
|
{
|
||||||
data: 'From: me@example.com
|
data: 'From: me@example.com
|
||||||
|
|
Loading…
Reference in a new issue