Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-09-22 03:09:59 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-09-22 03:09:59 +0300
commitfe53f9c3582f3a13e4e38d3804aaf53c3829b3b9 (patch)
tree821fdc9b41de9656fc7ba4c58a7cf8b6f61354d1 /app
parent724ca423e0d9aafcb9e1abcb69f4f7d4c9941541 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/packages/list/components/packages_sort.vue2
-rw-r--r--app/assets/javascripts/packages/list/constants.js28
-rw-r--r--app/assets/javascripts/packages/list/utils.js5
-rw-r--r--app/views/projects/feature_flags/_errors.html.haml4
4 files changed, 11 insertions, 28 deletions
diff --git a/app/assets/javascripts/packages/list/components/packages_sort.vue b/app/assets/javascripts/packages/list/components/packages_sort.vue
index fa8f4f39d54..47e51bbdca5 100644
--- a/app/assets/javascripts/packages/list/components/packages_sort.vue
+++ b/app/assets/javascripts/packages/list/components/packages_sort.vue
@@ -51,7 +51,7 @@ export default {
<gl-sorting-item
v-for="item in sortableFields"
ref="packageListSortItem"
- :key="item.key"
+ :key="item.orderBy"
@click="onSortItemClick(item.orderBy)"
>
{{ item.label }}
diff --git a/app/assets/javascripts/packages/list/constants.js b/app/assets/javascripts/packages/list/constants.js
index 0ff8c86362d..366b674ae72 100644
--- a/app/assets/javascripts/packages/list/constants.js
+++ b/app/assets/javascripts/packages/list/constants.js
@@ -15,7 +15,7 @@ export const GROUP_PAGE_TYPE = 'groups';
export const LIST_KEY_NAME = 'name';
export const LIST_KEY_PROJECT = 'project_path';
export const LIST_KEY_VERSION = 'version';
-export const LIST_KEY_PACKAGE_TYPE = 'package_type';
+export const LIST_KEY_PACKAGE_TYPE = 'type';
export const LIST_KEY_CREATED_AT = 'created_at';
export const LIST_KEY_ACTIONS = 'actions';
@@ -23,47 +23,35 @@ export const LIST_LABEL_NAME = __('Name');
export const LIST_LABEL_PROJECT = __('Project');
export const LIST_LABEL_VERSION = __('Version');
export const LIST_LABEL_PACKAGE_TYPE = __('Type');
-export const LIST_LABEL_CREATED_AT = __('Created');
+export const LIST_LABEL_CREATED_AT = __('Published');
export const LIST_LABEL_ACTIONS = '';
-export const LIST_ORDER_BY_PACKAGE_TYPE = 'type';
-
export const ASCENDING_ODER = 'asc';
export const DESCENDING_ORDER = 'desc';
// The following is not translated because it is used to build a JavaScript exception error message
export const MISSING_DELETE_PATH_ERROR = 'Missing delete_api_path link';
-export const TABLE_HEADER_FIELDS = [
+export const SORT_FIELDS = [
{
- key: LIST_KEY_NAME,
- label: LIST_LABEL_NAME,
orderBy: LIST_KEY_NAME,
- class: ['text-left'],
+ label: LIST_LABEL_NAME,
},
{
- key: LIST_KEY_PROJECT,
- label: LIST_LABEL_PROJECT,
orderBy: LIST_KEY_PROJECT,
- class: ['text-left'],
+ label: LIST_LABEL_PROJECT,
},
{
- key: LIST_KEY_VERSION,
- label: LIST_LABEL_VERSION,
orderBy: LIST_KEY_VERSION,
- class: ['text-center'],
+ label: LIST_LABEL_VERSION,
},
{
- key: LIST_KEY_PACKAGE_TYPE,
+ orderBy: LIST_KEY_PACKAGE_TYPE,
label: LIST_LABEL_PACKAGE_TYPE,
- orderBy: LIST_ORDER_BY_PACKAGE_TYPE,
- class: ['text-center'],
},
{
- key: LIST_KEY_CREATED_AT,
- label: LIST_LABEL_CREATED_AT,
orderBy: LIST_KEY_CREATED_AT,
- class: ['text-center'],
+ label: LIST_LABEL_CREATED_AT,
},
];
diff --git a/app/assets/javascripts/packages/list/utils.js b/app/assets/javascripts/packages/list/utils.js
index 98d78db8706..6a300d7bfe6 100644
--- a/app/assets/javascripts/packages/list/utils.js
+++ b/app/assets/javascripts/packages/list/utils.js
@@ -1,7 +1,6 @@
-import { LIST_KEY_PROJECT, TABLE_HEADER_FIELDS } from './constants';
+import { LIST_KEY_PROJECT, SORT_FIELDS } from './constants';
-export default isGroupPage =>
- TABLE_HEADER_FIELDS.filter(f => f.key !== LIST_KEY_PROJECT || isGroupPage);
+export default isGroupPage => SORT_FIELDS.filter(f => f.key !== LIST_KEY_PROJECT || isGroupPage);
/**
* A small util function that works out if the delete action has deleted the
diff --git a/app/views/projects/feature_flags/_errors.html.haml b/app/views/projects/feature_flags/_errors.html.haml
deleted file mode 100644
index a32245640be..00000000000
--- a/app/views/projects/feature_flags/_errors.html.haml
+++ /dev/null
@@ -1,4 +0,0 @@
-#error_explanation
- .alert.alert-danger
- - @feature_flag.errors.full_messages.each do |message|
- %p= message