diff --git a/client/idm/console/pom.xml b/client/idm/console/pom.xml index 89be27758a4..e6c51178fc6 100644 --- a/client/idm/console/pom.xml +++ b/client/idm/console/pom.xml @@ -69,6 +69,7 @@ under the License. true + --load-path=${rootpom.basedir}/client/idrepo/common-ui/src/main/resources/META-INF/resources/ui-commons/css ${basedir}/src/main/resources/META-INF/resources/css:${project.build.outputDirectory}/META-INF/resources/css diff --git a/client/idm/console/src/main/resources/META-INF/resources/css/_topology-theme.scss b/client/idm/console/src/main/resources/META-INF/resources/css/_topology-theme.scss new file mode 100644 index 00000000000..3424abcabd6 --- /dev/null +++ b/client/idm/console/src/main/resources/META-INF/resources/css/_topology-theme.scss @@ -0,0 +1,99 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + */ + +:root { + /* + * Topology + */ + --topology-node-border: rgba(15, 23, 42, 0.14); + --topology-node-shadow: 0 10px 28px rgba(2, 6, 23, 0.10); + --topology-node-shadow-hover: 0 14px 34px rgba(2, 6, 23, 0.14); + + --topology-root-bg: rgba(22, 163, 74, 0.18); + --topology-cs-bg: rgba(14, 165, 233, 0.12); + --topology-conn-bg: rgba(139, 92, 246, 0.10); + --topology-conn-errored-bg: rgba(244, 63, 94, 0.18); + --topology-res-bg: rgba(245, 158, 11, 0.14); + + /* + * Topology toolbar + */ + --topology-toolbar-bg: rgba(255, 255, 255, 0.92); + --topology-toolbar-bg-hover: rgba(255, 255, 255, 0.98); + --topology-toolbar-border: rgba(15, 23, 42, 0.10); + --topology-toolbar-fg: rgba(15, 23, 42, 0.78); + --topology-toolbar-fg-hover: rgba(15, 23, 42, 0.92); + --topology-toolbar-shadow: 0 8px 18px rgba(2, 6, 23, 0.10); + --topology-toolbar-shadow-hover: 0 10px 22px rgba(2, 6, 23, 0.14); + --topology-focus-ring: rgba(14, 165, 233, 0.25); + + /* + * Topology labels + */ + --topology-label-bg: #fff; + --topology-label-color: #444; + --topology-label-border: #808080; + --topology-label-hover-bg: #5c96bc; + --topology-label-hover-color: #fff; + --topology-label-hover-border: #fff; + + /* + * Topology tooltip + */ + --topology-tooltip-bg: #eee; + --topology-tooltip-color: #000; + --topology-tooltip-border: #bbb; +} + +[data-bs-theme="dark"] { + /* + * Application background: #2B3035 + * + * Surfaces are deliberately lighter to maintain contrast. + */ + --topology-node-border: rgba(255, 255, 255, 0.22); + --topology-node-shadow: 0 10px 28px rgba(0, 0, 0, 0.38); + --topology-node-shadow-hover: 0 14px 34px rgba(0, 0, 0, 0.52); + + --topology-root-bg: rgba(55, 210, 115, 0.30); + --topology-cs-bg: rgba(70, 185, 235, 0.27); + --topology-conn-bg: rgba(160, 120, 245, 0.25); + --topology-conn-errored-bg: rgba(245, 90, 105, 0.36); + --topology-res-bg: rgba(255, 195, 65, 0.30); + + --topology-toolbar-bg: rgba(65, 71, 77, 0.96); + --topology-toolbar-bg-hover: rgba(78, 85, 92, 0.98); + --topology-toolbar-border: rgba(255, 255, 255, 0.18); + --topology-toolbar-fg: rgba(245, 247, 249, 0.90); + --topology-toolbar-fg-hover: #fff; + --topology-toolbar-shadow: 0 8px 18px rgba(0, 0, 0, 0.40); + --topology-toolbar-shadow-hover: 0 10px 22px rgba(0, 0, 0, 0.52); + --topology-focus-ring: rgba(80, 190, 240, 0.45); + + --topology-label-bg: #414950; + --topology-label-color: #f5f5f5; + --topology-label-border: #9aa3ab; + --topology-label-hover-bg: #5c9bc3; + --topology-label-hover-color: #fff; + --topology-label-hover-border: #d9e2e8; + + --topology-tooltip-bg: #4a525a; + --topology-tooltip-color: #fff; + --topology-tooltip-border: #aeb7bf; +} diff --git a/client/idm/console/src/main/resources/META-INF/resources/css/idmTopology.scss b/client/idm/console/src/main/resources/META-INF/resources/css/idmTopology.scss deleted file mode 100644 index 092f501d454..00000000000 --- a/client/idm/console/src/main/resources/META-INF/resources/css/idmTopology.scss +++ /dev/null @@ -1,143 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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. - */ - -:root { - --topology-node-border: rgba(15, 23, 42, 0.14); - --topology-node-shadow: 0 10px 28px rgba(2, 6, 23, 0.10); - --topology-node-shadow-hover: 0 14px 34px rgba(2, 6, 23, 0.14); - - --topology-toolbar-bg: rgba(255, 255, 255, 0.92); - --topology-toolbar-border: rgba(15, 23, 42, 0.10); - --topology-toolbar-fg: rgba(15, 23, 42, 0.78); - --topology-toolbar-fg-hover: rgba(15, 23, 42, 0.92); -} - -#zoom { - display: flex; - justify-content: flex-end; - align-items: center; - gap: 6px; - - ul.menu { - display: flex; - gap: 6px; - margin: 0; - padding: 0; - list-style: none; - } - - ul.menu > li { - margin: 0; - padding: 0; - } - - ul.menu > li > a.btn, - .topology-toolbar-btn { - appearance: none; - border: 1px solid var(--topology-toolbar-border); - background: var(--topology-toolbar-bg); - color: var(--topology-toolbar-fg); - border-radius: 999px; - padding: 6px 10px; - line-height: 1; - box-shadow: 0 8px 18px rgba(2, 6, 23, 0.10); - transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease, color 120ms ease; - } - - ul.menu > li > a.btn:hover, - .topology-toolbar-btn:hover { - color: var(--topology-toolbar-fg-hover); - background: rgba(255, 255, 255, 0.98); - box-shadow: 0 10px 22px rgba(2, 6, 23, 0.14); - transform: translateY(-1px); - text-decoration: none; - } - - ul.menu > li > a.btn:focus, - .topology-toolbar-btn:focus { - outline: none; - box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.25), 0 10px 22px rgba(2, 6, 23, 0.14); - } - - ul.menu > li > a.btn i, - .topology-toolbar-btn i { - font-size: 1.05rem; - padding-right: 0; - } -} - -#topology { - cursor: grab; -} - -#topology.topology-panning { - cursor: grabbing; -} - -#drawing .window { - opacity: 1; - border: 1px solid var(--topology-node-border); - box-shadow: var(--topology-node-shadow); - border-radius: 14px; - width: 200px; - min-height: 72px; - height: auto; - line-height: normal; - padding: 10px 12px; - - display: flex; - align-items: center; - justify-content: center; -} - -#drawing .window:hover { - box-shadow: var(--topology-node-shadow); -} - -#drawing .window[data-original-title]:hover::after { - content: none !important; - display: none !important; -} - -#drawing .window.topology_root { - background-color: rgba(22, 163, 74, 0.18); -} - -#drawing .window.topology_cs { - background-color: rgba(14, 165, 233, 0.12); -} - -#drawing .window.topology_conn { - background-color: rgba(139, 92, 246, 0.10); -} - -#drawing .window.topology_conn_errored { - background-color: rgba(244, 63, 94, 0.18); -} - -#drawing .window.topology_res { - background-color: rgba(245, 158, 11, 0.14); -} - -#drawing .window p { - font-weight: 700; - letter-spacing: 0.2px; - font-size: 1.25em; - line-height: 1.25; -} diff --git a/client/idm/console/src/main/resources/META-INF/resources/css/topology.scss b/client/idm/console/src/main/resources/META-INF/resources/css/topology.scss new file mode 100644 index 00000000000..52674d114bc --- /dev/null +++ b/client/idm/console/src/main/resources/META-INF/resources/css/topology.scss @@ -0,0 +1,349 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + */ + +@import 'theme'; +@import 'topology-theme'; +@import 'utils'; + +.content-wrapper.accent-success { + overflow: hidden; +} + +/* + * Topology + */ + +#topology { + position: relative; + border: 0; + height: 780px; + overflow: hidden; + cursor: grab; +} + +#topology.topology-panning { + cursor: grabbing; +} + +#drawing { + height: 5000px; + width: 5000px; + display: block; + position: relative; + top: -2490px; + left: -2270px; +} + +/* + * Topology nodes + * + * IMPORTANT: + * position: absolute is required by jsPlumb. + */ +#drawing .window { + position: absolute; + + opacity: 1; + z-index: 20; + + width: 200px; + min-height: 72px; + height: auto; + + padding: 10px 12px; + + border: 1px solid var(--topology-node-border); + border-radius: 14px; + box-shadow: var(--topology-node-shadow); + + background-color: var(--topology-window-bg); + color: var(--topology-window-color); + + line-height: normal; + text-align: center; + + display: flex; + align-items: center; + justify-content: center; + + box-sizing: border-box; + + cursor: pointer; +} + +#drawing .window:hover { + box-shadow: var(--topology-node-shadow-hover); +} + +#drawing .window.topology_root { + background-color: var(--topology-root-bg); +} + +#drawing .window.topology_cs { + background-color: var(--topology-cs-bg); +} + +#drawing .window.topology_conn { + background-color: var(--topology-conn-bg); +} + +#drawing .window.topology_conn_errored { + background-color: var(--topology-conn-errored-bg); +} + +#drawing .window.topology_res { + background-color: var(--topology-res-bg); +} + +#drawing .window p { + margin: 0 !important; + + font-weight: 700; + letter-spacing: 0.2px; + font-size: 1.25em; + line-height: 1.25; +} + +/* + * Disable the old CSS tooltip because the topology + * already provides its own interaction. + */ +#drawing .window[data-original-title]:hover::after { + content: none !important; + display: none !important; +} + +/* + * jsPlumb + */ + +._jsPlumb_dragging { + z-index: 4000; +} + +#drawing ._jsPlumb_overlay.component.label, +.aLabel { + background-color: var(--topology-label-bg); + color: var(--topology-label-color); + border: 1px solid var(--topology-label-border); +} + +#drawing ._jsPlumb_overlay.component.label { + border-radius: 0.5em; + font-size: 0.8em; + opacity: 0.8; + padding: 0.5em; +} + +.aLabel { + padding: 0.4em; + + font: 12px sans-serif; + + z-index: 21; + opacity: 0.8; + filter: alpha(opacity = 80); + + cursor: pointer; + + &._jsPlumb_hover { + background-color: var(--topology-label-hover-bg); + color: var(--topology-label-hover-color); + border: 1px solid var(--topology-label-hover-border); + } +} + +/* + * Zoom toolbar + */ + +#zoom { + display: flex; + justify-content: flex-end; + align-items: center; + gap: 6px; + + ul.menu { + display: flex; + gap: 6px; + + margin: 0; + padding: 0; + + list-style: none; + } + + ul.menu > li { + margin: 0; + padding: 0; + } + + ul.menu > li > a.btn, + .topology-toolbar-btn { + appearance: none; + + border: 1px solid var(--topology-toolbar-border); + border-radius: 999px; + + background: var(--topology-toolbar-bg); + color: var(--topology-toolbar-fg); + + padding: 6px 10px; + + line-height: 1; + + box-shadow: var(--topology-toolbar-shadow); + + transition: transform 120ms ease, + box-shadow 120ms ease, + background 120ms ease, + color 120ms ease; + } + + ul.menu > li > a.btn:hover, + .topology-toolbar-btn:hover { + color: var(--topology-toolbar-fg-hover); + background: var(--topology-toolbar-bg-hover); + + box-shadow: var(--topology-toolbar-shadow-hover); + + transform: translateY(-1px); + + text-decoration: none; + } + + ul.menu > li > a.btn:focus, + .topology-toolbar-btn:focus { + outline: none; + + box-shadow: 0 0 0 3px var(--topology-focus-ring), + var(--topology-toolbar-shadow-hover); + } + + ul.menu > li > a.btn i, + .topology-toolbar-btn i { + font-size: 1.05rem; + padding-right: 0; + } + + ul.menu > li > a { + display: inline-block; + margin-left: 5px; + } +} + +/* + * Node actions + */ + +.node-action-link { + clear: both; + + display: block; + + height: 0; + + padding: 3px 8px 0 0; + + position: absolute; + right: 0; + top: 0; + + .fa { + font-size: 14px; + display: block !important; + } + + .dropdown-menu { + border-radius: 12px; + min-width: 50px; + width: 50px; + } +} + +/* + * Legacy topology tooltip + */ + +.window[data-original-title] { + &:hover::after { + border: 1px solid var(--topology-tooltip-border); + border-radius: 0.5em; + + padding: 5px 10px; + + background: var(--topology-tooltip-bg); + color: var(--topology-tooltip-color); + + content: attr(data-original-title); + + position: relative; + right: -5px; + top: -70px; + + white-space: nowrap; + text-align: center; + + height: 20px; + margin: 0; + } +} + +/* + * Miscellaneous + */ + +.checkbox { + margin-top: 15px; + margin-bottom: 15px; +} + +div.alert-widget > a > .badge { + font-size: 9px; + line-height: 0.9; + + padding: 2px 3px; + + position: absolute; + + text-align: center; + + margin-right: -13px; + top: 0; +} + +.card.card-outline { + margin-top: 20px; + margin-bottom: 0; +} + +.panel-group.box-group { + margin-bottom: 20px; +} + +.scrollable-tab-content { + padding-top: 20px; +} + +.conn-check-wrapper { + position: absolute; + top: 0; + right: 25px; + z-index: 1; +} diff --git a/client/idm/console/src/main/resources/org/apache/syncope/client/console/topology/Topology.html b/client/idm/console/src/main/resources/org/apache/syncope/client/console/topology/Topology.html index 4210527ae10..17ccca00226 100644 --- a/client/idm/console/src/main/resources/org/apache/syncope/client/console/topology/Topology.html +++ b/client/idm/console/src/main/resources/org/apache/syncope/client/console/topology/Topology.html @@ -21,8 +21,7 @@ - - +