Skip to content

Commit

Permalink
Merge branch 'master' of github.com:Evolveum/midpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
katkav committed Mar 12, 2015
2 parents 19ba11e + b792c57 commit 02f96c3
Show file tree
Hide file tree
Showing 34 changed files with 960 additions and 191 deletions.
7 changes: 4 additions & 3 deletions config/sql/midpoint/3.1.1/h2/h2-3.1.1.sql
Expand Up @@ -230,13 +230,14 @@ CREATE TABLE m_lookup_table (
);

CREATE TABLE m_lookup_table_row (
row_key VARCHAR(255) NOT NULL,
owner_oid VARCHAR(36) NOT NULL,
id SMALLINT NOT NULL,
owner_oid VARCHAR(36) NOT NULL,
row_key VARCHAR(255),
label_norm VARCHAR(255),
label_orig VARCHAR(255),
lastChangeTimestamp TIMESTAMP,
row_value VARCHAR(255),
PRIMARY KEY (row_key, owner_oid)
PRIMARY KEY (id, owner_oid)
);

CREATE TABLE m_node (
Expand Down
7 changes: 4 additions & 3 deletions config/sql/midpoint/3.1.1/h2/h2-upgrade-3.1-3.1.1.sql
Expand Up @@ -6,13 +6,14 @@ CREATE TABLE m_lookup_table (
);

CREATE TABLE m_lookup_table_row (
row_key VARCHAR(255) NOT NULL,
owner_oid VARCHAR(36) NOT NULL,
id SMALLINT NOT NULL,
owner_oid VARCHAR(36) NOT NULL,
row_key VARCHAR(255),
label_norm VARCHAR(255),
label_orig VARCHAR(255),
lastChangeTimestamp TIMESTAMP,
row_value VARCHAR(255),
PRIMARY KEY (row_key, owner_oid)
PRIMARY KEY (id, owner_oid)
);

ALTER TABLE m_lookup_table
Expand Down
9 changes: 5 additions & 4 deletions config/sql/midpoint/3.1.1/mysql/mysql-3.1.1.sql
Expand Up @@ -297,13 +297,14 @@ CREATE TABLE m_lookup_table (
ENGINE = InnoDB;

CREATE TABLE m_lookup_table_row (
row_key VARCHAR(255) NOT NULL,
owner_oid VARCHAR(36) NOT NULL,
id SMALLINT NOT NULL,
owner_oid VARCHAR(36) NOT NULL,
row_key VARCHAR(255),
label_norm VARCHAR(255),
label_orig VARCHAR(255),
lastChangeTimestamp DATETIME(6),
lastChangeTimestamp DATETIME,
row_value VARCHAR(255),
PRIMARY KEY (row_key, owner_oid)
PRIMARY KEY (id, owner_oid)
)
DEFAULT CHARACTER SET utf8
COLLATE utf8_bin
Expand Down
9 changes: 5 additions & 4 deletions config/sql/midpoint/3.1.1/mysql/mysql-upgrade-3.1-3.1.1.sql
Expand Up @@ -9,13 +9,14 @@ CREATE TABLE m_lookup_table (
ENGINE = InnoDB;

CREATE TABLE m_lookup_table_row (
row_key VARCHAR(255) NOT NULL,
owner_oid VARCHAR(36) NOT NULL,
id SMALLINT NOT NULL,
owner_oid VARCHAR(36) NOT NULL,
row_key VARCHAR(255),
label_norm VARCHAR(255),
label_orig VARCHAR(255),
lastChangeTimestamp DATETIME(6),
lastChangeTimestamp DATETIME,
row_value VARCHAR(255),
PRIMARY KEY (row_key, owner_oid)
PRIMARY KEY (id, owner_oid)
)
DEFAULT CHARACTER SET utf8
COLLATE utf8_bin
Expand Down
7 changes: 4 additions & 3 deletions config/sql/midpoint/3.1.1/oracle/oracle-3.1.1.sql
Expand Up @@ -233,13 +233,14 @@ CREATE TABLE m_lookup_table (
) INITRANS 30;

CREATE TABLE m_lookup_table_row (
row_key VARCHAR2(255 CHAR) NOT NULL,
owner_oid VARCHAR2(36 CHAR) NOT NULL,
id NUMBER(5, 0) NOT NULL,
owner_oid VARCHAR2(36 CHAR) NOT NULL,
row_key VARCHAR2(255 CHAR),
label_norm VARCHAR2(255 CHAR),
label_orig VARCHAR2(255 CHAR),
lastChangeTimestamp TIMESTAMP,
row_value VARCHAR2(255 CHAR),
PRIMARY KEY (row_key, owner_oid)
PRIMARY KEY (id, owner_oid)
) INITRANS 30;

CREATE TABLE m_node (
Expand Down
7 changes: 4 additions & 3 deletions config/sql/midpoint/3.1.1/oracle/oracle-upgrade-3.1-3.1.1.sql
Expand Up @@ -6,13 +6,14 @@ CREATE TABLE m_lookup_table (
) INITRANS 30;

CREATE TABLE m_lookup_table_row (
row_key VARCHAR2(255 CHAR) NOT NULL,
owner_oid VARCHAR2(36 CHAR) NOT NULL,
id NUMBER(5, 0) NOT NULL,
owner_oid VARCHAR2(36 CHAR) NOT NULL,
row_key VARCHAR2(255 CHAR),
label_norm VARCHAR2(255 CHAR),
label_orig VARCHAR2(255 CHAR),
lastChangeTimestamp TIMESTAMP,
row_value VARCHAR2(255 CHAR),
PRIMARY KEY (row_key, owner_oid)
PRIMARY KEY (id, owner_oid)
) INITRANS 30;

ALTER TABLE m_lookup_table
Expand Down
7 changes: 4 additions & 3 deletions config/sql/midpoint/3.1.1/postgresql/postgresql-3.1.1.sql
Expand Up @@ -230,13 +230,14 @@ CREATE TABLE m_lookup_table (
);

CREATE TABLE m_lookup_table_row (
row_key VARCHAR(255) NOT NULL,
owner_oid VARCHAR(36) NOT NULL,
id INT2 NOT NULL,
owner_oid VARCHAR(36) NOT NULL,
row_key VARCHAR(255),
label_norm VARCHAR(255),
label_orig VARCHAR(255),
lastChangeTimestamp TIMESTAMP,
row_value VARCHAR(255),
PRIMARY KEY (row_key, owner_oid)
PRIMARY KEY (id, owner_oid)
);

CREATE TABLE m_node (
Expand Down
Expand Up @@ -6,13 +6,14 @@ CREATE TABLE m_lookup_table (
);

CREATE TABLE m_lookup_table_row (
row_key VARCHAR(255) NOT NULL,
owner_oid VARCHAR(36) NOT NULL,
id INT2 NOT NULL,
owner_oid VARCHAR(36) NOT NULL,
row_key VARCHAR(255),
label_norm VARCHAR(255),
label_orig VARCHAR(255),
lastChangeTimestamp TIMESTAMP,
row_value VARCHAR(255),
PRIMARY KEY (row_key, owner_oid)
PRIMARY KEY (id, owner_oid)
);

ALTER TABLE m_lookup_table
Expand Down
7 changes: 4 additions & 3 deletions config/sql/midpoint/3.1.1/sqlserver/sqlserver-3.1.1.sql
Expand Up @@ -230,13 +230,14 @@ CREATE TABLE m_lookup_table (
);

CREATE TABLE m_lookup_table_row (
row_key NVARCHAR(255) COLLATE database_default NOT NULL,
owner_oid NVARCHAR(36) COLLATE database_default NOT NULL,
id SMALLINT NOT NULL,
owner_oid NVARCHAR(36) COLLATE database_default NOT NULL,
row_key NVARCHAR(255) COLLATE database_default,
label_norm NVARCHAR(255) COLLATE database_default,
label_orig NVARCHAR(255) COLLATE database_default,
lastChangeTimestamp DATETIME2,
row_value NVARCHAR(255) COLLATE database_default,
PRIMARY KEY (row_key, owner_oid)
PRIMARY KEY (id, owner_oid)
);

CREATE TABLE m_node (
Expand Down
Expand Up @@ -6,13 +6,14 @@ CREATE TABLE m_lookup_table (
);

CREATE TABLE m_lookup_table_row (
row_key NVARCHAR(255) COLLATE database_default NOT NULL,
owner_oid NVARCHAR(36) COLLATE database_default NOT NULL,
id SMALLINT NOT NULL,
owner_oid NVARCHAR(36) COLLATE database_default NOT NULL,
row_key NVARCHAR(255) COLLATE database_default,
label_norm NVARCHAR(255) COLLATE database_default,
label_orig NVARCHAR(255) COLLATE database_default,
lastChangeTimestamp DATETIME2,
row_value NVARCHAR(255) COLLATE database_default,
PRIMARY KEY (row_key, owner_oid)
PRIMARY KEY (id, owner_oid)
);

ALTER TABLE m_lookup_table
Expand Down
Expand Up @@ -233,6 +233,11 @@ public ObjectQuery getProviderQuery(){
return query;
}
}

@Override
protected void handlePartialError(OperationResult result) {
AssignmentTablePanel.this.handlePartialError(result);
}
});
add(assignWindow);

Expand Down Expand Up @@ -551,4 +556,9 @@ private void removeResourceFromAccConstruction(AssignmentType assignment) {
assignment.getConstruction().setResourceRef(ref);
assignment.getConstruction().setResource(null);
}

/**
* Override to provide handle operation for partial error during provider iterator operation.
* */
protected void handlePartialError(OperationResult result){}
}
Expand Up @@ -16,6 +16,7 @@
package com.evolveum.midpoint.web.component.wizard.resource.component.schemahandling;

import com.evolveum.midpoint.prism.PrismObject;
import com.evolveum.midpoint.prism.path.ItemPath;
import com.evolveum.midpoint.prism.util.ItemPathUtil;
import com.evolveum.midpoint.schema.processor.ObjectClassComplexTypeDefinition;
import com.evolveum.midpoint.schema.processor.ResourceAttributeDefinition;
Expand Down Expand Up @@ -57,6 +58,7 @@
import javax.xml.namespace.QName;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

/**
Expand Down Expand Up @@ -161,7 +163,7 @@ public boolean isVisible() {
refTooltip.setOutputMarkupId(true);
schemaRefPanel.add(refTooltip);

DropDownChoice refSelect = new DropDownChoice<>(ID_REFERENCE_SELECT, new PropertyModel<ItemPathType>(getModel(), "ref"),
DropDownChoice refSelect = new DropDownChoice<ItemPathType>(ID_REFERENCE_SELECT, new PropertyModel<ItemPathType>(getModel(), "ref"),
new AbstractReadOnlyModel<List<ItemPathType>>() {

@Override
Expand All @@ -179,7 +181,20 @@ public Object getDisplayValue(ItemPathType object) {
public String getIdValue(ItemPathType object, int index) {
return Integer.toString(index);
}
});
}){

@Override
protected boolean isSelected(ItemPathType object, int index, String selected) {
if(getModelObject() == null || getModelObject().equals(new ItemPathType())){
return false;
}

QName referenceQName = ItemPathUtil.getOnlySegmentQName(getModelObject());
QName optionQName = ItemPathUtil.getOnlySegmentQName(object);

return referenceQName.equals(optionQName);
}
};
refSelect.setNullValid(false);

refSelect.setOutputMarkupId(true);
Expand Down Expand Up @@ -391,7 +406,8 @@ private List<ItemPathType> loadObjectReferences(){
if(objectType != null && def.getTypeName().equals(objectType.getObjectClass())){

for (ResourceAttributeDefinition attributeDefinition : def.getAttributeDefinitions()) {
references.add(new ItemPathType(attributeDefinition.getName().getLocalPart()));
ItemPath itemPath = new ItemPath(attributeDefinition.getName());
references.add(new ItemPathType(itemPath));
}
}
}
Expand Down
Expand Up @@ -118,7 +118,8 @@ <h1 wicket:id="pageTitle">

<!-- Footer -->
<div class="mp-footer">
<br>&copy;&nbsp;2015&nbsp;<a href="https://www.evolveum.com/">Evolveum</a>&nbsp;,&nbsp;Open Source Identity Management<br>
Thanks for using <a href="http://midpoint.evolveum.com">midPoint</a>, developed by<br>
<a href="https://www.evolveum.com/">Evolveum</a>,&nbsp;Open Source Identity Management, &copy;&nbsp;2015&nbsp;
</div>

</body>
Expand Down
Expand Up @@ -970,6 +970,7 @@ private void showAssignablePopup(AjaxRequestTarget target, Class<? extends Objec
AssignablePopupContent content = (AssignablePopupContent) modal.get(modal.getContentId());
content.setType(type);
showModalWindow(MODAL_ID_ASSIGNABLE, target);
target.add(getFeedbackPanel());
}

private void initResourceModal() {
Expand Down Expand Up @@ -1003,6 +1004,11 @@ private void initAssignableModal() {
createStringResource("pageUser.title.selectAssignable"), 1100, 560);
window.setContent(new AssignablePopupContent(window.getContentId()) {

@Override
protected void handlePartialError(OperationResult result) {
showResult(result);
}

@Override
protected void addPerformed(AjaxRequestTarget target, List<ObjectType> selected) {
addSelectedAssignablePerformed(target, selected);
Expand Down Expand Up @@ -1867,6 +1873,7 @@ private void deleteAccountPerformed(AjaxRequestTarget target) {
private void showModalWindow(String id, AjaxRequestTarget target) {
ModalWindow window = (ModalWindow) get(id);
window.show(target);
target.add(getFeedbackPanel());
}

private void deleteAccountConfirmedPerformed(AjaxRequestTarget target, List<UserAccountDto> selected) {
Expand Down
Expand Up @@ -21,6 +21,7 @@
import com.evolveum.midpoint.prism.query.AndFilter;
import com.evolveum.midpoint.prism.query.ObjectQuery;
import com.evolveum.midpoint.prism.query.SubstringFilter;
import com.evolveum.midpoint.schema.result.OperationResult;
import com.evolveum.midpoint.util.logging.LoggingUtils;
import com.evolveum.midpoint.util.logging.Trace;
import com.evolveum.midpoint.util.logging.TraceManager;
Expand All @@ -33,7 +34,6 @@
import com.evolveum.midpoint.web.component.util.BasePanel;
import com.evolveum.midpoint.web.component.util.LoadableModel;
import com.evolveum.midpoint.web.component.util.SelectableBean;
import com.evolveum.midpoint.web.page.admin.users.dto.OrgUnitSearchDto;
import com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType;
import com.evolveum.midpoint.xml.ns._public.common.common_3.OrgType;
import com.evolveum.midpoint.xml.ns._public.common.common_3.RoleType;
Expand Down Expand Up @@ -119,14 +119,29 @@ public void onClick(AjaxRequestTarget target) {

private TablePanel createTable() {
List<IColumn> columns = createMultiSelectColumns();
ObjectDataProvider provider = new ObjectDataProvider(getPageBase(), type);
ObjectDataProvider provider = new ObjectDataProvider(getPageBase(), type){

@Override
protected void handleNotSuccessOrHandledErrorInIterator(OperationResult result) {
if(result.isPartialError()){
handlePartialError(result);
} else {
super.handleNotSuccessOrHandledErrorInIterator(result);
}
}
};
provider.setQuery(getProviderQuery());
TablePanel table = new TablePanel(ID_TABLE, provider, columns);
table.setOutputMarkupId(true);

return table;
}

/**
* Override to provide handle operation for partial error during provider iterator operation.
* */
protected void handlePartialError(OperationResult result){}

public ObjectQuery getProviderQuery(){
return null;
}
Expand Down
4 changes: 4 additions & 0 deletions gui/admin-gui/src/main/webapp/less/midpoint/midpoint.less
Expand Up @@ -30,13 +30,17 @@

div.mp-main-container{
height:100%;
padding-bottom: 40px;
}

div.mp-footer{
position: absolute;
bottom: 0;
text-align: center;
width: 100%;
height: 40px;
margin-bottom: 0.3em;
margin-top: 0.3em;
}

/**
Expand Down

0 comments on commit 02f96c3

Please sign in to comment.