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"
|
||||
success: (data) =>
|
||||
@stopLoading()
|
||||
console.log('111', data, @data)
|
||||
return if @data && data.token is @data.token && data.healthy is @data.healthy && data.message is @data.message
|
||||
console.log('222')
|
||||
@data = data
|
||||
@render()
|
||||
)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<form>
|
||||
<form autocomplete="off">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
|
|
|
@ -77,12 +77,12 @@
|
|||
</div>
|
||||
<div class="action-controls">
|
||||
<% if !calendar.default: %>
|
||||
<div class="sla-toggle 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--danger btn--secondary js-delete"><%- @T('Delete') %></div>
|
||||
<div class="btn btn--secondary js-default"><%- @T('Set as Default') %></div>
|
||||
<% else: %>
|
||||
<div class="btn btn--danger btn--secondary is-disabled"><%- @T('Delete') %></div>
|
||||
<% end %>
|
||||
<div class="sla-edit btn js-edit"><%- @T('Edit') %></div>
|
||||
<div class="btn js-edit"><%- @T('Edit') %></div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
</div>
|
||||
|
||||
<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 %>"/>
|
||||
|
||||
<div class="ticket-form-top"></div>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="modal-dialog">
|
||||
<form>
|
||||
<form autocomplete="off">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<% if @buttonClose: %>
|
||||
|
|
|
@ -68,7 +68,7 @@ returns calendar object
|
|||
|
||||
=begin
|
||||
|
||||
returnes preset of ical feeds
|
||||
returns preset of ical feeds
|
||||
|
||||
feeds = Calendar.ical_feeds
|
||||
|
||||
|
|
|
@ -61,7 +61,9 @@ returns
|
|||
items = SearchIndexBackend.search(query, limit, 'Organization')
|
||||
organizations = []
|
||||
items.each { |item|
|
||||
organizations.push Organization.lookup(id: item[:id])
|
||||
organization = Organization.lookup(id: item[:id])
|
||||
next if !organization
|
||||
organizations.push organization
|
||||
}
|
||||
return organizations
|
||||
end
|
||||
|
|
|
@ -11,7 +11,7 @@ class Permission < ApplicationModel
|
|||
|
||||
permissions = Permission.with_parents('some_key.sub_key')
|
||||
|
||||
returnes
|
||||
returns
|
||||
|
||||
['some_key.sub_key', 'some_key']
|
||||
|
||||
|
|
|
@ -143,7 +143,9 @@ returns
|
|||
end
|
||||
tickets = []
|
||||
items.each { |item|
|
||||
tickets.push Ticket.lookup(id: item[:id])
|
||||
ticket = Ticket.lookup(id: item[:id])
|
||||
next if !ticket
|
||||
tickets.push ticket
|
||||
}
|
||||
return tickets
|
||||
end
|
||||
|
|
|
@ -61,7 +61,9 @@ returns
|
|||
items = SearchIndexBackend.search(query, limit, 'User')
|
||||
users = []
|
||||
items.each { |item|
|
||||
users.push User.lookup(id: item[:id])
|
||||
user = User.lookup(id: item[:id])
|
||||
next if !user
|
||||
users.push user
|
||||
}
|
||||
return users
|
||||
end
|
||||
|
|
|
@ -55,7 +55,7 @@ types:
|
|||
restart_auto -> app is restarting
|
||||
config_changed -> config has changed
|
||||
|
||||
returnes
|
||||
returns
|
||||
|
||||
{
|
||||
event: 'maintenance'
|
||||
|
|
|
@ -4,6 +4,8 @@ require 'test_helper'
|
|||
|
||||
class EmailProcessTest < ActiveSupport::TestCase
|
||||
test 'process simple' do
|
||||
Ticket.destroy_all
|
||||
|
||||
files = [
|
||||
{
|
||||
data: 'From: me@example.com
|
||||
|
|
Loading…
Reference in a new issue