Change order of snapshots versions

This commit is contained in:
Mojca Lorber 2020-05-25 12:15:24 +02:00
parent 981839eb6f
commit 76a1f73989
2 changed files with 2 additions and 2 deletions

View file

@ -342,7 +342,7 @@ var MyModuleRepositories = (function() {
dataType: 'json',
success: function(data) {
let snapshotItem = $(data.html);
FULL_VIEW_MODAL.find('.snapshots-container-scrollbody').append(snapshotItem);
FULL_VIEW_MODAL.find('.snapshots-container-scrollbody').prepend(snapshotItem);
setTimeout(function() {
checkSnapshotStatus(snapshotItem);
}, STATUS_POLLING_INTERVAL);

View file

@ -74,7 +74,7 @@ class MyModuleRepositorySnapshotsController < ApplicationController
@repository_snapshots = @my_module.repository_snapshots
.where(parent_id: params[:repository_id])
.order(:updated_at)
.order(updated_at: :desc)
render json: {
html: render_to_string(
partial: 'my_modules/repositories/full_view_sidebar',