types.module.ts 2.15 KB
Newer Older
1
2
3
4
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';


Lukas Burgey's avatar
Lukas Burgey committed
5
// auth stuff
6
7
export interface IdP {
  id: number;
8
  name: string;
Lukas Burgey's avatar
Lukas Burgey committed
9
  issuer_uri: string;
10
11
}

Lukas Burgey's avatar
Lukas Burgey committed
12
13
export interface IdPInfo {
  selectedIdP?: IdP;
14
15
16
17
  idps: IdP[];
  default: number;
}

Lukas Burgey's avatar
Lukas Burgey committed
18
// user stuff
19
20
export interface EntitlementNameSpace  {
  name: string;
Lukas Burgey's avatar
Lukas Burgey committed
21
22
}

23
export interface VO {
Lukas Burgey's avatar
wip    
Lukas Burgey committed
24
  id: number;
Lukas Burgey's avatar
Lukas Burgey committed
25
  name: string;
26
27
28
29
  pretty_name: string;
  description: string;
  resourceType: string;
  name_space?: EntitlementNameSpace;
Lukas Burgey's avatar
Lukas Burgey committed
30
31
32
33
}

export interface Site {
  id: number;
34
35
36
  name: string;
}

37
38
39
40
41
42
43
export interface NewSSHKey {
  name: string;
  key: string;
}

export interface SSHKey {
  id: number;
44
45
46
47
  name: string;
  key: string;
}

Lukas Burgey's avatar
Lukas Burgey committed
48
49
50
51
52
export interface SSHKeyRef {
  id: number;
  name: string;
}

53
export interface Service {
54
  id: number;
55
  name: string;
Lukas Burgey's avatar
Lukas Burgey committed
56
  site: Site;
57
  description: string;
58
  vos: VO[];
59
60
}

Lukas Burgey's avatar
Lukas Burgey committed
61
export interface JSONObject {
62
63
64
  [key: string]: string;
}

Lukas Burgey's avatar
Lukas Burgey committed
65
66
export interface CredentialState {
  credential: SSHKeyRef;
Lukas Burgey's avatar
Lukas Burgey committed
67
  is_pending: boolean;
Lukas Burgey's avatar
Lukas Burgey committed
68
69
  state: string;
  state_target: string;
Lukas Burgey's avatar
Lukas Burgey committed
70
71
}

Lukas Burgey's avatar
Lukas Burgey committed
72
export interface DeploymentState {
Lukas Burgey's avatar
Lukas Burgey committed
73
  answers: JSONObject | undefined;
Lukas Burgey's avatar
Lukas Burgey committed
74
75
  credential_states: CredentialState[];
  credentials: JSONObject;
Lukas Burgey's avatar
Lukas Burgey committed
76
  id: number;
Lukas Burgey's avatar
Lukas Burgey committed
77
78
79
  is_credential_pending: boolean;
  is_pending: boolean;
  message: string;
Lukas Burgey's avatar
Lukas Burgey committed
80
  questionnaire: JSONObject | undefined;
Lukas Burgey's avatar
Lukas Burgey committed
81
  service: Service;
Lukas Burgey's avatar
Lukas Burgey committed
82
83
  site: Site;
  state: string;
Lukas Burgey's avatar
Lukas Burgey committed
84
  state_target: string;
Lukas Burgey's avatar
Lukas Burgey committed
85
}
86

Lukas Burgey's avatar
Lukas Burgey committed
87
export interface Deployment {
Lukas Burgey's avatar
Lukas Burgey committed
88
  id: number;
Lukas Burgey's avatar
Lukas Burgey committed
89
90
  service?: Service; // only for ServiceDeployment
  services?: Service[]; // only for VODeployment
91
92
  state: string
  state_target: string
Lukas Burgey's avatar
Lukas Burgey committed
93
94
  states: DeploymentState[];
  vo?: VO; // only for VODeployment
95
96
}

97
export interface User {
Lukas Burgey's avatar
Lukas Burgey committed
98
  deployments: Deployment[];
99
  id: number;
100
  profile_name: string;
Lukas Burgey's avatar
Lukas Burgey committed
101
  services: Service[];
102
  ssh_keys: SSHKey[];
Lukas Burgey's avatar
Lukas Burgey committed
103
104
  states: DeploymentState[];
  userinfo: JSONObject;
105
  vos: VO[];
106
107
}

Lukas Burgey's avatar
Lukas Burgey committed
108
109
110
111
export interface Session {
  deactivated?: boolean;
}

112
export interface State {
Lukas Burgey's avatar
Lukas Burgey committed
113
114
  msg?: string;
  session?: Session;
Lukas Burgey's avatar
Lukas Burgey committed
115
  user: User;
116
117
118
119
}

export interface Update {
  deployment?: Deployment;
120
  deployment_state?: DeploymentState;
Lukas Burgey's avatar
Lukas Burgey committed
121
  error?: string;
122
123
124
125
126
127
128
129
130
131
132
}


@NgModule({
  imports: [
    CommonModule
  ],
  declarations: [
  ]
})
export class TypesModule { }