Commit 3176e298 authored by Kamil Trzcinski's avatar Kamil Trzcinski

Expose stop_path for environment to not construct that in frontend

parent b1f5af40
......@@ -475,7 +475,7 @@
<div v-if="isStoppable && canCreateDeployment"
class="inline js-stop-component-container">
<stop-component
:stop_url="model.environment_path">
:stop_url="model.stop_path">
</stop-component>
</div>
......
......@@ -15,7 +15,7 @@
computed: {
stopUrl() {
return `${this.stop_url}/stop`;
return this.stop_url;
},
},
......
......@@ -16,5 +16,12 @@ class EnvironmentEntity < Grape::Entity
environment)
end
expose :stop_path do |environment|
stop_namespace_project_environment_path(
environment.project.namespace,
environment.project,
environment)
end
expose :created_at, :updated_at
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment