Merge branch 'feature/KASM-4489_watermark_time' into 'master'
Resolve KASM-4489 "Feature/ watermark time" Closes KASM-4489 See merge request kasm-technologies/internal/KasmVNC!103release/1.2.0
commit
b9e9a2d2a0
@ -0,0 +1,17 @@
|
|||||||
|
# - Find freetype
|
||||||
|
# Find the freetype libraries
|
||||||
|
#
|
||||||
|
# This module defines the following variables:
|
||||||
|
# FREETYPE_FOUND - True if freetype is found
|
||||||
|
# FREETYPE_INCLUDE_DIRS - include directories
|
||||||
|
#
|
||||||
|
|
||||||
|
find_package(PkgConfig)
|
||||||
|
pkg_check_modules(PC_FREETYPE freetype2)
|
||||||
|
find_path(FREETYPE_INCLUDE_DIRS NAMES ft2build.h HINTS ${PC_FREETYPE_INCLUDE_DIRS})
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
set(FPHSA_NAME_MISMATCHED 1)
|
||||||
|
find_package_handle_standard_args(freetype DEFAULT_MSG FREETYPE_INCLUDE_DIRS)
|
||||||
|
unset(FPHSA_NAME_MISMATCHED)
|
||||||
|
mark_as_advanced(FREETYPE_INCLUDE_DIRS)
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,9 @@
|
|||||||
|
use DateTime::TimeZone;
|
||||||
|
|
||||||
|
my $timezone = $ARGV[0];
|
||||||
|
|
||||||
|
if (DateTime::TimeZone->is_valid_name($timezone)) {
|
||||||
|
print "Valid timezone\n";
|
||||||
|
} else {
|
||||||
|
print "Invalid timezone\n";
|
||||||
|
}
|
@ -0,0 +1,11 @@
|
|||||||
|
use DateTime;
|
||||||
|
use DateTime::TimeZone;
|
||||||
|
|
||||||
|
#my $timezone_name = 'America/New_York';
|
||||||
|
my $timezone_name = 'UTC';
|
||||||
|
|
||||||
|
my $dt = DateTime->now(time_zone => $timezone_name);
|
||||||
|
my $offset = $dt->offset();
|
||||||
|
|
||||||
|
print "Timezone: $timezone_name\n";
|
||||||
|
print "Offset: $offset seconds\n";
|
@ -0,0 +1,37 @@
|
|||||||
|
package KasmVNC::CallbackValidator;
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use v5.10;
|
||||||
|
use Data::Dumper;
|
||||||
|
|
||||||
|
use KasmVNC::Utils;
|
||||||
|
|
||||||
|
sub new {
|
||||||
|
my ($class, $args) = @_;
|
||||||
|
my $self = bless {
|
||||||
|
isValidCallback => $args->{isValidCallback},
|
||||||
|
errorMessage => $args->{errorMessage}
|
||||||
|
}, $class;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub validate {
|
||||||
|
my $self = shift;
|
||||||
|
$self->{configKey} = shift;
|
||||||
|
my @values = @{ listify($self->{configKey}->value()) };
|
||||||
|
|
||||||
|
foreach my $value (@values) {
|
||||||
|
$self->validateValue($value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
sub validateValue {
|
||||||
|
my $self = shift;
|
||||||
|
my $value = shift;
|
||||||
|
|
||||||
|
unless ($self->{isValidCallback}($value)) {
|
||||||
|
$self->{configKey}->addErrorMessage($self->{errorMessage});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
1;
|
Loading…
Reference in New Issue