Adds commit partial for vue component
This commit is contained in:
parent
e4ff8dd2f1
commit
d873a3bd55
|
@ -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]
|
||||
}
|
||||
}
|
||||
)
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
.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
|
||||
|
||||
|
|
Loading…
Reference in New Issue