Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ func main() {
// Setup the plugin systems
resourceController := resource.NewController(log, settingsProvider)
resourceClient := resource.NewClient(resourceController)
graphService := resource.NewGraphService(resourceController.Graph())

settingsController := settings.NewController(log, settingsProvider)
settingsClient := settings.NewClient(settingsController)
Expand Down Expand Up @@ -340,6 +341,7 @@ func main() {
pluginLogManager,
devServerManager,
resourceClient,
graphService,
settingsClient,
execClient,
networkerClient,
Expand Down
136 changes: 131 additions & 5 deletions packages/omniviewdev-runtime/src/wailsjs/go/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,132 @@ export namespace exec {

}

export namespace graph {

export class GraphNode {
pluginId: string;
connectionId: string;
resourceKey: string;
id: string;
namespace?: string;

static createFrom(source: any = {}) {
return new GraphNode(source);
}

constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.pluginId = source["pluginId"];
this.connectionId = source["connectionId"];
this.resourceKey = source["resourceKey"];
this.id = source["id"];
this.namespace = source["namespace"];
}
}
export class GraphEdge {
source: GraphNode;
target: GraphNode;
type: string;
label: string;

static createFrom(source: any = {}) {
return new GraphEdge(source);
}

constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.source = this.convertValues(source["source"], GraphNode);
this.target = this.convertValues(source["target"], GraphNode);
this.type = source["type"];
this.label = source["label"];
}

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;
}
}
export class DependencyNode {
edge: GraphEdge;
children: DependencyNode[];

static createFrom(source: any = {}) {
return new DependencyNode(source);
}

constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.edge = this.convertValues(source["edge"], GraphEdge);
this.children = this.convertValues(source["children"], DependencyNode);
}

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;
}
}
export class DependencyTree {
root: GraphNode;
children: DependencyNode[];

static createFrom(source: any = {}) {
return new DependencyTree(source);
}

constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.root = this.convertValues(source["root"], GraphNode);
this.children = this.convertValues(source["children"], DependencyNode);
}

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;
}
}


}

export namespace logs {

export class ActionTargetBuilder {
Expand Down Expand Up @@ -1510,6 +1636,11 @@ export namespace registry {

export namespace resource {

export enum SyncPolicy {
ON_CONNECT = 0,
ON_FIRST_QUERY = 1,
NEVER = 2,
}
export enum WatchState {
IDLE = 0,
SYNCING = 1,
Expand All @@ -1520,11 +1651,6 @@ export namespace resource {
FORBIDDEN = 6,
SKIPPED = 7,
}
export enum SyncPolicy {
ON_CONNECT = 0,
ON_FIRST_QUERY = 1,
NEVER = 2,
}
export class SchemaProperty {
type: string;
description?: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
import {graph} from '../models';

export function GetDependencyTree(arg1:string,arg2:string,arg3:string,arg4:string,arg5:string,arg6:number):Promise<graph.DependencyTree>;

export function GetRelated(arg1:string,arg2:string,arg3:string,arg4:string,arg5:string,arg6:string,arg7:any):Promise<Array<graph.GraphEdge>>;

export function GetRelationshipChain(arg1:string,arg2:string,arg3:string,arg4:string,arg5:string,arg6:string,arg7:number):Promise<Array<any>>;
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// @ts-check
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT

export function GetDependencyTree(arg1, arg2, arg3, arg4, arg5, arg6) {
return window['go']['resource']['GraphService']['GetDependencyTree'](arg1, arg2, arg3, arg4, arg5, arg6);
}

export function GetRelated(arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
return window['go']['resource']['GraphService']['GetRelated'](arg1, arg2, arg3, arg4, arg5, arg6, arg7);
}

export function GetRelationshipChain(arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
return window['go']['resource']['GraphService']['GetRelationshipChain'](arg1, arg2, arg3, arg4, arg5, arg6, arg7);
}
Loading