Skip to content

Commit

Permalink
Merge pull request bigbluebutton#971 from bigbluebutton/v2.5-alpha
Browse files Browse the repository at this point in the history
Release v2.5
  • Loading branch information
ffdixon authored Mar 2, 2020
2 parents 984e5cc + 0092a28 commit 2af1f72
Show file tree
Hide file tree
Showing 82 changed files with 2,147 additions and 360 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ tmp
/db/**/*.sqlite3
/db/**/*.sqlite3-journal
/db/production
/db/production-postgres
public/assets
public/b
coverage/
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ vendor/bundle

# Ignore production paths.
/db/production
/db/production-postgres

# Ignore all logfiles and tempfiles.
/log/*
Expand Down
62 changes: 43 additions & 19 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,34 +1,58 @@
FROM ruby:2.5
FROM ruby:2.5.1-alpine AS base

# Install app dependencies.
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev curl

ADD https://dl.yarnpkg.com/debian/pubkey.gpg /tmp/yarn-pubkey.gpg

RUN apt-key add /tmp/yarn-pubkey.gpg && rm /tmp/yarn-pubkey.gpg && \
echo 'deb http://dl.yarnpkg.com/debian/ stable main' > /etc/apt/sources.list.d/yarn.list && \
curl -sL https://deb.nodesource.com/setup_10.x | bash - && \
apt-get update && apt-get install -y nodejs yarn

# Set an environment variable for the install location.
ENV RAILS_ROOT /usr/src/app
# Set a variable for the install location.
ARG RAILS_ROOT=/usr/src/app
# Set Rails environment.
ENV RAILS_ENV production
ENV BUNDLE_APP_CONFIG="$RAILS_ROOT/.bundle"

# Make the directory and set as working.
RUN mkdir -p $RAILS_ROOT
WORKDIR $RAILS_ROOT

# Set Rails environment.
ENV RAILS_ENV production
ARG BUILD_PACKAGES="build-base curl-dev git"
ARG DEV_PACKAGES="postgresql-dev sqlite-libs sqlite-dev yaml-dev zlib-dev nodejs yarn"
ARG RUBY_PACKAGES="tzdata"

# Install app dependencies.
RUN apk update \
&& apk upgrade \
&& apk add --update --no-cache $BUILD_PACKAGES $DEV_PACKAGES $RUBY_PACKAGES

COPY Gemfile* ./
RUN bundle install --without development test --deployment --clean
COPY Gemfile Gemfile.lock $RAILS_ROOT/

RUN bundle config --global frozen 1 \
&& bundle install --deployment --without development:test:assets -j4 --path=vendor/bundle \
&& rm -rf vendor/bundle/ruby/2.5.0/cache/*.gem \
&& find vendor/bundle/ruby/2.5.0/gems/ -name "*.c" -delete \
&& find vendor/bundle/ruby/2.5.0/gems/ -name "*.o" -delete

# Adding project files.
COPY . .

# Precompile assets
RUN SECRET_KEY_BASE="$(bundle exec rake secret)" bundle exec rake assets:clean
RUN SECRET_KEY_BASE="$(bundle exec rake secret)" bundle exec rake assets:precompile
# Remove folders not needed in resulting image
RUN rm -rf tmp/cache spec

############### Build step done ###############

FROM ruby:2.5.1-alpine

# Set a variable for the install location.
ARG RAILS_ROOT=/usr/src/app
ARG PACKAGES="tzdata curl postgresql-client sqlite-libs yarn nodejs bash"

ENV RAILS_ENV=production
ENV BUNDLE_APP_CONFIG="$RAILS_ROOT/.bundle"

WORKDIR $RAILS_ROOT

RUN apk update \
&& apk upgrade \
&& apk add --update --no-cache $PACKAGES


COPY --from=base $RAILS_ROOT $RAILS_ROOT

# Expose port 80.
EXPOSE 80
Expand Down
5 changes: 3 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.2'

# See https://github.com/rails/execjs#readme for more supported runtimes
gem 'mini_racer', platforms: :ruby
# gem 'mini_racer', platforms: :ruby

# Use jquery as the JavaScript library
gem 'jquery-rails', '~> 4.3.3'
Expand Down Expand Up @@ -77,6 +77,7 @@ gem 'cancancan', '~> 2.0'
group :production do
# Use a postgres database in production.
gem 'pg', '~> 0.18'
gem 'sequel'

# For a better logging library in production
gem "lograge"
Expand Down Expand Up @@ -121,7 +122,7 @@ end
gem 'remote_syslog_logger'

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
gem 'tzinfo-data'

gem 'coveralls', require: false

Expand Down
8 changes: 4 additions & 4 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ GEM
railties (>= 3.2.16)
json (2.2.0)
jwt (2.2.1)
libv8 (7.3.492.27.1)
listen (3.0.8)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
Expand All @@ -173,8 +172,6 @@ GEM
mimemagic (0.3.3)
mini_mime (1.0.2)
mini_portile2 (2.4.0)
mini_racer (0.2.6)
libv8 (>= 6.9.411)
minitest (5.11.3)
msgpack (1.3.0)
multi_json (1.13.1)
Expand Down Expand Up @@ -295,6 +292,7 @@ GEM
sprockets (> 3.0)
sprockets-rails
tilt
sequel (5.29.0)
shoulda-matchers (3.1.3)
activesupport (>= 4.0.0)
simplecov (0.16.1)
Expand Down Expand Up @@ -326,6 +324,8 @@ GEM
turbolinks-source (5.2.0)
tzinfo (1.2.5)
thread_safe (~> 0.1)
tzinfo-data (1.2019.3)
tzinfo (>= 1.0.0)
uglifier (4.1.20)
execjs (>= 0.3.0, < 3)
unicode-display_width (1.6.0)
Expand Down Expand Up @@ -369,7 +369,6 @@ DEPENDENCIES
jquery-ui-rails
listen (~> 3.0.5)
lograge
mini_racer
net-ldap
omniauth
omniauth-bn-launcher!
Expand All @@ -389,6 +388,7 @@ DEPENDENCIES
rspec-rails (~> 3.7)
rubocop
sassc-rails
sequel
shoulda-matchers (~> 3.1)
spring
spring-watcher-listen (~> 2.0.0)
Expand Down
48 changes: 48 additions & 0 deletions app/assets/javascripts/admins.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,49 @@ $(document).on('turbolinks:load', function(){

updateTabParams(this.id)
})

$('.selectpicker').selectpicker({
liveSearchPlaceholder: getLocalizedString('javascript.search.start')
});
// Fixes turbolinks issue with bootstrap select
$(window).trigger('load.bs.select.data-api');

// Display merge accounts modal with correct info
$(".merge-user").click(function() {
// Update the path of save button
$("#merge-save-access").attr("data-path", $(this).data("path"))

let userInfo = $(this).data("info")

$("#merge-to").html("<span>" + userInfo.name + "</span>" + "<span class='text-muted d-block'>" + userInfo.email + "</span>" + "<span class='text-muted d-block'>" + userInfo.uid + "</span>")

})

$("#mergeUserModal").on("show.bs.modal", function() {
$(".selectpicker").selectpicker('val','')
})

$(".bootstrap-select").on("click", function() {
$(".bs-searchbox").siblings().hide()
})

$(".bs-searchbox input").on("input", function() {
if ($(".bs-searchbox input").val() == '' || $(".bs-searchbox input").val().length < 3) {
$(".bs-searchbox").siblings().hide()
} else {
$(".bs-searchbox").siblings().show()
}
})

// User selects an option from the Room Access dropdown
$(".bootstrap-select").on("changed.bs.select", function(){
// Get the uid of the selected user
let user = $(".selectpicker").selectpicker('val')
if (user != "") {
userInfo = JSON.parse(user)
$("#merge-from").html("<span>" + userInfo.name + "</span>" + "<span class='text-muted d-block'>" + userInfo.email + "</span>" + "<span id='from-uid' class='text-muted d-block'>" + userInfo.uid + "</span>")
}
})
}
else if(action == "site_settings"){
loadColourSelectors()
Expand Down Expand Up @@ -79,6 +122,11 @@ function changeBrandingImage(path) {
$.post(path, {value: url})
}

function mergeUsers() {
let userToMerge = $("#from-uid").text()
$.post($("#merge-save-access").data("path"), {merge: userToMerge})
}

// Filters by role
function filterRole(role) {
var search = new URL(location.href).searchParams.get('search')
Expand Down
1 change: 1 addition & 0 deletions app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,5 @@
//= require jquery-ui/widget
//= require jquery-ui/widgets/sortable
//= require pickr.min.js
//= require bootstrap-select.min.js
//= require_tree .
Loading

0 comments on commit 2af1f72

Please sign in to comment.