Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into fb_moveDeadlocks
Browse files Browse the repository at this point in the history
  • Loading branch information
labkey-susanh committed Oct 3, 2024
2 parents 1af446f + f157ec6 commit 1ed38f0
Show file tree
Hide file tree
Showing 14 changed files with 217 additions and 188 deletions.
5 changes: 3 additions & 2 deletions api/src/org/labkey/api/data/ContainerManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import org.junit.Before;
import org.junit.Test;
import org.labkey.api.Constants;
import org.labkey.api.action.ApiUsageException;
import org.labkey.api.action.SpringActionController;
import org.labkey.api.admin.FolderExportContext;
import org.labkey.api.admin.FolderImportContext;
Expand Down Expand Up @@ -1817,12 +1818,12 @@ private static boolean delete(final Collection<Container> containers, User user,
{
if (!isDeletable(container))
{
throw new IllegalArgumentException("Cannot delete container: " + container.getPath());
throw new ApiUsageException("Cannot delete container: " + container.getPath());
}

if (deletingContainers.containsKey(container.getId()))
{
throw new IllegalArgumentException("Container is already being deleted: " + container.getPath());
throw new ApiUsageException("Container is already being deleted: " + container.getPath());
}
}
containerIds.forEach(id -> deletingContainers.put(id, user.getUserId()));
Expand Down
15 changes: 15 additions & 0 deletions api/src/org/labkey/api/security/SectionHeader.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package org.labkey.api.security;

import org.jetbrains.annotations.NotNull;

public class SectionHeader extends SettingsField
{
public static SectionHeader of(@NotNull String caption)
{
SectionHeader of = new SectionHeader();
of.put("type", FieldType.section);
of.put("caption", caption);

return of;
}
}
4 changes: 4 additions & 0 deletions api/src/org/labkey/api/security/SecurityManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,10 @@ public static UsageMetricsProvider getMetricsProvider()
};
}

/**
* @param key short description of the purpose of the allowed connection. Mostly to make it possible to update
* afterward in the case of dynamically configured sources.
*/
public static void registerAllowedConnectionSource(String key, String serviceURL)
{
if (StringUtils.trimToNull(serviceURL) == null)
Expand Down
10 changes: 10 additions & 0 deletions api/src/org/labkey/api/security/SettingsField.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ public class SettingsField extends HashMap<String, Object>
{
public enum FieldType
{
section,
checkbox,
fixedHtml,
input,
Expand All @@ -16,6 +17,15 @@ public enum FieldType
pem // file picker that allows upload of a PEM file (used on SAML settings page)
}

public static SettingsField of(@NotNull String name, @NotNull FieldType type, @NotNull String caption)
{
SettingsField sf = new SettingsField();
sf.put("name", name);
sf.put("type", type.toString());
sf.put("caption", caption);

return sf;
}
public static SettingsField of(@NotNull String name, @NotNull FieldType type, @NotNull String caption, @NotNull String description, boolean required, Object defaultValue)
{
SettingsField sf = of(name, type, caption, required, defaultValue);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,23 +84,35 @@
float: right;
}

.sso-fields__label {
width: 130px;
.auth-config-input-row {
display: flex;
height: 50px;
align-items: center;
position: relative;
}

.auth-config-input-row__caption {
width: 220px;
flex-shrink: 0;
}

.auth-config-input-row__input {
flex-grow: 1;
}

.auth-config-section {
margin-top: 10px;
font-weight: bold;
}

.sso-fields__file-attachment {
width: 300px;
margin-left: auto;
margin-right: 0;
flex-grow: 1;
}

.sso-fields__image-holder {
float: left;
width: 240px;
height: 95px;
flex-grow: 1;
display: flex;
align-items: center;
flex-direction: column;
justify-content: center;
}

Expand All @@ -119,36 +131,25 @@
}

.sso-fields__image__header-logo {
max-height: 26px;
max-height: 44px;
}

.sso-fields__image__page-logo {
max-height: 44px;
}

.sso-fields__null-image {
margin-left: 7px;
}

.sso-fields__delete-img {
color: #d9534f;
position: absolute;
top: 0;
right: 0;
margin-left: 5px;
padding-bottom: 30px;
}

.sso-fields__image-holder {
position: relative;
}

.sso-fields__image-holder--view-only {
margin-left: 265px;
}

.sso-fields__null-image__text {
font-size: smaller;
color: #DCDCDC;
margin-left: 5px;
margin-left: 20px;
}

.fa-cloud-upload:before {
Expand Down Expand Up @@ -199,3 +200,16 @@
margin-top: 30px;
}
}

// Adjusts styling of FileAttachmentForm for our specific purposes
.file-upload--one-row {
display: block;
}

.file-upload--file-entry-listing {
overflow-y: auto;
}

.wizard-row--container {
margin: 0;
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
.modal-dialog {
width: 800px;
}

.modal__test-button {
display: flex;
justify-content: flex-end;
Expand All @@ -13,97 +17,37 @@
color: red;
font-size: 10px;
position: absolute;
left: 270px;
top: 30px;
left: 222px;
top: 40px;
}

.modal__tiny-error--small-file-input {
color: red;
font-size: 10px;
position: absolute;
left: 285px;
top: 192px;
left: 222px;
top: 46px;
}

.modal__enable-toggle {
display: flex;
float: right;
}

.modal__description-title {
height: 40px;
}

.modal__settings-text {
margin-bottom: 17px;
}

.modal__field-label {
height: 40px;
}

.modal__field {
height: 30px;
margin-bottom: 10px;
}

.modal__text-input-field {
border-radius: 5px;
float: right;
width: 300px;
}

.modal__text-input-field--error {
.auth-config-input-row__input--error {
border:1px solid #FF0004;
}

.modal__textarea-field {
height: 55px;
}

.modal__option-field {
height: 38px;
}

.modal__compact-file-upload-field {
height: 55px;
}

.modal__fixed-html-field {
height: 80px;
margin-top: 10px;
}

.modal__text-input {
height: 45px;
position: relative;
}

.modal__input {
float: right;
margin-right: 285px;
}

.modal__compact-file-upload-input {
float: right;
width: 300px;
}

.modal__option-input {
float: right;
width: 300px;
}

.modal__pem-input {
width: 300px;
float: right;
overflow: scroll;
}

.modal__fixed-html-text {
float: right;
width: 300px;
}

.modal__help-link {
margin-right: 10px;
}
Expand Down
28 changes: 16 additions & 12 deletions core/src/client/components/DynamicConfigurationModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -202,18 +202,22 @@ export default class DynamicConfigurationModal extends PureComponent<Props, Part
</div>
</div>

<div className="bold-text modal__settings-text"> Settings</div>

<TextInput
onChange={this.onChange}
value={fieldValues.description}
type="text"
canEdit={canEdit}
requiredFieldEmpty={requiredFieldEmpty}
required={true}
name="description"
caption="Description"
/>
{authConfig.provider !== 'SAML' && (
<>
<div className="bold-text modal__settings-text"> Settings</div>

<TextInput
onChange={this.onChange}
value={fieldValues.description}
type="text"
canEdit={canEdit}
requiredFieldEmpty={requiredFieldEmpty}
required={true}
name="description"
caption="Name/Description"
/>
</>
)}

<DynamicFields
fields={modalType.settingsFields}
Expand Down
Loading

0 comments on commit 1ed38f0

Please sign in to comment.