blob: be89a5bc43f3ac2657616643403f978b206ce143 [file] [log] [blame]
Radek Krejci95bd14c2017-09-21 14:24:13 +02001import { Device } from '../inventory/device';
2
Radek Krejci482629d2018-03-13 14:56:00 +01003import { SessionsService } from './sessions.service';
4
5export enum NodeType {
6 container = 1,
7 leaf = 4,
8 leaflist = 8,
9 list = 16
10}
11
Radek Krejci95bd14c2017-09-21 14:24:13 +020012export class Session {
13 constructor (
14 public key: string,
15 public device: Device,
Radek Krejci30ce1592018-03-01 14:44:14 +010016 public loading = false,
Radek Krejci482629d2018-03-13 14:56:00 +010017 public data: Node = null,
Radek Krejcid0fac3b2018-03-13 16:55:47 +010018 public treeFilters = [],
Radek Krejci26bf2bc2018-01-09 15:00:54 +010019 public modifications = null,
Radek Krejciae758392017-10-20 10:53:26 +020020 public cpblts: string = "",
Radek Krejcid0fac3b2018-03-13 16:55:47 +010021 public dataPresence: string = 'none',
Radek Krejcia1339602017-11-02 13:52:38 +010022 public statusVisibility: boolean = true,
23 public cpbltsVisibility: boolean = false,
Radek Krejci95bd14c2017-09-21 14:24:13 +020024 ) {}
25}
Radek Krejci482629d2018-03-13 14:56:00 +010026
27export class NodeSchema {
28/*
29 * type: NodeType;
30 * path: string;
31 */
32}
33
34export class Node {
35/*
36 * path: string;
37 * info: NodeSchema;
38 *
39 * === container ===
40 * children: Node[]
41 * newChildren: Node[]
42 *
43 * === leaf ===
44 * value: string;
45 *
46 * === leaf-list ===
47 * value: string;
48 *
49 * === list ===
50 * children: Node[]
51 * newChildren: Node[]
52 */
53}