mirror of
https://github.com/openziti/desktop-edge-win.git
synced 2026-09-21 10:23:45 +00:00
2f7e53f02c
* feat: bump dependencies (NuGet 8 -> 10, NLog 5 -> 6) * feat: shared IPC data structures for policy state * feat: registry policy reader with WMI watcher * feat: monitor service policy enforcement, maintenance window, deferred install * feat: UI policy state propagation, locks, deferred-install + sentinel UX fix * feat: ADMX/ADML templates, admin guide, helper script, test runbook * chore: build tooling, MSI SHA256, version bump, release notes * more reworking around the adml/admx/md * build and upload ADMX/ADML admin templates zip * updates from looking at / testing GPO UI * missed the prepare-for-tests ps1 * add boms to all ps1's just in case * update test-run for more vebosity to allow humans to understand * more updates to release notes * Fix alignment on "from" label for maintenance window * Remove arrow pointing to task bar * Remove unused selection changed stub * Ensure logical hour value is passed to maintenance window start/end * Fix invalid URL error not showing - ensure maintenance start/end time errors return correctly Change variable names * reworking new-upcoming-releasenotes * publish admin templates zip + sha256 sidecar to GitHub release, update release note * add tatooing words * reword clamping words --------- Co-authored-by: Christopher Britton <christopher.l.britton@outlook.com>
65 lines
2.0 KiB
C#
65 lines
2.0 KiB
C#
/*
|
|
Copyright NetFoundry Inc.
|
|
|
|
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
|
|
|
|
https://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.
|
|
*/
|
|
|
|
using NLog;
|
|
using System;
|
|
|
|
namespace Ziti.Desktop.Edge.Models {
|
|
public class ZDEWViewState {
|
|
private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
|
|
|
|
private bool automaticUpdatesDisabled = false;
|
|
private string updateUrl = "not set yet";
|
|
public bool AutomaticUpdatesDisabled {
|
|
get {
|
|
return automaticUpdatesDisabled;
|
|
}
|
|
set {
|
|
automaticUpdatesDisabled = value;
|
|
}
|
|
}
|
|
public string AutomaticUpdateURL {
|
|
get {
|
|
return updateUrl;
|
|
}
|
|
set {
|
|
updateUrl = value;
|
|
}
|
|
}
|
|
|
|
public int? MaintenanceWindowStart { get; set; }
|
|
public int? MaintenanceWindowEnd { get; set; }
|
|
|
|
public bool UpdateAvailable { get; set; }
|
|
public bool DeferredInstallPending { get; set; }
|
|
public bool DeferToRestartPending { get; set; }
|
|
public bool StagingDownloadPending { get; set; }
|
|
public bool DeferInstallToRestartLocked { get; set; }
|
|
public UpdateInfo PendingUpdate { get; set; } = new UpdateInfo();
|
|
|
|
}
|
|
public class UpdateInfo {
|
|
public DateTime InstallTime { get; set; } = DateTime.MinValue;
|
|
public string Version { get; set; } = "0.0.0.0";
|
|
|
|
public double TimeLeft {
|
|
get {
|
|
double timeLeft = (InstallTime - DateTime.Now).TotalSeconds;
|
|
return timeLeft;
|
|
}
|
|
}
|
|
}
|
|
} |