summaryrefslogtreecommitdiff
path: root/app/assets
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-09-20 09:06:17 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-09-20 09:06:17 +0000
commit8ac91ecfd1bb445a0a1572b3c0885c41c9037e8a (patch)
tree4b8c9d2a99ad50ef84421b57758869863ea477a2 /app/assets
parent7e20809103e1f9c0c96c3a96705224c81bf448d5 (diff)
downloadgitlab-ce-8ac91ecfd1bb445a0a1572b3c0885c41c9037e8a.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets')
-rw-r--r--app/assets/javascripts/blob/balsamiq/balsamiq_viewer.js37
-rw-r--r--app/assets/stylesheets/pages/projects.scss7
2 files changed, 23 insertions, 21 deletions
diff --git a/app/assets/javascripts/blob/balsamiq/balsamiq_viewer.js b/app/assets/javascripts/blob/balsamiq/balsamiq_viewer.js
index 75777b910ca..87c8568802e 100644
--- a/app/assets/javascripts/blob/balsamiq/balsamiq_viewer.js
+++ b/app/assets/javascripts/blob/balsamiq/balsamiq_viewer.js
@@ -1,5 +1,7 @@
import sqljs from 'sql.js';
import { template as _template } from 'underscore';
+import axios from '~/lib/utils/axios_utils';
+import { successCodes } from '~/lib/utils/http_status';
const PREVIEW_TEMPLATE = _template(`
<div class="card">
@@ -16,30 +18,25 @@ class BalsamiqViewer {
}
loadFile(endpoint) {
- return new Promise((resolve, reject) => {
- const xhr = new XMLHttpRequest();
-
- xhr.open('GET', endpoint, true);
- xhr.responseType = 'arraybuffer';
- xhr.onload = loadEvent => this.fileLoaded(loadEvent, resolve, reject);
- xhr.onerror = reject;
-
- xhr.send();
- });
- }
-
- fileLoaded(loadEvent, resolve, reject) {
- if (loadEvent.target.status !== 200) return reject();
-
- this.renderFile(loadEvent);
-
- return resolve();
+ return axios
+ .get(endpoint, {
+ responseType: 'arraybuffer',
+ validateStatus(status) {
+ return status !== successCodes.OK;
+ },
+ })
+ .then(({ data }) => {
+ this.renderFile(data);
+ })
+ .catch(e => {
+ throw new Error(e);
+ });
}
- renderFile(loadEvent) {
+ renderFile(fileBuffer) {
const container = document.createElement('ul');
- this.initDatabase(loadEvent.target.response);
+ this.initDatabase(fileBuffer);
const previews = this.getPreviews();
previews.forEach(preview => {
diff --git a/app/assets/stylesheets/pages/projects.scss b/app/assets/stylesheets/pages/projects.scss
index 801e9e7204c..7577112cb0e 100644
--- a/app/assets/stylesheets/pages/projects.scss
+++ b/app/assets/stylesheets/pages/projects.scss
@@ -877,11 +877,16 @@ pre.light-well {
flex-direction: column;
// Disable Flexbox for admin page
- &.admin-projects {
+ &.admin-projects,
+ &.group-settings-projects {
display: block;
.project-row {
display: block;
+
+ .description > p {
+ margin-bottom: 0;
+ }
}
}