@sassoftware/viya-serverjs 0.2.3 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env +6 -7
- package/.env.proxy +3 -3
- package/.env.server +3 -3
- package/Dockerfile +4 -4
- package/lib/config.js +62 -62
- package/lib/handlers/logon.js +39 -39
- package/lib/handlers/proxyMapUri.js +49 -49
- package/lib/handlers/setCookies.js +73 -73
- package/lib/iService.js +408 -401
- package/lib/plugins/appCookie.js +98 -98
- package/lib/plugins/setDefaultRoutes.js +247 -272
- package/lib/plugins/setupAuth.js +68 -68
- package/package.json +2 -2
- package/public/index.html +288 -297
- package/public/indexProxy.html +2 -2
- package/src/iService.js +18 -20
- package/src/plugins/setDefaultRoutes.js +0 -11
package/public/index.html
CHANGED
|
@@ -18,240 +18,229 @@
|
|
|
18
18
|
-->
|
|
19
19
|
|
|
20
20
|
<html lang="en">
|
|
21
|
-
<head>
|
|
22
|
-
<meta charset="UTF-8" />
|
|
23
|
-
<title>index.html</title>
|
|
24
21
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
></script>
|
|
29
|
-
<script
|
|
30
|
-
crossorigin
|
|
31
|
-
src="https://unpkg.com/react-dom@16/umd/react-dom.production.min.js"
|
|
32
|
-
></script>
|
|
33
|
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-standalone/6.26.0/babel.min.js"></script>
|
|
34
|
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-polyfill/6.26.0/polyfill.min.js"></script>
|
|
35
|
-
<script src="https://unpkg.com/@sassoftware/restaf@5.2.4/dist/restaf.js"></script>
|
|
36
|
-
<script src="https://unpkg.com/@sassoftware/restaflib@5.2.4/dist/restaflib.js"></script>
|
|
37
|
-
<script src="/appenv"></script>
|
|
38
|
-
|
|
39
|
-
<style>
|
|
40
|
-
.container {
|
|
41
|
-
display: flex;
|
|
42
|
-
flex-direction: column;
|
|
43
|
-
flex-wrap: nowrap;
|
|
44
|
-
min-height: 800px;
|
|
45
|
-
}
|
|
46
|
-
.elabel {
|
|
47
|
-
display: inline-block;
|
|
22
|
+
<head>
|
|
23
|
+
<meta charset="UTF-8" />
|
|
24
|
+
<title>index.html</title>
|
|
48
25
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
26
|
+
<script crossorigin src="https://unpkg.com/react@16/umd/react.production.min.js"></script>
|
|
27
|
+
<script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.production.min.js"></script>
|
|
28
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-standalone/6.26.0/babel.min.js"></script>
|
|
29
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-polyfill/6.26.0/polyfill.min.js"></script>
|
|
30
|
+
<script src="https://unpkg.com/@sassoftware/restaf@5.2.4"></script>
|
|
31
|
+
<script src="https://unpkg.com/@sassoftware/restaflib@5.2.4"></script>
|
|
32
|
+
<script src="/appenv"></script>
|
|
33
|
+
|
|
34
|
+
<style>
|
|
35
|
+
.container {
|
|
36
|
+
display: flex;
|
|
37
|
+
flex-direction: column;
|
|
38
|
+
flex-wrap: nowrap;
|
|
39
|
+
min-height: 800px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.elabel {
|
|
43
|
+
display: inline-block;
|
|
44
|
+
|
|
45
|
+
clear: left;
|
|
46
|
+
width: 250px;
|
|
47
|
+
text-align: right;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.einput {
|
|
51
|
+
display: inline-block;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.div1 {
|
|
55
|
+
border: 1px solid black;
|
|
56
|
+
background: lightskyblue;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.div2 {
|
|
60
|
+
border: 1px solid black;
|
|
61
|
+
background: lightskyblue;
|
|
62
|
+
height: 200px;
|
|
63
|
+
}
|
|
64
|
+
</style>
|
|
65
|
+
|
|
66
|
+
<script>
|
|
67
|
+
debugger;
|
|
68
|
+
console.log(JSON.stringify(APPENV, null, 4));
|
|
69
|
+
let store = restaf.initStore({
|
|
70
|
+
casProxy: true,
|
|
71
|
+
options: {
|
|
72
|
+
proxyServer: APPENV.PROXYSERVER,
|
|
73
|
+
httpOptions: null
|
|
64
74
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
75
|
+
});
|
|
76
|
+
debugger; console.log(store.config);
|
|
77
|
+
|
|
78
|
+
let session = null;
|
|
79
|
+
let servers = null;
|
|
80
|
+
let services = null;
|
|
81
|
+
let files = null;
|
|
82
|
+
let reports = null;
|
|
83
|
+
let compute = null;
|
|
84
|
+
|
|
85
|
+
function setup() {
|
|
68
86
|
debugger;
|
|
69
|
-
|
|
70
|
-
let store = restaf.initStore({
|
|
71
|
-
casProxy: true,
|
|
72
|
-
options: {
|
|
73
|
-
proxyServer: APPENV.PROXYSERVER,
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
debugger; console.log(store.config);
|
|
87
|
+
document.getElementById('output').innerHTML = '...initializing';
|
|
77
88
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
89
|
+
initSession()
|
|
90
|
+
.then(r => {
|
|
91
|
+
document.getElementById('output').innerHTML = 'ready';
|
|
92
|
+
keepAlive();
|
|
93
|
+
})
|
|
94
|
+
.catch(e => {
|
|
84
95
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
console.log(e);
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
function keepAlive() {
|
|
100
|
-
if (LOGONPAYLOAD.keepAlive != null) {
|
|
101
|
-
let interval = 120;
|
|
102
|
-
let timeout = 14400;
|
|
103
|
-
if (LOGONPAYLOAD.timers != null) {
|
|
104
|
-
let opts = LOGONPAYLOAD.timers.split(',');
|
|
105
|
-
interval = parseInt(opts[ 0 ]);
|
|
106
|
-
timeout = parseInt(opts[ 1 ]);
|
|
107
|
-
}
|
|
108
|
-
console.log(`Keepalive is active`);
|
|
109
|
-
store.keepViyaAlive(LOGONPAYLOAD.keepAlive, interval, timeout, () => {
|
|
110
|
-
console.log('timed out at', Date());
|
|
111
|
-
let params = `scrollbars=no,resizable=no,status=no,location=no,toolbar=no,menubar=no,width=0,height=0,left=-1000,top=-1000`;
|
|
112
|
-
window.open(`${appOptions.logonPayload.host}/SASLogon/timedout`, 'Timed Out', params);
|
|
113
|
-
return true;
|
|
114
|
-
});
|
|
96
|
+
console.log(e);
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
function keepAlive() {
|
|
100
|
+
if (LOGONPAYLOAD.keepAlive != null) {
|
|
101
|
+
let interval = 120;
|
|
102
|
+
let timeout = 14400;
|
|
103
|
+
if (LOGONPAYLOAD.timers != null) {
|
|
104
|
+
let opts = LOGONPAYLOAD.timers.split(',');
|
|
105
|
+
interval = parseInt(opts[0]);
|
|
106
|
+
timeout = parseInt(opts[1]);
|
|
115
107
|
}
|
|
116
|
-
|
|
108
|
+
console.log(`Keepalive is active`);
|
|
109
|
+
store.keepViyaAlive(LOGONPAYLOAD.keepAlive, interval, timeout, () => {
|
|
110
|
+
console.log('timed out at', Date());
|
|
111
|
+
let params = `scrollbars=no,resizable=no,status=no,location=no,toolbar=no,menubar=no,width=0,height=0,left=-1000,top=-1000`;
|
|
112
|
+
window.open(`${appOptions.logonPayload.host}/SASLogon/timedout`, 'Timed Out', params);
|
|
113
|
+
return true;
|
|
114
|
+
});
|
|
117
115
|
}
|
|
118
|
-
function logoff() {
|
|
119
|
-
let url = `${window.location.protocol}//${window.location.host}/${LOGONPAYLOAD.appName}/logout?callbackUrl=onlogoff.html`;
|
|
120
|
-
window.location.replace(url);
|
|
121
116
|
|
|
122
|
-
|
|
117
|
+
}
|
|
118
|
+
function logoff() {
|
|
119
|
+
let url = `${window.location.protocol}//${window.location.host}/${LOGONPAYLOAD.appName}/logout?callbackUrl=onlogoff.html`;
|
|
120
|
+
window.location.replace(url);
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
}
|
|
124
|
+
async function initSession() {
|
|
125
|
+
debugger;
|
|
126
|
+
console.log(APPENV);
|
|
127
|
+
console.log(LOGONPAYLOAD);
|
|
128
|
+
debugger;
|
|
129
|
+
if (LOGONPAYLOAD.host == null) {
|
|
130
|
+
return 'done';
|
|
123
131
|
}
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
console.log(APPENV);
|
|
127
|
-
console.log(LOGONPAYLOAD);
|
|
128
|
-
debugger;
|
|
129
|
-
if (LOGONPAYLOAD.host == null) {
|
|
130
|
-
|
|
131
|
-
return 'done';
|
|
132
|
-
}
|
|
132
|
+
try {
|
|
133
133
|
let msg = await store.logon(LOGONPAYLOAD);
|
|
134
134
|
console.log(store.connection());
|
|
135
135
|
console.log(msg);
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
// if (identities.links('currentUser') != null) {
|
|
140
|
-
// let c = await store.apiCall(identities.links('currentUser'));
|
|
141
|
-
// name = c.items('id');
|
|
142
|
-
// }
|
|
143
|
-
console.log(name);
|
|
144
|
-
debugger;
|
|
145
|
-
/*
|
|
146
|
-
services = await store.addServices(
|
|
147
|
-
'files', 'compute', 'casManagement'
|
|
148
|
-
);
|
|
149
|
-
console.log(services.casManagement.links().toJS())
|
|
150
|
-
*/
|
|
151
|
-
debugger;
|
|
152
|
-
return 'done';
|
|
136
|
+
} catch (err) {
|
|
137
|
+
console.log('Error logging in', JSON.stringify(err, null, 4));
|
|
138
|
+
throw err;
|
|
153
139
|
}
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
break;
|
|
167
|
-
}
|
|
168
|
-
case 'cas': {
|
|
169
|
-
testcase = runCas;
|
|
170
|
-
break;
|
|
171
|
-
}
|
|
172
|
-
case 'timedout': {
|
|
173
|
-
testcase = timedout;
|
|
174
|
-
break;
|
|
175
|
-
}
|
|
176
|
-
case 'redir': {
|
|
177
|
-
testcase= noaction;
|
|
178
|
-
|
|
179
|
-
break;
|
|
180
|
-
}
|
|
181
|
-
case 'spre': {
|
|
182
|
-
testcase= spre;
|
|
183
|
-
|
|
184
|
-
break;
|
|
185
|
-
}
|
|
186
|
-
default: {
|
|
187
|
-
testcase = SASfileService;
|
|
188
|
-
break;
|
|
189
|
-
}
|
|
140
|
+
let name = 'user';
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
//document.getElementById('output').innerHTML = '...running';
|
|
144
|
+
return 'done';
|
|
145
|
+
}
|
|
146
|
+
function runit(type) {
|
|
147
|
+
let testcase;
|
|
148
|
+
switch (type) {
|
|
149
|
+
case 'files': {
|
|
150
|
+
testcase = SASfileService;
|
|
151
|
+
break;
|
|
190
152
|
}
|
|
153
|
+
case 'compute': {
|
|
154
|
+
testcase = dsCompute;
|
|
155
|
+
break;
|
|
156
|
+
}
|
|
157
|
+
case 'cas': {
|
|
158
|
+
testcase = runCas;
|
|
159
|
+
break;
|
|
160
|
+
}
|
|
161
|
+
case 'timedout': {
|
|
162
|
+
testcase = timedout;
|
|
163
|
+
break;
|
|
164
|
+
}
|
|
165
|
+
case 'redir': {
|
|
166
|
+
testcase = noaction;
|
|
191
167
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
).innerHTML = JSON.stringify(err, null, 4);
|
|
203
|
-
});
|
|
204
|
-
}
|
|
205
|
-
async function noaction() {
|
|
206
|
-
r = {msg: 'redirects completed'};
|
|
207
|
-
return r;
|
|
208
|
-
}
|
|
209
|
-
async function spre(store) {
|
|
210
|
-
let p = {
|
|
211
|
-
method: 'GET',
|
|
212
|
-
url : 'http://localhost:3000/api/test',
|
|
213
|
-
withCredentials: true
|
|
168
|
+
break;
|
|
169
|
+
}
|
|
170
|
+
case 'spre': {
|
|
171
|
+
testcase = spre;
|
|
172
|
+
|
|
173
|
+
break;
|
|
174
|
+
}
|
|
175
|
+
default: {
|
|
176
|
+
testcase = SASfileService;
|
|
177
|
+
break;
|
|
214
178
|
}
|
|
215
|
-
let r = await store.request(p);
|
|
216
|
-
return r.data;
|
|
217
|
-
}
|
|
218
|
-
async function timedout(store) {
|
|
219
|
-
console.log('timed out at', Date() );
|
|
220
|
-
let params = `scrollbars=no,resizable=no,status=no,location=no,toolbar=no,menubar=no,width=0,height=0,left=-1000,top=-1000`;
|
|
221
|
-
window.open(`${LOGONPAYLOAD.host}/SASLogon/timedout`,'Timed Out', params);
|
|
222
|
-
return true;
|
|
223
179
|
}
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
180
|
+
|
|
181
|
+
testcase(store)
|
|
182
|
+
.then(r => {
|
|
183
|
+
document.getElementById(
|
|
184
|
+
'output'
|
|
185
|
+
).innerHTML = JSON.stringify(r, null, 4);
|
|
186
|
+
})
|
|
187
|
+
.catch(err => {
|
|
188
|
+
|
|
189
|
+
document.getElementById(
|
|
190
|
+
'output'
|
|
191
|
+
).innerHTML = JSON.stringify(err, null, 4);
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
async function noaction() {
|
|
195
|
+
r = { msg: 'redirects completed' };
|
|
196
|
+
return r;
|
|
197
|
+
}
|
|
198
|
+
async function spre(store) {
|
|
199
|
+
let p = {
|
|
200
|
+
method: 'GET',
|
|
201
|
+
url: 'http://localhost:3000/api/test',
|
|
202
|
+
withCredentials: true
|
|
243
203
|
}
|
|
204
|
+
let r = await store.request(p);
|
|
205
|
+
return r.data;
|
|
206
|
+
}
|
|
207
|
+
async function timedout(store) {
|
|
208
|
+
console.log('timed out at', Date());
|
|
209
|
+
let params = `scrollbars=no,resizable=no,status=no,location=no,toolbar=no,menubar=no,width=0,height=0,left=-1000,top=-1000`;
|
|
210
|
+
window.open(`${LOGONPAYLOAD.host}/SASLogon/timedout`, 'Timed Out', params);
|
|
211
|
+
return true;
|
|
212
|
+
}
|
|
213
|
+
async function runCas(store) {
|
|
214
|
+
debugger;
|
|
215
|
+
let { casManagement } = await store.addServices('casManagement');
|
|
216
|
+
let servers = await store.apiCall(
|
|
217
|
+
casManagement.links('servers')
|
|
218
|
+
);
|
|
219
|
+
let serverName = servers.itemsList(0);
|
|
220
|
+
let session = await store.apiCall(
|
|
221
|
+
servers.itemsCmd(serverName, 'createSession')
|
|
222
|
+
);
|
|
223
|
+
let payload = {
|
|
224
|
+
action: 'builtins.echo',
|
|
225
|
+
data: { code: { x: 1 } }
|
|
226
|
+
};
|
|
227
|
+
console.log(JSON.stringify(session.links("execute"), null, 4));
|
|
228
|
+
let r = await store.runAction(session, payload);
|
|
229
|
+
console.log('echo completed');
|
|
230
|
+
await store.apiCall(session.links('delete'));
|
|
231
|
+
return r.items();
|
|
232
|
+
}
|
|
244
233
|
|
|
245
|
-
|
|
234
|
+
async function SASfileService(store) {
|
|
235
|
+
debugger;
|
|
236
|
+
let content;
|
|
237
|
+
try {
|
|
246
238
|
debugger;
|
|
247
|
-
let
|
|
248
|
-
try {
|
|
249
|
-
debugger;
|
|
250
|
-
let {files} = await store.addServices('files');
|
|
239
|
+
let { files } = await store.addServices('files');
|
|
251
240
|
debugger;
|
|
252
241
|
console.log(JSON.stringify(files.links(), null, 4));
|
|
253
242
|
//console.log('items - should be an array of files(empty array is ok)')
|
|
254
|
-
|
|
243
|
+
// console.log(files.items().toJS());
|
|
255
244
|
let payload = {
|
|
256
245
|
data: { x: 1, y: 'This was saved earlier in the step' },
|
|
257
246
|
headers: { 'content-type': 'application/json' }
|
|
@@ -261,100 +250,102 @@
|
|
|
261
250
|
debugger;
|
|
262
251
|
console.log(JSON.stringify(newFile.links('content'), null, 4));
|
|
263
252
|
content = await store.apiCall(newFile.links('content'));
|
|
264
|
-
|
|
265
|
-
} catch(err) {
|
|
253
|
+
|
|
254
|
+
} catch (err) {
|
|
266
255
|
console.log(JSON.stringify(err, null, 4));
|
|
267
256
|
debugger;
|
|
268
257
|
}
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
258
|
+
console.log(content);
|
|
259
|
+
return content.items();
|
|
260
|
+
}
|
|
261
|
+
async function dsCompute(store) {
|
|
262
|
+
let log = null;
|
|
263
|
+
debugger;
|
|
264
|
+
let { compute } = await store.addServices('compute');
|
|
265
|
+
let servers = await store.apiCall(compute.links('servers'));
|
|
277
266
|
|
|
278
|
-
|
|
267
|
+
let contexts = await store.apiCall(compute.links('contexts'));
|
|
279
268
|
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
269
|
+
// lookup the name of the first context and then use it to get the associated createSession restafLink
|
|
270
|
+
let createSession = contexts.itemsCmd(
|
|
271
|
+
contexts.itemsList(0),
|
|
272
|
+
'createSession'
|
|
273
|
+
);
|
|
274
|
+
let session = await store.apiCall(createSession);
|
|
286
275
|
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
276
|
+
// Now run a simple data step in that session
|
|
277
|
+
let payload = {
|
|
278
|
+
data: {
|
|
279
|
+
code: [`data _null_; do i = 1 to 100; x=1; end; run; `]
|
|
280
|
+
}
|
|
281
|
+
};
|
|
293
282
|
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
283
|
+
// Now execute the data step and wait for completion
|
|
284
|
+
let job = await store.apiCall(
|
|
285
|
+
session.links('execute'),
|
|
286
|
+
payload
|
|
287
|
+
);
|
|
288
|
+
let status = await store.jobState(job, null, 5, 2);
|
|
300
289
|
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
}
|
|
290
|
+
if (status.data === 'running') {
|
|
291
|
+
throw `ERROR: Job did not complete in allotted time`;
|
|
292
|
+
} else {
|
|
293
|
+
switch (status.data) {
|
|
294
|
+
case 'warning':
|
|
295
|
+
console.log(`Warning: check your log for warnings`);
|
|
296
|
+
break;
|
|
297
|
+
case 'error':
|
|
298
|
+
throw `Please correct errors and rerun program`;
|
|
299
|
+
default:
|
|
300
|
+
log = await store.apiCall(status.job.links('log'));
|
|
301
|
+
break;
|
|
314
302
|
}
|
|
315
|
-
return log === null ? status : log.items();
|
|
316
303
|
}
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
304
|
+
return log === null ? status : log.items();
|
|
305
|
+
}
|
|
306
|
+
</script>
|
|
307
|
+
</head>
|
|
308
|
+
|
|
309
|
+
<body onload="setup()">
|
|
310
|
+
<h1 id="head">Hi</h1>
|
|
311
|
+
<div>
|
|
312
|
+
<button onclick="runit('redir')">
|
|
313
|
+
Press to do some redirs
|
|
314
|
+
</button>
|
|
315
|
+
<button onclick="runit('files')">
|
|
316
|
+
Press to make a call to file service
|
|
317
|
+
</button>
|
|
318
|
+
<br />
|
|
319
|
+
<br />
|
|
320
|
+
<button onclick="runit('compute')">
|
|
321
|
+
Press to make a call compute service
|
|
322
|
+
</button>
|
|
323
|
+
<br />
|
|
324
|
+
<br />
|
|
325
|
+
<button onclick="runit('cas')">
|
|
326
|
+
Press to make a call to cas echo
|
|
327
|
+
</button>
|
|
328
|
+
<br />
|
|
329
|
+
<br />
|
|
330
|
+
<button onclick="runit('spre')">
|
|
331
|
+
REST call
|
|
332
|
+
</button>
|
|
333
|
+
<br />
|
|
334
|
+
<br />
|
|
335
|
+
<input id='filename'> </input>
|
|
336
|
+
<button onclick="runit('timedout')">
|
|
337
|
+
Press to test timedout
|
|
338
|
+
</button>
|
|
339
|
+
<br />
|
|
340
|
+
<br />
|
|
341
|
+
<button onclick="logoff()">
|
|
342
|
+
logoff
|
|
343
|
+
</button>
|
|
344
|
+
<br />
|
|
345
|
+
</div>
|
|
346
|
+
<div>
|
|
347
|
+
<pre id="output"></pre>
|
|
348
|
+
</div>
|
|
349
|
+
</body>
|
|
350
|
+
|
|
351
|
+
</html>
|
package/public/indexProxy.html
CHANGED
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
></script>
|
|
32
32
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-standalone/6.26.0/babel.min.js"></script>
|
|
33
33
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-polyfill/6.26.0/polyfill.min.js"></script>
|
|
34
|
-
<script src="https://unpkg.com/@sassoftware/restaf@
|
|
35
|
-
<script src="https://unpkg.com/@sassoftware/restaflib@
|
|
34
|
+
<script src="https://unpkg.com/@sassoftware/restaf@alpha"></script>
|
|
35
|
+
<script src="https://unpkg.com/@sassoftware/restaflib@alpha"></script>
|
|
36
36
|
<script src="/appenv"></script>
|
|
37
37
|
|
|
38
38
|
<style>
|