Skip to content
代码片段 群组 项目
  • Pam Artiaga's avatar
    f8642296
    Return or display Gitlab version if GITLAB_KAS_VERSION is a SHA · f8642296
    Pam Artiaga 创作于
    Gitlab::Kas.version and Gitlab::Kas.version_info are called
    when the API or ~frontend needs to display the KAS semantic version.
    
    Both Gitlab::Kas.version and Gitlab::Kas.version_info bases the version
    on the contents of the GITLAB_KAS_VERSION file. We want to handle the
    possibility that the content of the GITLAB_KAS_VERSION file is a SHA.
    In this situation, Gitlab::Kas.version and Gitlab::Kas.version_info
    will be based on the Gitlab version, with the SHA as the suffix.
    
    Changelog: changed
    f8642296
    历史
    Return or display Gitlab version if GITLAB_KAS_VERSION is a SHA
    Pam Artiaga 创作于
    Gitlab::Kas.version and Gitlab::Kas.version_info are called
    when the API or ~frontend needs to display the KAS semantic version.
    
    Both Gitlab::Kas.version and Gitlab::Kas.version_info bases the version
    on the contents of the GITLAB_KAS_VERSION file. We want to handle the
    possibility that the content of the GITLAB_KAS_VERSION file is a SHA.
    In this situation, Gitlab::Kas.version and Gitlab::Kas.version_info
    will be based on the Gitlab version, with the SHA as the suffix.
    
    Changelog: changed
代码所有者
将用户和群组指定为特定文件更改的核准人。 了解更多。
index.js 970 B
import Vue from 'vue';
import { parseBoolean } from '~/lib/utils/common_utils';
import AgentShowPage from 'ee_else_ce/clusters/agents/components/show.vue';
import apolloProvider from './graphql/provider';
import createRouter from './router';

export default () => {
  const el = document.querySelector('#js-cluster-agent-details');

  if (!el) {
    return null;
  }

  const {
    activityEmptyStateImage,
    agentName,
    canAdminVulnerability,
    emptyStateSvgPath,
    projectPath,
    kasAddress,
    kasInstallVersion,
    canAdminCluster,
  } = el.dataset;

  return new Vue({
    el,
    apolloProvider,
    router: createRouter(),
    provide: {
      activityEmptyStateImage,
      agentName,
      canAdminVulnerability,
      emptyStateSvgPath,
      projectPath,
      kasAddress,
      kasInstallVersion,
      canAdminCluster: parseBoolean(canAdminCluster),
    },
    render(createElement) {
      return createElement(AgentShowPage);
    },
  });
};