diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-28 18:13:55 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-28 18:13:55 +0300 |
commit | 8188ca655a7437381491e565406869c747c1b40a (patch) | |
tree | c9f4295b0ffe7867d9a037d03c926ae65574cb7c /app/assets/javascripts/repository | |
parent | 4eac7e06bd6fc1c90a20ae36412b34ac73a15cb2 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/repository')
-rw-r--r-- | app/assets/javascripts/repository/components/blob_viewers/csv_viewer.vue | 26 | ||||
-rw-r--r-- | app/assets/javascripts/repository/components/blob_viewers/index.js | 1 |
2 files changed, 27 insertions, 0 deletions
diff --git a/app/assets/javascripts/repository/components/blob_viewers/csv_viewer.vue b/app/assets/javascripts/repository/components/blob_viewers/csv_viewer.vue new file mode 100644 index 00000000000..86a0bb9fad0 --- /dev/null +++ b/app/assets/javascripts/repository/components/blob_viewers/csv_viewer.vue @@ -0,0 +1,26 @@ +<script> +import CsvViewer from '~/blob/csv/csv_viewer.vue'; + +export default { + components: { + CsvViewer, + }, + props: { + blob: { + type: Object, + required: true, + }, + }, + data() { + return { + url: this.blob.rawPath, + }; + }, +}; +</script> + +<template> + <div> + <csv-viewer :csv="url" remote-file data-testid="csv" /> + </div> +</template> diff --git a/app/assets/javascripts/repository/components/blob_viewers/index.js b/app/assets/javascripts/repository/components/blob_viewers/index.js index e942f59e7d8..11fc4b90f7e 100644 --- a/app/assets/javascripts/repository/components/blob_viewers/index.js +++ b/app/assets/javascripts/repository/components/blob_viewers/index.js @@ -1,4 +1,5 @@ const viewers = { + csv: () => import('./csv_viewer.vue'), download: () => import('./download_viewer.vue'), image: () => import('./image_viewer.vue'), video: () => import('./video_viewer.vue'), |