summaryrefslogtreecommitdiff
path: root/app/assets
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-24 01:43:31 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-24 01:43:31 +0000
commite20a1cde5d740fbc9f4d033786a8cd5ad7eb8b4d (patch)
treecf76b0527f1909eaf1ecac057a4ccc7591cce4f6 /app/assets
parent5fc725def41e6973e92bc32095774edd60fd154f (diff)
downloadgitlab-ce-e20a1cde5d740fbc9f4d033786a8cd5ad7eb8b4d.tar.gz
Add latest changes from gitlab-org/gitlab@12-10-stable-ee
Diffstat (limited to 'app/assets')
-rw-r--r--app/assets/javascripts/diffs/store/getters_versions_dropdowns.js6
-rw-r--r--app/assets/javascripts/ide/stores/mutations.js5
-rw-r--r--app/assets/javascripts/pages/admin/services/edit/index.js9
-rw-r--r--app/assets/javascripts/pages/groups/settings/ci_cd/show/index.js3
-rw-r--r--app/assets/javascripts/pages/groups/settings/repository/show/index.js9
-rw-r--r--app/assets/javascripts/pages/projects/settings/ci_cd/show/index.js4
6 files changed, 28 insertions, 8 deletions
diff --git a/app/assets/javascripts/diffs/store/getters_versions_dropdowns.js b/app/assets/javascripts/diffs/store/getters_versions_dropdowns.js
index dd682060b4b..acc8874dad8 100644
--- a/app/assets/javascripts/diffs/store/getters_versions_dropdowns.js
+++ b/app/assets/javascripts/diffs/store/getters_versions_dropdowns.js
@@ -39,7 +39,11 @@ export const diffCompareDropdownTargetVersions = (state, getters) => {
...v,
};
};
- return [...state.mergeRequestDiffs.slice(1).map(formatVersion), baseVersion, headVersion];
+
+ if (gon.features?.diffCompareWithHead) {
+ return [...state.mergeRequestDiffs.slice(1).map(formatVersion), baseVersion, headVersion];
+ }
+ return [...state.mergeRequestDiffs.slice(1).map(formatVersion), baseVersion];
};
export const diffCompareDropdownSourceVersions = (state, getters) => {
diff --git a/app/assets/javascripts/ide/stores/mutations.js b/app/assets/javascripts/ide/stores/mutations.js
index 49485f4d575..5d567d9b169 100644
--- a/app/assets/javascripts/ide/stores/mutations.js
+++ b/app/assets/javascripts/ide/stores/mutations.js
@@ -216,7 +216,12 @@ export default {
if (entry.type === 'blob') {
if (tempFile) {
+ // Since we only support one list of file changes, it's safe to just remove from both
+ // changed and staged. Otherwise, we'd need to somehow evaluate the difference between
+ // changed and HEAD.
+ // https://gitlab.com/gitlab-org/create-stage/-/issues/12669
state.changedFiles = state.changedFiles.filter(f => f.path !== path);
+ state.stagedFiles = state.stagedFiles.filter(f => f.path !== path);
} else {
state.changedFiles = state.changedFiles.concat(entry);
}
diff --git a/app/assets/javascripts/pages/admin/services/edit/index.js b/app/assets/javascripts/pages/admin/services/edit/index.js
new file mode 100644
index 00000000000..e5e80d2f566
--- /dev/null
+++ b/app/assets/javascripts/pages/admin/services/edit/index.js
@@ -0,0 +1,9 @@
+import IntegrationSettingsForm from '~/integrations/integration_settings_form';
+import initAlertsSettings from '~/alerts_service_settings';
+
+document.addEventListener('DOMContentLoaded', () => {
+ const integrationSettingsForm = new IntegrationSettingsForm('.js-integration-settings-form');
+ integrationSettingsForm.init();
+
+ initAlertsSettings(document.querySelector('.js-alerts-service-settings'));
+});
diff --git a/app/assets/javascripts/pages/groups/settings/ci_cd/show/index.js b/app/assets/javascripts/pages/groups/settings/ci_cd/show/index.js
index 1ef18b356f2..479c82265f2 100644
--- a/app/assets/javascripts/pages/groups/settings/ci_cd/show/index.js
+++ b/app/assets/javascripts/pages/groups/settings/ci_cd/show/index.js
@@ -1,13 +1,10 @@
import initSettingsPanels from '~/settings_panels';
import AjaxVariableList from '~/ci_variable_list/ajax_variable_list';
import initVariableList from '~/ci_variable_list';
-import DueDateSelectors from '~/due_date_select';
document.addEventListener('DOMContentLoaded', () => {
// Initialize expandable settings panels
initSettingsPanels();
- // eslint-disable-next-line no-new
- new DueDateSelectors();
if (gon.features.newVariablesUi) {
initVariableList();
diff --git a/app/assets/javascripts/pages/groups/settings/repository/show/index.js b/app/assets/javascripts/pages/groups/settings/repository/show/index.js
new file mode 100644
index 00000000000..f4b26ba81fe
--- /dev/null
+++ b/app/assets/javascripts/pages/groups/settings/repository/show/index.js
@@ -0,0 +1,9 @@
+import initSettingsPanels from '~/settings_panels';
+import DueDateSelectors from '~/due_date_select';
+
+document.addEventListener('DOMContentLoaded', () => {
+ // Initialize expandable settings panels
+ initSettingsPanels();
+
+ new DueDateSelectors(); // eslint-disable-line no-new
+});
diff --git a/app/assets/javascripts/pages/projects/settings/ci_cd/show/index.js b/app/assets/javascripts/pages/projects/settings/ci_cd/show/index.js
index 7f865f4cfb6..aeeef40fc6e 100644
--- a/app/assets/javascripts/pages/projects/settings/ci_cd/show/index.js
+++ b/app/assets/javascripts/pages/projects/settings/ci_cd/show/index.js
@@ -3,7 +3,6 @@ import SecretValues from '~/behaviors/secret_values';
import AjaxVariableList from '~/ci_variable_list/ajax_variable_list';
import registrySettingsApp from '~/registry/settings/registry_settings_bundle';
import initVariableList from '~/ci_variable_list';
-import DueDateSelectors from '~/due_date_select';
import initDeployKeys from '~/deploy_keys';
document.addEventListener('DOMContentLoaded', () => {
@@ -41,9 +40,6 @@ document.addEventListener('DOMContentLoaded', () => {
autoDevOpsExtraSettings.classList.toggle('hidden', !target.checked);
});
- // eslint-disable-next-line no-new
- new DueDateSelectors();
-
registrySettingsApp();
initDeployKeys();
});