Version bump
This commit is contained in:
commit
f9335244f8
29
.github/workflows/ci.yml
vendored
29
.github/workflows/ci.yml
vendored
@ -57,12 +57,14 @@ jobs:
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Setup Git
|
||||
run: git config --global user.email "ci@ci.invalid" && git config --global user.name "Discourse CI"
|
||||
run: |
|
||||
git config --global user.email "ci@ci.invalid"
|
||||
git config --global user.name "Discourse CI"
|
||||
|
||||
- name: Setup packages
|
||||
if: env.BUILD_TYPE != 'LINT'
|
||||
run: |
|
||||
sudo apt-get -yqq install postgresql-client libpq-dev gifsicle jpegoptim optipng jhead && \
|
||||
sudo apt-get -yqq install postgresql-client libpq-dev gifsicle jpegoptim optipng jhead
|
||||
wget -qO- https://raw.githubusercontent.com/discourse/discourse_docker/master/image/base/install-pngquant | sudo sh
|
||||
|
||||
- name: Setup redis
|
||||
@ -78,7 +80,10 @@ jobs:
|
||||
architecture: 'x64'
|
||||
|
||||
- name: Setup bundler
|
||||
run: gem install bundler -v 2.1.1 --no-doc
|
||||
run: |
|
||||
gem install bundler -v 2.1.4 --no-doc
|
||||
bundle config deployment 'true'
|
||||
bundle config without 'development'
|
||||
|
||||
- name: Bundler cache
|
||||
uses: actions/cache@v1
|
||||
@ -90,7 +95,7 @@ jobs:
|
||||
${{ runner.os }}-gem-
|
||||
|
||||
- name: Setup gems
|
||||
run: bundle install --without development --deployment --jobs 4 --retry 3
|
||||
run: bundle install --jobs 4
|
||||
|
||||
- name: Get yarn cache directory
|
||||
id: yarn-cache-dir
|
||||
@ -114,11 +119,15 @@ jobs:
|
||||
|
||||
- name: Create database
|
||||
if: env.BUILD_TYPE != 'LINT'
|
||||
run: bin/rake db:create && bin/rake db:migrate
|
||||
run: |
|
||||
bin/rake db:create
|
||||
bin/rake db:migrate
|
||||
|
||||
- name: Create parallel databases
|
||||
if: env.BUILD_TYPE == 'BACKEND' && env.TARGET == 'CORE'
|
||||
run: bin/rake parallel:create && bin/rake parallel:migrate
|
||||
run: |
|
||||
bin/rake parallel:create
|
||||
bin/rake parallel:migrate
|
||||
|
||||
- name: Rubocop
|
||||
if: env.BUILD_TYPE == 'LINT'
|
||||
@ -126,7 +135,9 @@ jobs:
|
||||
|
||||
- name: ESLint
|
||||
if: env.BUILD_TYPE == 'LINT'
|
||||
run: yarn eslint app/assets/javascripts test/javascripts && yarn eslint --ext .es6 app/assets/javascripts test/javascripts plugins
|
||||
run: |
|
||||
yarn eslint app/assets/javascripts test/javascripts
|
||||
yarn eslint --global I18n --ext .es6 plugins
|
||||
|
||||
- name: Prettier
|
||||
if: env.BUILD_TYPE == 'LINT'
|
||||
@ -136,7 +147,9 @@ jobs:
|
||||
|
||||
- name: Core RSpec
|
||||
if: env.BUILD_TYPE == 'BACKEND' && env.TARGET == 'CORE'
|
||||
run: bin/turbo_rspec && bin/rake plugin:spec
|
||||
run: |
|
||||
bin/turbo_rspec
|
||||
bin/rake plugin:spec
|
||||
|
||||
- name: Plugin RSpec
|
||||
if: env.BUILD_TYPE == 'BACKEND' && env.TARGET == 'PLUGINS'
|
||||
|
||||
5
.gitignore
vendored
5
.gitignore
vendored
@ -137,4 +137,7 @@ node_modules
|
||||
openapi/*
|
||||
|
||||
# ember-cli generated
|
||||
dist
|
||||
dist
|
||||
|
||||
# Copyright Deposits
|
||||
copyright
|
||||
|
||||
359
.rubocop.yml
359
.rubocop.yml
@ -1,357 +1,2 @@
|
||||
require:
|
||||
- rubocop-discourse
|
||||
- rubocop-rspec
|
||||
|
||||
AllCops:
|
||||
TargetRubyVersion: 2.6
|
||||
DisabledByDefault: true
|
||||
Exclude:
|
||||
- "db/schema.rb"
|
||||
- "bundle/**/*"
|
||||
- "vendor/**/*"
|
||||
- "node_modules/**/*"
|
||||
- "public/**/*"
|
||||
- "plugins/**/gems/**/*"
|
||||
|
||||
Discourse:
|
||||
Enabled: true
|
||||
|
||||
Discourse/NoChdir:
|
||||
Exclude:
|
||||
- 'spec/**/*' # Specs are run sequentially, so chdir can be used
|
||||
- 'plugins/*/spec/**/*'
|
||||
|
||||
# Prefer &&/|| over and/or.
|
||||
Style/AndOr:
|
||||
Enabled: true
|
||||
|
||||
Style/FrozenStringLiteralComment:
|
||||
Enabled: true
|
||||
|
||||
# Align `when` with `case`.
|
||||
Layout/CaseIndentation:
|
||||
Enabled: true
|
||||
|
||||
# Align comments with method definitions.
|
||||
Layout/CommentIndentation:
|
||||
Enabled: true
|
||||
|
||||
# No extra empty lines.
|
||||
Layout/EmptyLines:
|
||||
Enabled: true
|
||||
|
||||
# Use Ruby >= 1.9 syntax for hashes. Prefer { a: :b } over { :a => :b }.
|
||||
Style/HashSyntax:
|
||||
Enabled: true
|
||||
|
||||
# Two spaces, no tabs (for indentation).
|
||||
Layout/IndentationWidth:
|
||||
Enabled: true
|
||||
|
||||
Layout/SpaceAfterColon:
|
||||
Enabled: true
|
||||
|
||||
Layout/SpaceAfterComma:
|
||||
Enabled: true
|
||||
|
||||
Layout/SpaceAroundEqualsInParameterDefault:
|
||||
Enabled: true
|
||||
|
||||
Layout/SpaceAroundKeyword:
|
||||
Enabled: true
|
||||
|
||||
Layout/SpaceAroundOperators:
|
||||
Enabled: true
|
||||
|
||||
Layout/SpaceBeforeFirstArg:
|
||||
Enabled: true
|
||||
|
||||
# Defining a method with parameters needs parentheses.
|
||||
Style/MethodDefParentheses:
|
||||
Enabled: true
|
||||
|
||||
# Use `foo {}` not `foo{}`.
|
||||
Layout/SpaceBeforeBlockBraces:
|
||||
Enabled: true
|
||||
|
||||
# Use `foo { bar }` not `foo {bar}`.
|
||||
Layout/SpaceInsideBlockBraces:
|
||||
Enabled: true
|
||||
|
||||
# Use `{ a: 1 }` not `{a:1}`.
|
||||
Layout/SpaceInsideHashLiteralBraces:
|
||||
Enabled: true
|
||||
|
||||
Layout/SpaceInsideParens:
|
||||
Enabled: true
|
||||
|
||||
# Detect hard tabs, no hard tabs.
|
||||
Layout/IndentationStyle:
|
||||
Enabled: true
|
||||
|
||||
# Blank lines should not have any spaces.
|
||||
Layout/TrailingEmptyLines:
|
||||
Enabled: true
|
||||
|
||||
# No trailing whitespace.
|
||||
Layout/TrailingWhitespace:
|
||||
Enabled: true
|
||||
|
||||
Lint/Debugger:
|
||||
Enabled: true
|
||||
|
||||
Layout/BlockAlignment:
|
||||
Enabled: true
|
||||
|
||||
# Align `end` with the matching keyword or starting expression except for
|
||||
# assignments, where it should be aligned with the LHS.
|
||||
Layout/EndAlignment:
|
||||
Enabled: true
|
||||
EnforcedStyleAlignWith: variable
|
||||
|
||||
# Use my_method(my_arg) not my_method( my_arg ) or my_method my_arg.
|
||||
Lint/RequireParentheses:
|
||||
Enabled: true
|
||||
|
||||
Lint/ShadowingOuterLocalVariable:
|
||||
Enabled: true
|
||||
|
||||
Layout/MultilineMethodCallIndentation:
|
||||
Enabled: true
|
||||
EnforcedStyle: indented
|
||||
|
||||
Layout/HashAlignment:
|
||||
Enabled: true
|
||||
|
||||
Bundler/OrderedGems:
|
||||
Enabled: false
|
||||
|
||||
Style/SingleLineMethods:
|
||||
Enabled: true
|
||||
|
||||
Style/Semicolon:
|
||||
Enabled: true
|
||||
AllowAsExpressionSeparator: true
|
||||
|
||||
Style/RedundantReturn:
|
||||
Enabled: true
|
||||
|
||||
Style/GlobalVars:
|
||||
Enabled: true
|
||||
Severity: warning
|
||||
Exclude:
|
||||
- 'lib/tasks/**/*'
|
||||
- 'script/**/*'
|
||||
- 'spec/**/*.rb'
|
||||
- 'plugins/*/spec/**/*'
|
||||
|
||||
# Specs
|
||||
|
||||
RSpec/AnyInstance:
|
||||
Enabled: false # To be decided
|
||||
|
||||
RSpec/AroundBlock:
|
||||
Enabled: true
|
||||
|
||||
RSpec/BeforeAfterAll:
|
||||
Enabled: false # To be decided
|
||||
|
||||
RSpec/ContextMethod:
|
||||
Enabled: false # TODO
|
||||
|
||||
RSpec/ContextWording:
|
||||
Enabled: false # To be decided
|
||||
|
||||
RSpec/DescribeClass:
|
||||
Enabled: false # To be decided
|
||||
|
||||
RSpec/DescribeMethod:
|
||||
Enabled: true
|
||||
|
||||
RSpec/DescribeSymbol:
|
||||
Enabled: false # To be decided
|
||||
|
||||
RSpec/DescribedClass:
|
||||
Enabled: false # To be decided
|
||||
|
||||
RSpec/DescribedClassModuleWrapping:
|
||||
Enabled: false # To be decided
|
||||
|
||||
RSpec/EmptyExampleGroup:
|
||||
Enabled: true
|
||||
Exclude:
|
||||
- 'spec/requests/api/*'
|
||||
|
||||
RSpec/EmptyLineAfterExample:
|
||||
Enabled: false # TODO
|
||||
|
||||
RSpec/EmptyLineAfterExampleGroup:
|
||||
Enabled: false # TODO
|
||||
|
||||
RSpec/EmptyLineAfterFinalLet:
|
||||
Enabled: false # TODO
|
||||
|
||||
RSpec/EmptyLineAfterHook:
|
||||
Enabled: false # TODO
|
||||
|
||||
RSpec/EmptyLineAfterSubject:
|
||||
Enabled: false # TODO
|
||||
|
||||
RSpec/ExampleLength:
|
||||
Enabled: false # To be decided
|
||||
|
||||
RSpec/ExampleWithoutDescription:
|
||||
Enabled: true
|
||||
|
||||
RSpec/ExampleWording:
|
||||
Enabled: false # TODO
|
||||
|
||||
RSpec/ExpectActual:
|
||||
Enabled: true
|
||||
|
||||
RSpec/ExpectChange:
|
||||
Enabled: false # To be decided
|
||||
|
||||
RSpec/ExpectInHook:
|
||||
Enabled: false # To be decided
|
||||
|
||||
RSpec/ExpectOutput:
|
||||
Enabled: true
|
||||
|
||||
RSpec/FilePath:
|
||||
Enabled: false # To be decided
|
||||
|
||||
RSpec/Focus:
|
||||
Enabled: true
|
||||
|
||||
RSpec/HookArgument:
|
||||
Enabled: false # TODO
|
||||
|
||||
RSpec/HooksBeforeExamples:
|
||||
Enabled: false # TODO
|
||||
|
||||
RSpec/ImplicitBlockExpectation:
|
||||
Enabled: true
|
||||
|
||||
RSpec/ImplicitExpect:
|
||||
Enabled: false # To be decided
|
||||
|
||||
RSpec/ImplicitSubject:
|
||||
Enabled: false # To be decided
|
||||
|
||||
RSpec/InstanceSpy:
|
||||
Enabled: true
|
||||
|
||||
RSpec/InstanceVariable:
|
||||
Enabled: false # TODO
|
||||
|
||||
RSpec/InvalidPredicateMatcher:
|
||||
Enabled: true
|
||||
|
||||
RSpec/ItBehavesLike:
|
||||
Enabled: true
|
||||
|
||||
RSpec/IteratedExpectation:
|
||||
Enabled: false # To be decided
|
||||
|
||||
RSpec/LeadingSubject:
|
||||
Enabled: false # TODO
|
||||
|
||||
RSpec/LeakyConstantDeclaration:
|
||||
Enabled: false # To be decided
|
||||
|
||||
RSpec/LetBeforeExamples:
|
||||
Enabled: false # TODO
|
||||
|
||||
RSpec/LetSetup:
|
||||
Enabled: false # TODO
|
||||
|
||||
RSpec/MessageChain:
|
||||
Enabled: true
|
||||
|
||||
RSpec/MessageSpies:
|
||||
Enabled: true
|
||||
|
||||
RSpec/MissingExampleGroupArgument:
|
||||
Enabled: true
|
||||
|
||||
RSpec/MultipleDescribes:
|
||||
Enabled: false # TODO
|
||||
|
||||
RSpec/MultipleSubjects:
|
||||
Enabled: true
|
||||
|
||||
RSpec/NamedSubject:
|
||||
Enabled: false # To be decided
|
||||
|
||||
RSpec/NestedGroups:
|
||||
Enabled: false # To be decided
|
||||
|
||||
RSpec/OverwritingSetup:
|
||||
Enabled: true
|
||||
|
||||
RSpec/ReceiveCounts:
|
||||
Enabled: true
|
||||
|
||||
RSpec/ReceiveNever:
|
||||
Enabled: true
|
||||
|
||||
RSpec/RepeatedDescription:
|
||||
Enabled: false # TODO
|
||||
|
||||
RSpec/RepeatedExample:
|
||||
Enabled: false # TODO
|
||||
|
||||
RSpec/RepeatedExampleGroupBody:
|
||||
Enabled: false # TODO
|
||||
|
||||
RSpec/RepeatedExampleGroupDescription:
|
||||
Enabled: false # TODO
|
||||
|
||||
RSpec/ReturnFromStub:
|
||||
Enabled: true
|
||||
|
||||
RSpec/ScatteredSetup:
|
||||
Enabled: false # TODO
|
||||
|
||||
RSpec/SharedContext:
|
||||
Enabled: true
|
||||
|
||||
RSpec/SharedExamples:
|
||||
Enabled: true
|
||||
|
||||
RSpec/SingleArgumentMessageChain:
|
||||
Enabled: true
|
||||
|
||||
RSpec/SubjectStub:
|
||||
Enabled: true
|
||||
|
||||
RSpec/UnspecifiedException:
|
||||
Enabled: true
|
||||
|
||||
RSpec/VerifiedDoubles:
|
||||
Enabled: true
|
||||
|
||||
RSpec/VoidExpect:
|
||||
Enabled: true
|
||||
|
||||
RSpec/Yield:
|
||||
Enabled: true
|
||||
|
||||
Capybara/CurrentPathExpectation:
|
||||
Enabled: true
|
||||
|
||||
Capybara/FeatureMethods:
|
||||
Enabled: true
|
||||
|
||||
FactoryBot/AttributeDefinedStatically:
|
||||
Enabled: true
|
||||
|
||||
FactoryBot/CreateList:
|
||||
Enabled: true
|
||||
|
||||
FactoryBot/FactoryClassName:
|
||||
Enabled: true
|
||||
|
||||
Rails/HttpStatus:
|
||||
Enabled: true
|
||||
inherit_gem:
|
||||
rubocop-discourse: default.yml
|
||||
|
||||
@ -8,7 +8,6 @@ module.exports = {
|
||||
rules: {
|
||||
"block-indentation": true,
|
||||
"deprecated-render-helper": true,
|
||||
"require-valid-alt-text": false,
|
||||
"linebreak-style": true,
|
||||
"link-rel-noopener": "strict",
|
||||
"no-abstract-roles": true,
|
||||
|
||||
86
.travis.yml
86
.travis.yml
@ -1,86 +0,0 @@
|
||||
language: ruby
|
||||
|
||||
git:
|
||||
depth: false
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- beta
|
||||
- stable
|
||||
|
||||
env:
|
||||
global:
|
||||
- TRAVIS_NODE_VERSION="10"
|
||||
- DISCOURSE_HOSTNAME=www.example.com
|
||||
- RUBY_GLOBAL_METHOD_CACHE_SIZE=131072
|
||||
matrix:
|
||||
- "RAILS_MASTER=0 QUNIT_RUN=0 RUN_LINT=0"
|
||||
- "RAILS_MASTER=0 QUNIT_RUN=1 RUN_LINT=0"
|
||||
- "RAILS_MASTER=0 QUNIT_RUN=0 RUN_LINT=1"
|
||||
|
||||
addons:
|
||||
chrome: stable
|
||||
postgresql: "9.6"
|
||||
apt:
|
||||
update: true
|
||||
packages:
|
||||
- gifsicle
|
||||
- jpegoptim
|
||||
- optipng
|
||||
- jhead
|
||||
|
||||
matrix:
|
||||
fast_finish: true
|
||||
|
||||
rvm:
|
||||
- 2.6.3
|
||||
|
||||
services:
|
||||
- redis-server
|
||||
|
||||
sudo: required
|
||||
dist: xenial
|
||||
|
||||
cache:
|
||||
yarn: true
|
||||
directories:
|
||||
- vendor/bundle
|
||||
|
||||
before_install:
|
||||
- wget -qO- https://raw.githubusercontent.com/discourse/discourse_docker/master/image/base/install-pngquant | sudo sh
|
||||
- nvm install node
|
||||
- node --version
|
||||
- gem install bundler -v 1.17.3
|
||||
- git clone --depth=1 https://github.com/discourse/discourse-backup-uploads-to-s3.git plugins/discourse-backup-uploads-to-s3
|
||||
- git clone --depth=1 https://github.com/discourse/discourse-spoiler-alert.git plugins/discourse-spoiler-alert
|
||||
- git clone --depth=1 https://github.com/discourse/discourse-cakeday.git plugins/discourse-cakeday
|
||||
- git clone --depth=1 https://github.com/discourse/discourse-canned-replies.git plugins/discourse-canned-replies
|
||||
- git clone --depth=1 https://github.com/discourse/discourse-chat-integration.git plugins/discourse-chat-integration
|
||||
- git clone --depth=1 https://github.com/discourse/discourse-assign.git plugins/discourse-assign
|
||||
- git clone --depth=1 https://github.com/discourse/discourse-patreon.git plugins/discourse-patreon
|
||||
- git clone --depth=1 https://github.com/discourse/discourse-user-notes.git plugins/discourse-user-notes
|
||||
- git clone --depth=1 https://github.com/discourse/discourse-group-tracker
|
||||
- export PATH=$HOME/.yarn/bin:$PATH
|
||||
|
||||
install:
|
||||
- bash -c "if [ '$RAILS_MASTER' == '1' ]; then bundle update --retry=3 --jobs=3 arel rails seed-fu; fi"
|
||||
- bash -c "if [ '$RAILS_MASTER' == '0' ]; then bundle install --without development --deployment --retry=3 --jobs=3; fi"
|
||||
- bash -c "if [ '$QUNIT_RUN' == '1' ] || [ '$RUN_LINT' == '1' ]; then yarn install --dev; fi"
|
||||
- bash -c "if [ '$RUN_LINT' != '1' ]; then bundle exec rake db:create && LOAD_PLUGINS=1 bundle exec rake db:migrate; fi"
|
||||
|
||||
script:
|
||||
- |
|
||||
bash -c "
|
||||
if [ '$RUN_LINT' == '1' ]; then
|
||||
npx lefthook run lints
|
||||
else
|
||||
if [ '$QUNIT_RUN' == '1' ]; then
|
||||
bundle exec rake qunit:test['1200000'] && \
|
||||
bundle exec rake qunit:test['1200000','/wizard/qunit'] && \
|
||||
bundle exec rake plugin:qunit
|
||||
else
|
||||
bundle exec rspec && bundle exec rake plugin:spec
|
||||
fi
|
||||
fi
|
||||
"
|
||||
24
Gemfile
24
Gemfile
@ -18,13 +18,13 @@ else
|
||||
# this allows us to include the bits of rails we use without pieces we do not.
|
||||
#
|
||||
# To issue a rails update bump the version number here
|
||||
gem 'actionmailer', '6.0.2.2'
|
||||
gem 'actionpack', '6.0.2.2'
|
||||
gem 'actionview', '6.0.2.2'
|
||||
gem 'activemodel', '6.0.2.2'
|
||||
gem 'activerecord', '6.0.2.2'
|
||||
gem 'activesupport', '6.0.2.2'
|
||||
gem 'railties', '6.0.2.2'
|
||||
gem 'actionmailer', '6.0.3'
|
||||
gem 'actionpack', '6.0.3'
|
||||
gem 'actionview', '6.0.3'
|
||||
gem 'activemodel', '6.0.3'
|
||||
gem 'activerecord', '6.0.3'
|
||||
gem 'activesupport', '6.0.3'
|
||||
gem 'railties', '6.0.3'
|
||||
gem 'sprockets-rails'
|
||||
end
|
||||
|
||||
@ -127,11 +127,7 @@ gem 'mini_racer'
|
||||
# TODO: determine why highline is being held back and upgrade to latest
|
||||
gem 'highline', '~> 1.7.0', require: false
|
||||
|
||||
# TODO: Upgrading breaks Sidekiq Web
|
||||
# This is a bit of a hornets nest cause in an ideal world we much prefer
|
||||
# if Sidekiq reused session and CSRF mitigation with Discourse on the
|
||||
# _forum_session cookie instead of a rack.session cookie
|
||||
gem 'rack', '2.0.8'
|
||||
gem 'rack', '2.2.2'
|
||||
|
||||
gem 'rack-protection' # security
|
||||
gem 'cbor', require: false
|
||||
@ -172,9 +168,7 @@ group :test, :development do
|
||||
gem 'shoulda-matchers', require: false
|
||||
gem 'rspec-html-matchers'
|
||||
gem 'byebug', require: ENV['RM_INFO'].nil?, platform: :mri
|
||||
gem 'rubocop', require: false
|
||||
gem "rubocop-discourse", require: false
|
||||
gem "rubocop-rspec", require: false
|
||||
gem 'parallel_tests'
|
||||
|
||||
gem 'rswag-specs'
|
||||
@ -254,3 +248,5 @@ end
|
||||
gem 'webpush', require: false
|
||||
gem 'colored2', require: false
|
||||
gem 'maxminddb'
|
||||
|
||||
gem 'rails_failover', require: false
|
||||
|
||||
100
Gemfile.lock
100
Gemfile.lock
@ -1,21 +1,21 @@
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
actionmailer (6.0.2.2)
|
||||
actionpack (= 6.0.2.2)
|
||||
actionview (= 6.0.2.2)
|
||||
activejob (= 6.0.2.2)
|
||||
actionmailer (6.0.3)
|
||||
actionpack (= 6.0.3)
|
||||
actionview (= 6.0.3)
|
||||
activejob (= 6.0.3)
|
||||
mail (~> 2.5, >= 2.5.4)
|
||||
rails-dom-testing (~> 2.0)
|
||||
actionpack (6.0.2.2)
|
||||
actionview (= 6.0.2.2)
|
||||
activesupport (= 6.0.2.2)
|
||||
actionpack (6.0.3)
|
||||
actionview (= 6.0.3)
|
||||
activesupport (= 6.0.3)
|
||||
rack (~> 2.0, >= 2.0.8)
|
||||
rack-test (>= 0.6.3)
|
||||
rails-dom-testing (~> 2.0)
|
||||
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
||||
actionview (6.0.2.2)
|
||||
activesupport (= 6.0.2.2)
|
||||
actionview (6.0.3)
|
||||
activesupport (= 6.0.3)
|
||||
builder (~> 3.1)
|
||||
erubi (~> 1.4)
|
||||
rails-dom-testing (~> 2.0)
|
||||
@ -24,20 +24,20 @@ GEM
|
||||
actionview (>= 6.0.a)
|
||||
active_model_serializers (0.8.4)
|
||||
activemodel (>= 3.0)
|
||||
activejob (6.0.2.2)
|
||||
activesupport (= 6.0.2.2)
|
||||
activejob (6.0.3)
|
||||
activesupport (= 6.0.3)
|
||||
globalid (>= 0.3.6)
|
||||
activemodel (6.0.2.2)
|
||||
activesupport (= 6.0.2.2)
|
||||
activerecord (6.0.2.2)
|
||||
activemodel (= 6.0.2.2)
|
||||
activesupport (= 6.0.2.2)
|
||||
activesupport (6.0.2.2)
|
||||
activemodel (6.0.3)
|
||||
activesupport (= 6.0.3)
|
||||
activerecord (6.0.3)
|
||||
activemodel (= 6.0.3)
|
||||
activesupport (= 6.0.3)
|
||||
activesupport (6.0.3)
|
||||
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||
i18n (>= 0.7, < 2)
|
||||
minitest (~> 5.1)
|
||||
tzinfo (~> 1.1)
|
||||
zeitwerk (~> 2.2)
|
||||
zeitwerk (~> 2.2, >= 2.2.2)
|
||||
addressable (2.7.0)
|
||||
public_suffix (>= 2.0.2, < 5.0)
|
||||
annotate (3.1.1)
|
||||
@ -66,7 +66,7 @@ GEM
|
||||
barber (0.12.2)
|
||||
ember-source (>= 1.0, < 3.1)
|
||||
execjs (>= 1.2, < 3)
|
||||
better_errors (2.7.0)
|
||||
better_errors (2.7.1)
|
||||
coderay (>= 1.0.0)
|
||||
erubi (>= 1.0.0)
|
||||
rack (>= 0.9.0)
|
||||
@ -151,9 +151,8 @@ GEM
|
||||
concurrent-ruby (~> 1.0)
|
||||
image_size (1.5.0)
|
||||
in_threads (1.5.4)
|
||||
jaro_winkler (1.5.4)
|
||||
jmespath (1.4.0)
|
||||
jquery-rails (4.3.5)
|
||||
jquery-rails (4.4.0)
|
||||
rails-dom-testing (>= 1, < 3)
|
||||
railties (>= 4.2.0)
|
||||
thor (>= 0.14, < 2.0)
|
||||
@ -184,19 +183,19 @@ GEM
|
||||
mini_mime (>= 0.1.1)
|
||||
maxminddb (0.1.22)
|
||||
memory_profiler (0.9.14)
|
||||
message_bus (3.1.0)
|
||||
message_bus (3.2.0)
|
||||
rack (>= 1.1.3)
|
||||
method_source (1.0.0)
|
||||
mini_mime (1.0.2)
|
||||
mini_portile2 (2.4.0)
|
||||
mini_racer (0.2.10)
|
||||
mini_racer (0.2.14)
|
||||
libv8 (> 7.3)
|
||||
mini_scheduler (0.12.2)
|
||||
sidekiq
|
||||
mini_sql (0.2.5)
|
||||
mini_suffix (0.3.0)
|
||||
ffi (~> 1.9)
|
||||
minitest (5.14.0)
|
||||
minitest (5.14.1)
|
||||
mocha (1.11.2)
|
||||
mock_redis (0.23.0)
|
||||
msgpack (1.3.3)
|
||||
@ -241,7 +240,7 @@ GEM
|
||||
omniauth-twitter (1.4.0)
|
||||
omniauth-oauth (~> 1.1)
|
||||
rack
|
||||
onebox (1.9.27.2)
|
||||
onebox (1.9.28.1)
|
||||
addressable (~> 2.7.0)
|
||||
htmlentities (~> 4.3)
|
||||
multi_json (~> 1.11)
|
||||
@ -262,12 +261,12 @@ GEM
|
||||
method_source (~> 1.0)
|
||||
pry-rails (0.3.9)
|
||||
pry (>= 0.10.4)
|
||||
public_suffix (4.0.4)
|
||||
puma (4.3.3)
|
||||
public_suffix (4.0.5)
|
||||
puma (4.3.5)
|
||||
nio4r (~> 2.0)
|
||||
r2 (0.2.7)
|
||||
rack (2.0.8)
|
||||
rack-mini-profiler (2.0.1)
|
||||
rack (2.2.2)
|
||||
rack-mini-profiler (2.0.2)
|
||||
rack (>= 1.2.0)
|
||||
rack-protection (2.0.8.1)
|
||||
rack
|
||||
@ -278,12 +277,14 @@ GEM
|
||||
nokogiri (>= 1.6)
|
||||
rails-html-sanitizer (1.3.0)
|
||||
loofah (~> 2.3)
|
||||
rails_multisite (2.1.1)
|
||||
rails_failover (0.2.0)
|
||||
redis (~> 4)
|
||||
rails_multisite (2.1.2)
|
||||
activerecord (> 5.0, < 7)
|
||||
railties (> 5.0, < 7)
|
||||
railties (6.0.2.2)
|
||||
actionpack (= 6.0.2.2)
|
||||
activesupport (= 6.0.2.2)
|
||||
railties (6.0.3)
|
||||
actionpack (= 6.0.3)
|
||||
activesupport (= 6.0.3)
|
||||
method_source
|
||||
rake (>= 0.8.7)
|
||||
thor (>= 0.20.3, < 2.0)
|
||||
@ -295,7 +296,7 @@ GEM
|
||||
rb-fsevent (0.10.4)
|
||||
rb-inotify (0.10.1)
|
||||
ffi (~> 1.0)
|
||||
rbtrace (0.4.12)
|
||||
rbtrace (0.4.13)
|
||||
ffi (>= 1.0.6)
|
||||
msgpack (>= 0.4.3)
|
||||
optimist (>= 3.0.0)
|
||||
@ -319,7 +320,7 @@ GEM
|
||||
rspec-mocks (~> 3.9.0)
|
||||
rspec-core (3.9.2)
|
||||
rspec-support (~> 3.9.3)
|
||||
rspec-expectations (3.9.1)
|
||||
rspec-expectations (3.9.2)
|
||||
diff-lcs (>= 1.2.0, < 2.0)
|
||||
rspec-support (~> 3.9.0)
|
||||
rspec-html-matchers (0.9.2)
|
||||
@ -328,7 +329,7 @@ GEM
|
||||
rspec-mocks (3.9.1)
|
||||
diff-lcs (>= 1.2.0, < 2.0)
|
||||
rspec-support (~> 3.9.0)
|
||||
rspec-rails (4.0.0)
|
||||
rspec-rails (4.0.1)
|
||||
actionpack (>= 4.2)
|
||||
activesupport (>= 4.2)
|
||||
railties (>= 4.2)
|
||||
@ -342,20 +343,22 @@ GEM
|
||||
json-schema (~> 2.2)
|
||||
railties (>= 3.1, < 7.0)
|
||||
rtlit (0.0.5)
|
||||
rubocop (0.82.0)
|
||||
jaro_winkler (~> 1.5.1)
|
||||
rubocop (0.84.0)
|
||||
parallel (~> 1.10)
|
||||
parser (>= 2.7.0.1)
|
||||
rainbow (>= 2.2.2, < 4.0)
|
||||
rexml
|
||||
rubocop-ast (>= 0.0.3)
|
||||
ruby-progressbar (~> 1.7)
|
||||
unicode-display_width (>= 1.4.0, < 2.0)
|
||||
rubocop-ast (0.0.3)
|
||||
parser (>= 2.7.0.1)
|
||||
rubocop-discourse (2.1.2)
|
||||
rubocop (>= 0.69.0)
|
||||
rubocop-rspec (>= 1.39.0)
|
||||
rubocop-rspec (1.39.0)
|
||||
rubocop (>= 0.68.1)
|
||||
ruby-prof (1.3.2)
|
||||
ruby-prof (1.4.1)
|
||||
ruby-progressbar (1.10.1)
|
||||
ruby-readability (0.7.0)
|
||||
guess_html_encoding (>= 0.0.4)
|
||||
@ -428,14 +431,14 @@ PLATFORMS
|
||||
ruby
|
||||
|
||||
DEPENDENCIES
|
||||
actionmailer (= 6.0.2.2)
|
||||
actionpack (= 6.0.2.2)
|
||||
actionview (= 6.0.2.2)
|
||||
actionmailer (= 6.0.3)
|
||||
actionpack (= 6.0.3)
|
||||
actionview (= 6.0.3)
|
||||
actionview_precompiler
|
||||
active_model_serializers (~> 0.8.3)
|
||||
activemodel (= 6.0.2.2)
|
||||
activerecord (= 6.0.2.2)
|
||||
activesupport (= 6.0.2.2)
|
||||
activemodel (= 6.0.3)
|
||||
activerecord (= 6.0.3)
|
||||
activesupport (= 6.0.3)
|
||||
addressable
|
||||
annotate
|
||||
aws-sdk-s3
|
||||
@ -508,11 +511,12 @@ DEPENDENCIES
|
||||
pry-rails
|
||||
puma
|
||||
r2
|
||||
rack (= 2.0.8)
|
||||
rack (= 2.2.2)
|
||||
rack-mini-profiler
|
||||
rack-protection
|
||||
rails_failover
|
||||
rails_multisite
|
||||
railties (= 6.0.2.2)
|
||||
railties (= 6.0.3)
|
||||
rake
|
||||
rb-fsevent
|
||||
rb-inotify (~> 0.9)
|
||||
@ -528,9 +532,7 @@ DEPENDENCIES
|
||||
rspec-rails
|
||||
rswag-specs
|
||||
rtlit
|
||||
rubocop
|
||||
rubocop-discourse
|
||||
rubocop-rspec
|
||||
ruby-prof
|
||||
ruby-readability
|
||||
rubyzip
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import { scheduleOnce } from "@ember/runloop";
|
||||
import Component from "@ember/component";
|
||||
import discourseDebounce from "discourse/lib/debounce";
|
||||
|
||||
@ -1,30 +0,0 @@
|
||||
import Component from "@ember/component";
|
||||
import { iconHTML } from "discourse-common/lib/icon-library";
|
||||
|
||||
export default Component.extend({
|
||||
tagName: "th",
|
||||
classNames: ["sortable"],
|
||||
chevronIcon: null,
|
||||
toggleProperties() {
|
||||
if (this.order === this.field) {
|
||||
this.set("ascending", this.ascending ? null : true);
|
||||
} else {
|
||||
this.setProperties({ order: this.field, ascending: null });
|
||||
}
|
||||
},
|
||||
toggleChevron() {
|
||||
if (this.order === this.field) {
|
||||
let chevron = iconHTML(this.ascending ? "chevron-up" : "chevron-down");
|
||||
this.set("chevronIcon", `${chevron}`.htmlSafe());
|
||||
} else {
|
||||
this.set("chevronIcon", null);
|
||||
}
|
||||
},
|
||||
click() {
|
||||
this.toggleProperties();
|
||||
},
|
||||
didReceiveAttrs() {
|
||||
this._super(...arguments);
|
||||
this.toggleChevron();
|
||||
}
|
||||
});
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import { alias } from "@ember/object/computed";
|
||||
import Component from "@ember/component";
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import { makeArray } from "discourse-common/lib/helpers";
|
||||
import { alias, or, and, equal, notEmpty, not } from "@ember/object/computed";
|
||||
@ -59,8 +60,6 @@ export default Component.extend({
|
||||
forcedModes: null,
|
||||
showAllReportsLink: false,
|
||||
filters: null,
|
||||
startDate: null,
|
||||
endDate: null,
|
||||
showTrend: false,
|
||||
showHeader: true,
|
||||
showTitle: true,
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import { isEmpty } from "@ember/utils";
|
||||
import { empty } from "@ember/object/computed";
|
||||
import { scheduleOnce } from "@ember/runloop";
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import Component from "@ember/component";
|
||||
import { iconHTML } from "discourse-common/lib/icon-library";
|
||||
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import { alias } from "@ember/object/computed";
|
||||
import Component from "@ember/component";
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import Component from "@ember/component";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import Component from "@ember/component";
|
||||
import { iconHTML } from "discourse-common/lib/icon-library";
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import { reads } from "@ember/object/computed";
|
||||
import Component from "@ember/component";
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import { isEmpty } from "@ember/utils";
|
||||
import { or } from "@ember/object/computed";
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import Component from "@ember/component";
|
||||
import discourseComputed, { observes } from "discourse-common/utils/decorators";
|
||||
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import EmberObject from "@ember/object";
|
||||
import { later } from "@ember/runloop";
|
||||
import Component from "@ember/component";
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import { equal } from "@ember/object/computed";
|
||||
import Component from "@ember/component";
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import { schedule } from "@ember/runloop";
|
||||
import Component from "@ember/component";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
@ -16,6 +17,7 @@ export default Component.extend({
|
||||
{ id: "topic_id", name: I18n.t("admin.permalink.topic_id") },
|
||||
{ id: "post_id", name: I18n.t("admin.permalink.post_id") },
|
||||
{ id: "category_id", name: I18n.t("admin.permalink.category_id") },
|
||||
{ id: "tag_name", name: I18n.t("admin.permalink.tag_name") },
|
||||
{ id: "external_url", name: I18n.t("admin.permalink.external_url") }
|
||||
];
|
||||
},
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import { later, schedule } from "@ember/runloop";
|
||||
import Component from "@ember/component";
|
||||
import { iconHTML } from "discourse-common/lib/icon-library";
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import { schedule } from "@ember/runloop";
|
||||
import Component from "@ember/component";
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import { isEmpty } from "@ember/utils";
|
||||
import Component from "@ember/component";
|
||||
import { on } from "discourse-common/utils/decorators";
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import { alias } from "@ember/object/computed";
|
||||
import Component from "@ember/component";
|
||||
import UploadMixin from "discourse/mixins/upload";
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import { isEmpty } from "@ember/utils";
|
||||
import { schedule } from "@ember/runloop";
|
||||
import Component from "@ember/component";
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import { alias } from "@ember/object/computed";
|
||||
import Component from "@ember/component";
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import { isBlank } from "@ember/utils";
|
||||
import Controller from "@ember/controller";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import { alias, equal } from "@ember/object/computed";
|
||||
import Controller, { inject as controller } from "@ember/controller";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import Controller from "@ember/controller";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import discourseComputed, { observes } from "discourse-common/utils/decorators";
|
||||
import { reads } from "@ember/object/computed";
|
||||
import Controller, { inject as controller } from "@ember/controller";
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import { later } from "@ember/runloop";
|
||||
import Controller from "@ember/controller";
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import EmberObject from "@ember/object";
|
||||
import Controller from "@ember/controller";
|
||||
import showModal from "discourse/lib/show-modal";
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import Controller from "@ember/controller";
|
||||
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import Controller from "@ember/controller";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import Controller from "@ember/controller";
|
||||
import { url } from "discourse/lib/computed";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import { makeArray } from "discourse-common/lib/helpers";
|
||||
import {
|
||||
empty,
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import { makeArray } from "discourse-common/lib/helpers";
|
||||
import { inject } from "@ember/controller";
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import { empty } from "@ember/object/computed";
|
||||
import Controller from "@ember/controller";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import { sort } from "@ember/object/computed";
|
||||
import EmberObject, { action, computed } from "@ember/object";
|
||||
import Controller from "@ember/controller";
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import Controller from "@ember/controller";
|
||||
import discourseDebounce from "discourse/lib/debounce";
|
||||
import { outputExportResult } from "discourse/lib/export-result";
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import { gt } from "@ember/object/computed";
|
||||
import EmberObject from "@ember/object";
|
||||
import { scheduleOnce } from "@ember/runloop";
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import Controller from "@ember/controller";
|
||||
import discourseDebounce from "discourse/lib/debounce";
|
||||
import Permalink from "admin/models/permalink";
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import Controller from "@ember/controller";
|
||||
export const DEFAULT_PERIOD = "yearly";
|
||||
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import Controller from "@ember/controller";
|
||||
import { DEFAULT_PERIOD } from "admin/controllers/admin-search-logs-index";
|
||||
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import { isEmpty } from "@ember/utils";
|
||||
import { alias } from "@ember/object/computed";
|
||||
import Controller from "@ember/controller";
|
||||
@ -15,12 +16,32 @@ export default Controller.extend({
|
||||
// If we have no content, don't bother filtering anything
|
||||
if (!!isEmpty(this.allSiteSettings)) return;
|
||||
|
||||
let filter;
|
||||
let filter, pluginFilter;
|
||||
if (this.filter) {
|
||||
filter = this.filter.toLowerCase().trim();
|
||||
filter = this.filter
|
||||
.toLowerCase()
|
||||
.split(" ")
|
||||
.filter(word => {
|
||||
if (word.length === 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (word.startsWith("plugin:")) {
|
||||
pluginFilter = word.substr("plugin:".length).trim();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
})
|
||||
.join(" ")
|
||||
.trim();
|
||||
}
|
||||
|
||||
if ((!filter || 0 === filter.length) && !this.onlyOverridden) {
|
||||
if (
|
||||
(!filter || 0 === filter.length) &&
|
||||
(!pluginFilter || 0 === pluginFilter.length) &&
|
||||
!this.onlyOverridden
|
||||
) {
|
||||
this.set("visibleSiteSettings", this.allSiteSettings);
|
||||
if (this.categoryNameKey === "all_results") {
|
||||
this.transitionToRoute("adminSiteSettings");
|
||||
@ -39,6 +60,7 @@ export default Controller.extend({
|
||||
this.allSiteSettings.forEach(settingsCategory => {
|
||||
const siteSettings = settingsCategory.siteSettings.filter(item => {
|
||||
if (this.onlyOverridden && !item.get("overridden")) return false;
|
||||
if (pluginFilter && item.plugin !== pluginFilter) return false;
|
||||
if (filter) {
|
||||
const setting = item.get("setting").toLowerCase();
|
||||
return (
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import Controller from "@ember/controller";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import { alias, sort } from "@ember/object/computed";
|
||||
import { next } from "@ember/runloop";
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import { gte, sort } from "@ember/object/computed";
|
||||
import Controller from "@ember/controller";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import { notEmpty, and } from "@ember/object/computed";
|
||||
import { inject as service } from "@ember/service";
|
||||
import Controller from "@ember/controller";
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import discourseComputed, { observes } from "discourse-common/utils/decorators";
|
||||
import Controller from "@ember/controller";
|
||||
import discourseDebounce from "discourse/lib/debounce";
|
||||
@ -10,7 +11,7 @@ export default Controller.extend(CanCheckEmails, {
|
||||
model: null,
|
||||
query: null,
|
||||
order: null,
|
||||
ascending: null,
|
||||
asc: null,
|
||||
showEmails: false,
|
||||
refreshing: false,
|
||||
listFilter: null,
|
||||
@ -53,7 +54,7 @@ export default Controller.extend(CanCheckEmails, {
|
||||
filter: this.listFilter,
|
||||
show_emails: this.showEmails,
|
||||
order: this.order,
|
||||
ascending: this.ascending,
|
||||
asc: this.asc,
|
||||
page: this._page
|
||||
})
|
||||
.then(result => {
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import { or } from "@ember/object/computed";
|
||||
import { schedule } from "@ember/runloop";
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import { isEmpty } from "@ember/utils";
|
||||
import { alias } from "@ember/object/computed";
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import Controller from "@ember/controller";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import { isEmpty } from "@ember/utils";
|
||||
import { and, not } from "@ember/object/computed";
|
||||
import Controller, { inject as controller } from "@ember/controller";
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import { alias, map } from "@ember/object/computed";
|
||||
import Controller from "@ember/controller";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import Controller from "@ember/controller";
|
||||
import { A } from "@ember/array";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import { equal, match, alias } from "@ember/object/computed";
|
||||
import Controller, { inject as controller } from "@ember/controller";
|
||||
import ModalFunctionality from "discourse/mixins/modal-functionality";
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import Controller, { inject as controller } from "@ember/controller";
|
||||
import ModalFunctionality from "discourse/mixins/modal-functionality";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import Controller from "@ember/controller";
|
||||
import ModalFunctionality from "discourse/mixins/modal-functionality";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import { htmlHelper } from "discourse-common/lib/helpers";
|
||||
|
||||
export default htmlHelper(size => I18n.toHumanSize(size));
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import Helper from "@ember/component/helper";
|
||||
|
||||
function postActionTitle([id, nameKey]) {
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import ModalFunctionality from "discourse/mixins/modal-functionality";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import Mixin from "@ember/object/mixin";
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import { warn } from "@ember/debug";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import { alias, oneWay } from "@ember/object/computed";
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import { computed } from "@ember/object";
|
||||
import Mixin from "@ember/object/mixin";
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import { filter, or, gt, lt, not } from "@ember/object/computed";
|
||||
import { iconHTML } from "discourse-common/lib/icon-library";
|
||||
@ -76,12 +77,6 @@ const AdminUser = User.extend({
|
||||
});
|
||||
},
|
||||
|
||||
revokeApiKey() {
|
||||
return ajax(`/admin/users/${this.id}/revoke_api_key`, {
|
||||
type: "DELETE"
|
||||
}).then(() => this.set("api_key", null));
|
||||
},
|
||||
|
||||
deleteAllPosts() {
|
||||
let deletedPosts = 0;
|
||||
const user = this;
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import { extractError } from "discourse/lib/ajax-error";
|
||||
import EmberObject from "@ember/object";
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import discourseComputed, {
|
||||
observes,
|
||||
on
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import { A } from "@ember/array";
|
||||
import ArrayProxy from "@ember/array/proxy";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import RestModel from "discourse/models/rest";
|
||||
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import { makeArray } from "discourse-common/lib/helpers";
|
||||
import { isEmpty } from "@ember/utils";
|
||||
@ -346,7 +347,7 @@ const Report = EmberObject.extend({
|
||||
|
||||
return {
|
||||
value: username,
|
||||
formatedValue: username ? formatedValue(username) : "—"
|
||||
formatedValue: username ? formatedValue() : "—"
|
||||
};
|
||||
},
|
||||
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import EmberObject from "@ember/object";
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import { equal } from "@ember/object/computed";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import EmberObject from "@ember/object";
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import Setting from "admin/mixins/setting-object";
|
||||
import EmberObject from "@ember/object";
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import AdminUser from "admin/models/admin-user";
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import { get } from "@ember/object";
|
||||
import { isBlank, isEmpty } from "@ember/utils";
|
||||
import { or, gt } from "@ember/object/computed";
|
||||
|
||||
@ -12,6 +12,11 @@ export default EmberObject.extend({
|
||||
return Math.round((minDaysVisited * 100) / timePeriod);
|
||||
},
|
||||
|
||||
@discourseComputed("num_topics_replied_to", "min_topics_replied_to")
|
||||
capped_topics_replied_to(numReplied, minReplied) {
|
||||
return numReplied > minReplied;
|
||||
},
|
||||
|
||||
@discourseComputed(
|
||||
"days_visited",
|
||||
"min_days_visited",
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import EmberObject from "@ember/object";
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import EmberObject from "@ember/object";
|
||||
import Route from "@ember/routing/route";
|
||||
import PreloadStore from "preload-store";
|
||||
import PreloadStore from "discourse/lib/preload-store";
|
||||
|
||||
export default Route.extend({
|
||||
// since the logs are pushed via the message bus
|
||||
|
||||
@ -1,10 +1,11 @@
|
||||
import I18n from "I18n";
|
||||
import EmberObject from "@ember/object";
|
||||
import DiscourseRoute from "discourse/routes/discourse";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import showModal from "discourse/lib/show-modal";
|
||||
import BackupStatus from "admin/models/backup-status";
|
||||
import Backup from "admin/models/backup";
|
||||
import PreloadStore from "preload-store";
|
||||
import PreloadStore from "discourse/lib/preload-store";
|
||||
import User from "discourse/models/user";
|
||||
|
||||
const LOG_CHANNEL = "/admin/backups/logs";
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import { get } from "@ember/object";
|
||||
import Route from "@ember/routing/route";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import DiscourseRoute from "discourse/routes/discourse";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import Badge from "discourse/models/badge";
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import Route from "@ember/routing/route";
|
||||
export default Route.extend({
|
||||
model(params) {
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import Route from "@ember/routing/route";
|
||||
export default Route.extend({
|
||||
model(params) {
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import Route from "@ember/routing/route";
|
||||
import { scrollTop } from "discourse/mixins/scroll-top";
|
||||
import { THEMES, COMPONENTS } from "admin/models/theme";
|
||||
|
||||
@ -9,18 +9,12 @@ export default Route.extend({
|
||||
const controller = this.controllerFor("adminSiteSettings");
|
||||
this.transitionTo("adminSiteSettingsCategory", "plugins").then(() => {
|
||||
if (plugin) {
|
||||
const siteSettingFilter = plugin.get("enabled_setting_filter");
|
||||
const match = /^(.*)_enabled/.exec(plugin.get("enabled_setting"));
|
||||
const filter = siteSettingFilter || match[1];
|
||||
|
||||
if (filter) {
|
||||
// filterContent() is normally on a debounce from typing.
|
||||
// Because we don't want the default of "All Results", we tell it
|
||||
// to skip the next debounce.
|
||||
controller.set("filter", filter);
|
||||
controller.set("_skipBounce", true);
|
||||
controller.filterContentNow("plugins");
|
||||
}
|
||||
// filterContent() is normally on a debounce from typing.
|
||||
// Because we don't want the default of "All Results", we tell it
|
||||
// to skip the next debounce.
|
||||
controller.set("filter", `plugin:${plugin.id}`);
|
||||
controller.set("_skipBounce", true);
|
||||
controller.filterContentNow("plugins");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import EmberObject from "@ember/object";
|
||||
import DiscourseRoute from "discourse/routes/discourse";
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@ import DiscourseRoute from "discourse/routes/discourse";
|
||||
export default DiscourseRoute.extend({
|
||||
queryParams: {
|
||||
order: { refreshModel: true },
|
||||
ascending: { refreshModel: true }
|
||||
asc: { refreshModel: true }
|
||||
},
|
||||
|
||||
// TODO: this has been introduced to fix a bug in admin-users-list-show
|
||||
@ -18,7 +18,7 @@ export default DiscourseRoute.extend({
|
||||
if (controller) {
|
||||
controller.setProperties({
|
||||
order: transition.to.queryParams.order,
|
||||
ascending: transition.to.queryParams.ascending,
|
||||
asc: transition.to.queryParams.asc,
|
||||
query: params.filter,
|
||||
refreshing: false
|
||||
});
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import EmberObject from "@ember/object";
|
||||
import DiscourseRoute from "discourse/routes/discourse";
|
||||
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
import { get } from "@ember/object";
|
||||
import { isEmpty } from "@ember/utils";
|
||||
import DiscourseRoute from "discourse/routes/discourse";
|
||||
|
||||
export default DiscourseRoute.extend({
|
||||
@ -15,7 +14,7 @@ export default DiscourseRoute.extend({
|
||||
},
|
||||
|
||||
setupController(controller, model) {
|
||||
if (model.get("isNew") || isEmpty(model.get("web_hook_event_types"))) {
|
||||
if (model.get("isNew")) {
|
||||
model.set("web_hook_event_types", controller.get("defaultEventTypes"));
|
||||
}
|
||||
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import DiscourseRoute from "discourse/routes/discourse";
|
||||
|
||||
export default DiscourseRoute.extend({
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
// A service that can act as a bridge between the front end Discourse application
|
||||
// and the admin application. Use this if you need front end code to access admin
|
||||
// modules. Inject it optionally, and if it exists go to town!
|
||||
|
||||
@ -1 +0,0 @@
|
||||
<span class="header-contents">{{i18n this.i18nKey}}{{chevronIcon}}</span>
|
||||
@ -1,5 +1,6 @@
|
||||
<label>
|
||||
{{input type="checkbox" checked=enabled}}
|
||||
<span>{{html-safe setting.description}}</span>
|
||||
{{setting-validation-message message=validationMessage}}
|
||||
</label>
|
||||
|
||||
{{setting-validation-message message=validationMessage}}
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
{{#if popular}}
|
||||
<div class="popular-theme-items">
|
||||
{{#each themes as |theme|}}
|
||||
<div class="popular-theme-item">
|
||||
<div class="popular-theme-item" data-name={{theme.name}}>
|
||||
<div class="popular-theme-name">
|
||||
<a href={{theme.meta_url}} rel="noopener noreferrer" target="_blank">
|
||||
{{#if theme.component}}
|
||||
|
||||
@ -32,6 +32,9 @@
|
||||
{{#if pl.category_id}}
|
||||
{{category-link pl.category}}
|
||||
{{/if}}
|
||||
{{#if pl.tag_id}}
|
||||
<a href={{pl.tag_url}}>{{pl.tag_name}}</a>
|
||||
{{/if}}
|
||||
{{#if pl.external_url}}
|
||||
{{#if pl.linkIsExternal}}
|
||||
{{d-icon "external-link-alt"}}
|
||||
|
||||
@ -47,7 +47,7 @@
|
||||
</td>
|
||||
<td class="settings">
|
||||
{{#if currentUser.admin}}
|
||||
{{#if plugin.enabled_setting}}
|
||||
{{#if plugin.has_settings}}
|
||||
{{d-button class="btn-default" action=(route-action "showSettings") actionParam=plugin icon="cog" label="admin.plugins.change_settings_short"}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
@ -33,7 +33,7 @@
|
||||
<tr>
|
||||
<th>{{i18n "admin.user.tl3_requirements.topics_replied_to"}}</th>
|
||||
<td>{{check-icon model.tl3Requirements.met.topics_replied_to}}</td>
|
||||
<td>{{model.tl3Requirements.num_topics_replied_to}}</td>
|
||||
<td>{{#if model.tl3Requirements.capped_topics_replied_to}}≥ {{/if}}{{model.tl3Requirements.num_topics_replied_to}}</td>
|
||||
<td>{{model.tl3Requirements.min_topics_replied_to}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user