Data Explorer Plugin

official

(Mittineague) #43

There is a major difference.

The Data Explorer plugin does only Read queries. i.e. informational only.

The Badge queries do stuff. The “stuff” is only Badges, but as the referenced post states, can put a heavy load on the database.

The Data Explorer plugin has safety built in so over-loading the database won’t happen.

Personally, I’d rather see safety built into the Badge queries, but meh.

I’m not so sure how valid a concern data leak risk due to a security breach is.

True, if a non-Admin gained access to the Data Explorer page they could craft a query that exposed sensitve information.
But if they had access to Admin pages they could get sensitive information from them as well without needing to use Data Explorer.


(Jay Pfaffman) #44

Me too. I’ve been thinking about ways to accomplish that


(Anton) #45

… which, as a result, causes solutions like this. Instead of fetching the query’s results directly from JS, I had to fetch them somewhere, then expose to client-side JS on Discourse via a 3rd-party API provider.

If a website administrator can insert any custom CSS/JS/HTML in header/footer and break the website entirely, why don’t we allow the administrator to expose results of a particular custom read-only SQL query? I don’t follow the logic here.

The idea here is to only make a particular query publicly callable by native Discourse API (so that JSON results can be retrieved by e.g. a client-side JavaScript); not the query itself visible through any of the admin pages.


(Jay Pfaffman) #46

I agree that it’d be convenient. It’s a paternalistic measure to protect people from themselves. Sure, you can break lots of things with CSS, but publishing a query that takes 5 seconds to complete that gets hit 100 times a minute can bring down a server. If said server has other sites running on it, you’ve got a problem.

If you break things with a badly behaved plugin, it’s not discourse’s fault.


(Anton) #47

This thinking reminds me of whether admins/mods should be able to view private messages right from the admin panel. If there is need for this, we will find a workaround anyway… So why making it harder.

Exposing the results of SQL queries is just a tool for website admins. If can’t be exposed through native API, there is still always a way to do it by running a query directly server-side and exposing the results in another way. So why make things more complicated for admins… anyway this is alraedy there in GUI ready to use, all is needed is a single checkbox, which is OFF by default.

Anyway, this:

but publishing a query that takes 5 seconds to complete that gets hit 100 times a minute can bring down a server.

…should be for administrator to decide, so I can’t see why there should be such a limitation.


(Daniela) #51

Submitted a PR for italian translation


(Anton) #52

After updating Data Explorer today to the latest version, as well as the Discourse platform as well, I get an “internal server error” when I run a request:

Error message

NoMethodError (undefined method username' for nil:NilClass) /var/www/discourse/plugins/discourse-data-explorer/plugin.rb:52:inusername’

Backtrace

/var/www/discourse/plugins/discourse-data-explorer/plugin.rb:52:in `username'
(eval):7:in `_fast_attributes'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/active_model_serializers-0.8.3/lib/active_model/serializer.rb:467:in `rescue in attributes'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/active_model_serializers-0.8.3/lib/active_model/serializer.rb:455:in `attributes'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/active_model_serializers-0.8.3/lib/active_model/serializer.rb:479:in `_serializable_hash'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/active_model_serializers-0.8.3/lib/active_model/serializer.rb:361:in `serializable_hash'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/active_model_serializers-0.8.3/lib/active_model/array_serializer.rb:89:in `block in _serializable_array'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.7.1/lib/active_record/relation/delegation.rb:46:in `map'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.7.1/lib/active_record/relation/delegation.rb:46:in `map'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/active_model_serializers-0.8.3/lib/active_model/array_serializer.rb:79:in `_serializable_array'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/active_model_serializers-0.8.3/lib/active_model/array_serializer.rb:73:in `serializable_array'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/active_model_serializers-0.8.3/lib/active_model/array_serializer.rb:53:in `as_json'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/core_ext/object/json.rb:159:in `block in as_json'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/core_ext/object/json.rb:159:in `each'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/core_ext/object/json.rb:159:in `map'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/core_ext/object/json.rb:159:in `as_json'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/core_ext/object/json.rb:159:in `block in as_json'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/core_ext/object/json.rb:159:in `each'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/core_ext/object/json.rb:159:in `map'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/core_ext/object/json.rb:159:in `as_json'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/json/encoding.rb:35:in `encode'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/json/encoding.rb:22:in `encode'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/core_ext/object/json.rb:37:in `to_json_with_active_support_encoder'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_controller/metal/renderers.rb:116:in `block in <module:Renderers>'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/active_model_serializers-0.8.3/lib/action_controller/serialization.rb:50:in `block (2 levels) in <module:Serialization>'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_controller/metal/renderers.rb:45:in `block in _render_to_body_with_renderer'
/usr/local/lib/ruby/2.3.0/set.rb:306:in `each_key'
/usr/local/lib/ruby/2.3.0/set.rb:306:in `each'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_controller/metal/renderers.rb:41:in `_render_to_body_with_renderer'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_controller/metal/renderers.rb:37:in `render_to_body'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/abstract_controller/rendering.rb:25:in `render'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_controller/metal/rendering.rb:16:in `render'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_controller/metal/instrumentation.rb:44:in `block (2 levels) in render'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/core_ext/benchmark.rb:12:in `block in ms'
/usr/local/lib/ruby/2.3.0/benchmark.rb:308:in `realtime'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/core_ext/benchmark.rb:12:in `ms'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_controller/metal/instrumentation.rb:44:in `block in render'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_controller/metal/instrumentation.rb:87:in `cleanup_view_runtime'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.7.1/lib/active_record/railties/controller_runtime.rb:25:in `cleanup_view_runtime'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_controller/metal/instrumentation.rb:43:in `render'
/var/www/discourse/plugins/discourse-data-explorer/plugin.rb:1065:in `block (2 levels) in run'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_controller/metal/mime_responds.rb:217:in `respond_to'
/var/www/discourse/plugins/discourse-data-explorer/plugin.rb:1045:in `run'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/abstract_controller/base.rb:198:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_controller/metal/rendering.rb:10:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/callbacks.rb:117:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/callbacks.rb:505:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/callbacks.rb:92:in `__run_callbacks__'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/callbacks.rb:778:in `_run_process_action_callbacks'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/callbacks.rb:81:in `run_callbacks'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/abstract_controller/callbacks.rb:19:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_controller/metal/rescue.rb:29:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/notifications.rb:164:in `block in instrument'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/notifications.rb:164:in `instrument'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.7.1/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/abstract_controller/base.rb:137:in `process'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionview-4.2.7.1/lib/action_view/rendering.rb:30:in `process'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/rack-mini-profiler-0.10.1/lib/mini_profiler/profiling_methods.rb:102:in `block in profile_method'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_controller/metal.rb:196:in `dispatch'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_controller/metal.rb:237:in `block in action'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_dispatch/routing/route_set.rb:74:in `dispatch'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_dispatch/routing/route_set.rb:43:in `serve'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_dispatch/journey/router.rb:43:in `block in serve'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_dispatch/journey/router.rb:30:in `each'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_dispatch/journey/router.rb:30:in `serve'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_dispatch/routing/route_set.rb:817:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/engine.rb:518:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/railtie.rb:194:in `public_send'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/railtie.rb:194:in `method_missing'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_dispatch/routing/mapper.rb:51:in `serve'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_dispatch/journey/router.rb:43:in `block in serve'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_dispatch/journey/router.rb:30:in `each'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_dispatch/journey/router.rb:30:in `serve'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_dispatch/routing/route_set.rb:817:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/rack-protection-1.5.3/lib/rack/protection/frame_options.rb:31:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/omniauth-1.3.1/lib/omniauth/strategy.rb:186:in `call!'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/omniauth-1.3.1/lib/omniauth/strategy.rb:164:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/omniauth-1.3.1/lib/omniauth/strategy.rb:186:in `call!'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/omniauth-1.3.1/lib/omniauth/strategy.rb:164:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/omniauth-1.3.1/lib/omniauth/strategy.rb:186:in `call!'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/omniauth-1.3.1/lib/omniauth/strategy.rb:164:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/omniauth-1.3.1/lib/omniauth/strategy.rb:186:in `call!'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/omniauth-1.3.1/lib/omniauth/strategy.rb:164:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/omniauth-1.3.1/lib/omniauth/strategy.rb:186:in `call!'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/omniauth-1.3.1/lib/omniauth/strategy.rb:164:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/omniauth-1.3.1/lib/omniauth/strategy.rb:186:in `call!'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/omniauth-1.3.1/lib/omniauth/strategy.rb:164:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/omniauth-1.3.1/lib/omniauth/builder.rb:63:in `call'
/var/www/discourse/config/initializers/008-rack-cors.rb:15:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/rack-1.6.4/lib/rack/conditionalget.rb:38:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/rack-1.6.4/lib/rack/head.rb:13:in `call'
/var/www/discourse/lib/middleware/anonymous_cache.rb:129:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_dispatch/middleware/params_parser.rb:27:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_dispatch/middleware/flash.rb:260:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/rack-1.6.4/lib/rack/session/abstract/id.rb:225:in `context'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/rack-1.6.4/lib/rack/session/abstract/id.rb:220:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_dispatch/middleware/cookies.rb:560:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.7.1/lib/active_record/query_cache.rb:36:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.7.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:653:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/callbacks.rb:88:in `__run_callbacks__'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/callbacks.rb:778:in `_run_call_callbacks'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/callbacks.rb:81:in `run_callbacks'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_dispatch/middleware/remote_ip.rb:78:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/logster-1.2.5/lib/logster/middleware/reporter.rb:31:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/rack/logger.rb:38:in `call_app'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/rack/logger.rb:22:in `call'
/var/www/discourse/config/initializers/100-quiet_logger.rb:13:in `call_with_quiet_assets'
/var/www/discourse/config/initializers/100-silence_logger.rb:26:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_dispatch/middleware/request_id.rb:21:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/rack-1.6.4/lib/rack/methodoverride.rb:22:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/rack-1.6.4/lib/rack/runtime.rb:18:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/rack-1.6.4/lib/rack/sendfile.rb:113:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/rack-mini-profiler-0.10.1/lib/mini_profiler/profiler.rb:278:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/message_bus-2.0.2/lib/message_bus/rack/middleware.rb:62:in `call'
/var/www/discourse/lib/middleware/request_tracker.rb:73:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/engine.rb:518:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/application.rb:165:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/railtie.rb:194:in `public_send'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/railtie.rb:194:in `method_missing'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/rack-1.6.4/lib/rack/urlmap.rb:66:in `block in call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/rack-1.6.4/lib/rack/urlmap.rb:50:in `each'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/rack-1.6.4/lib/rack/urlmap.rb:50:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:562:in `process_client'
/var/www/discourse/lib/scheduler/defer.rb:85:in `process_client'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:658:in `worker_loop'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:508:in `spawn_missing_workers'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:132:in `start'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/unicorn-5.1.0/bin/unicorn:126:in `<top (required)>'
/var/www/discourse/vendor/bundle/ruby/2.3.0/bin/unicorn:23:in `load'
/var/www/discourse/vendor/bundle/ruby/2.3.0/bin/unicorn:23:in `<main>'
infobacktraceenvSolve  Delete  Protect Share  Debug 

Environment


(Joshua Rosenfeld) #53

I’m also experiencing errors, am no longer able to load this on my dev instance. Console errors:

discourse/routes/application:89 TypeError: Discourse.ajax is not a function(…)error @ discourse/routes/application:89triggerEvent @ ember:23529trigger @ ember:45041trigger @ ember:44866(anonymous function) @ ember:44671tryCatch @ ember:45483invokeCallback @ ember:45495publish @ ember:45466publishRejection @ ember:45408(anonymous function) @ ember:26484invoke @ ember:879flush @ ember:944flush @ ember:749end @ ember:174run @ ember:229join @ ember:248run.join @ ember:15527_bubbleEvent @ ember:36781(anonymous function) @ ember:36731dispatch @ jquery:4733elemData.handle @ jquery:4545
ember:23482 
Error while processing route: adminPlugins.explorer Discourse.ajax is not a function TypeError: Discourse.ajax is not a function
    at Class.model (javascripts/discourse/routes/admin-plugins-explorer:12:28)
    at Class.deserialize (ember:22086:19)
    at applyHook (ember:45157:32)
    at C.runSharedModelHook (ember:43158:22)
    at C.getModel (ember:43384:21)
    at eval (ember:45026:19)
    at tryCatch (ember:45483:16)
    at invokeCallback (ember:45495:17)
    at publish (ember:45466:11)
    at eval (ember:26484:7)logError @ ember:23482error @ ember:23425triggerEvent @ ember:23538trigger @ ember:45041trigger @ ember:44866(anonymous function) @ ember:44671tryCatch @ ember:45483invokeCallback @ ember:45495publish @ ember:45466publishRejection @ ember:45408(anonymous function) @ ember:26484invoke @ ember:879flush @ ember:944flush @ ember:749end @ ember:174run @ ember:229join @ ember:248run.join @ ember:15527_bubbleEvent @ ember:36781(anonymous function) @ ember:36731dispatch @ jquery:4733elemData.handle @ jquery:4545

(Jeff Atwood) #54

Did we break Data Explorer in latest @eviltrout?


(Joshua Rosenfeld) #55

Might be related to this:


(Alan Tan) #56

Fixed in


(Sam McGahan) #57

I am running into an issue while trying to add this plugin to our discourse instance. I have followed your instructions on how to add a plugin and it works as far as showing up in the plugin list and allowing me to change it to active. I can then create a query, but the results area will not load. Then if I leave that tab and come back it will no longer allow me to create queries if I have created one.

What I see at that point is this:

Note: the “Create one” button/link does not function and is not clickable.

I have tried this in both a vanilla dev build with no other plugins and in my local dev copy of our production build.

In my browser’s console I am seeing this error:


I can not find this resource anywhere other than being mentioned here.

I also have not seen anyone else reporting that they have this issue so it would seem there is some dependency I’m missing. Any help would be appreciated. Let me know if there is anything else I can provide that you would find helpful.


(cpradio) #58

What version of Discourse are you currently running?


(Sam McGahan) #59

For production: v1.7.0.beta3 but I also tested on: v1.6.7

– I am in the process of updating my dev environment to be match the current release to see if that makes any difference. I’ll let you know if that resolves it.


(cpradio) #60

1.6.7 definitely wouldn’t have it. 1.7.0.beta3 would be iffy at best, the beta branch is currently 1.7.0.beta8

So my guess is beta3 doesn’t have it either (ping @eviltrout).


(Rafael dos Santos Silva) #61

Yeah, please update to latest, there was another bug involved in data-explorer recently also.


(Sam McGahan) #62

Thanks I’ll let you know if it works.


(Anton) #63

Here is a feature request:

Add a macro that will be substituted by current authorized user ID.

For example: {CURRENT_USER_ID}


(Justin Veenema) #64

Hi all! (tagging @riking and @codinghorror for visibility).

One of our Data Scientists approached our Community team recently asking if we’d be interested in having some Data Science students from a nearby University mine our Community via machine learning to try to see patterns and learn things about our customers. This sounds super exciting, so we obviously said yes.

We’re going to use Data Explorer for this, we just have a few questions.

  1. We began to run some numbers, and it looks like we’re seeing some discrepancies. For example, we’re trying to find the # of posts, and we found 3 different numbers:

• 20,188 posts downloaded (from querying the post text)
• 20,034 raw count (from doing a SELECT COUNT(*) from said table)
• 19,295 dashboard (the number of posts we see in our dashboard)

  1. We were trying to run some big numbers, and our data scientist said he was running into some limits, for how many things he could query/pull at a time. Is there any way we can manually crank those limits higher?

This is so awesome, and I can’t wait to get this into the hands of some data whiz-kids!


(Mittineague) #65

You are aware that there is what some would consider to be sensitive information in the database and that (unless you’ve changed yours)

Privacy Policy - Discourse Meta

How do we protect your information?

We implement a variety of security measures to maintain the safety of your personal information when you enter, submit, or access your personal information.

.

Do we disclose any information to outside parties?

We do not sell, trade, or otherwise transfer to outside parties your personally identifiable information. This does not include trusted third parties who assist us in operating our site, conducting our business, or servicing you, so long as those parties agree to keep this information confidential. We may also release your information when we believe release is appropriate to comply with the law, enforce our site policies, or protect ours or others rights, property, or safety. However, non-personally identifiable visitor information may be provided to other parties for marketing, advertising, or other uses.

IMHO you should cover your tail and get signed copies of the “parties agreement”