discourse/app/assets/javascripts/admin/routes
riking 1833b43ae2 FEATURE: Badge query validation, preview results, and EXPLAIN
Upon saving a badge or requesting a badge result preview,
BadgeGranter.contract_checks! will examine the provided badge SQL for
some contractual obligations - namely, the returned columns and use of
trigger parameters.

Saving the badge is wrapped in a transaction to make this easier, by
raising ActiveRecord::Rollback on a detected violation.

On the client, a modal view is added for the badge query sample run
results, named admin-badge-preview.
The preview action is moved up to the route.
The save action, on failure, triggers a 'saveError' action (also in the
route).

The preview action gains a new parameter, 'explain', which will give the
output of an EXPLAIN query for the badge sql, which can be used by forum
admins to estimate the cost of their badge queries.
The preview link is replaced by two links, one which omits (false) and
includes (true) the EXPLAIN query.

The Badge.save() method is amended to propogate errors.

Badge::Trigger gets some utility methods for use in the
BadgeGranter.contract_checks! method.

Additionally, extra checks outside of BadgeGranter.contract_checks! are
added in the preview() method, to cover cases of null granted_at
columns.

An uninitialized variable path is removed in the backfill() method.

TODO - it would be nice to be able to get the actual names of all
columns the provided query returns, so we could give more errors
2014-08-31 11:25:44 -07:00
..
admin_api_route.js Support for per-user API keys 2013-10-22 17:34:39 -04:00
admin_backups_index_route.js backup & restore client-side code 2014-02-13 13:31:13 -08:00
admin_backups_logs_route.js BUGFIX: backups logs page was busted since last Ember update 2014-04-23 11:20:22 +02:00
admin_backups_route.js Allow restoring from backups in development mode even if the setting is 2014-08-28 17:02:48 -04:00
admin_badges_route.js FEATURE: Badge query validation, preview results, and EXPLAIN 2014-08-31 11:25:44 -07:00
admin_customize_colors_route.js Theming: color scheme editing. Unfinished! Doesn't have any effect on css files yet. 2014-04-24 16:49:12 -04:00
admin_customize_css_html_route.js Theming: color scheme editing. Unfinished! Doesn't have any effect on css files yet. 2014-04-24 16:49:12 -04:00
admin_customize_route.js ES6: Migrated and deprecated a bunch of views 2014-06-10 11:54:38 -04:00
admin_email_index_route.js FEATURE: add filters on email logs 2014-02-15 00:50:08 +01:00
admin_email_logs_routes.js BUGFIX: calling _super() won't actually set the model to the controller 2014-02-18 18:21:35 +01:00
admin_email_preview_digest_route.js TRIVIAL: fix deprecations due to momentjs upgrade 2014-08-20 22:22:58 +02:00
admin_flags_route.js FIX: dual modal when deleting spammer in the flag modal 2014-08-29 13:05:51 +02:00
admin_group_route.js REFACTOR: Add urls for admin groups, make it more idiomatic ember 2014-04-23 15:15:46 -04:00
admin_groups_route.js REFACTOR: Add urls for admin groups, make it more idiomatic ember 2014-04-23 15:15:46 -04:00
admin_logs_routes.js ES6: Migrated and deprecated a bunch of views 2014-06-10 11:54:38 -04:00
admin_reports_route.js ES6: Migrated and deprecated a bunch of views 2014-06-10 11:54:38 -04:00
admin_route.js FIX: Put in admin title when browsing admin section 2014-06-27 11:58:46 -04:00
admin_routes.js Theming: color scheme editing. Unfinished! Doesn't have any effect on css files yet. 2014-04-24 16:49:12 -04:00
admin_site_content_edit_route.js add top page 2013-12-24 00:50:36 +01:00
admin_site_contents_route.js Enable JSHINT's unused option. It caught a bunch of suspicious stuff which is fixed in this commit. 2013-12-30 13:30:22 -05:00
admin_site_settings_category_route.js Add an All Results tab when filtering the site settings 2013-11-15 16:43:56 -05:00
admin_site_settings_route.js Use replaceWith in order to not break the back button. 2014-06-05 10:18:31 -04:00
admin_user_badges_route.js ES6: Patch up a few issues with the admin controllers conversion 2014-07-25 14:17:58 -04:00
admin_user_leader_requirements_route.js Add a page in admin to view trust level 3 requirements for a user. Only shows for users who are currently at trust level 2. 2014-01-22 18:17:45 -05:00
admin_user_route.js FIX: moderators had no access to admin user page 2014-07-28 11:59:46 +10:00
admin_users_list_routes.js FEATURE: export user list 2014-08-15 01:46:57 +05:30
admin_users_list_trust_level_routes.js FIX: Ember doesn't allow one route name, basic, and Discourse used it! 2014-04-17 10:45:06 -04:00
admin-dashboard.js.es6 TRIVIAL: fix deprecations due to momentjs upgrade 2014-08-20 22:22:58 +02:00