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-11-04 00:51:14 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-11-04 00:51:14 +0300
commit03f12181c510ce8c95edfd312119a225803816f8 (patch)
tree50375bd8968fc1ca889b8b6f08599e00782eb47c /app
parentca14bd8fad7daf966a12066e33fbb76bd98ee4d6 (diff)
Add latest changes from gitlab-org/gitlab@13-4-stable-eev13.4.6
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/lib/utils/datetime_utility.js18
-rw-r--r--app/assets/javascripts/vue_shared/components/timezone_dropdown.vue11
-rw-r--r--app/models/clusters/applications/fluentd.rb6
-rw-r--r--app/models/clusters/applications/ingress.rb7
-rw-r--r--app/models/clusters/applications/prometheus.rb8
5 files changed, 38 insertions, 12 deletions
diff --git a/app/assets/javascripts/lib/utils/datetime_utility.js b/app/assets/javascripts/lib/utils/datetime_utility.js
index b193a8b2c9a..611c97929a7 100644
--- a/app/assets/javascripts/lib/utils/datetime_utility.js
+++ b/app/assets/javascripts/lib/utils/datetime_utility.js
@@ -643,6 +643,24 @@ export const secondsToMilliseconds = seconds => seconds * 1000;
export const secondsToDays = seconds => Math.round(seconds / 86400);
/**
+ * Converts a numeric utc offset in seconds to +/- hours
+ * ie -32400 => -9 hours
+ * ie -12600 => -3.5 hours
+ *
+ * @param {Number} offset UTC offset in seconds as a integer
+ *
+ * @return {String} the + or - offset in hours
+ */
+export const secondsToHours = offset => {
+ const parsed = parseInt(offset, 10);
+ if (Number.isNaN(parsed) || parsed === 0) {
+ return `0`;
+ }
+ const num = offset / 3600;
+ return parseInt(num, 10) !== num ? num.toFixed(1) : num;
+};
+
+/**
* Returns the date n days after the date provided
*
* @param {Date} date the initial date
diff --git a/app/assets/javascripts/vue_shared/components/timezone_dropdown.vue b/app/assets/javascripts/vue_shared/components/timezone_dropdown.vue
index 135b9842cbf..43420e393b2 100644
--- a/app/assets/javascripts/vue_shared/components/timezone_dropdown.vue
+++ b/app/assets/javascripts/vue_shared/components/timezone_dropdown.vue
@@ -2,6 +2,7 @@
import { GlDropdown, GlDeprecatedDropdownItem, GlSearchBoxByType, GlIcon } from '@gitlab/ui';
import { __ } from '~/locale';
import autofocusonshow from '~/vue_shared/directives/autofocusonshow';
+import { secondsToHours } from '~/lib/utils/datetime_utility';
export default {
name: 'TimezoneDropdown',
@@ -59,16 +60,8 @@ export default {
isSelected(timezone) {
return this.value === timezone.formattedTimezone;
},
- formatUtcOffset(offset) {
- const parsed = parseInt(offset, 10);
- if (Number.isNaN(parsed) || parsed === 0) {
- return `0`;
- }
- const prefix = offset > 0 ? '+' : '-';
- return `${prefix}${Math.abs(offset / 3600)}`;
- },
formatTimezone(item) {
- return `[UTC ${this.formatUtcOffset(item.offset)}] ${item.name}`;
+ return `[UTC ${secondsToHours(item.offset)}] ${item.name}`;
},
},
};
diff --git a/app/models/clusters/applications/fluentd.rb b/app/models/clusters/applications/fluentd.rb
index 3fd6e870edc..c608d37be77 100644
--- a/app/models/clusters/applications/fluentd.rb
+++ b/app/models/clusters/applications/fluentd.rb
@@ -22,7 +22,11 @@ module Clusters
validate :has_at_least_one_log_enabled?
def chart
- 'stable/fluentd'
+ 'fluentd/fluentd'
+ end
+
+ def repository
+ 'https://gitlab-org.gitlab.io/cluster-integration/helm-stable-archive'
end
def install_command
diff --git a/app/models/clusters/applications/ingress.rb b/app/models/clusters/applications/ingress.rb
index 1d08f38a2f1..d5412714858 100644
--- a/app/models/clusters/applications/ingress.rb
+++ b/app/models/clusters/applications/ingress.rb
@@ -46,7 +46,11 @@ module Clusters
end
def chart
- 'stable/nginx-ingress'
+ "#{name}/nginx-ingress"
+ end
+
+ def repository
+ 'https://gitlab-org.gitlab.io/cluster-integration/helm-stable-archive'
end
def values
@@ -60,6 +64,7 @@ module Clusters
def install_command
Gitlab::Kubernetes::Helm::InstallCommand.new(
name: name,
+ repository: repository,
version: VERSION,
rbac: cluster.platform_kubernetes_rbac?,
chart: chart,
diff --git a/app/models/clusters/applications/prometheus.rb b/app/models/clusters/applications/prometheus.rb
index dd6a4144608..7679296699f 100644
--- a/app/models/clusters/applications/prometheus.rb
+++ b/app/models/clusters/applications/prometheus.rb
@@ -51,7 +51,11 @@ module Clusters
end
def chart
- 'stable/prometheus'
+ "#{name}/prometheus"
+ end
+
+ def repository
+ 'https://gitlab-org.gitlab.io/cluster-integration/helm-stable-archive'
end
def service_name
@@ -65,6 +69,7 @@ module Clusters
def install_command
Gitlab::Kubernetes::Helm::InstallCommand.new(
name: name,
+ repository: repository,
version: VERSION,
rbac: cluster.platform_kubernetes_rbac?,
chart: chart,
@@ -76,6 +81,7 @@ module Clusters
def patch_command(values)
::Gitlab::Kubernetes::Helm::PatchCommand.new(
name: name,
+ repository: repository,
version: version,
rbac: cluster.platform_kubernetes_rbac?,
chart: chart,