diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-28 00:16:17 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-28 00:16:17 +0300 |
commit | d099cb5be9c4fa93ba9a114d11ba6dbe5f10a4eb (patch) | |
tree | d8de98401200c58a9f1b92bf1705fdae42f6d6d3 /app/assets | |
parent | 034c9310c8f946cf82651e63f73bed0a599d345b (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets')
4 files changed, 0 insertions, 112 deletions
diff --git a/app/assets/javascripts/behaviors/secret_values.js b/app/assets/javascripts/behaviors/secret_values.js deleted file mode 100644 index b6ed14611cd..00000000000 --- a/app/assets/javascripts/behaviors/secret_values.js +++ /dev/null @@ -1,47 +0,0 @@ -import { parseBoolean } from '~/lib/utils/common_utils'; -import { n__ } from '~/locale'; - -export default class SecretValues { - constructor({ - container, - valueSelector = '.js-secret-value', - placeholderSelector = '.js-secret-value-placeholder', - }) { - this.container = container; - this.valueSelector = valueSelector; - this.placeholderSelector = placeholderSelector; - } - - init() { - this.revealButton = this.container.querySelector('.js-secret-value-reveal-button'); - - if (this.revealButton) { - const isRevealed = parseBoolean(this.revealButton.dataset.secretRevealStatus); - this.updateDom(isRevealed); - - this.revealButton.addEventListener('click', this.onRevealButtonClicked.bind(this)); - } - } - - onRevealButtonClicked() { - const previousIsRevealed = parseBoolean(this.revealButton.dataset.secretRevealStatus); - this.updateDom(!previousIsRevealed); - } - - updateDom(isRevealed) { - const values = this.container.querySelectorAll(this.valueSelector); - values.forEach((value) => { - value.classList.toggle('hide', !isRevealed); - }); - - const placeholders = this.container.querySelectorAll(this.placeholderSelector); - placeholders.forEach((placeholder) => { - placeholder.classList.toggle('hide', isRevealed); - }); - - this.revealButton.textContent = isRevealed - ? n__('Hide value', 'Hide values', values.length) - : n__('Reveal value', 'Reveal values', values.length); - this.revealButton.dataset.secretRevealStatus = isRevealed; - } -} 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 dce40c1f322..ad6f84fbc07 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 @@ -1,11 +1,9 @@ import initArtifactsSettings from '~/artifacts_settings'; -import SecretValues from '~/behaviors/secret_values'; import initSettingsPipelinesTriggers from '~/ci_settings_pipeline_triggers'; import initVariableList from '~/ci/ci_variable_list'; import initInheritedGroupCiVariables from '~/ci/inherited_ci_variables'; import initDeployFreeze from '~/deploy_freeze'; import registrySettingsApp from '~/packages_and_registries/settings/project/registry_settings_bundle'; -import { initInstallRunner } from '~/pages/shared/mount_runner_instructions'; import initSharedRunnersToggle from '~/projects/settings/mount_shared_runners_toggle'; import initRefSwitcherBadges from '~/projects/settings/mount_ref_switcher_badges'; import initSettingsPanels from '~/settings_panels'; @@ -18,14 +16,6 @@ import { initGeneralPipelinesOptions } from '~/ci_settings_general_pipeline'; // Initialize expandable settings panels initSettingsPanels(); -const runnerToken = document.querySelector('.js-secret-runner-token'); -if (runnerToken) { - const runnerTokenSecretValue = new SecretValues({ - container: runnerToken, - }); - runnerTokenSecretValue.init(); -} - initVariableList(); initInheritedGroupCiVariables(); @@ -47,7 +37,6 @@ initArtifactsSettings(); initProjectRunnersRegistrationDropdown(); initSharedRunnersToggle(); initRefSwitcherBadges(); -initInstallRunner(); initTokenAccess(); initCiSecureFiles(); initGeneralPipelinesOptions(); diff --git a/app/assets/javascripts/pages/shared/mount_runner_instructions.js b/app/assets/javascripts/pages/shared/mount_runner_instructions.js deleted file mode 100644 index e83c73edfde..00000000000 --- a/app/assets/javascripts/pages/shared/mount_runner_instructions.js +++ /dev/null @@ -1,27 +0,0 @@ -import Vue from 'vue'; -import VueApollo from 'vue-apollo'; -import createDefaultClient from '~/lib/graphql'; -import RunnerInstructions from '~/vue_shared/components/runner_instructions/runner_instructions.vue'; - -Vue.use(VueApollo); - -export function initInstallRunner(componentId = 'js-install-runner') { - const installRunnerEl = document.getElementById(componentId); - - if (installRunnerEl) { - const defaultClient = createDefaultClient(); - - const apolloProvider = new VueApollo({ - defaultClient, - }); - - // eslint-disable-next-line no-new - new Vue({ - el: installRunnerEl, - apolloProvider, - render(createElement) { - return createElement(RunnerInstructions); - }, - }); - } -} diff --git a/app/assets/javascripts/vue_shared/components/runner_instructions/runner_instructions.vue b/app/assets/javascripts/vue_shared/components/runner_instructions/runner_instructions.vue deleted file mode 100644 index 06852f511bf..00000000000 --- a/app/assets/javascripts/vue_shared/components/runner_instructions/runner_instructions.vue +++ /dev/null @@ -1,27 +0,0 @@ -<script> -import { GlButton, GlModalDirective } from '@gitlab/ui'; -import { s__ } from '~/locale'; -import RunnerInstructionsModal from './runner_instructions_modal.vue'; - -export default { - components: { - GlButton, - RunnerInstructionsModal, - }, - directives: { - GlModal: GlModalDirective, - }, - modalId: 'runner-instructions-modal', - i18n: { - buttonText: s__('Runners|Show runner installation instructions'), - }, -}; -</script> -<template> - <div> - <gl-button v-gl-modal="$options.modalId" class="gl-mt-4" data-testid="show-modal-button"> - {{ $options.i18n.buttonText }} - </gl-button> - <runner-instructions-modal :modal-id="$options.modalId" /> - </div> -</template> |