diff --git a/ee/app/assets/javascripts/workspaces/common/components/get_project_details_query.vue b/ee/app/assets/javascripts/workspaces/common/components/get_project_details_query.vue index 53ccce75b7b820a52d67c8240fadd163d9363682..e1131dc17ee3964e932933aade65fe9b544ff778 100644 --- a/ee/app/assets/javascripts/workspaces/common/components/get_project_details_query.vue +++ b/ee/app/assets/javascripts/workspaces/common/components/get_project_details_query.vue @@ -90,14 +90,10 @@ export default { return { clusterAgents: - data.namespace?.remoteDevelopmentClusterAgents?.nodes.map( - ({ id, name, project, workspacesAgentConfig }) => ({ - value: id, - text: `${project.nameWithNamespace} / ${name}`, - defaultMaxHoursBeforeTermination: - workspacesAgentConfig.defaultMaxHoursBeforeTermination, - }), - ) || [], + data.namespace?.remoteDevelopmentClusterAgents?.nodes.map(({ id, name, project }) => ({ + value: id, + text: `${project.nameWithNamespace} / ${name}`, + })) || [], }; } catch (error) { return { errors: [error] }; diff --git a/ee/app/assets/javascripts/workspaces/common/graphql/fragments/workspace_item.fragment.graphql b/ee/app/assets/javascripts/workspaces/common/graphql/fragments/workspace_item.fragment.graphql index 5383b1cea0595f95f0a078fe72b8a1745d38db96..7fa49723f9fa205bd88312c3be23e1c7952c0829 100644 --- a/ee/app/assets/javascripts/workspaces/common/graphql/fragments/workspace_item.fragment.graphql +++ b/ee/app/assets/javascripts/workspaces/common/graphql/fragments/workspace_item.fragment.graphql @@ -9,6 +9,5 @@ fragment WorkspaceItem on Workspace { devfileRef devfilePath devfileWebUrl - maxHoursBeforeTermination createdAt } diff --git a/ee/app/assets/javascripts/workspaces/common/graphql/queries/get_remote_development_cluster_agents.query.graphql b/ee/app/assets/javascripts/workspaces/common/graphql/queries/get_remote_development_cluster_agents.query.graphql index 548fb3219419bedc0a0c7cb1284ac0510ad43098..745f85745fe4f0f5f7b9cd2498e1e4cc87cf9d66 100644 --- a/ee/app/assets/javascripts/workspaces/common/graphql/queries/get_remote_development_cluster_agents.query.graphql +++ b/ee/app/assets/javascripts/workspaces/common/graphql/queries/get_remote_development_cluster_agents.query.graphql @@ -11,7 +11,6 @@ query getRemoteDevelopmentClusterAgents($namespace: ID!) { } workspacesAgentConfig { id - defaultMaxHoursBeforeTermination } } } diff --git a/ee/app/assets/javascripts/workspaces/user/pages/create.vue b/ee/app/assets/javascripts/workspaces/user/pages/create.vue index 2a95a47cfe896d8cf3a85b79fdddc4537bafac54..0402d8f1de930ad35741af1e170c77668805e800 100644 --- a/ee/app/assets/javascripts/workspaces/user/pages/create.vue +++ b/ee/app/assets/javascripts/workspaces/user/pages/create.vue @@ -59,7 +59,6 @@ export const i18n = { }, pathToDevfile: s__('Workspaces|Path to devfile'), agentId: s__('Workspaces|Cluster agent'), - maxHoursBeforeTermination: s__('Workspaces|Workspace automatically terminates after'), maxHoursSuffix: __('hours'), }, invalidProjectAlert: { @@ -116,7 +115,6 @@ export default { clusterAgentsMap: {}, devfileRef: '', projectId: null, - maxHoursBeforeTermination: 0, workspaceVariables: [], showWorkspaceVariableValidations: false, projectDetailsLoaded: false, @@ -158,10 +156,6 @@ export default { this.focusFirstElement(); }, methods: { - onAgentChange(agentId) { - this.maxHoursBeforeTermination = - this.clusterAgentsMap[agentId].defaultMaxHoursBeforeTermination; - }, onProjectDetailsResult({ fullPath, nameWithNamespace, clusterAgents, id, rootRef }) { // This scenario happens when the selected project is specified in the URL as a query param if (!this.selectedProject) { @@ -180,7 +174,6 @@ export default { // Select the first agent if there are any if (clusterAgents.length > 0) { this.selectedAgent = clusterAgents[0].value; - this.maxHoursBeforeTermination = clusterAgents[0].defaultMaxHoursBeforeTermination; } }, onProjectDetailsError() { @@ -223,7 +216,6 @@ export default { desiredState: DEFAULT_DESIRED_STATE, devfileRef: this.devfileRef, devfilePath: this.devfilePath, - maxHoursBeforeTermination: parseInt(this.maxHoursBeforeTermination, 10), variables: this.workspaceVariables.map((v) => omit(v, 'valid')), }, }, @@ -338,7 +330,6 @@ export default { class="gl-max-w-full" autocomplete="off" data-testid="workspace-cluster-agent-id-field" - @input="onAgentChange" />