Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/Evolveum/midpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
Kateryna Honchar committed May 26, 2022
2 parents c4a9a4e + 26d8fd6 commit b939cf8
Show file tree
Hide file tree
Showing 37 changed files with 581 additions and 414 deletions.
File renamed without changes.
11 changes: 9 additions & 2 deletions gui/admin-gui/src/frontend/js/vendors.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,12 @@ ace.config.setModuleUrl('ace/ext/searchbox',
require('../../../node_modules/ace-builds/src-noconflict/ext-searchbox.js'));

// ace.config.setModuleUrl('ace/mode/xml_worker', require('../../../node_modules/ace-builds/src-noconflict/worker-xml.js'));
ace.config.setModuleUrl('ace/mode/xml_worker',
require('file-loader?publicPath=../../static/&name=[name].[ext]&esModule=false!../../../node_modules/ace-builds/src-noconflict/worker-xml.js'));
require('file-loader?publicPath=../../static/&name=[name].[ext]&esModule=false!../../../node_modules/ace-builds/src-noconflict/worker-xml.js')


// xml worker module is being loaded always using some url, it's different that theme and ext modules, therefore we'll compute
// <midpoint_context>/static/worker-xml.js from current script URL and use it to load correctly worker-xml.js script
var url = document.currentScript.src;
url = url.replace(/vendors.js/, "worker-xml.js");

ace.config.setModuleUrl('ace/mode/xml_worker', url);
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This work is dual-licensed under the Apache License 2.0
* and European Union Public License. See LICENSE file for details.
*/
@import "midpoint-theme-variables";
@import "midpoint-variables";

// AdminLTE and Bootstrap
@import "../../../node_modules/admin-lte/node_modules/bootstrap/scss/functions";
Expand Down Expand Up @@ -1749,3 +1749,36 @@ th.debug-list-buttons {
font-size: 0.5em;
}
}

.user-panel {
border-bottom: 0 !important;
}

.tile-panel {
width: 250px;
height: 250px;
border: 2px solid $white;
border-radius: $border-radius;
cursor: pointer;

&:hover {
border: 2px solid $lightblue;
border-radius: $border-radius;
}
}

.details-menu-panel {
min-width: 273px;

& > ul {
width: 100%;
margin: 0;
padding: 0;
list-style: none;

& > li {
display: flex;
flex-flow: column;
}
}
}
2 changes: 1 addition & 1 deletion gui/admin-gui/src/frontend/scss/vendors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
@import "../../../node_modules/@fontsource/source-sans-pro/400-italic.css";
@import "../../../node_modules/@fontsource/source-sans-pro/700.css";

@import "midpoint-theme-variables";
@import "midpoint-variables";

@import "../../../node_modules/admin-lte/build/scss/adminlte";
@import "../../../node_modules/overlayscrollbars/css/OverlayScrollbars.css";
Expand Down
2 changes: 1 addition & 1 deletion gui/admin-gui/src/frontend/scss/wicket.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* and European Union Public License. See LICENSE file for details.
*/

@import "midpoint-theme-variables";
@import "midpoint-variables";

#wicketDebugLink {
bottom: 55px !important;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
~ and European Union Public License. See LICENSE file for details.
-->
<wicket:panel xmlns:wicket="http://wicket.apache.org">
<form wicket:id="form" class="search-panel-form d-flex flex-wrap justify-content-end gap-1">
<form wicket:id="form" class="search-panel-form d-flex flex-wrap justify-content-end gap-1 align-items-start">
<div wicket:id="searchItemsPanel"/>

<div wicket:id="searchContainer">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,7 @@ private void addSelectedAccountPerformed(AjaxRequestTarget target, List<Resource
LOGGER.trace("Refined schema for {}\n{}", resource, refinedSchema.debugDump());
}

// TODO are we OK with "any" account definition?
ResourceObjectTypeDefinition accountDefinition = refinedSchema
.findDefaultOrAnyObjectTypeDefinition(ShadowKindType.ACCOUNT);
if (accountDefinition == null) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<!--
~ Copyright (c) 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.
-->

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:wicket="http://wicket.apache.org">
<body>
<wicket:extend>

<hr class="my-5"/>

<div class="d-flex flex-column flex-sm-row gap-2">
<div wicket:id="menu"/>
<div class="flex-grow-1 bg-gray" style="height: 600px;">
content
</div>
</div>

<hr class="my-5"/>

<form wicket:id="mainForm" class="d-flex justify-content-center">
<div wicket:id="wizard">
<div wicket:id="personOfInterest"/>
<div wicket:id="roleCatalog"/>
</div>
</form>
</wicket:extend>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
/*
* Copyright (C) 2016-2020 Evolveum and contributors
* Copyright (c) 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.
*/
package com.evolveum.midpoint.web.page.self;
package com.evolveum.midpoint.gui.impl.page.self;

import com.evolveum.midpoint.gui.impl.page.self.requestAccess.DetailsMenuPanel;
import com.evolveum.midpoint.gui.impl.page.self.requestAccess.PersonOfInterestPanel;
import com.evolveum.midpoint.gui.impl.page.self.requestAccess.RoleCatalogPanel;
import com.evolveum.midpoint.web.page.self.PageSelf;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.model.IModel;
Expand All @@ -19,8 +23,6 @@
import com.evolveum.midpoint.security.api.AuthorizationConstants;
import com.evolveum.midpoint.util.logging.Trace;
import com.evolveum.midpoint.util.logging.TraceManager;
import com.evolveum.midpoint.web.page.self.component.PersonOfInterestPanel;
import com.evolveum.midpoint.web.page.self.component.RoleCatalogPanel;

/**
* @author Viliam Repan (lazyman)
Expand Down Expand Up @@ -96,5 +98,8 @@ protected void onBackPerformed(AjaxRequestTarget target) {
};
roleCatalog.add(wizard.createWizardStepVisibleBehaviour(1));
wizard.add(roleCatalog);

//todo delete
add(new DetailsMenuPanel("menu"));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<!--
~ Copyright (c) 2010-2017 Evolveum
~
~ This work is dual-licensed under the Apache License 2.0
~ and European Union Public License. See LICENSE file for details.
-->
<!DOCTYPE html>
<html xmlns:wicket="http://wicket.apache.org">
<wicket:panel>
<ul>
<li class="border-bottom rounded-top">
<a href="#" style="color: inherit;" class="p-2 px-3 w-100 d-flex flex-wrap align-items-center bg-lightblue text-white rounded-top">
<i class="fa fa-fw fa-border-all mr-3"></i>
<span class="flex-grow-1">All roles</span>
</a>
</li>
<li class="border-bottom">
<a href="#" style="color: #495057;" class="p-2 px-3 w-100 d-flex flex-wrap align-items-center">
<i class="fa fa-fw fa-users mr-3"></i>
<span class="flex-grow-1">Roles of team mate</span>
<i class="fa fa-chevron-down"></i>
</a>
</li>
<li class="border-bottom">
<a href="#" style="color: inherit;" class="p-2 px-3 w-100 d-flex flex-wrap align-items-center bg-lightblue text-white">
<i class="fa fa-fw fa-users mr-3"></i>
<span class="flex-grow-1">Roles of team mate</span>
<i class="fa fa-chevron-down"></i>
</a>
<select class="form-control m-3 w-auto">
<option>Option 1</option>
</select>
</li>
<li class="border-bottom">
<a href="#" style="color: #495057;" class="p-2 px-3 w-100 d-flex flex-wrap align-items-center">
<i class="fa fa-fw fa-puzzle-piece mr-3"></i>
<span class="flex-grow-1">Applications</span>
<i class="fa fa-chevron-left"></i>
</a>
</li>
<li class="border-bottom rounded-bottom">
<a href="#" style="color: inherit;" class="p-2 px-3 w-100 d-flex flex-wrap align-items-center bg-lightblue text-white">
<i class="fa fa-fw fa-puzzle-piece mr-3"></i>
<span class="flex-grow-1">Applications</span>
<i class="fa fa-chevron-down"></i>
</a>
<ul class="ml-3" style="width: 100%; margin: 0; padding: 0; list-style: none;">
<li class="d-flex flex-column">
<a style="color: #495057;" class="p-2 px-3 w-100 d-flex flex-wrap align-items-center">
<i class="far fa-fw fa-circle mr-3"></i>
<span>Microsoft</span>
</a>
</li>
<li class="d-flex flex-column">
<a style="color: #495057;" class="p-2 px-3 w-100 d-flex flex-wrap align-items-center">
<i class="far fa-fw fa-circle mr-3"></i>
<span>Google</span>
</a>
</li>
<li class="d-flex flex-column">
<a style="color: #495057;" class="p-2 px-3 w-100 d-flex flex-wrap align-items-center">
<i class="far fa-fw fa-circle mr-3"></i>
<span>SAP</span>
</a>
</li>
<li class="d-flex flex-column">
<a style="color: #495057;" class="p-2 px-3 w-100 d-flex flex-wrap align-items-center">
<i class="far fa-fw fa-circle mr-3"></i>
<span>Uncategorized</span>
</a>
</li>
</ul>
</li>
</ul>
</wicket:panel>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* Copyright (c) 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.
*/

package com.evolveum.midpoint.gui.impl.page.self.requestAccess;

import com.evolveum.midpoint.gui.api.component.BasePanel;

import org.apache.wicket.behavior.AttributeAppender;

/**
* Created by Viliam Repan (lazyman).
*/
public class DetailsMenuPanel extends BasePanel {

public DetailsMenuPanel(String id) {
super(id);

initLayout();
}

private void initLayout() {
add(AttributeAppender.append("class", "details-menu-panel d-flex rounded bg-white align-self-stretch align-self-sm-start"));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<!--
~ Copyright (c) 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.
-->
<!DOCTYPE html>
<html xmlns:wicket="http://wicket.apache.org">
<wicket:panel>
<div class="d-flex flex-column align-items-center mt-5">
<h2>Who are you requesting for?</h2>
<h5>Select for whom do you want to request access whether it's you or group of team members</h5>
<div class="d-flex flex-wrap gap-3 justify-content-center mt-5">
<div wicket:id="myself"/>
<div wicket:id="group"/>
<div wicket:id="team"/>
</div>
<div class="d-flex gap-3 justify-content-center mt-5">
<a class="btn btn-outline-lightblue" wicket:id="back">
<i class="fas fa-arrow-left mr-2"></i>
Back
</a>
<a class="btn btn-success" wicket:id="next">
Next: Role catalog
<i class="fas fa-arrow-right ml-2"></i>
</a>
</div>
</div>
</wicket:panel>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* and European Union Public License. See LICENSE file for details.
*/

package com.evolveum.midpoint.web.page.self.component;
package com.evolveum.midpoint.gui.impl.page.self.requestAccess;

import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.markup.html.AjaxLink;
Expand All @@ -19,6 +19,10 @@ public class PersonOfInterestPanel extends BasePanel {

private static final long serialVersionUID = 1L;

private static final String ID_MYSELF = "myself";
private static final String ID_GROUP = "group";
private static final String ID_TEAM = "team";
private static final String ID_BACK = "back";
private static final String ID_NEXT = "next";

public PersonOfInterestPanel(String id) {
Expand All @@ -28,6 +32,19 @@ public PersonOfInterestPanel(String id) {
}

private void initLayout() {
add(new TilePanel(ID_MYSELF, () -> new Tile("fas fa-user-circle", "Myself")));
add(new TilePanel(ID_GROUP, () -> new Tile("fas fa-user-friends", "Group/Others")));
add(new TilePanel(ID_TEAM, () -> new Tile("fas fa-users", "Team")));

AjaxLink back = new AjaxLink<>(ID_BACK) {

@Override
public void onClick(AjaxRequestTarget target) {
onBackPerformed(target);
}
};
add(back);

AjaxLink next = new AjaxLink<>(ID_NEXT) {

@Override
Expand All @@ -41,4 +58,8 @@ public void onClick(AjaxRequestTarget target) {
protected void onNextPerformed(AjaxRequestTarget target) {

}

protected void onBackPerformed(AjaxRequestTarget target) {

}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
~ Copyright (c) 2010-2017 Evolveum
~ Copyright (c) 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.
Expand Down Expand Up @@ -33,9 +33,7 @@ <h3>Role catalog</h3>
search
</div>
<div class="d-flex flex-column justify-content-between w-100 gap-2">
<div class="d-flex rounded bg-white" style="width: 273px;">
menu
</div>
<div wicket:id="menu"/>
<div class="d-flex">
<div class="d-flex flex-column align-items-center bordered p-4" style="width: 317px; height: 345px; background: #fff;">
<div class="d-flex justify-content-center" style="width: 84px; height: 84px; border-radius: 108px; background-color: rgba(60, 141, 188, 0.1);">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* and European Union Public License. See LICENSE file for details.
*/

package com.evolveum.midpoint.web.page.self.component;
package com.evolveum.midpoint.gui.impl.page.self.requestAccess;

import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.markup.html.AjaxLink;
Expand Down

0 comments on commit b939cf8

Please sign in to comment.