mirror of
https://github.com/go-gitea/gitea.git
synced 2025-04-18 00:47:48 -04:00
Apply suggestions from code review
Co-authored-by: delvh <dev.lh@web.de>
This commit is contained in:
parent
2ae7f5434c
commit
b884772652
@ -3253,7 +3253,7 @@ runners.labels = Labels
|
|||||||
runners.latest_online = Last Online Time
|
runners.latest_online = Last Online Time
|
||||||
runners.agent_labels = Agent Labels
|
runners.agent_labels = Agent Labels
|
||||||
runners.custom_labels = Custom Labels
|
runners.custom_labels = Custom Labels
|
||||||
runners.custom_labels_helper = Custom labels are labels that are not automatically added by the agent. They are added by the administrator. Use comma separated.
|
runners.custom_labels_helper = Custom labels are labels that are added manually by an administrator. A comma separates labels, whitespace at the start and end of each label are ignored.
|
||||||
runners.runner_title = Runner
|
runners.runner_title = Runner
|
||||||
runners.task_list = Recent jobs on this runner
|
runners.task_list = Recent jobs on this runner
|
||||||
runners.edit_runner = Edit Runner
|
runners.edit_runner = Edit Runner
|
||||||
|
@ -125,7 +125,7 @@ func RunnerDetailsEditPost(ctx *context.Context, runnerID, ownerID, repoID int64
|
|||||||
}
|
}
|
||||||
if !runner.Editable(ownerID, repoID) {
|
if !runner.Editable(ownerID, repoID) {
|
||||||
err = errors.New("no permission to edit this runner")
|
err = errors.New("no permission to edit this runner")
|
||||||
ctx.NotFound("RunnerDetailsEditPost.Editable", err)
|
ctx.NotFound("RunnerDetailsEditPost.Editable", util.NewPermissionDeniedErrorf("no permission to edit this runner"))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ func DeleteRepository(ctx context.Context, doer *user_model.User, repo *repo_mod
|
|||||||
|
|
||||||
// deletes actions resource after the repo has been deleted, to avoid new tasks
|
// deletes actions resource after the repo has been deleted, to avoid new tasks
|
||||||
if err := actions_service.DeleteResourceOfRepository(ctx, repo); err != nil {
|
if err := actions_service.DeleteResourceOfRepository(ctx, repo); err != nil {
|
||||||
log.Error("delete actions resource failed: %v", err)
|
return fmt.Errorf("delete actions resources failed: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
return packages_model.UnlinkRepositoryFromAllPackages(ctx, repo.ID)
|
return packages_model.UnlinkRepositoryFromAllPackages(ctx, repo.ID)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{{template "base/head" .}}
|
{{template "base/head" .}}
|
||||||
<div class="page-content repository settings webhooks">
|
<div class="page-content repository settings runners">
|
||||||
{{template "repo/header" .}}
|
{{template "repo/header" .}}
|
||||||
{{template "repo/settings/navbar" .}}
|
{{template "repo/settings/navbar" .}}
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{{template "base/head" .}}
|
{{template "base/head" .}}
|
||||||
<div class="page-content repository settings webhooks">
|
<div class="page-content repository settings runners">
|
||||||
{{template "repo/header" .}}
|
{{template "repo/header" .}}
|
||||||
{{template "repo/settings/navbar" .}}
|
{{template "repo/settings/navbar" .}}
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
|
@ -8,15 +8,15 @@
|
|||||||
{{template "base/disable_form_autofill"}}
|
{{template "base/disable_form_autofill"}}
|
||||||
{{.CsrfTokenHtml}}
|
{{.CsrfTokenHtml}}
|
||||||
<div class="runner-basic-info">
|
<div class="runner-basic-info">
|
||||||
<div class="field dib">
|
<div class="field dib disabled">
|
||||||
<label>{{.locale.Tr "actions.runners.status"}}</label>
|
<label>{{.locale.Tr "actions.runners.status"}}</label>
|
||||||
<span class="runner-status-{{if .Runner.IsOnline}}online{{else}}offline{{end}}">{{.Runner.StatusName}}</span>
|
<span class="runner-status-{{if .Runner.IsOnline}}online{{else}}offline{{end}}">{{.Runner.StatusName}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="field dib">
|
<div class="field dib disabled">
|
||||||
<label>{{.locale.Tr "actions.runners.latest_online"}}</label>
|
<label>{{.locale.Tr "actions.runners.latest_online"}}</label>
|
||||||
<span>{{TimeSinceUnix .Runner.LastOnline $.locale}}</span>
|
<span>{{TimeSinceUnix .Runner.LastOnline $.locale}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="field dib">
|
<div class="field dib disabled">
|
||||||
<label>{{.locale.Tr "actions.runners.agent_labels"}}</label>
|
<label>{{.locale.Tr "actions.runners.agent_labels"}}</label>
|
||||||
<span>
|
<span>
|
||||||
{{range .Runner.AgentLabels}}
|
{{range .Runner.AgentLabels}}
|
||||||
@ -24,7 +24,7 @@
|
|||||||
{{end}}
|
{{end}}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="field dib">
|
<div class="field dib disabled">
|
||||||
<label>{{.locale.Tr "actions.runners.owner_type"}}</label>
|
<label>{{.locale.Tr "actions.runners.owner_type"}}</label>
|
||||||
<span>{{.Runner.OwnType}}</span>
|
<span>{{.Runner.OwnType}}</span>
|
||||||
</div>
|
</div>
|
||||||
@ -36,7 +36,7 @@
|
|||||||
<label for="description">{{.locale.Tr "actions.runners.description"}}</label>
|
<label for="description">{{.locale.Tr "actions.runners.description"}}</label>
|
||||||
<input id="description" name="description" value="{{.Runner.Description}}">
|
<input id="description" name="description" value="{{.Runner.Description}}">
|
||||||
</div>
|
</div>
|
||||||
<div class="field">
|
<div class="field tooltip" data-content="Labels are comma-separated. Whitespace at the beginning, end, and around the commas are ignored.">
|
||||||
<label for="custom_labels">{{.locale.Tr "actions.runners.custom_labels"}}</label>
|
<label for="custom_labels">{{.locale.Tr "actions.runners.custom_labels"}}</label>
|
||||||
<input id="custom_labels" name="custom_labels" value="{{Join .Runner.CustomLabels `,`}}">
|
<input id="custom_labels" name="custom_labels" value="{{Join .Runner.CustomLabels `,`}}">
|
||||||
<p class="help">{{.locale.Tr "actions.runners.custom_labels_helper"}}</p>
|
<p class="help">{{.locale.Tr "actions.runners.custom_labels_helper"}}</p>
|
||||||
|
@ -46,9 +46,7 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th data-sortt-asc="online" data-sortt-desc="offline">{{.locale.Tr "actions.runners.status"}}</th>
|
<th data-sortt-asc="online" data-sortt-desc="offline">{{.locale.Tr "actions.runners.status"}}</th>
|
||||||
<th data-sortt-asc="alphabetically">
|
<th data-sortt-asc="alphabetically">{{.locale.Tr "actions.runners.id"}}</th>
|
||||||
{{.locale.Tr "actions.runners.id"}}
|
|
||||||
</th>
|
|
||||||
<th>{{.locale.Tr "actions.runners.owner_type"}}</th>
|
<th>{{.locale.Tr "actions.runners.owner_type"}}</th>
|
||||||
<th>{{.locale.Tr "actions.runners.labels"}}</th>
|
<th>{{.locale.Tr "actions.runners.labels"}}</th>
|
||||||
<th>{{.locale.Tr "actions.runners.latest_online"}}</th>
|
<th>{{.locale.Tr "actions.runners.latest_online"}}</th>
|
||||||
|
@ -8,9 +8,6 @@
|
|||||||
<div class="action-view-body">
|
<div class="action-view-body">
|
||||||
<div class="action-view-left">
|
<div class="action-view-left">
|
||||||
<div class="job-group-section" v-for="(jobGroup, i) in allJobGroups" :key="i">
|
<div class="job-group-section" v-for="(jobGroup, i) in allJobGroups" :key="i">
|
||||||
<!-- <div class="job-group-summary">-->
|
|
||||||
<!-- {{ jobGroup.summary }}-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<div class="job-brief-list">
|
<div class="job-brief-list">
|
||||||
<a class="job-brief-item" v-for="(job, index) in jobGroup.jobs" :key="job.id" :href="runInfo.htmlurl+'/jobs/'+index">
|
<a class="job-brief-item" v-for="(job, index) in jobGroup.jobs" :key="job.id" :href="runInfo.htmlurl+'/jobs/'+index">
|
||||||
<SvgIcon name="octicon-check-circle-fill" class="green" v-if="job.status === 'success'"/>
|
<SvgIcon name="octicon-check-circle-fill" class="green" v-if="job.status === 'success'"/>
|
||||||
@ -59,17 +56,6 @@
|
|||||||
|
|
||||||
<!-- the log elements could be a lot, do not use v-if to destroy/reconstruct the DOM -->
|
<!-- the log elements could be a lot, do not use v-if to destroy/reconstruct the DOM -->
|
||||||
<div class="job-step-logs" ref="elJobStepLogs" v-show="currentJobStepsStates[i].expanded">
|
<div class="job-step-logs" ref="elJobStepLogs" v-show="currentJobStepsStates[i].expanded">
|
||||||
<!--
|
|
||||||
possible layouts:
|
|
||||||
<div class="job-log-group">
|
|
||||||
<div class="job-log-group-summary"></div>
|
|
||||||
<div class="job-log-list">
|
|
||||||
<div class="job-log-line"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
-- or --
|
|
||||||
<div class="job-log-line"></div>
|
|
||||||
-->
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -312,9 +298,6 @@ const sfc = {
|
|||||||
const reqData = {stepLogCursors};
|
const reqData = {stepLogCursors};
|
||||||
|
|
||||||
const respData = await this.fetchJobData(reqData);
|
const respData = await this.fetchJobData(reqData);
|
||||||
// const respData = this.fetchMockData(reqData);
|
|
||||||
|
|
||||||
// console.log('loadJobData by request', reqData, ', get response ', respData);
|
|
||||||
|
|
||||||
// save the stateData to Vue data, then the UI will be updated
|
// save the stateData to Vue data, then the UI will be updated
|
||||||
for (const [key, value] of Object.entries(respData.stateData)) {
|
for (const [key, value] of Object.entries(respData.stateData)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user