discourse/app/assets/javascripts/admin/templates
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
..
logs remove a few strings on admin in favor of glyphs 2014-08-16 22:53:41 -07:00
modal FEATURE: Badge query validation, preview results, and EXPLAIN 2014-08-31 11:25:44 -07:00
reports FIX: Ember doesn't allow one route name, `basic`, and Discourse used it! 2014-04-17 10:45:06 -04:00
site_settings Show color for values of type:list site settings with word 'colors' in their name 2014-08-11 19:54:03 +03:00
admin.js.handlebars Theming: color scheme editing. Unfinished! Doesn't have any effect on css files yet. 2014-04-24 16:49:12 -04:00
api.js.handlebars add glyph to API master key button 2014-05-17 00:57:01 -07:00
backups.js.handlebars FEATURE: upload backups 2014-02-22 01:41:01 +01:00
backups_index.js.handlebars remove a few strings on admin in favor of glyphs 2014-08-16 22:53:41 -07:00
badges.js.handlebars FEATURE: Badge query validation, preview results, and EXPLAIN 2014-08-31 11:25:44 -07:00
commits.js.handlebars REFACTOR: Fixes poor class hierarchy for listing topics 2014-01-18 19:26:24 +01:00
customize.js.handlebars Theming: color scheme editing. Unfinished! Doesn't have any effect on css files yet. 2014-04-24 16:49:12 -04:00
customize_colors.js.handlebars FIX: clearfix at bottom of customize/colors UI 2014-06-19 12:33:02 -04:00
customize_css_html.js.handlebars Make ?preview-style make sense 2014-06-20 09:06:36 -07:00
dashboard.js.handlebars mods can use shield glyph as well, don't need two 2014-08-25 23:49:39 -07:00
email.js.handlebars FEATURE: add all email logs tab 2014-02-15 01:17:13 +01:00
email_all.js.handlebars BUGFIX: date of the post in the share dialog is now properly bound 2014-06-10 19:04:31 +02:00
email_index.js.handlebars make Send Test Email easier to see 2014-07-14 13:58:06 -07:00
email_preview_digest.js.handlebars f**ing bootstrap, span5 = .gutter 2014-06-05 02:57:56 -07:00
email_sent.js.handlebars BUGFIX: date of the post in the share dialog is now properly bound 2014-06-10 19:04:31 +02:00
email_skipped.js.handlebars BUGFIX: date of the post in the share dialog is now properly bound 2014-06-10 19:04:31 +02:00
flags.js.handlebars FIX: Using a binding in an `{{avatar}}` was broken 2014-08-20 15:12:18 -04:00
group.js.handlebars ES6: Convert a couple view helpers. They should probably be components 2014-06-11 11:05:49 -04:00
groups.js.handlebars add some glyphs to new buttons 2014-05-17 01:27:12 -07:00
groups_index.js.handlebars REFACTOR: Add urls for admin groups, make it more idiomatic ember 2014-04-23 15:15:46 -04:00
logs.js.handlebars Add data-auto-route=true to Logster link 2014-08-25 15:59:48 -07:00
reports.js.handlebars Reverse the order of rows in a report so today is first 2014-06-06 17:08:35 -04:00
site_content_edit.js.handlebars ES6: Convert {{pagedown}} to {{pagedown-editor}} with deprecations 2014-06-09 12:16:27 -04:00
site_contents.js.handlebars Ember Upgrade: 1.0 2013-10-01 11:16:27 -04:00
site_contents_empty.js.handlebars REFACTOR: Fixes poor class hierarchy for listing topics 2014-01-18 19:26:24 +01:00
site_settings.js.handlebars ES6: Migrated and deprecated a bunch of views 2014-06-10 11:54:38 -04:00
site_settings_category.js.handlebars REFACTOR: Fixes poor class hierarchy for listing topics 2014-01-18 19:26:24 +01:00
user.js.handlebars ES6: Migrated and deprecated a bunch of views 2014-06-10 11:54:38 -04:00
user_badges.js.handlebars ES6: Convert a couple view helpers. They should probably be components 2014-06-11 11:05:49 -04:00
user_index.js.handlebars UX: Add link to change username on admin page 2014-08-27 13:52:01 -04:00
user_leader_requirements.js.handlebars FIX: suspended users cannot be trust level 3 2014-08-29 12:33:34 -04:00
users_list.js.handlebars mods can use shield glyph as well, don't need two 2014-08-25 23:49:39 -07:00
version_checks.js.handlebars BUGFIX: date of the post in the share dialog is now properly bound 2014-06-10 19:04:31 +02:00