Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Andrew A. Vasilyev
2023-05-25 17:19:25 +03:00
19 changed files with 181 additions and 80 deletions

View File

@ -1,51 +1,56 @@
#include /usr/share/dpkg/pkg-info.mk
export DEB_VERSION_UPSTREAM_REVISION
export PACKAGE=proxmox-widget-toolkit
PACKAGE=proxmox-widget-toolkit
DEB=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_all.deb
DEV_DEB=${PACKAGE}-dev_${DEB_VERSION_UPSTREAM_REVISION}_all.deb
DEB=$(PACKAGE)_$(DEB_VERSION)_all.deb
DEV_DEB=$(PACKAGE)-dev_$(DEB_VERSION)_all.deb
DEBS=${DEB} ${DEV_DEB}
DSC=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}.dsc
DEBS=$(DEB) $(DEV_DEB)
DSC=$(PACKAGE)_$(DEB_VERSION).dsc
BUILDDIR ?= ${PACKAGE}-${DEB_VERSION_UPSTREAM}
BUILDDIR ?= $(PACKAGE)-$(DEB_VERSION_UPSTREAM)
${BUILDDIR}: GITVERSION:=$(shell git rev-parse HEAD)
${BUILDDIR}:
rm -rf ${BUILDDIR} ${BUILDDIR}.tmp
cp -a src/ ${BUILDDIR}.tmp
cp -a debian ${BUILDDIR}.tmp/
echo "git clone git://git.proxmox.com/git/proxmox-widget-toolkit.git\\ngit checkout ${GITVERSION}" > ${BUILDDIR}.tmp/debian/SOURCE
mv ${BUILDDIR}.tmp/ ${BUILDDIR}
$(BUILDDIR): GITVERSION:=$(shell git rev-parse HEAD)
$(BUILDDIR):
rm -rf $(BUILDDIR) $(BUILDDIR).tmp
cp -a src/ $(BUILDDIR).tmp
cp -a debian $(BUILDDIR).tmp/
echo "git clone git://git.proxmox.com/git/proxmox-widget-toolkit.git\\ngit checkout $(GITVERSION)" > $(BUILDDIR).tmp/debian/SOURCE
mv $(BUILDDIR).tmp/ $(BUILDDIR)
.PHONY: deb
deb: ${DEBS}
${DEBS}: ${BUILDDIR}
cd ${BUILDDIR}; dpkg-buildpackage -b -us -uc
lintian ${DEBS}
deb: $(DEBS)
$(DEBS): $(BUILDDIR)
cd $(BUILDDIR); dpkg-buildpackage -b -us -uc
lintian $(DEBS)
.PHONY: dsc
dsc: ${DSC}
${DSC}: ${BUILDDIR}
cd ${BUILDDIR}; dpkg-buildpackage -S -us -uc -d
lintian ${DSC}
dsc: $(DSC)
$(MAKE) clean
$(MAKE) $(DSC)
lintian $(DSC)
$(DSC): $(BUILDDIR)
cd $(BUILDDIR); dpkg-buildpackage -S -us -uc -d
sbuild: $(DSC)
sbuild $(DSC)
.PHONY: lint
lint: ${JSSRC}
${MAKE} -C src lint
lint: $(JSSRC)
$(MAKE) -C src lint
.PHONY: upload
upload: ${DEBS}
tar cf - ${DEB} | ssh -X repoman@repo.proxmox.com -- upload --product pve,pmg,pbs --dist bullseye
tar cf - ${DEV_DEB} | ssh -X repoman@repo.proxmox.com -- upload --product devel --dist bullseye
upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION)
upload: $(DEBS)
tar cf - $(DEB) | ssh -X repoman@repo.proxmox.com -- upload --product pve,pmg,pbs --dist $(UPLOAD_DIST)
tar cf - $(DEV_DEB) | ssh -X repoman@repo.proxmox.com -- upload --product devel --dist $(UPLOAD_DIST)
distclean: clean
clean:
$(MAKE) -C src clean
rm -rf ${BUILDDIR} ${BUILDDIR}.tmp *.tar.gz *.dsc *.deb *.changes *.buildinfo
find . -name '*~' -exec rm {} ';'
rm -rf $(PACKAGE)-[0-9]*/ *.tar.* *.dsc *.deb *.changes *.buildinfo *.build
.PHONY: dinstall
dinstall: ${DEBS}
dpkg -i ${DEBS}
dinstall: $(DEBS)
dpkg -i $(DEBS)

31
debian/changelog vendored
View File

@ -1,3 +1,34 @@
proxmox-widget-toolkit (4.0.0) bookworm; urgency=medium
* re-build for Debian 12 Bookworm based releases
-- Proxmox Support Team <support@proxmox.com> Thu, 25 May 2023 09:13:29 +0200
proxmox-widget-toolkit (3.7.0) bullseye; urgency=medium
* dark-mode:
- fix focus and focus-over states for tabs
- fix the focused state for background image grid icons
- style the icon for the datastore maintenance mode
- improve apt repo group header contrast ratios
- adjust panel header tool icons
- fix #4618: lighten critical/warning charts/gauges colors
* form: combo grid: use correct method to initialize the picker to ensure
it's cleaned up again after closed.
-- Proxmox Support Team <support@proxmox.com> Wed, 17 May 2023 14:02:50 +0200
proxmox-widget-toolkit (3.6.5) bullseye; urgency=medium
* window: ldap auth edit: avoid relying on the default bind property
* window: ldap auth edit: set view-model form data explicitly on edit to
avoid a data race in chromium based browser that could result in a
mismatch of the configured value and the initially shown one.
-- Proxmox Support Team <support@proxmox.com> Tue, 28 Mar 2023 17:56:10 +0200
proxmox-widget-toolkit (3.6.4) bullseye; urgency=medium
* dark-mode:

1
debian/compat vendored
View File

@ -1 +0,0 @@
12

15
debian/control vendored
View File

@ -2,22 +2,23 @@ Source: proxmox-widget-toolkit
Section: web
Priority: optional
Maintainer: Proxmox Support Team <support@proxmox.com>
Build-Depends: debhelper (>= 12~),
Build-Depends: debhelper-compat (= 13),
libjs-marked,
pve-eslint (>= 7.28.0),
sassc,
Standards-Version: 4.5.1
Standards-Version: 4.6.2
Homepage: https://www.proxmox.com
Package: proxmox-widget-toolkit
Architecture: all
Depends: ${misc:Depends}
Description: ExtJS Helper Classes for Proxmox
ExtJS Helper Classes to easy access to Proxmox APIs.
Description: Core Widgets and ExtJS Helper Classes for Proxmox Web UIs
The base framework providing widgets, models, and general utilities for the
ExtJS based Web UIs of various Proxmox projects
Package: proxmox-widget-toolkit-dev
Architecture: all
Depends: ${misc:Depends}
Description: Development dependencies for Proxmox Projects
Contains some common javascript code that are dev-dependencies,
for various Proxmox projects.
Description: ExtJS based widgets and utilities for development
Contains some common JavaScript code that some Proxmox projects might used to
build common interfaces, like the API viewer in each documnetation repo.

4
debian/rules vendored
View File

@ -3,6 +3,10 @@
# output every command that modifies files on the build system.
#DH_VERBOSE = 1
include /usr/share/dpkg/pkg-info.mk
export DEB_SOURCE
export DEB_VERSION
%:
dh $@

View File

@ -106,20 +106,20 @@ JSSRC= \
node/TimeEdit.js \
node/TimeView.js
all: ${SUBDIRS}
set -e && for i in ${SUBDIRS}; do ${MAKE} -C $$i; done
all: $(SUBDIRS)
set -e && for i in $(SUBDIRS); do $(MAKE) -C $$i; done
proxmoxlib.js: ${JSSRC}
# add the version as comment in the file
echo "// ${DEB_VERSION_UPSTREAM_REVISION}" > $@.tmp
cat ${JSSRC} ${MARKEDJS} >> $@.tmp
echo "// v$(BUILD_VERSION) - t$(BUILD_TIME)" > $@.tmp
cat $(JSSRC) $(MARKEDJS) >> $@.tmp
mv $@.tmp $@
install: proxmoxlib.js
install -d -m 755 ${WWWBASEDIR}
install -m 0644 proxmoxlib.js ${WWWBASEDIR}
set -e && for i in ${SUBDIRS}; do ${MAKE} -C $$i $@; done
install -d -m 755 $(WWWBASEDIR)
install -m 0644 proxmoxlib.js $(WWWBASEDIR)
set -e && for i in $(SUBDIRS); do $(MAKE) -C $$i $@; done
.PHONY: clean
clean:
rm -f proxmoxlib.js
rm -f proxmoxlib.js proxmoxlib.js.tmp .lint-incremental

View File

@ -5,9 +5,9 @@ CSS=ext6-pmx.css
all:
.PHONY: install
install: ${CSS}
install -d ${WWWCSSDIR}
for i in ${CSS}; do install -m 0644 $$i ${WWWCSSDIR}/$$i; done
install: $(CSS)
install -d $(WWWCSSDIR)
for i in $(CSS); do install -m 0644 $$i $(WWWCSSDIR)/$$i; done
.PHONY: clean
clean:

View File

@ -1,6 +1,8 @@
PACKAGE ?= $(or $(DEB_SOURCE), proxmox-widget-toolkit)
DESTDIR=
DOCDIR=${DESTDIR}/usr/share/doc/${PACKAGE}
WWWBASEDIR=${DESTDIR}/usr/share/javascript/${PACKAGE}
WWWCSSDIR=${WWWBASEDIR}/css
WWWIMAGESDIR=${WWWBASEDIR}/images
WWWTHEMEDIR=${WWWBASEDIR}/themes
DOCDIR=$(DESTDIR)/usr/share/doc/$(PACKAGE)
WWWBASEDIR=$(DESTDIR)/usr/share/javascript/$(PACKAGE)
WWWCSSDIR=$(WWWBASEDIR)/css
WWWIMAGESDIR=$(WWWBASEDIR)/images
WWWTHEMEDIR=$(WWWBASEDIR)/themes

View File

@ -408,7 +408,7 @@ Ext.define('Proxmox.form.ComboGrid', {
// Create the picker at an early stage, so it is available to store the previous selection
if (!me.picker) {
me.createPicker();
me.getPicker();
}
me.mon(me.store, 'beforeload', function() {

View File

@ -10,9 +10,9 @@ IMAGES=pmx-clear-trigger.png \
all:
.PHONY: install
install: ${IMAGES}
install -d ${WWWIMAGESDIR}
for i in ${IMAGES}; do install -m 0644 $$i ${WWWIMAGESDIR}/$$i; done
install: $(IMAGES)
install -d $(WWWIMAGESDIR)
for i in $(IMAGES); do install -m 0644 $$i $(WWWIMAGESDIR)/$$i; done
.PHONY: clean
clean:

View File

@ -35,10 +35,10 @@ all: theme-proxmox-dark.css
.PHONY: install
install: theme-proxmox-dark.css
install -d ${WWWTHEMEDIR}/
install -m 0664 theme-proxmox-dark.css ${WWWTHEMEDIR}/
install -d $(WWWTHEMEDIR)/
install -m 0664 theme-proxmox-dark.css $(WWWTHEMEDIR)/
theme-proxmox-dark.css: ${SCSSSRC}
theme-proxmox-dark.css: $(SCSSSRC)
sassc -t compressed $< $@.tmp
mv $@.tmp $@

View File

@ -2,15 +2,42 @@
background-color: $content-background-color;
border: none;
// The small navigation elements in the panel header bar e.g. to
// collapse a panel
.x-tool-tool-el {
background-color: transparent;
filter: brightness(120%);
}
}
// The small navigation elements in the panel header bar e.g. to
// collapse a panel
.x-tool-img {
filter: brightness(175%);
// these are brighter per default, so they don't need to be
// brigthened as much
&.x-tool-expand,
&.x-tool-collapse,
&.x-tool-refresh {
filter: brightness(125%);
}
.x-tool-over .x-tool-tool-el {
filter: brightness(140%);
// this icon uses multiple tones, to have them behave appropriatelly
// invert them before brightening them
&.x-tool-print {
filter: invert(100%) hue-rotate(180deg) brightness(125%);
}
.x-tool-over & {
filter: brightness(200%);
}
.x-tool-over &.x-tool-expand,
.x-tool-over &.x-tool-collapse,
.x-tool-over &.x-tool-refresh {
filter: brightness(150%);
}
.x-tool-over &.x-tool-print {
filter: invert(100%) hue-rotate(180deg) brightness(150%);
}
}

View File

@ -11,9 +11,9 @@
}
.x-progress.warning .x-progress-bar {
background-color: $background-warning;
background-color: var(--pwt-gauge-warn);
}
.x-progress.critical .x-progress-bar {
background-color: $background-invalid;
background-color: var(--pwt-gauge-crit);
}

View File

@ -26,6 +26,8 @@
color: $text-color;
}
.x-keyboard-mode &.x-tab-focus,
.x-keyboard-mode &.x-tab-focus.x-tab-over,
.x-keyboard-mode &.x-tab-focus.x-tab-active {
background-color: $primary-color;
border-color: $primary-color;

View File

@ -7,8 +7,8 @@
--pwt-text-color: #{$text-color};
--pwt-gauge-default: #{$primary-color};
--pwt-gauge-back: #{$background-dark};
--pwt-gauge-warn: #{$background-warning};
--pwt-gauge-crit: #{$background-invalid};
--pwt-gauge-warn: #{adjust-color($background-warning, $lightness: lightness($primary-color))};
--pwt-gauge-crit: #{adjust-color($background-invalid, $lightness: lightness($primary-color))};
--pwt-chart-primary: #{$primary-color};
--pwt-chart-grid-stroke: #{$content-background-selected};
}

View File

@ -90,12 +90,16 @@
color: black;
}
.x-grid-cell-inner::before {
// this is a somewhat hacky work-around for the focus borders on
// these elements. since we use the invert filter to fix the icon
// color we need to also invert the border color first too, not
// just the text. add "!important" to properly override.
border-color: invert($primary-color, $weight: 90%) !important;
// this is a somewhat hacky work-around for the focus borders and
// background on these elements. since we use the invert filter to
// fix the icon color we need to also invert the border color first
// too, not just the text.
.x-keyboard-mode &.x-grid-item-focused {
background-color: invert($selection-background-color, $weight: 90%);
.x-grid-cell-inner::before {
border-color: invert($primary-color, $weight: 90%);
}
}
}
@ -152,6 +156,20 @@
}
}
.pmx-tree-icon-custom {
&::after {
text-shadow: -1px 0 1px $background-darker;
}
&.maintenance::before {
color: $icon-color-alt;
}
&.maintenance::after {
color: $icon-color;
}
}
// icons for templates in the storages view
.x-treelist-item-icon {
&.lxc::after,

View File

@ -8,6 +8,14 @@
color: black;
}
.x-keyboard-mode .x-grid-item-focused.x-grid-row-loading {
background-color: invert($selection-background-color, $weight: 90%);
.x-grid-cell-inner::before {
border-color: invert($primary-color, $weight: 90%) !important;
}
}
.x-mask-msg {
background-color: $form-field-body-color;
border: solid 1px $border-color-alt;

View File

@ -1,7 +1,7 @@
// Table headers under Node > "Updates" > "Repositories"
.proxmox-apt-repos .x-grid-group-hd {
background-color: $background-darker;
border-bottom-width: 0;
background-color: $background-darkest;
border-color: $border-color-alt;
}
.proxmox-apt-repos .x-grid-group-title {

View File

@ -57,7 +57,9 @@ Ext.define('Proxmox.panel.LDAPInputPanel', {
},
onSetValues: function(values) {
let me = this;
values.anonymous_search = values["bind-dn"] ? 0 : 1;
me.getViewModel().set('anonymous_search', values.anonymous_search);
return values;
},
@ -92,7 +94,9 @@ Ext.define('Proxmox.panel.LDAPInputPanel', {
xtype: 'proxmoxcheckbox',
fieldLabel: gettext('Anonymous Search'),
name: 'anonymous_search',
bind: '{anonymous_search}',
bind: {
value: '{anonymous_search}',
},
},
{
xtype: 'proxmoxtextfield',