Closed unclesp1d3r closed 1 month ago
Code Climate has analyzed commit ae7ce2e6 and detected 0 issues on this pull request.
The test coverage on the diff in this pull request is 83.3% (50% is the threshold).
This pull request will bring the total coverage in the repository to 59.3% (0.0% change).
View more on Code Climate.
Fixes #118
Add ability to override machine name with custom labels for agents.
custom_label
toresource_params
method inapp/controllers/admin/agents_controller.rb
. Add input field forcustom_label
inapp/views/agents/_form.html.erb
.custom_label
column toagents
table with a comment. Create migration to renamename
column tohost_name
inagents
table.custom_label
attribute toAgent
model. Validate presence and length ofhost_name
. Validate length and uniqueness ofcustom_label
if not nil. Renamename
property tohost_name
. Makename
property return eithercustom_label
orhost_name
.custom_label
toATTRIBUTE_TYPES
andSHOW_PAGE_ATTRIBUTES
inapp/dashboards/agent_dashboard.rb
. Removename
fromFORM_ATTRIBUTES
.spec/models/agent_spec.rb
. Update factory for Agent to include custom_label inspec/factories/agent.rb
.SPDX-FileCopyrightText
lines in various helper files andconfig/routes.rb
.For more details, open the Copilot Workspace session.