Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
skublik committed Sep 25, 2023
2 parents dc40980 + 3851e1e commit 1412aaa
Show file tree
Hide file tree
Showing 12 changed files with 60 additions and 18 deletions.
6 changes: 6 additions & 0 deletions config/sql/native/postgres-upgrade.sql
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,12 @@ CREATE TRIGGER m_role_analysis_session_oid_delete_tr AFTER DELETE ON m_role_anal
FOR EACH ROW EXECUTE FUNCTION delete_object_oid();
$aa$);

-- Display Name for Connector Type

call apply_change(24, $aa$
ALTER TABLE m_connector ADD displayNameOrig TEXT;
ALTER TABLE m_connector ADD displayNameNorm TEXT;
$aa$);

---
-- WRITE CHANGES ABOVE ^^
Expand Down
4 changes: 3 additions & 1 deletion config/sql/native/postgres.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1255,6 +1255,8 @@ CREATE TABLE m_connector (
connectorHostRefTargetOid UUID,
connectorHostRefTargetType ObjectType,
connectorHostRefRelationId INTEGER REFERENCES m_uri(id),
displayNameOrig TEXT,
displayNameNorm TEXT,
targetSystemTypes INTEGER[],
available BOOLEAN
)
Expand Down Expand Up @@ -2158,4 +2160,4 @@ END $$;
-- This is important to avoid applying any change more than once.
-- Also update SqaleUtils.CURRENT_SCHEMA_CHANGE_NUMBER
-- repo/repo-sqale/src/main/java/com/evolveum/midpoint/repo/sqale/SqaleUtils.java
call apply_change(23, $$ SELECT 1 $$, true);
call apply_change(24, $$ SELECT 1 $$, true);
25 changes: 12 additions & 13 deletions gui/admin-gui/src/frontend/js/midpoint-theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,19 +159,18 @@ export default class MidPointTheme {

breakLongerTextInTableCell(cellId) {
$("#" + cellId).css("word-break", function (index, origValue) {
var textOfColumn = document.getElementById(cellId).innerText;
if (textOfColumn != '' && textOfColumn != ' ') {
var numberOfChars = 15;
var controlValue = numberOfChars;
var indexOfSpace = textOfColumn.indexOf(' ');

while (indexOfSpace == (controlValue - numberOfChars)) {
controlValue = controlValue + 1 + indexOfSpace;
indexOfSpace = textOfColumn.indexOf(' ', (indexOfSpace + 1));
}
var textOfColumn = document.getElementById(cellId).innerText.trim();
var permittedChars = "@" //Just add other permitted chars to string if needed
if (textOfColumn != '' && textOfColumn != ' ' && !Array.from(permittedChars).some(char => textOfColumn.includes(char)))
{
var numberOfChars = 16;

if (textOfColumn.length >= numberOfChars) {
var indexOfSpace = textOfColumn.indexOf(' ');

if (indexOfSpace + 1 != textOfColumn.length && textOfColumn.length > controlValue) {
return "break-word";
if (indexOfSpace === -1 || indexOfSpace >= numberOfChars) {
return "break-all";
}
}
}
return "inherit";
Expand Down Expand Up @@ -470,7 +469,7 @@ export default class MidPointTheme {
if (!popup.is(':visible')) {
var position = ref.position();

var left = position.left + (ref.outerWidth() - popup.outerWidth()) / 2;// - paddingRight;
var left = position.left + (ref.outerWidth() - popup.outerWidth() - 9) / 2;// - paddingRight;
var top = position.top + ref.outerHeight();

var offsetLeft = ref.offset().left - position.left;
Expand Down
4 changes: 4 additions & 0 deletions gui/admin-gui/src/frontend/scss/midpoint-utils.scss
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,7 @@
height: auto !important;
position: absolute;
}

.lh-n {
line-height: normal!important;
}
9 changes: 8 additions & 1 deletion gui/admin-gui/src/frontend/scss/midpoint.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1280,7 +1280,7 @@ td .prism-property-value {

@include bg-variant(".search-item", $gray-300, true);

// deprecated, uses should be replaced by "d-flex gap-1 pl-1 bg-light rounded-sm align-items-center"
// deprecated, uses should be replaced by "d-flex gap-1 px-2 bg-light rounded-sm align-items-center"
.search-item {
display: flex;
gap: 0.25em;
Expand All @@ -1297,6 +1297,12 @@ td .prism-property-value {
}
}

.search-item-field {
.search-item-controls a > i {
font-size: 0.8rem;
}
}

.metadata div.prism-container {
// Removing the "top horizontal line" above metadata label and icon.
// HACK We should rather re-structure the code and provide custom css class.
Expand Down Expand Up @@ -1578,6 +1584,7 @@ fieldset.objectButtons {
flex-direction: row;
align-items: stretch;
background-color: $white;
border-radius: 0.25rem;
overflow: hidden;
box-shadow: 0 0 1px rgba(0,0,0,.125), 0 1px 3px rgba(0,0,0,.2);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ protected void onInitialize() {
private void initLayout() {
List<Badge> badgeList = getModelObject()
.stream()
.map(op -> new Badge(createBadgeClass(op), null, createLabelText(op), null))
.map(op -> new Badge(createBadgeClass(op), null, createLabelText(op), createTooltip(op)))
.toList();
add(new BadgeListPanel(
ID_OPERATION,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@
<append>true</append>
</appender>
</logging>
<audit>
<eventRecording>
<recordResourceStageChanges>false</recordResourceStageChanges>
</eventRecording>
</audit>
<notificationConfiguration>
<handler>
<simpleTaskNotifier>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
xmlns:q="http://prism.evolveum.com/xml/ns/public/query-3">
<name>SystemConfiguration</name>
<audit>
<eventRecording>
<recordResourceStageChanges>false</recordResourceStageChanges>
</eventRecording>
</audit>
<simulation>
<metric>
<identifier>nonsense-custom-metric</identifier>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class SqaleUtils {
*/
public static final String SCHEMA_AUDIT_CHANGE_NUMBER = "schemaAuditChangeNumber";

public static final int CURRENT_SCHEMA_CHANGE_NUMBER = 23;
public static final int CURRENT_SCHEMA_CHANGE_NUMBER = 24;

public static final int CURRENT_SCHEMA_AUDIT_CHANGE_NUMBER = 8;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,7 @@ public class MConnector extends MObject {
public Integer connectorHostRefRelationId;
public Integer[] targetSystemTypes;
public Boolean available;

public String displayNameOrig;
public String displayNameNorm;
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ public class QConnector extends QAssignmentHolder<MConnector> {
public static final ColumnMetadata AVAILABLE =
ColumnMetadata.named("available").ofType(Types.BOOLEAN);

public static final ColumnMetadata DISPLAY_NAME_ORIG =
ColumnMetadata.named("displayNameOrig").ofType(Types.VARCHAR);
public static final ColumnMetadata DISPLAY_NAME_NORM =
ColumnMetadata.named("displayNameNorm").ofType(Types.VARCHAR);

public final StringPath connectorBundle = createString("connectorBundle", CONNECTOR_BUNDLE);
public final StringPath connectorType = createString("connectorType", CONNECTOR_TYPE);
public final StringPath connectorVersion = createString("connectorVersion", CONNECTOR_VERSION);
Expand All @@ -59,6 +64,9 @@ public class QConnector extends QAssignmentHolder<MConnector> {
createArray("targetSystemTypes", Integer[].class, TARGET_SYSTEM_TYPES);
public final BooleanPath available = createBoolean("available", AVAILABLE);

public final StringPath displayNameNorm = createString("displayNameNorm", DISPLAY_NAME_NORM);
public final StringPath displayNameOrig = createString("displayNameOrig", DISPLAY_NAME_ORIG);

public QConnector(String variable) {
this(variable, DEFAULT_SCHEMA_NAME, TABLE_NAME);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ private QConnectorMapping(@NotNull SqaleRepoContext repositoryContext) {

addItemMapping(F_TARGET_SYSTEM_TYPE, multiUriMapper(q -> q.targetSystemTypes));
addItemMapping(F_AVAILABLE, booleanMapper(q -> q.available));
addItemMapping(F_DISPLAY_NAME,
polyStringMapper(q -> q.displayNameOrig, q -> q.displayNameNorm));
}

@Override
Expand Down Expand Up @@ -83,7 +85,8 @@ public MConnector newRowObject() {

row.targetSystemTypes = processCacheableUris(schemaObject.getTargetSystemType());
row.available = schemaObject.isAvailable();

setPolyString(schemaObject.getDisplayName(),
o -> row.displayNameOrig = o, n -> row.displayNameNorm = n);
return row;
}
}

0 comments on commit 1412aaa

Please sign in to comment.