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 Aug 30, 2023
2 parents e5d798c + 6cc426d commit e0e26e7
Show file tree
Hide file tree
Showing 357 changed files with 18,249 additions and 3,819 deletions.
1,428 changes: 0 additions & 1,428 deletions config/sql/generic-old/postgresql-4.6-all.sql

This file was deleted.

9 changes: 0 additions & 9 deletions config/sql/generic-old/postgresql-upgrade-4.5-4.6.sql

This file was deleted.

4 changes: 3 additions & 1 deletion config/sql/native-new/postgres-new-audit.sql
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ DO $$ BEGIN
'REPORT_DATA',
'RESOURCE',
'ROLE',
'ROLE_ANALYSIS_CLUSTER',
'ROLE_ANALYSIS_SESSION',
'SECURITY_POLICY',
'SEQUENCE',
'SERVICE',
Expand Down Expand Up @@ -372,4 +374,4 @@ limit 50;
-- This is important to avoid applying any change more than once.
-- Also update SqaleUtils.CURRENT_SCHEMA_AUDIT_CHANGE_NUMBER
-- repo/repo-sqale/src/main/java/com/evolveum/midpoint/repo/sqale/SqaleUtils.java
call apply_audit_change(6, $$ SELECT 1 $$, true);
call apply_audit_change(7, $$ SELECT 1 $$, true);
7 changes: 7 additions & 0 deletions config/sql/native-new/postgres-new-upgrade-audit.sql
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,13 @@ call apply_audit_change(6, $aa$
ADD COLUMN shadowIntent TEXT;
$aa$);

-- Role Mining

call apply_audit_change(7, $aa$
ALTER TYPE ObjectType ADD VALUE IF NOT EXISTS 'ROLE_ANALYSIS_CLUSTER' AFTER 'ROLE';
ALTER TYPE ObjectType ADD VALUE IF NOT EXISTS 'ROLE_ANALYSIS_SESSION' AFTER 'ROLE_ANALYSIS_CLUSTER';
$aa$);

-- WRITE CHANGES ABOVE ^^
-- IMPORTANT: update apply_audit_change number at the end of postgres-new-audit.sql
-- to match the number used in the last change here!
Expand Down
46 changes: 46 additions & 0 deletions config/sql/native-new/postgres-new-upgrade.sql
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,52 @@ ALTER TABLE m_user
$aa$);


-- Role Mining --

call apply_change(22, $aa$
ALTER TYPE ObjectType ADD VALUE IF NOT EXISTS 'ROLE_ANALYSIS_CLUSTER' AFTER 'ROLE';
ALTER TYPE ObjectType ADD VALUE IF NOT EXISTS 'ROLE_ANALYSIS_SESSION' AFTER 'ROLE_ANALYSIS_CLUSTER';
$aa$);

call apply_change(23, $aa$
CREATE TABLE m_role_analysis_cluster (
oid UUID NOT NULL PRIMARY KEY REFERENCES m_object_oid(oid),
objectType ObjectType GENERATED ALWAYS AS ('ROLE_ANALYSIS_CLUSTER') STORED
CHECK (objectType = 'ROLE_ANALYSIS_CLUSTER'),
parentRefTargetOid UUID,
parentRefTargetType ObjectType,
parentRefRelationId INTEGER REFERENCES m_uri(id)
)
INHERITS (m_assignment_holder);

CREATE TRIGGER m_role_analysis_cluster_oid_insert_tr BEFORE INSERT ON m_role_analysis_cluster
FOR EACH ROW EXECUTE FUNCTION insert_object_oid();
CREATE TRIGGER m_role_analysis_cluster_update_tr BEFORE UPDATE ON m_role_analysis_cluster
FOR EACH ROW EXECUTE FUNCTION before_update_object();
CREATE TRIGGER m_role_analysis_cluster_oid_delete_tr AFTER DELETE ON m_role_analysis_cluster
FOR EACH ROW EXECUTE FUNCTION delete_object_oid();

CREATE INDEX m_role_analysis_cluster_parentRefTargetOid_idx ON m_role_analysis_cluster (parentRefTargetOid);
CREATE INDEX m_role_analysis_cluster_parentRefTargetType_idx ON m_role_analysis_cluster (parentRefTargetType);
CREATE INDEX m_role_analysis_cluster_parentRefRelationId_idx ON m_role_analysis_cluster (parentRefRelationId);


CREATE TABLE m_role_analysis_session (
oid UUID NOT NULL PRIMARY KEY REFERENCES m_object_oid(oid),
objectType ObjectType GENERATED ALWAYS AS ('ROLE_ANALYSIS_SESSION') STORED
CHECK (objectType = 'ROLE_ANALYSIS_SESSION')
)
INHERITS (m_assignment_holder);

CREATE TRIGGER m_role_analysis_session_oid_insert_tr BEFORE INSERT ON m_role_analysis_session
FOR EACH ROW EXECUTE FUNCTION insert_object_oid();
CREATE TRIGGER m_role_analysis_session_update_tr BEFORE UPDATE ON m_role_analysis_session
FOR EACH ROW EXECUTE FUNCTION before_update_object();
CREATE TRIGGER m_role_analysis_session_oid_delete_tr AFTER DELETE ON m_role_analysis_session
FOR EACH ROW EXECUTE FUNCTION delete_object_oid();
$aa$);


---
-- WRITE CHANGES ABOVE ^^
-- IMPORTANT: update apply_change number at the end of postgres-new.sql
Expand Down
43 changes: 42 additions & 1 deletion config/sql/native-new/postgres-new.sql
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ CREATE TYPE ObjectType AS ENUM (
'REPORT_DATA',
'RESOURCE',
'ROLE',
'ROLE_ANALYSIS_CLUSTER',
'ROLE_ANALYSIS_SESSION',
'SECURITY_POLICY',
'SEQUENCE',
'SERVICE',
Expand Down Expand Up @@ -1162,6 +1164,45 @@ CREATE INDEX m_report_data_policySituation_idx
CREATE INDEX m_report_data_createTimestamp_idx ON m_report_data (createTimestamp);
CREATE INDEX m_report_data_modifyTimestamp_idx ON m_report_data (modifyTimestamp);


CREATE TABLE m_role_analysis_cluster (
oid UUID NOT NULL PRIMARY KEY REFERENCES m_object_oid(oid),
objectType ObjectType GENERATED ALWAYS AS ('ROLE_ANALYSIS_CLUSTER') STORED
CHECK (objectType = 'ROLE_ANALYSIS_CLUSTER'),
parentRefTargetOid UUID,
parentRefTargetType ObjectType,
parentRefRelationId INTEGER REFERENCES m_uri(id)
)
INHERITS (m_assignment_holder);

CREATE TRIGGER m_role_analysis_cluster_oid_insert_tr BEFORE INSERT ON m_role_analysis_cluster
FOR EACH ROW EXECUTE FUNCTION insert_object_oid();
CREATE TRIGGER m_role_analysis_cluster_update_tr BEFORE UPDATE ON m_role_analysis_cluster
FOR EACH ROW EXECUTE FUNCTION before_update_object();
CREATE TRIGGER m_role_analysis_cluster_oid_delete_tr AFTER DELETE ON m_role_analysis_cluster
FOR EACH ROW EXECUTE FUNCTION delete_object_oid();

CREATE INDEX m_role_analysis_cluster_parentRefTargetOid_idx ON m_role_analysis_cluster (parentRefTargetOid);
CREATE INDEX m_role_analysis_cluster_parentRefTargetType_idx ON m_role_analysis_cluster (parentRefTargetType);
CREATE INDEX m_role_analysis_cluster_parentRefRelationId_idx ON m_role_analysis_cluster (parentRefRelationId);


CREATE TABLE m_role_analysis_session (
oid UUID NOT NULL PRIMARY KEY REFERENCES m_object_oid(oid),
objectType ObjectType GENERATED ALWAYS AS ('ROLE_ANALYSIS_SESSION') STORED
CHECK (objectType = 'ROLE_ANALYSIS_SESSION')
)
INHERITS (m_assignment_holder);

CREATE TRIGGER m_role_analysis_session_oid_insert_tr BEFORE INSERT ON m_role_analysis_session
FOR EACH ROW EXECUTE FUNCTION insert_object_oid();
CREATE TRIGGER m_role_analysis_session_update_tr BEFORE UPDATE ON m_role_analysis_session
FOR EACH ROW EXECUTE FUNCTION before_update_object();
CREATE TRIGGER m_role_analysis_session_oid_delete_tr AFTER DELETE ON m_role_analysis_session
FOR EACH ROW EXECUTE FUNCTION delete_object_oid();



-- Represents LookupTableType, see https://docs.evolveum.com/midpoint/reference/misc/lookup-tables/
CREATE TABLE m_lookup_table (
oid UUID NOT NULL PRIMARY KEY REFERENCES m_object_oid(oid),
Expand Down Expand Up @@ -2117,4 +2158,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(21, $$ SELECT 1 $$, true);
call apply_change(23, $$ SELECT 1 $$, true);
12 changes: 12 additions & 0 deletions gui/admin-gui/src/frontend/scss/_admin-lte-overrides.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,15 @@
.role-catalog-tiles-table div.img-circle {
background-color: #f5f5f5;
}

.dropdown-toggle:after {
vertical-align: middle;
/*margin: 0 0.255em;*/
margin-bottom: 0.05rem;
}

.login-box-msg,
.register-box-msg {
padding: 0 20px 10px;
}

8 changes: 8 additions & 0 deletions gui/admin-gui/src/frontend/scss/_tiles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@
&.simple-tile > i {
font-size: 2.625rem;
}

&.simple-tile.vertical > i {
font-size: 1.3rem;
line-height: 1.5;
width: 1.625rem;
text-align: center;
margin-right: 0.65rem;
}
}

@mixin selectable-tile {
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 @@ -69,6 +69,10 @@
color: $red;
}

.gap-2h {
gap: 0.75rem!important;
}

//Extra smooth transition function with importance flag
@mixin smooth-transition($duration, $important: "") {
$important-flag: if($important == "important", ' !important', '');
Expand Down
50 changes: 49 additions & 1 deletion gui/admin-gui/src/frontend/scss/midpoint.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,50 @@
@import "tiles";
@import "tables";

@import "role-mining-rotated-header";
@import "role-mining-static-header";
@import "role-mining-static-header-name";
@import "role-mining-static-row-header";
@import "role-mining-no-border";


.role-mining-rotated-header{
display:flex; display:flex;
justify-content:center; justify-content:center;
align-items:center; align-items:center;
transform: rotate(180deg); transform: rotate(180deg);
writing-mode: vertical-lr; writing-mode: vertical-lr;
width: 40px; width: 40px;
height: 150px; height: 150px;
border: 1px solid #f4f4f4; border: 1px solid #f4f4f4;
}

.role-mining-no-border {
border-left: none !important;
border-right: none !important;
}

.role-mining-static-header {
width: 40px;
height: 150px;
}

.role-mining-static-header-name {
display: flex;
justify-content: center;
align-items: center;
transform: rotate(180deg);
writing-mode: revert;
width: 40px;
height: 150px;
border: 1px solid #f4f4f4;
}

.role-mining-static-row-header {
width: 150px;
height: 150px;
}

body.custom-hold-transition {
.content-wrapper,
.right-side,
Expand Down Expand Up @@ -1759,7 +1803,11 @@ th.debug-list-buttons {
width: 220px;
height: 220px;
}

& .simple-tile.vertical {
width: 100%;
height: auto;
padding: 0.65rem 1rem;
}
& .role-catalog-tiles-table .catalog-tile-panel {
height: 376px;
margin-bottom: $grid-gutter-width;
Expand Down
14 changes: 14 additions & 0 deletions gui/admin-gui/src/frontend/scss/role-mining-no-border.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*!
* Copyright (C) 2010-2023 Evolveum and contributors
*
* This work is dual-licensed under the Apache License 2.0
* and European Union Public License. See LICENSE file for details.
*/


.role-mining-no-border {
border-left: none !important;
border-right: none !important;
}


20 changes: 20 additions & 0 deletions gui/admin-gui/src/frontend/scss/role-mining-rotated-header.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*!
* Copyright (C) 2010-2022 Evolveum and contributors
*
* This work is dual-licensed under the Apache License 2.0
* and European Union Public License. See LICENSE file for details.
*/


.role-mining-rotated-header {
display: flex;
justify-content: center;
align-items: center;
transform: rotate(180deg);
writing-mode: vertical-lr;
width: 40px;
height: 150px;
border: 1px solid #f4f4f4;
}


Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*!
* Copyright (C) 2010-2022 Evolveum and contributors
*
* This work is dual-licensed under the Apache License 2.0
* and European Union Public License. See LICENSE file for details.
*/


.role-mining-static-header-name {
display: flex;
justify-content: center;
align-items: center;
transform: rotate(180deg);
writing-mode: revert;
width: 40px;
height: 120px;
border: 1px solid #f4f4f4;
}


14 changes: 14 additions & 0 deletions gui/admin-gui/src/frontend/scss/role-mining-static-header.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*!
* Copyright (C) 2010-2022 Evolveum and contributors
*
* This work is dual-licensed under the Apache License 2.0
* and European Union Public License. See LICENSE file for details.
*/


.role-mining-static-header {
width: 40px;
height: 150px;
}


16 changes: 16 additions & 0 deletions gui/admin-gui/src/frontend/scss/role-mining-static-row-header.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*!
* Copyright (C) 2010-2022 Evolveum and contributors
*
* This work is dual-licensed under the Apache License 2.0
* and European Union Public License. See LICENSE file for details.
*/


.role-mining-static-row-header {
width: 150px;
height: 120px;
border-left: none !important;
border-right: none !important;
}


Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,30 @@
*/
package com.evolveum.midpoint.gui.api.component.autocomplete;

import com.evolveum.midpoint.web.component.prism.InputPanel;
import java.io.Serial;
import java.time.Duration;

import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.attributes.AjaxRequestAttributes;
import org.apache.wicket.ajax.attributes.ThrottlingSettings;
import org.apache.wicket.ajax.markup.html.AjaxLink;
import org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteSettings;

import java.time.Duration;
import com.evolveum.midpoint.web.component.prism.InputPanel;
import com.evolveum.midpoint.web.component.util.VisibleBehaviour;

/**
* @author semancik
*/
public abstract class AbstractAutoCompletePanel extends InputPanel {
private static final long serialVersionUID = 1L;
@Serial private static final long serialVersionUID = 1L;

private static final String ID_ICON_BUTTON = "iconButton";

public AbstractAutoCompletePanel(String id) {
super(id);
AjaxLink<String> showChoices = new AjaxLink<String>(ID_ICON_BUTTON) {
private static final long serialVersionUID = 1L;
AjaxLink<String> showChoices = new AjaxLink<>(ID_ICON_BUTTON) {
@Serial private static final long serialVersionUID = 1L;

@Override
public void onClick(AjaxRequestTarget target) {
Expand All @@ -41,9 +43,14 @@ protected void updateAjaxAttributes(AjaxRequestAttributes attributes) {
attributes.setThrottlingSettings(new ThrottlingSettings(Duration.ofMillis(settings.getThrottleDelay()), true));
}
};
showChoices.add(new VisibleBehaviour(this::isShowChoicesVisible));
add(showChoices);
}

protected boolean isShowChoicesVisible() {
return true;
}

protected AutoCompleteSettings createAutoCompleteSettings() {
AutoCompleteSettings autoCompleteSettings = new AutoCompleteSettings();
autoCompleteSettings.setShowListOnEmptyInput(true);
Expand Down

0 comments on commit e0e26e7

Please sign in to comment.