Skip to content

Commit

Permalink
Fix settings UI
Browse files Browse the repository at this point in the history
  • Loading branch information
isc-etamarch committed Nov 12, 2024
1 parent 58e371b commit 2bfe3f9
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.7.1] - Unreleased
## [2.8.0] - Unreleased

### Fixed
- Fixed improper encoding of unicode characters in commit messages (#627)
Expand Down
2 changes: 1 addition & 1 deletion cls/SourceControl/Git/Settings.cls
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ Method RetrieveDefaults() As %Boolean
Method SaveDefaults() As %Boolean
{
set defaults = {}
set items = $lb("gitBinPath", "namespaceTemp", "pullEventClass", "percentClassReplace", "environmentName", "systemBasicMode", "defaultMergeBranch", "mappedItemsReadOnly", "compileOnImport")
set items = $lb("gitBinPath", "pullEventClass", "percentClassReplace", "environmentName", "systemBasicMode", "defaultMergeBranch", "mappedItemsReadOnly", "compileOnImport")
for i=1:1:$LISTLENGTH(items) {
set property = $listget(items,i)
do defaults.%Set(property, $property($this, property))
Expand Down
30 changes: 15 additions & 15 deletions csp/gitprojectsettings.csp
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ body {

<fieldset id="namespaceSettings">
<div class="form-group row mb-3">
<label for="gitBinPath" class="offset-sm-1 col-sm-3 col-form-label" data-toggle="tooltip" data-placement="top" title="Absolute path to the Git executable">Path to git.exe</label>
<label for="gitBinPath" class="offset-sm-1 col-sm-3 col-form-label" data-toggle="tooltip" data-placement="top" title="Absolute path to the Git executable"><b>Path to git.exe</b></label>
<div class="col-sm-7">
<server>
set exists = ##class(SourceControl.Git.Utils).GitBinExists(.version)
Expand Down Expand Up @@ -277,7 +277,7 @@ body {
}
</server>
<div class="form-group row mb-3">
<label for="privateKeyFile" class="offset-sm-1 col-sm-3 col-form-label" data-toggle="tooltip" data-placement="top" title="Absolute path to your private SSH key file">*SSH Private Key File</label>
<label for="privateKeyFile" class="offset-sm-1 col-sm-3 col-form-label" data-toggle="tooltip" data-placement="top" title="Absolute path to your private SSH key file">SSH Private Key File</label>
<div class="col-sm-7">
<server>
Set fileExists = ##class(%File).Exists(settings.privateKeyFile)
Expand Down Expand Up @@ -332,7 +332,7 @@ body {
</server>

<div class="form-group row mb-3">
<label for="pullEventClass" class="offset-sm-1 col-sm-3 col-form-label" data-toggle="tooltip" data-placement="top" title="Handler class for git pull">Pull Event Class</label>
<label for="pullEventClass" class="offset-sm-1 col-sm-3 col-form-label" data-toggle="tooltip" data-placement="top" title="Handler class for git pull"><b>Pull Event Class</b></label>
<div class="col-sm-7">
<select class="form-control" id="pullEventClass" name="pullEventClass">
<server>
Expand All @@ -348,7 +348,7 @@ body {
</div>

<div class="form-group row mb-3">
<label for="environmentName" class="offset-sm-1 col-sm-3 col-form-label" data-toggle="tooltip" data-placement="top" title="Environment Name">Environment Name</label>
<label for="environmentName" class="offset-sm-1 col-sm-3 col-form-label" data-toggle="tooltip" data-placement="top" title="Environment Name"><b>Environment Name</b></label>
<div class="col-sm-7">
<select class="form-control" id="environmentName" name="environmentName">
<server>
Expand All @@ -362,14 +362,14 @@ body {
</div>

<div class="form-group row mb-3">
<label for="percentClassReplace" class="offset-sm-1 col-sm-3 col-form-label" data-toggle="tooltip" data-placement="top" title="Character(s) to replace '%' with for percent classes while exporting them out to the filesystem. By default, the '%' is removed.">'%' Replacement on Export</label>
<label for="percentClassReplace" class="offset-sm-1 col-sm-3 col-form-label" data-toggle="tooltip" data-placement="top" title="Character(s) to replace '%' with for percent classes while exporting them out to the filesystem. By default, the '%' is removed."><b>'%' Replacement on Export</b></label>
<div class="col-sm-7">
<input type="text" class="form-control" id="percentClassReplace" name="percentClassReplace" value='#(..EscapeHTML(settings.percentClassReplace))#' placeholder="_, __, <empty>, etc."/>
</div>
</div>

<div class="form-group row mb-3">
<label for="systemBasicMode" class="offset-sm-1 col-sm-3 col-form-label" data-toggle="tooltip" data-placement="top" title="Enable basic mode for all users, which reduces the number of menu options and requires less knowledge of git. This is suitable for a single-developer (non-shared) namespace."> Basic Mode as System Default</label>
<label for="systemBasicMode" class="offset-sm-1 col-sm-3 col-form-label" data-toggle="tooltip" data-placement="top" title="Enable basic mode for all users, which reduces the number of menu options and requires less knowledge of git. This is suitable for a single-developer (non-shared) namespace."><b> Basic Mode as System Default</b></label>
<div class="col-sm-7">

<div class="custom-control custom-switch custom-switch-no-border">
Expand All @@ -390,14 +390,14 @@ body {
</div>

<div class="form-group row mb-3">
<label for="defaultMergeBranch" class="offset-sm-1 col-sm-3 col-form-label" data-toggle="tooltip" data-placement="top" title="In basic mode, the Sync operation will merge changes from this remote branch (leave blank for no branch)">Default merge branch</label>
<label for="defaultMergeBranch" class="offset-sm-1 col-sm-3 col-form-label" data-toggle="tooltip" data-placement="top" title="In basic mode, the Sync operation will merge changes from this remote branch (leave blank for no branch)"><b>Default merge branch</b></label>
<div class="col-sm-7">
<input type="text" class="form-control" id="defaultMergeBranch" name="defaultMergeBranch" value='#(..EscapeHTML(settings.defaultMergeBranch))#' placeholder="sample-remote-branch">
</div>
</div>

<div class="form-group row mb-3">
<label for="remoteRepo" class="offset-sm-1 col-sm-3 col-form-label" data-toggle="tooltip" data-placement="top" title="Url to Remote repository">*Remote Repository</label>
<label for="remoteRepo" class="offset-sm-1 col-sm-3 col-form-label" data-toggle="tooltip" data-placement="top" title="Url to Remote repository"><b>Remote Repository</b></label>
<div class="col-sm-7">
<input type="text" class="form-control" id="remoteRepo" name="remoteRepo" value='#(..EscapeHTML(remote))#' placeholder="ex. [email protected]:User/UserRepo.git"/>
<div class = "neutral-feedback">
Expand All @@ -407,7 +407,7 @@ body {
</div>

<div class="form-group row mb-3">
<label for="mappedItemsReadOnly" class="offset-sm-1 col-sm-3 col-form-label" data-toggle="tooltip" data-placement="top" title="Whether items mapped from a database other than this namespace's default routine database should be read-only. If enabled, mapped items won't be saved to source control or exported. NOTE: These are different from the mappings configured in this settings page"> Treat Mapped Items as Read-only</label>
<label for="mappedItemsReadOnly" class="offset-sm-1 col-sm-3 col-form-label" data-toggle="tooltip" data-placement="top" title="Whether items mapped from a database other than this namespace's default routine database should be read-only. If enabled, mapped items won't be saved to source control or exported. NOTE: These are different from the mappings configured in this settings page"><b> Treat Mapped Items as Read-only</b></label>
<div class="col-sm-7">

<div class="custom-control custom-switch custom-switch-no-border">
Expand All @@ -427,7 +427,7 @@ body {

</div>
<div class="form-group row mb-3">
<label for="compileOnImport" class="offset-sm-1 col-sm-3 col-form-label" data-toggle="tooltip" data-placement="top" title="If true, the Import All options will compile imported options using the configured pull event handler">Compile Items on Import</label>
<label for="compileOnImport" class="offset-sm-1 col-sm-3 col-form-label" data-toggle="tooltip" data-placement="top" title="If true, the Import All options will compile imported options using the configured pull event handler"><b>Compile Items on Import</b></label>
<div class="col-sm-7">
<div class="custom-control custom-switch custom-switch-no-border">
<input class="custom-control-input" name="compileOnImport" type="checkbox"
Expand All @@ -439,7 +439,7 @@ body {

<div class="form-group row mb-3 mapping-input-group">
<div class="offset-sm-1 col-sm-3">
<label for="MappingsPath" class="col-form-label" data-toggle="tooltip" data-placement="top" title="Relative paths mapping the files in your project. For web application files, use the extension: /CSP/">*Mappings</label>
<label for="MappingsPath" class="col-form-label" data-toggle="tooltip" data-placement="top" title="Relative paths mapping the files in your project. For web application files, use the extension: /CSP/">Mappings</label>
<button type="button" class="btn btn-default btn-add" >
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="#198754" class="bi bi-plus-circle-fill" viewBox="0 0 16 16">
<path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM8.5 4.5a.5.5 0 0 0-1 0v3h-3a.5.5 0 0 0 0 1h3v3a.5.5 0 0 0 1 0v-3h3a.5.5 0 0 0 0-1h-3v-3z"></path>
Expand Down Expand Up @@ -542,21 +542,21 @@ body {

<fieldset id="userSettings">
<div class="form-group row mb-3">
<label for="gitUserName" class="offset-sm-1 col-sm-3 col-form-label" data-toggle="tooltip" data-placement="top" title="Firstname Lastname">*Git Committer Name </label>
<label for="gitUserName" class="offset-sm-1 col-sm-3 col-form-label" data-toggle="tooltip" data-placement="top" title="Firstname Lastname">Git Committer Name </label>
<div class="col-sm-7">
<input type="text" class="form-control" id="gitUserName" name="gitUserName" value='#(..EscapeHTML(settings.gitUserName))#'/>
</div>
</div>

<div class="form-group row mb-3">
<label for="gitUserEmail" class="offset-sm-1 col-sm-3 col-form-label" data-toggle="tooltip" data-placement="top" title="<git-username-on-remote>@remote.com">*Git Committer Email </label>
<label for="gitUserEmail" class="offset-sm-1 col-sm-3 col-form-label" data-toggle="tooltip" data-placement="top" title="<git-username-on-remote>@remote.com">Git Committer Email</label>
<div class="col-sm-7">
<input type="email" class="form-control" id="gitUserEmail" name="gitUserEmail" value='#(..EscapeHTML(settings.gitUserEmail))#'/>
</div>
</div>

<div class="form-group mb-3">
<label for="basicMode" class="offset-sm-1 col-sm-3 col-form-label form-rad-label" data-toggle="tooltip" data-placement="top" title="Enable basic mode, which reduces the number of menu options and requires less knowledge of git. This is suitable for a single-developer (non-shared) namespace.">*Basic Mode</label>
<label for="basicMode" class="offset-sm-1 col-sm-3 col-form-label form-rad-label" data-toggle="tooltip" data-placement="top" title="Enable basic mode, which reduces the number of menu options and requires less knowledge of git. This is suitable for a single-developer (non-shared) namespace.">Basic Mode</label>

<div class="form-check offset-sm-4 form-rad">
<server>
Expand Down Expand Up @@ -641,7 +641,7 @@ body {
<input type='submit' class="btn-lg btn-primary" value = 'Save' name="Save"/>
<input type="submit" class="btn-lg btn-primary" id="saveDefaults" value = 'Save as Instance Defaults' title="Save these settings as default for new instances" name="saveDefaults"/>
<div>
<small> Settings not saved as default marked with '*'</small>
<small> Settings saved as default are <b>bolded </b> </small>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<Document name="git-source-control.ZPM">
<Module>
<Name>git-source-control</Name>
<Version>2.7.1</Version>
<Version>2.8.0</Version>
<Description>Server-side source control extension for use of Git on InterSystems platforms</Description>
<Keywords>git source control studio vscode</Keywords>
<Packaging>module</Packaging>
Expand Down

0 comments on commit 2bfe3f9

Please sign in to comment.