Skip to content

Commit

Permalink
Merge branch 'master' into feature/repo-aggregate
Browse files Browse the repository at this point in the history
  • Loading branch information
tonydamage committed Aug 2, 2023
2 parents d7eb18f + a78982e commit a324e7d
Show file tree
Hide file tree
Showing 732 changed files with 20,021 additions and 12,571 deletions.
35 changes: 35 additions & 0 deletions config/sql/native-new/postgres-new-upgrade.sql
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,41 @@ call apply_change(15, $aa$
ALTER TABLE m_resource ADD abstract BOOLEAN;
$aa$);

-- Task Affected Indexing (Changes to types)
call apply_change(16, $aa$
ALTER TYPE ContainerType ADD VALUE IF NOT EXISTS 'AFFECTED_RESOURCE_OBJECTS' AFTER 'ACCESS_CERTIFICATION_WORK_ITEM';
ALTER TYPE ContainerType ADD VALUE IF NOT EXISTS 'AFFECTED_OBJECTS' AFTER 'AFFECTED_RESOURCE_OBJECTS';
$aa)

-- Task Affected Indexing (tables)

call apply_change(17, $aa$
CREATE TABLE m_task_affected_resource_objects (
ownerOid UUID NOT NULL REFERENCES m_object_oid(oid) ON DELETE CASCADE,
containerType ContainerType GENERATED ALWAYS AS ('AFFECTED_RESOURCE_OBJECTS') STORED
CHECK (containerType = 'AFFECTED_RESOURCE_OBJECTS'),
objectClassId INTEGER REFERENCES m_uri(id),
resourceRefTargetOid UUID,
resourceRefTargetType ObjectType,
resourceRefRelationId INTEGER REFERENCES m_uri(id),
intent TEXT,
kind ShadowKindType,
PRIMARY KEY (ownerOid, cid)
) INHERITS(m_container);

CREATE TABLE m_task_affected_objects (
ownerOid UUID NOT NULL REFERENCES m_object_oid(oid) ON DELETE CASCADE,
containerType ContainerType GENERATED ALWAYS AS ('AFFECTED_OBJECTS') STORED
CHECK (containerType = 'AFFECTED_OBJECTS'),
type ObjectType,
archetypeRefTargetOid UUID,
archetypeRefTargetType ObjectType,
archetypeRefRelationId INTEGER REFERENCES m_uri(id),
PRIMARY KEY (ownerOid, cid)
) INHERITS(m_container);

$aa$)
---
-- WRITE CHANGES ABOVE ^^
-- IMPORTANT: update apply_change number at the end of postgres-new.sql
-- to match the number used in the last change here!
Expand Down
27 changes: 26 additions & 1 deletion config/sql/native-new/postgres-new.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1308,6 +1308,31 @@ CREATE INDEX m_task_ext_idx ON m_task USING gin(ext);
CREATE INDEX m_task_fullTextInfo_idx ON m_task USING gin(fullTextInfo gin_trgm_ops);
CREATE INDEX m_task_createTimestamp_idx ON m_task (createTimestamp);
CREATE INDEX m_task_modifyTimestamp_idx ON m_task (modifyTimestamp);

CREATE TABLE m_task_affected_resource_objects (
ownerOid UUID NOT NULL REFERENCES m_object_oid(oid) ON DELETE CASCADE,
containerType ContainerType GENERATED ALWAYS AS ('AFFECTED_RESOURCE_OBJECTS') STORED
CHECK (containerType = 'AFFECTED_RESOURCE_OBJECTS'),
objectClassId INTEGER REFERENCES m_uri(id),
resourceRefTargetOid UUID,
resourceRefTargetType ObjectType,
resourceRefRelationId INTEGER REFERENCES m_uri(id),
intent TEXT,
kind ShadowKindType,
PRIMARY KEY (ownerOid, cid)
) INHERITS(m_container);

CREATE TABLE m_task_affected_objects (
ownerOid UUID NOT NULL REFERENCES m_object_oid(oid) ON DELETE CASCADE,
containerType ContainerType GENERATED ALWAYS AS ('AFFECTED_OBJECTS') STORED
CHECK (containerType = 'AFFECTED_OBJECTS'),
type ObjectType,
archetypeRefTargetOid UUID,
archetypeRefTargetType ObjectType,
archetypeRefRelationId INTEGER REFERENCES m_uri(id),
PRIMARY KEY (ownerOid, cid)
) INHERITS(m_container);

-- endregion

-- region cases
Expand Down Expand Up @@ -2087,4 +2112,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(15, $$ SELECT 1 $$, true);
call apply_change(17, $$ SELECT 1 $$, true);
14 changes: 14 additions & 0 deletions gui/admin-gui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion gui/admin-gui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"tempusdominus-bootstrap-4": "^5.39.2",
"webpack": "^5.76.0",
"webpack-cli": "^5.0.0",
"webpack-merge": "^5.8.0"
"webpack-merge": "^5.8.0",
"bootstrap4-toggle" : "^3.6.1"
}
}
11 changes: 11 additions & 0 deletions gui/admin-gui/src/frontend/js/midpoint-theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -554,4 +554,15 @@ export default class MidPointTheme {
chart.draw(data)
});
}

/**
* used in SimulationModePanel.java
*
* @param compId
*/
initDropdownResize(panelId) {
var panel = $('#' + panelId);
panel.find("option.width-tmp-option").html(panel.find("select.resizing-select option:selected").text());
panel.find("select.resizing-select").width(panel.find("select.width-tmp-select").width());
}
}
2 changes: 2 additions & 0 deletions gui/admin-gui/src/frontend/js/vendors.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ import '../../../node_modules/select2/dist/js/select2';

import '../../../node_modules/sparklines';

import '../../../node_modules/admin-lte/plugins/bootstrap-switch/js/bootstrap-switch';

import '../../../node_modules/ace-builds/src-noconflict/ace';

ace.config.setModuleUrl('ace/theme/eclipse',
Expand Down
16 changes: 16 additions & 0 deletions gui/admin-gui/src/frontend/scss/midpoint.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1841,3 +1841,19 @@ th.debug-list-buttons {
background-color: $dark;
}
}

@each $color, $value in $theme-colors {
$backgroundValue: color-yiq($value);

.colored-form-#{$color}, .colored-form-#{$color}:hover, .colored-form-#{$color}:active, .colored-form-#{$color}:focus {
color: $value;
background-color: mix(#ffffff00, $value, 85%);
border-color: $value;

option {
background: $white;
color: $dark;
}
}

}
1 change: 1 addition & 0 deletions gui/admin-gui/src/frontend/scss/vendors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
@import "midpoint-variables";

@import "../../../node_modules/admin-lte/build/scss/adminlte";
@import "../../../node_modules/admin-lte/build/scss/plugins/bootstrap-switch";
@import "../../../node_modules/overlayscrollbars/css/OverlayScrollbars.css";
@import "../../../node_modules/datatables.net-bs4/css/dataTables.bootstrap4";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,9 @@ public abstract class MainObjectListPanel<O extends ObjectType> extends ObjectLi
private static final String OPERATION_DELETE_OBJECT = DOT_CLASS + "deleteObject";

private LoadableModel<ExecuteChangeOptionsDto> executeOptionsModel;

public MainObjectListPanel(String id, Class<O> type) {
this(id, type, null);
}

public MainObjectListPanel(String id, Class<O> type, Collection<SelectorOptions<GetOperationOptions>> options) {
super(id, type, options);
super(id, type);
executeOptionsModel = new LoadableModel<>(false) {

@Override
Expand All @@ -97,8 +93,8 @@ protected ExecuteChangeOptionsDto load() {
};
}

public MainObjectListPanel(String id, Class<O> type, Collection<SelectorOptions<GetOperationOptions>> options, ContainerPanelConfigurationType config) {
super(id, type, options, config);
public MainObjectListPanel(String id, Class<O> type, ContainerPanelConfigurationType config) {
super(id, type, config);
executeOptionsModel = new LoadableModel<>(false) {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
import java.util.function.Supplier;
import java.util.stream.Collectors;

import com.evolveum.midpoint.schema.GetOperationOptions;
import com.evolveum.midpoint.schema.SelectorOptions;

import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
import org.apache.wicket.extensions.markup.html.repeater.util.SortParam;
Expand All @@ -25,11 +28,8 @@
import com.evolveum.midpoint.gui.api.util.WebComponentUtil;
import com.evolveum.midpoint.gui.impl.component.ContainerableListPanel;
import com.evolveum.midpoint.model.api.authentication.CompiledObjectCollectionView;
import com.evolveum.midpoint.prism.path.ItemPath;
import com.evolveum.midpoint.prism.query.ObjectOrdering;
import com.evolveum.midpoint.prism.query.ObjectQuery;
import com.evolveum.midpoint.schema.GetOperationOptions;
import com.evolveum.midpoint.schema.SelectorOptions;
import com.evolveum.midpoint.gui.impl.component.data.provider.SelectableBeanObjectDataProvider;
import com.evolveum.midpoint.web.component.data.column.ColumnUtils;
import com.evolveum.midpoint.web.component.data.column.ObjectNameColumn;
Expand All @@ -52,12 +52,12 @@ public abstract class ObjectListPanel<O extends ObjectType> extends Containerabl
/**
* @param defaultType specifies type of the object that will be selected by default. It can be changed.
*/
public ObjectListPanel(String id, Class<O> defaultType, Collection<SelectorOptions<GetOperationOptions>> options) {
super(id, defaultType, options);
public ObjectListPanel(String id, Class<O> defaultType) {
super(id, defaultType);
}

public ObjectListPanel(String id, Class<O> defaultType, Collection<SelectorOptions<GetOperationOptions>> options, ContainerPanelConfigurationType config) {
super(id, defaultType, options, config);
public ObjectListPanel(String id, Class<O> defaultType, ContainerPanelConfigurationType config) {
super(id, defaultType, config);
}

protected String getSearchByNameParameterValue() {
Expand All @@ -73,8 +73,16 @@ protected String getSearchByNameParameterValue() {
return value.toString();
}

protected final SelectableBeanObjectDataProvider<O> createSelectableBeanObjectDataProvider(SerializableSupplier<ObjectQuery> querySuplier,
protected final SelectableBeanObjectDataProvider<O> createSelectableBeanObjectDataProvider(
SerializableSupplier<ObjectQuery> querySuplier,
SerializableFunction<SortParam<String>, List<ObjectOrdering>> orderingSuplier) {
return createSelectableBeanObjectDataProvider(querySuplier, orderingSuplier, null);
}

protected final SelectableBeanObjectDataProvider<O> createSelectableBeanObjectDataProvider(
SerializableSupplier<ObjectQuery> querySuplier,
SerializableFunction<SortParam<String>, List<ObjectOrdering>> orderingSuplier,
Collection<SelectorOptions<GetOperationOptions>> options) {
SelectableBeanObjectDataProvider<O> provider = new SelectableBeanObjectDataProvider<>(
getPageBase(), getSearchModel(), null) {
private static final long serialVersionUID = 1L;
Expand Down Expand Up @@ -107,7 +115,7 @@ public Set<O> getSelected() {
}
};
provider.setCompiledObjectCollectionView(getObjectCollectionView());
provider.setOptions(getOptions());
provider.setOptions(options);
return provider;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public PopupObjectListPanel(String id, Class<O> defaultType, boolean multiselect

public PopupObjectListPanel(String id, Class<O> defaultType, Collection<SelectorOptions<GetOperationOptions>> options,
boolean multiselect) {
super(id, defaultType, options);
super(id, defaultType);
this.multiselect = multiselect;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import java.util.Collection;
import java.util.Iterator;

import com.evolveum.midpoint.gui.api.util.WebComponentUtil;
import com.evolveum.midpoint.gui.api.util.WebModelServiceUtils;
import com.evolveum.midpoint.prism.PrismObject;
import com.evolveum.midpoint.schema.GetOperationOptions;
Expand Down Expand Up @@ -69,7 +70,6 @@ public AutoCompleteTextPanel(String id, final IModel<T> model, Class<T> type,
this.strict = strict;
}


public AutoCompleteTextPanel(String id, final IModel<T> model, Class<T> type, IAutoCompleteRenderer<T> renderer) {
super(id);

Expand Down Expand Up @@ -137,19 +137,11 @@ protected LookupTableType getLookupTable() {

protected LookupTableType getLookupTable() {
if (lookupTableOid != null) {
Task task = getPageBase().createSimpleTask("Load lookup table");
OperationResult result = task.getResult();
Collection<SelectorOptions<GetOperationOptions>> options = WebModelServiceUtils
.createLookupTableRetrieveOptions(getPageBase().getSchemaService());
PrismObject<LookupTableType> prismLookupTable = WebModelServiceUtils.loadObject(LookupTableType.class, lookupTableOid, options, getPageBase(), task, result);
if (prismLookupTable != null) {
return prismLookupTable.asObjectable();
}
}
return WebComponentUtil.loadLookupTable(lookupTableOid, getPageBase());
}
return null;
}


@Override
public FormComponent<T> getBaseFormComponent() {
return (FormComponent<T>) get(ID_INPUT);
Expand Down

0 comments on commit a324e7d

Please sign in to comment.