feat: field-sync-gui MVP — Wails GUI ingest SD→local+S3 (4 slots //)
This commit is contained in:
17
frontend/wailsjs/go/main/App.d.ts
vendored
Executable file
17
frontend/wailsjs/go/main/App.d.ts
vendored
Executable file
@@ -0,0 +1,17 @@
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
import {main} from '../models';
|
||||
import {config} from '../models';
|
||||
import {detect} from '../models';
|
||||
|
||||
export function CancelIngest():Promise<void>;
|
||||
|
||||
export function GetSnapshot():Promise<main.Snapshot>;
|
||||
|
||||
export function LoadConfig():Promise<config.Config>;
|
||||
|
||||
export function ScanCards():Promise<Array<detect.SDCard>>;
|
||||
|
||||
export function SetDryRun(arg1:boolean):Promise<void>;
|
||||
|
||||
export function StartIngest(arg1:Array<main.SlotPayload>):Promise<void>;
|
||||
27
frontend/wailsjs/go/main/App.js
Executable file
27
frontend/wailsjs/go/main/App.js
Executable file
@@ -0,0 +1,27 @@
|
||||
// @ts-check
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
|
||||
export function CancelIngest() {
|
||||
return window['go']['main']['App']['CancelIngest']();
|
||||
}
|
||||
|
||||
export function GetSnapshot() {
|
||||
return window['go']['main']['App']['GetSnapshot']();
|
||||
}
|
||||
|
||||
export function LoadConfig() {
|
||||
return window['go']['main']['App']['LoadConfig']();
|
||||
}
|
||||
|
||||
export function ScanCards() {
|
||||
return window['go']['main']['App']['ScanCards']();
|
||||
}
|
||||
|
||||
export function SetDryRun(arg1) {
|
||||
return window['go']['main']['App']['SetDryRun'](arg1);
|
||||
}
|
||||
|
||||
export function StartIngest(arg1) {
|
||||
return window['go']['main']['App']['StartIngest'](arg1);
|
||||
}
|
||||
139
frontend/wailsjs/go/models.ts
Executable file
139
frontend/wailsjs/go/models.ts
Executable file
@@ -0,0 +1,139 @@
|
||||
export namespace config {
|
||||
|
||||
export class Config {
|
||||
s3Bucket: string;
|
||||
localDest: string;
|
||||
awsProfile: string;
|
||||
concurrency: number;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new Config(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.s3Bucket = source["s3Bucket"];
|
||||
this.localDest = source["localDest"];
|
||||
this.awsProfile = source["awsProfile"];
|
||||
this.concurrency = source["concurrency"];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export namespace detect {
|
||||
|
||||
export class SDCard {
|
||||
mountpoint: string;
|
||||
label: string;
|
||||
device: string;
|
||||
fstype: string;
|
||||
totalBytes: number;
|
||||
freeBytes: number;
|
||||
mediaFiles: string[];
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new SDCard(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.mountpoint = source["mountpoint"];
|
||||
this.label = source["label"];
|
||||
this.device = source["device"];
|
||||
this.fstype = source["fstype"];
|
||||
this.totalBytes = source["totalBytes"];
|
||||
this.freeBytes = source["freeBytes"];
|
||||
this.mediaFiles = source["mediaFiles"];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export namespace main {
|
||||
|
||||
export class SlotPayload {
|
||||
slot: string;
|
||||
mountpoint: string;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new SlotPayload(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.slot = source["slot"];
|
||||
this.mountpoint = source["mountpoint"];
|
||||
}
|
||||
}
|
||||
export class SlotState {
|
||||
slot: string;
|
||||
mountpoint: string;
|
||||
label: string;
|
||||
status: string;
|
||||
filesTotal: number;
|
||||
filesDone: number;
|
||||
bytesTotal: number;
|
||||
bytesDone: number;
|
||||
speedMBs: number;
|
||||
error?: string;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new SlotState(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.slot = source["slot"];
|
||||
this.mountpoint = source["mountpoint"];
|
||||
this.label = source["label"];
|
||||
this.status = source["status"];
|
||||
this.filesTotal = source["filesTotal"];
|
||||
this.filesDone = source["filesDone"];
|
||||
this.bytesTotal = source["bytesTotal"];
|
||||
this.bytesDone = source["bytesDone"];
|
||||
this.speedMBs = source["speedMBs"];
|
||||
this.error = source["error"];
|
||||
}
|
||||
}
|
||||
export class Snapshot {
|
||||
sessionID: string;
|
||||
slots: SlotState[];
|
||||
running: boolean;
|
||||
dryRun: boolean;
|
||||
config: config.Config;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new Snapshot(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.sessionID = source["sessionID"];
|
||||
this.slots = this.convertValues(source["slots"], SlotState);
|
||||
this.running = source["running"];
|
||||
this.dryRun = source["dryRun"];
|
||||
this.config = this.convertValues(source["config"], config.Config);
|
||||
}
|
||||
|
||||
convertValues(a: any, classs: any, asMap: boolean = false): any {
|
||||
if (!a) {
|
||||
return a;
|
||||
}
|
||||
if (a.slice && a.map) {
|
||||
return (a as any[]).map(elem => this.convertValues(elem, classs));
|
||||
} else if ("object" === typeof a) {
|
||||
if (asMap) {
|
||||
for (const key of Object.keys(a)) {
|
||||
a[key] = new classs(a[key]);
|
||||
}
|
||||
return a;
|
||||
}
|
||||
return new classs(a);
|
||||
}
|
||||
return a;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user