Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding edit panel for dashboard report (MID-5525)
- Loading branch information
Showing
9 changed files
with
421 additions
and
163 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
...eum/midpoint/web/page/admin/reports/component/DashboardReportBasicConfigurationPanel.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<!-- | ||
~ Copyright (c) 2010-2013 Evolveum | ||
~ | ||
~ Licensed under the Apache License, Version 2.0 (the "License"); | ||
~ you may not use this file except in compliance with the License. | ||
~ You may obtain a copy of the License at | ||
~ | ||
~ http://www.apache.org/licenses/LICENSE-2.0 | ||
~ | ||
~ Unless required by applicable law or agreed to in writing, software | ||
~ distributed under the License is distributed on an "AS IS" BASIS, | ||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
~ See the License for the specific language governing permissions and | ||
~ limitations under the License. | ||
--> | ||
<!DOCTYPE html> | ||
<html xmlns:wicket="http://wicket.apache.org"> | ||
<wicket:panel> | ||
|
||
<div class="row"> | ||
<h3 style="margin-left: 20px;"><wicket:message key="ReportConfigurationPanel.title.basic"/></h3> | ||
|
||
<div class="form-group col-md-12" wicket:id="name" /> | ||
<div class="form-group col-md-12" wicket:id="description" /> | ||
<div class="form-group col-md-12"> | ||
<div class=" control-label col-md-2"> | ||
<span> | ||
<wicket:message key="DashboardReportBasicConfigurationPanel.label.dashboard"/> | ||
</span> | ||
</div> | ||
<div class="col-md-10" wicket:id="dashboard" /> | ||
</div> | ||
</div> | ||
|
||
</wicket:panel> | ||
</html> |
98 changes: 98 additions & 0 deletions
98
...eum/midpoint/web/page/admin/reports/component/DashboardReportBasicConfigurationPanel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
/* | ||
* Copyright (c) 2010-2019 Evolveum | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package com.evolveum.midpoint.web.page.admin.reports.component; | ||
|
||
import com.evolveum.midpoint.gui.api.component.BasePanel; | ||
import com.evolveum.midpoint.gui.api.util.WebComponentUtil; | ||
import com.evolveum.midpoint.gui.impl.factory.ItemRealValueModel; | ||
import com.evolveum.midpoint.gui.impl.prism.PrismReferencePanel; | ||
import com.evolveum.midpoint.prism.Referencable; | ||
import com.evolveum.midpoint.prism.query.ObjectFilter; | ||
import com.evolveum.midpoint.prism.query.builder.S_FilterEntryOrEmpty; | ||
import com.evolveum.midpoint.web.component.form.DropDownFormGroup; | ||
import com.evolveum.midpoint.web.component.form.TextAreaFormGroup; | ||
import com.evolveum.midpoint.web.component.form.TextFormGroup; | ||
import com.evolveum.midpoint.web.component.form.ValueChoosePanel; | ||
import com.evolveum.midpoint.web.page.admin.reports.dto.ReportDto; | ||
import com.evolveum.midpoint.xml.ns._public.common.common_3.AbstractRoleType; | ||
import com.evolveum.midpoint.xml.ns._public.common.common_3.DashboardType; | ||
import com.evolveum.midpoint.xml.ns._public.common.common_3.ExportType; | ||
import com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectReferenceType; | ||
import com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType; | ||
import com.evolveum.midpoint.xml.ns._public.common.common_3.RoleType; | ||
import com.evolveum.midpoint.xml.ns._public.common.common_3.ShadowType; | ||
|
||
import org.apache.wicket.markup.html.form.ChoiceRenderer; | ||
import org.apache.wicket.markup.html.form.EnumChoiceRenderer; | ||
import org.apache.wicket.markup.html.form.IChoiceRenderer; | ||
import org.apache.wicket.model.IModel; | ||
import org.apache.wicket.model.PropertyModel; | ||
|
||
import java.util.ArrayList; | ||
import java.util.Arrays; | ||
import java.util.List; | ||
|
||
import javax.xml.namespace.QName; | ||
|
||
/** | ||
* @author skublik | ||
* | ||
*/ | ||
public class DashboardReportBasicConfigurationPanel extends BasePanel<ReportDto> { | ||
|
||
private static final String ID_NAME = "name"; | ||
private static final String ID_DESCRIPTION = "description"; | ||
private static final String ID_DASHBOARD = "dashboard"; | ||
private static final String ID_LABEL_SIZE = "col-md-2"; | ||
private static final String ID_INPUT_SIZE = "col-md-10"; | ||
|
||
public DashboardReportBasicConfigurationPanel(String id, IModel<ReportDto> model) { | ||
super(id, model); | ||
initLayout(); | ||
} | ||
|
||
protected void initLayout() { | ||
TextFormGroup name = new TextFormGroup(ID_NAME, new PropertyModel<>(getModel(), ID_NAME), | ||
createStringResource("ObjectType.name"), ID_LABEL_SIZE, ID_INPUT_SIZE, true); | ||
add(name); | ||
|
||
TextAreaFormGroup description = new TextAreaFormGroup(ID_DESCRIPTION, | ||
new PropertyModel<>(getModel(), ID_DESCRIPTION), | ||
createStringResource("ObjectType.description"), ID_LABEL_SIZE, ID_INPUT_SIZE, false); | ||
add(description); | ||
|
||
ValueChoosePanel<ObjectReferenceType> panel = | ||
new ValueChoosePanel<ObjectReferenceType>(ID_DASHBOARD, | ||
new PropertyModel<ObjectReferenceType>(getModel(), ReportDto.F_DASHBOARD_REF)) { | ||
|
||
private static final long serialVersionUID = 1L; | ||
|
||
@Override | ||
public List<QName> getSupportedTypes() { | ||
return Arrays.asList(DashboardType.COMPLEX_TYPE); | ||
} | ||
|
||
|
||
@Override | ||
protected <O extends ObjectType> Class<O> getDefaultType(List<QName> supportedTypes) { | ||
return (Class<O>) DashboardType.class; | ||
} | ||
|
||
}; | ||
add(panel); | ||
|
||
} | ||
} |
39 changes: 39 additions & 0 deletions
39
...olveum/midpoint/web/page/admin/reports/component/JasperReportBasicConfigurationPanel.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<!-- | ||
~ Copyright (c) 2010-2013 Evolveum | ||
~ | ||
~ Licensed under the Apache License, Version 2.0 (the "License"); | ||
~ you may not use this file except in compliance with the License. | ||
~ You may obtain a copy of the License at | ||
~ | ||
~ http://www.apache.org/licenses/LICENSE-2.0 | ||
~ | ||
~ Unless required by applicable law or agreed to in writing, software | ||
~ distributed under the License is distributed on an "AS IS" BASIS, | ||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
~ See the License for the specific language governing permissions and | ||
~ limitations under the License. | ||
--> | ||
<!DOCTYPE html> | ||
<html xmlns:wicket="http://wicket.apache.org"> | ||
<wicket:panel> | ||
|
||
<div class="row"> | ||
<div class="col-md-6"> | ||
<h3 style="margin-left: 20px;"><wicket:message key="ReportConfigurationPanel.title.basic"/></h3> | ||
|
||
<div class="form-group" wicket:id="name" /> | ||
<div class="form-group" wicket:id="description" /> | ||
<div class="form-group" wicket:id="exportType" /> | ||
|
||
</div> | ||
<div class="col-md-6"> | ||
<h3 style="margin-left: 20px;"><wicket:message key="ReportConfigurationPanel.title.advanced"/></h3> | ||
<div class="form-group" wicket:id="maxPages" /> | ||
<div class="form-group" wicket:id="timeout" /> | ||
<div class="form-group" wicket:id="virtualizer" /> | ||
<div class="form-group" wicket:id="virtualizerKickOn" /> | ||
</div> | ||
</div> | ||
|
||
</wicket:panel> | ||
</html> |
Oops, something went wrong.