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>2021-11-26 21:12:26 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-11-26 21:12:26 +0300
commita4aa229f7621a1982b4220bbd6db1fbceb738a2e (patch)
treefcd1137d144f6ed81c728d187e62eb8d2c1a10e3 /app
parent74015980b5259072bbf27b432b9b08fda9d27945 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/pipeline_editor/components/commit/commit_section.vue15
-rw-r--r--app/assets/javascripts/pipeline_editor/graphql/mutations/commit_ci_file.mutation.graphql2
-rw-r--r--app/assets/javascripts/security_configuration/components/app.vue11
3 files changed, 21 insertions, 7 deletions
diff --git a/app/assets/javascripts/pipeline_editor/components/commit/commit_section.vue b/app/assets/javascripts/pipeline_editor/components/commit/commit_section.vue
index e11cfc1c65e..d8043f749ab 100644
--- a/app/assets/javascripts/pipeline_editor/components/commit/commit_section.vue
+++ b/app/assets/javascripts/pipeline_editor/components/commit/commit_section.vue
@@ -87,7 +87,7 @@ export default {
try {
const {
data: {
- commitCreate: { errors },
+ commitCreate: { errors, commitPipelinePath: pipelineEtag },
},
} = await this.$apollo.mutate({
mutation: commitCIFile,
@@ -101,14 +101,12 @@ export default {
content: this.ciFileContent,
lastCommitId: this.commitSha,
},
- update(_, { data }) {
- const pipelineEtag = data?.commitCreate?.commit?.commitPipelinePath;
- if (pipelineEtag) {
- this.$apollo.mutate({ mutation: updatePipelineEtag, variables: pipelineEtag });
- }
- },
});
+ if (pipelineEtag) {
+ this.updatePipelineEtag(pipelineEtag);
+ }
+
if (errors?.length) {
this.$emit('showError', { type: COMMIT_FAILURE, reasons: errors });
} else if (openMergeRequest) {
@@ -139,6 +137,9 @@ export default {
variables: { lastCommitBranch },
});
},
+ updatePipelineEtag(pipelineEtag) {
+ this.$apollo.mutate({ mutation: updatePipelineEtag, variables: { pipelineEtag } });
+ },
},
};
</script>
diff --git a/app/assets/javascripts/pipeline_editor/graphql/mutations/commit_ci_file.mutation.graphql b/app/assets/javascripts/pipeline_editor/graphql/mutations/commit_ci_file.mutation.graphql
index 94e6facabfd..65bb755ad2e 100644
--- a/app/assets/javascripts/pipeline_editor/graphql/mutations/commit_ci_file.mutation.graphql
+++ b/app/assets/javascripts/pipeline_editor/graphql/mutations/commit_ci_file.mutation.graphql
@@ -19,7 +19,9 @@ mutation commitCIFile(
]
}
) {
+ __typename
commit {
+ __typename
sha
}
commitPipelinePath
diff --git a/app/assets/javascripts/security_configuration/components/app.vue b/app/assets/javascripts/security_configuration/components/app.vue
index bc13150c99c..cd2add6407f 100644
--- a/app/assets/javascripts/security_configuration/components/app.vue
+++ b/app/assets/javascripts/security_configuration/components/app.vue
@@ -1,6 +1,7 @@
<script>
import { GlTab, GlTabs, GlSprintf, GlLink, GlAlert } from '@gitlab/ui';
import { __, s__ } from '~/locale';
+import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import LocalStorageSync from '~/vue_shared/components/local_storage_sync.vue';
import UserCalloutDismisser from '~/vue_shared/components/user_callout_dismisser.vue';
import AutoDevOpsAlert from './auto_dev_ops_alert.vue';
@@ -23,6 +24,8 @@ export const i18n = {
any subsequent feature branch you create will include the scan.`,
),
securityConfiguration: __('Security Configuration'),
+ vulnerabilityManagement: s__('SecurityConfiguration|Vulnerability Management'),
+ securityTraining: s__('SecurityConfiguration|Security training'),
};
export default {
@@ -41,6 +44,7 @@ export default {
UpgradeBanner,
UserCalloutDismisser,
},
+ mixins: [glFeatureFlagsMixin()],
inject: ['projectPath'],
props: {
augmentedSecurityFeatures: {
@@ -231,6 +235,13 @@ export default {
</template>
</section-layout>
</gl-tab>
+ <gl-tab
+ v-if="glFeatures.secureVulnerabilityTraining"
+ data-testid="vulnerability-management-tab"
+ :title="$options.i18n.vulnerabilityManagement"
+ >
+ <section-layout :heading="$options.i18n.securityTraining" />
+ </gl-tab>
</gl-tabs>
</article>
</template>