Skip to content

Commit

Permalink
add integrityCheckEnabled toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
sahibamittal committed Aug 4, 2023
1 parent 86e9b39 commit 0b2166b
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -705,6 +705,7 @@
"delete_repository": "Delete Repository",
"repository_created": "Repository created",
"repository_deleted": "Repository deleted",
"integrity_check_enabled": "Integrity Check required",
"portfolio_access_control": "Portfolio Access Control",
"project_access": "Project access",
"select_project": "Select Project",
Expand Down
19 changes: 18 additions & 1 deletion src/views/administration/repositories/Repositories.vue
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,15 @@ import RepositoryCreateRepositoryModal from "./RepositoryCreateRepositoryModal";
return value === true ? '<i class="fa fa-check-square-o" />' : "";
},
},
{
title: this.$t('admin.integrity_check_enabled'),
field: "integrityCheckEnabled",
class: "tight",
sortable: true,
formatter(value, row, index) {
return value === true ? '<i class="fa fa-check-square-o" />' : "";
},
},
{
title: this.$t('admin.enabled'),
field: "enabled",
Expand Down Expand Up @@ -134,6 +143,9 @@ import RepositoryCreateRepositoryModal from "./RepositoryCreateRepositoryModal";
<div>
<c-switch color="primary" v-model="internal" label v-bind="labelIcon" />{{$t('admin.internal')}}
</div>
<div>
<c-switch color="primary" v-model="integrityCheckEnabled" label v-bind="labelIcon" />{{$t('admin.integrity_check_enabled')}}
</div>
<div>
<b-validated-input-group-form-input
Expand Down Expand Up @@ -181,6 +193,7 @@ import RepositoryCreateRepositoryModal from "./RepositoryCreateRepositoryModal";
dataOn: '\u2713',
dataOff: '\u2715'
},
integrityCheckEnabled: row.integrityCheckEnabled
}
},
watch: {
Expand All @@ -189,6 +202,9 @@ import RepositoryCreateRepositoryModal from "./RepositoryCreateRepositoryModal";
},
enabled() {
this.updateRepository();
},
integrityCheckEnabled() {
this.updateRepository();
}
},
methods: {
Expand All @@ -210,7 +226,8 @@ import RepositoryCreateRepositoryModal from "./RepositoryCreateRepositoryModal";
username: this.username,
password: this.password || null,
enabled: this.enabled,
uuid: this.uuid
uuid: this.uuid,
integrityCheckEnabled: this.integrityCheckEnabled
}).then((response) => {
this.repository = response.data;
EventBus.$emit('admin:repository:rowUpdate', index, this.repository);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
:label="$t('admin.repository_type')" />
<div>
<c-switch color="primary" v-model="internal" label v-bind="labelIcon" />{{$t('admin.internal')}}
<br/>
<c-switch color="primary" v-model="integrityCheckEnabled" label v-bind="labelIcon" />{{$t('admin.integrity_check_enabled')}}
</div>

<b-validated-input-group-form-input
Expand Down Expand Up @@ -81,6 +83,7 @@ import BValidatedInputGroupFormInput from "../../../forms/BValidatedInputGroupFo
dataOn: '\u2713',
dataOff: '\u2715'
},
integrityCheckEnabled: false,
repositoryTypes: [
{ value: 'COMPOSER', text: 'PHP (Composer)' },
{ value: 'CPAN', text: 'Perl (CPAN)' },
Expand All @@ -103,6 +106,7 @@ import BValidatedInputGroupFormInput from "../../../forms/BValidatedInputGroupFo
identifier: this.identifier,
url: this.url,
internal: this.internal,
integrityCheckEnabled: this.integrityCheckEnabled,
username: this.username,
password: this.password || null,
enabled: this.enabled
Expand All @@ -124,6 +128,7 @@ import BValidatedInputGroupFormInput from "../../../forms/BValidatedInputGroupFo
this.username = null;
this.password = null;
this.enabled = true;
this.integrityCheckEnabled = false;
}
}
}
Expand Down

0 comments on commit 0b2166b

Please sign in to comment.