提交 d873a3bd 编写于 作者: F Filipa Lacerda

Adds commit partial for vue component

上级 e4ff8dd2
......@@ -76,8 +76,9 @@ class Projects::EnvironmentsController < Projects::ApplicationController
last_deployment: {
include: {
user: { only: [:id, :name, :username], methods: [:avatar_url] },
deployable: { only: [:id, :name, :ref, :tag, :short_sha] }
}
deployable: { only: [:id, :name, :ref, :tag] }
},
methods: [:short_sha, :commit_title, :commit]
}
}
)
......
.branch-commit{"v-if" => "!isFolder && model.last_deployment"}
%div{ "v-if" => "model.last_deployment.ref" }
.icon-container{ "v-if" => "model.last_deployment.tag" }
=icon("tag")
.icon-container{ "v-if" => "!model.last_deployment.tag" }
=icon("code-fork")
%a.monospace.branch-name{}
{{model.last_deployment.ref}}
.icon-container.commit-icon
= custom_icon("icon_commit")
%a.commit-id.monospace{":href" => ""}
{{model.last_deployment.short_sha}}
%p.commit-title
%span{ "v-if" => "model.last_deployment.commit_title"}
%a.commit-row-message{":href" => ""}
{{model.last_deployment.commit_title}}
%span{ "v-if" => "!model.last_deployment.commit_title"}
Cant find HEAD commit for this branch
......@@ -31,13 +31,13 @@
%td
%a.build-link{ "v-if" => "!isFolder && model.last_deployment && model.last_deployment.deployable",
":href" => "'#{namespace_project_builds_path(@project.namespace, @project)}/' + model.last_deployment.deployable.id"}
{{model.last_deployment.deployble.name}}
{{model.last_deployment.deployable.name}}
= precede "#" do
{{model.last_deployment.deployable.id}}
%td
%a{ "v-if" => "!isFolder && model.last_deployment"}
commit message goes here
=render "projects/environments/components/commit"
%p.commit-title{ "v-if" => "!isFolder && !model.last_deployment"}
No deployments yet
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册