Various fixes and improvements (#1643)

- allow repo names to be case-insensitive
- improve backend error handling on DB get errors (record not found ->
404, else -> 500)
- replace magic numbers of http response codes
- unify the look and feel of cancel / save buttons on forms and view
them in one line

---------

Co-authored-by: Lauris BH <lauris@nix.lv>
This commit is contained in:
qwerty287
2023-03-19 13:52:58 +01:00
committed by GitHub
parent 42a115e19e
commit ade8e6d010
27 changed files with 230 additions and 179 deletions

View File

@@ -78,7 +78,7 @@
:label="$t('admin.settings.agents.capacity.capacity')"
docs-url="docs/next/administration/agent-config#woodpecker_max_procs"
>
<span class="text-color-alt">The max amount of parallel pipelines executed by this agent.</span>
<span class="text-color-alt">{{ $t('admin.settings.agents.capacity.desc') }}</span>
<TextField :model-value="selectedAgent.capacity?.toString()" disabled />
</InputField>
@@ -98,11 +98,15 @@
</InputField>
</template>
<Button
:is-loading="isSaving"
type="submit"
:text="isEditingAgent ? $t('admin.settings.agents.save') : $t('admin.settings.agents.add')"
/>
<div class="flex gap-2">
<Button type="button" color="gray" :text="$t('cancel')" @click="selectedAgent = undefined" />
<Button
:is-loading="isSaving"
type="submit"
color="green"
:text="isEditingAgent ? $t('admin.settings.agents.save') : $t('admin.settings.agents.add')"
/>
</div>
</form>
</div>
</Panel>