Commit graph

292 commits

Author SHA1 Message Date
Akinori MUSHA
5519e6a1a7 Encode screen_name and id_str in URLs 2017-09-15 23:38:54 +09:00
Akinori MUSHA
0b88ce0edc Enhance the tweets view of TwitterStreamAgent
- Use the `extended_tweet.full_text` property instead of `text`
- Show the time and links to the tweet and event for each tweet
- Clicking on the tweet text replaces it with the embedded tweet widget
2017-09-15 23:38:49 +09:00
Akinori MUSHA
d76ea3dea5 Replace some other occurrences of the references to the old URL 2017-09-04 11:15:56 +09:00
Akinori MUSHA
cec6ce1a56 Merge pull request #2047 from albertsun/update-google-api-client
Update google-api-client and Google agents
2017-08-01 22:46:43 +09:00
Akinori MUSHA
ef82bfabb7 Inherit receivers when cloning 2017-07-19 11:25:02 +09:00
Akinori MUSHA
3ffe667f9e Allow controllers to be selected 2017-07-19 11:24:22 +09:00
Albert Sun
675700ac2d update changelog / upgrade warning to be clearer about backward compatibility 2017-07-10 11:20:08 -04:00
Albert Sun
f9695499ae add an upgrade warning for google cal publish agent. other cleanup. 2017-07-05 10:59:54 -04:00
Akinori MUSHA
6a7221a9da Use URI Template (RFC 6570) for interpolating search_url 2017-05-25 06:40:54 +09:00
Aleksey Ivanov
a4b7f1b1f5 Fallback to default value for existing agents 2017-05-23 03:47:51 +03:00
Aleksey Ivanov
eccb449dfd Add configurable search_url #1552 2017-05-22 22:34:20 +03:00
Dominik Sander
ff2615a71f Upgrade rails and configuration to 5.1.1
Use `to_unsafe_h` to convert unpermitted parameters to a Hash
Specify rails version in migrations
2017-05-19 09:24:44 +02:00
Dominik Sander
f064e6bfdd Push docker images to new huginn namespace
For now we keep pushing to the old namespace but add a warning to users a
chance to change their images to the new namespace.
2017-05-17 21:18:39 +02:00
aeter
8ab1f97c7d Close #1914 - remove 'become user' if deactivated user (#1938)
Ticket -- https://github.com/cantino/huginn/issues/1914
Testing -- Local huginn setup
About --
Switching as admin to a user is broken if the user is deactivated.

This code makes the 'Become User' buttons invisible if the user to
be impersonated is deactivated. The buttons used to be visible on:
* /admin/users
* /admin/users/XX/edit

Bonus: removes the 'Become User' button from the 'Edit Users' page
if we are the edited `current_user`.
2017-03-18 17:28:42 -04:00
Dominik Sander
a8ad5e97b6 Fix devise confirmation form, unify unlock form
Use `login` as the key for all devise request/resend forms.

Fixes #1895
2017-02-02 20:14:47 +01:00
Alex Jordan
5eef730904 Add titles to all pages (#1884)
Fixes #1882
2017-01-30 21:07:37 -05:00
Alex Jordan
70e4abfb87
Change "Abort" button to say "Cancel" 2017-01-28 16:19:15 -05:00
Andrew Cantino
3ea44cb8bb Fix #1863 validation issue with schedule names (#1864)
* Fix #1863 validation issue with schedule names

* Expose as a class method
2017-01-08 11:13:25 -05:00
Enfop
b8765fbd31 default selected value for scenario.icon select (#1861) 2017-01-06 20:05:47 -05:00
Dominik Sander
070946e879 Work around possible regression in rails
`pluck` used to always trigger a database query. With Rails 5.0.1 it uses data from
already loaded associations, this also includes new records for which we can not
generate agent_paths
2016-12-27 23:40:09 +01:00
Andrew Cantino
8a14a57e00 Beeper.io is no more (#1808)
* Beeper.io is no more

* Avoid event propagation or scheduling of missing agents

* Update undefined_agents.html.erb with a link to the wiki
2016-11-27 15:30:50 -05:00
Dominik Sander
6daa6cc75e Cache Agent type select options in Agent#new
Agent#new was by far the slowest action of all controllers. When using
many Agent gems the response time goes up to a point where the user
starts to wonder if something is going wrong. By caching the Agent
description the response time goes down from about 1 second to 100ms
in development.
2016-11-22 20:02:27 +01:00
Akinori MUSHA
74077b0ad4 Auto-focus on Agent Type when creating an agent 2016-11-09 23:25:55 +09:00
Enfop
8efe50ad99 manual event agent validate JSON field before form submit (#1728) 2016-10-11 07:53:56 -04:00
Dominik Sander
42b132017f Rescue from AR:SubclassNotFound and allow to delete agents
Especially when using Agent gems it happens that an Agent was deleted from the gem or the user removed a gem from the
configuration. Instead of failing with an Internal Server Error the user now is offered to delete all undefined agents.

`type.constantize` is needed to invoke the Rails auto_loader in development since not all Agent classes are loaded when
the application boots.
2016-09-21 20:10:49 +02:00
Albert Sun
6bb61065ec Allow admins to login as another user (#1659)
* switch_to_user and switch_back routes

* Uses session to store original user id
2016-09-02 15:32:38 -04:00
Andrew Cantino
577b441382 Handle removed events when rendering logs (#1634) 2016-08-15 11:50:54 -04:00
Sascha Hagedorn
d627a18f6d Added api_key option to UserLocationAgent (#1613)
* Added `api_key` option to UserLocationAgent

The `api_key` is used on the summary page of the UserLocationAgent
as well as the event detail page to display a location on a Google
Map which requires an API key. Closes #1612

* added link to Google API key documentation
2016-08-04 21:22:59 -04:00
Darren Cauthon
9d584b6ba4 Liquid output agent (#1587)
* Start with a stripped copy of the data output agent.

* Run the data from the last event through a liquid template.

* Flatten the secret logic to allow for an easier switch to FormConfigurable.

* Switch to form configurable, and allow the content of the page to be configured.

* Allow the mime type to be changed.

* Cleanup.

* Write how this template works.

* Better default values.

* Cleanup.

* Refactor.

* Start testing.

* Test the validation.

* Test receive.

* Test the happy path through the receive web events.

* Test the authentication.

* This is actually a match.

* Refactor.

* Refactor.

* Refactor for better testing.

* Create a mode that lets the logic change. Start with a merge behavior.

* Refactor.

* Create a form configurable setting to change the mode.

* Document how the modes work.

* Wording change.

* Go with a singular secret.

* Fix typo.

* Fix the tests.

* Test cleanup.

* If not one of two types that receive events, ignore all received events.

* Set up these tests for the next set of changes.

* Isolate the method that gets the data for the liquid template.

* Look up past events to render through the liquid template.

* Implement a limit of 2 events.

* Extract a method.

* Hook the limit to options.

* Implement a limit of X events.

* Implement a date limit.

* Refactor the count limit.

* Limit by date with sql, not in-memory objects.

* This ordering is already built into the scope.

* Refactor the dates a bit.

* Put in a few checks around the date limits.

* Add the last X event options to the form and the documentation.

* Missed one bit of documentation.

* Add a view for a liquid output agent that makes it easy to retrieve the generated URL.

* This agent cannot accept events.

* Hardcode the possibilities instead of inspecting the integer.

* Do not be case sensitive on the date filter.

* Hardcode a limit of 5000, just in case no limit was provided.

* Better checks around the time period parsing.

* Test the hardcodes, and rename for consistency.

* Nevermind on that rename.

* Do not be case sensitive on this mode.

* Test that it works even when the casing on the mode is wrong.

* Here is more descriptive default content.

* Text change.

* The if is no longer necessary.

* Refactor.

* Move the limit down to 1000.

* Put a hard limit of 1000.

* Note the new event limit... limit.

* Validate for a valid event limit.

* Do not throw an error if someone types in a non-integer into this field.

* Text update.

* Typo.

* Add a link to the Liquid Templating engine.
2016-07-25 21:23:33 -04:00
Lloyd Pick
c3e263d3a4 allow decimal values to be shown on the peak graph (#1574) 2016-07-01 14:47:09 -04:00
Andrew Cantino
e1a2b5ae25 Heroku now makes an empty repo with the deployment button (#1570) 2016-06-30 00:45:53 -04:00
Enfop
d26015c62b Return to Agent Events after Event show (#1555) 2016-06-22 20:43:04 -07:00
Andrew Cantino
e4e2782ebe Fix whitespace 2016-06-15 23:55:11 -07:00
Judy Ngai
1abcd947f5 Uploadicons (#1427)
* checking in work for glyph upload

* checking in icon selections

* added more icon options

* work on upload icon

* fix issue

* switched to options for select

* removed wrapper and removed commment

* add migration to support icon

* remove right floating

* rm params session add it to model

* rebuilt the menu

* rm extra div

* converted js to coffee

* quick change in indentation

* using the view helper

* submitting icons and loading into form

* added icon to both scenario export and import

* added icon to spec

* low level caching the icons

* tentative work in making a new coffee class

* renamed js page

* switched to cache in memory and worked on coffee class

* made pathsmatching compatible for all scenarios

* switched to rails root

* fixed all rubocop stylings

* fixed line is too long styling

* rm private method definition

* patch to avoid having no icon

* blank or nil?

* reordering the lines
2016-06-15 23:52:50 -07:00
Judy Ngai
f57a3af521 enable disable all agents within a scenario (#1506)
* tentative work on enable disable all agents within a scenario

* more work with pr

* more work

* better names and save a line of code

* coffeescript to change modal text and hidden disabled value

* redoing coffeescript class to save some code

* initing the function

* updated coffeescript

* change text from specific modal, made names more specific

* updates disabled test and rubocop bug

* improved test and refactored method per rubocop warnings

* switched from 0 to false

* switched from 0 to false and 1 to true

* fixed null bug in postgresql database

* fixed ruby boolean bug

* moved instances into let lazy load and use proper agent fixture

* putting in a different fix

* using existing membership and agent and another version of test

* switch back to 2 not 3 after rm an agent in yml

* made test passed locally

* forgot to remove debuging pp

* small spacing bug

* trying to get rid of newline in file

* typo not agent but scenario

* minor changes to syntax and naming

* rm potential failure and changed update_all statement

* fixing new line issue

* removed unnecessary if else statement from method
2016-06-13 22:36:22 -07:00
Dominik Sander
30fcfe1338 Merge pull request #1482 from kreuzwerker/feature/agent-icons
Add Agent connection status icons
2016-05-31 13:15:55 +02:00
Dominik Sander
506a70837f Determine agent connections with cached COUNT queries 2016-05-31 12:35:20 +02:00
Dominik Sander
96537fcd3a Add agent role icons in agent tables 2016-05-31 12:35:15 +02:00
Dominik Sander
d573b98a68 Show recently received events in dry run modal 2016-05-18 09:58:49 +02:00
Dominik Sander
53d4559f6e Improve agent and scenario forms
Allow to configure agent event target
Make select2 agent tags clickable
2016-05-12 09:15:49 +02:00
George Opritescu
ad4a15d6da Added button to toggle visibility of disabled agents (#1464)
Added button to toggle visibility of disabled agents

* Moved index code to separate file

* Added cookie to allow toggling visibility of disabled agents

* Filter disabled agents based on cookie

* Removed js and use correct cookie name

* CR changes
2016-05-10 22:52:30 +02:00
George Opritescu
372db7a3d0 Fixed some n+1 queries 2016-05-07 17:35:26 +03:00
Dominik Sander
f1ecae6deb Fix internal jobs beeing shown as deleted
Show more information about previosly labeled "(internal)" jobs that are now available due to the switch to ActiveJob.

Fixes #1460
2016-04-29 16:58:45 +02:00
Dominik Sander
ea95a9d6c3 Merge pull request #1446 from kreuzwerker/feature/scenario-deletion
Allow user to delete the scenarios agents with it
2016-04-24 10:28:51 +02:00
Dominik Sander
98fae41421 Allow user to delete the scenarios agents with it 2016-04-23 22:18:02 +02:00
Andrew Cantino
491dace4a0 Merge pull request #1394 from Jngai/uploadcredentialsfeature
new credentials uploading feature
2016-04-21 20:13:47 -07:00
Judy Ngai
26e776db4d new credentials uploading feature
rm req json, not saving file, styled button a bit

skinny controller fat model

minor spacing mistake

build user credentials fixed mass assignment issue

undo mass assignment variables

spec in progress

spec

fixed exception issue

json fixtures

slight change to test

added test to assert credentials created for current user only

added tests to satisfy requirements

refined import method

added status 422

saving two lines of code

one more test

fixed small bug, words changed

minor change in test

styled file upload button

deleted unnecessary spec

switched to modal format

made modal more presentable

minor change to modal

fix indentation issue

ok nested correctly within form tag
2016-04-21 07:16:28 -04:00
Andrew Cantino
35bbd2a492 Merge pull request #1423 from Jngai/queuedjobpatch
retry queued job patch
2016-04-12 21:07:42 -07:00
Judy Ngai
d8df930da0 retry queued job patch
quick rewording

changed glyphicon

skip failed jobs locked at and using update all

spec ready as well

rm without protection modify spec

rm unnecessary lines

work on delayed job feature

fixed render json

switched from ok to success

revert render json change for other methods

checking in work

test passed

reverting render and saving a line of code

add back sign in an user

run this on github

altered format.json

rm comment

prevent ajax error head no content
2016-04-12 11:04:10 -04:00
Andrew Cantino
2a9ff37c08 Minor whitespace 2016-03-29 21:30:32 -07:00