un-cli 0.0.76 → 0.0.79
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/README.md +30 -2
- package/adminlog.mjs +13 -3
- package/index.html +1484 -153
- package/index.mjs +8 -9
- package/package.json +22 -22
- package/portal.mjs +1 -1
- package/un.mjs +3 -3
package/README.md
CHANGED
|
@@ -64,10 +64,38 @@ uncli> help
|
|
|
64
64
|
Create a commands.txt file and type in the commands in that file
|
|
65
65
|
command.txt
|
|
66
66
|
```text
|
|
67
|
-
update subnetworks
|
|
68
|
-
export subnetworks
|
|
67
|
+
update subnetworks --all
|
|
68
|
+
export subnetworks --new
|
|
69
69
|
```
|
|
70
70
|
|
|
71
71
|
|
|
72
72
|
> uncli --portal https://utilitynetwork.esri.com/portal --service NapervilleElectric_SQLServer --user tester --password tester.108 --file commands.txt --verify true
|
|
73
73
|
|
|
74
|
+
## Server Log web parser
|
|
75
|
+
This tool also provides a way to parse server logs and view them for each utility network and geodatabase function
|
|
76
|
+
|
|
77
|
+
To install on IIS follow these steps: This server assume your machine name where the Webadaptor lives is `utilitynetwork.esri.com`
|
|
78
|
+
|
|
79
|
+
- Login to machine where you have the webadaptor
|
|
80
|
+
- Create a folder called `log` in `c:\inetpub\wwwroot`
|
|
81
|
+
- Copy the entire content of the repro https://github.com/hussein-nasser/uncli to c:\inetpub\wwwroot\log
|
|
82
|
+
- Open IIS (Internet Information Services)
|
|
83
|
+
- Open MIME Types
|
|
84
|
+
- Under action click Add
|
|
85
|
+
- under file extension type `.mjs` and under MIME Type write `application/javascript`
|
|
86
|
+
- Restart IIS
|
|
87
|
+
- (OPTIONAL only change when your webadaptor is not /portal) In c:\inetpub\wwwroot\log edit the `index.html` and find this line of code
|
|
88
|
+
- Update the JSON object with the correct URL, for example if your webadaptor is https://utilitynetwork.esri.com/portal set the "portal" to be that. You don't have to update the referer it will be automatically calculated it.
|
|
89
|
+
- (Optional) if you have multiple federated server , you have to set the correct one you want to query admin api for in the `"server"` parameter below.
|
|
90
|
+
|
|
91
|
+
```js
|
|
92
|
+
let parameters = {
|
|
93
|
+
"user": "unadmin",
|
|
94
|
+
"password": "",
|
|
95
|
+
"portal": "",
|
|
96
|
+
"service": "",
|
|
97
|
+
"referer": "",
|
|
98
|
+
"server": undefined
|
|
99
|
+
}
|
|
100
|
+
```
|
|
101
|
+
- Save the HTML and then visit `https://utilitynetwork.esri.com/log` put in your username and password and login to use the parser
|
package/adminlog.mjs
CHANGED
|
@@ -26,11 +26,21 @@ export class AdminLog {
|
|
|
26
26
|
const level = logLevel
|
|
27
27
|
const filterType="json"
|
|
28
28
|
const token = this.token
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
let filter = {
|
|
31
33
|
"codes": codes,
|
|
32
|
-
"services": serviceName
|
|
33
34
|
}
|
|
35
|
+
|
|
36
|
+
//query server logs
|
|
37
|
+
if (serviceName != "Server")
|
|
38
|
+
filter ["services"] = serviceName
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
//reset filter if nothing is passed, this will return admin crashes too
|
|
42
|
+
if (codes?.length == 0 && serviceName == "*")
|
|
43
|
+
filter = {};
|
|
34
44
|
|
|
35
45
|
let queryLogUrl = url + `&token=${token}&level=${level}&filterType=${filterType}&filter=${encodeURIComponent(JSON.stringify(filter))}&pageSize=${pageSize}`
|
|
36
46
|
if (startTime != null)
|