summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/logs
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2021-01-20 13:34:23 -0600
committerRobert Speicher <rspeicher@gmail.com>2021-01-20 13:34:23 -0600
commit6438df3a1e0fb944485cebf07976160184697d72 (patch)
tree00b09bfd170e77ae9391b1a2f5a93ef6839f2597 /app/assets/javascripts/logs
parent42bcd54d971da7ef2854b896a7b34f4ef8601067 (diff)
downloadgitlab-ce-6438df3a1e0fb944485cebf07976160184697d72.tar.gz
Add latest changes from gitlab-org/gitlab@13-8-stable-eev13.8.0-rc42
Diffstat (limited to 'app/assets/javascripts/logs')
-rw-r--r--app/assets/javascripts/logs/components/environment_logs.vue8
-rw-r--r--app/assets/javascripts/logs/components/log_advanced_filters.vue2
-rw-r--r--app/assets/javascripts/logs/logs_tracking_helper.js2
-rw-r--r--app/assets/javascripts/logs/stores/actions.js8
-rw-r--r--app/assets/javascripts/logs/stores/getters.js4
-rw-r--r--app/assets/javascripts/logs/utils.js2
6 files changed, 11 insertions, 15 deletions
diff --git a/app/assets/javascripts/logs/components/environment_logs.vue b/app/assets/javascripts/logs/components/environment_logs.vue
index f7c0bd5ae13..a114b3c7d4d 100644
--- a/app/assets/javascripts/logs/components/environment_logs.vue
+++ b/app/assets/javascripts/logs/components/environment_logs.vue
@@ -246,9 +246,7 @@ export default {
</div>{{trace}}
</code></pre>
</template>
- <template #default
- ><div></div
- ></template>
+ <template #default><div></div></template>
</gl-infinite-scroll>
<div ref="logFooter" class="py-2 px-3 text-white bg-secondary-900">
@@ -262,9 +260,7 @@ export default {
>
<template #fetched>{{ logs.lines.length }}</template>
</gl-sprintf>
- <template v-else>
- {{ s__('Environments|Currently showing all results.') }}</template
- >
+ <template v-else> {{ s__('Environments|Currently showing all results.') }}</template>
</div>
</div>
</template>
diff --git a/app/assets/javascripts/logs/components/log_advanced_filters.vue b/app/assets/javascripts/logs/components/log_advanced_filters.vue
index 49bb80b3bfd..37fc4dc3735 100644
--- a/app/assets/javascripts/logs/components/log_advanced_filters.vue
+++ b/app/assets/javascripts/logs/components/log_advanced_filters.vue
@@ -42,7 +42,7 @@ export default {
*/
podOptions() {
if (this.pods.options.length) {
- return this.pods.options.map(podName => ({ value: podName, title: podName }));
+ return this.pods.options.map((podName) => ({ value: podName, title: podName }));
}
return null;
},
diff --git a/app/assets/javascripts/logs/logs_tracking_helper.js b/app/assets/javascripts/logs/logs_tracking_helper.js
index 91b0392f71f..26043d646b0 100644
--- a/app/assets/javascripts/logs/logs_tracking_helper.js
+++ b/app/assets/javascripts/logs/logs_tracking_helper.js
@@ -8,7 +8,7 @@ import Tracking from '~/tracking';
* 3. Change the time range
* 4. Use the search bar
*/
-const trackLogs = label =>
+const trackLogs = (label) =>
Tracking.event(document.body.dataset.page, 'logs_view', {
label,
property: 'count',
diff --git a/app/assets/javascripts/logs/stores/actions.js b/app/assets/javascripts/logs/stores/actions.js
index 623516f349d..a26e6f694c9 100644
--- a/app/assets/javascripts/logs/stores/actions.js
+++ b/app/assets/javascripts/logs/stores/actions.js
@@ -11,14 +11,14 @@ const requestUntilData = (url, params) =>
backOff((next, stop) => {
axios
.get(url, { params })
- .then(res => {
+ .then((res) => {
if (res.status === httpStatusCodes.ACCEPTED) {
next();
return;
}
stop(res);
})
- .catch(err => {
+ .catch((err) => {
stop(err);
});
});
@@ -66,12 +66,12 @@ const requestLogsUntilData = ({ commit, state }) => {
const filtersToParams = (filters = []) => {
// Strings become part of the `search`
const search = filters
- .filter(f => typeof f === 'string')
+ .filter((f) => typeof f === 'string')
.join(' ')
.trim();
// null podName to show all pods
- const podName = filters.find(f => f?.type === TOKEN_TYPE_POD_NAME)?.value?.data ?? null;
+ const podName = filters.find((f) => f?.type === TOKEN_TYPE_POD_NAME)?.value?.data ?? null;
return { search, podName };
};
diff --git a/app/assets/javascripts/logs/stores/getters.js b/app/assets/javascripts/logs/stores/getters.js
index dc392af8381..836e6e82385 100644
--- a/app/assets/javascripts/logs/stores/getters.js
+++ b/app/assets/javascripts/logs/stores/getters.js
@@ -3,9 +3,9 @@ import { formatDate } from '../utils';
const mapTrace = ({ timestamp = null, pod = '', message = '' }) =>
[timestamp ? formatDate(timestamp) : '', pod, message].join(' | ');
-export const trace = state => state.logs.lines.map(mapTrace).join('\n');
+export const trace = (state) => state.logs.lines.map(mapTrace).join('\n');
-export const showAdvancedFilters = state => {
+export const showAdvancedFilters = (state) => {
if (state.environments.current) {
const environment = state.environments.options.find(
({ name }) => name === state.environments.current,
diff --git a/app/assets/javascripts/logs/utils.js b/app/assets/javascripts/logs/utils.js
index 880f762e225..8e21863dd0c 100644
--- a/app/assets/javascripts/logs/utils.js
+++ b/app/assets/javascripts/logs/utils.js
@@ -22,4 +22,4 @@ export const getTimeRange = (seconds = 0) => {
};
};
-export const formatDate = timestamp => dateFormat(timestamp, dateFormatMask);
+export const formatDate = (timestamp) => dateFormat(timestamp, dateFormatMask);