pro-xy-ui 0.5.8 → 0.6.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/.esformatter +28 -28
- package/.eslintrc +15 -15
- package/bin/pro-xy-ui +25 -27
- package/index.html +38 -38
- package/lib/app/_common/app-menu.js +42 -42
- package/lib/app/_common/app-menu.ts +41 -41
- package/lib/app/_common/patchResize.js +33 -33
- package/lib/app/_common/patchResize.ts +32 -32
- package/lib/app/_common/pipes.js +33 -33
- package/lib/app/_common/pipes.ts +21 -21
- package/lib/app/_common/rxjs-extensions.js +20 -20
- package/lib/app/_common/rxjs-extensions.ts +21 -21
- package/lib/app/app.component.css +39 -39
- package/lib/app/app.component.html +35 -35
- package/lib/app/app.module.js +92 -92
- package/lib/app/app.module.ts +89 -89
- package/lib/app/main.js +11 -11
- package/lib/app/main.ts +11 -11
- package/lib/app/model/config.js +69 -69
- package/lib/app/model/config.ts +79 -79
- package/lib/app/model/http.js +116 -116
- package/lib/app/service/config.defaultConfig.js +74 -74
- package/lib/app/service/config.defaultConfig.ts +72 -72
- package/lib/app/service/config.service.js +44 -44
- package/lib/app/service/config.service.ts +39 -39
- package/lib/app/service/socket.service.js +109 -109
- package/lib/app/service/socket.service.ts +131 -131
- package/lib/app/service/traffic.service.js +98 -98
- package/lib/app/views/auto-responder/auto-responder.component.css +37 -37
- package/lib/app/views/auto-responder/auto-responder.component.html +41 -41
- package/lib/app/views/auto-responder/auto-responder.component.js +102 -102
- package/lib/app/views/auto-responder/auto-responder.component.ts +110 -110
- package/lib/app/views/composer/composer.component.css +7 -7
- package/lib/app/views/composer/composer.component.html +9 -9
- package/lib/app/views/composer/composer.component.js +147 -147
- package/lib/app/views/composer/composer.component.ts +148 -148
- package/lib/app/views/config/config.component.css +13 -13
- package/lib/app/views/config/config.component.html +14 -14
- package/lib/app/views/config/config.component.js +163 -163
- package/lib/app/views/config/diff.dialog.html +3 -3
- package/lib/app/views/config/diff.dialog.js +29 -29
- package/lib/app/views/config/diff.dialog.ts +17 -17
- package/lib/app/views/config/plugins.dialog.html +17 -17
- package/lib/app/views/config/plugins.dialog.js +29 -29
- package/lib/app/views/config/plugins.dialog.ts +17 -17
- package/lib/app/views/config-list-base.js +44 -44
- package/lib/app/views/config-list-base.ts +66 -66
- package/lib/app/views/connection/connection.component.html +9 -9
- package/lib/app/views/connection/connection.component.js +87 -89
- package/lib/app/views/connection/connection.component.ts +83 -85
- package/lib/app/views/delay/delay.component.css +23 -23
- package/lib/app/views/delay/delay.component.html +35 -35
- package/lib/app/views/delay/delay.component.js +34 -34
- package/lib/app/views/find/find.component.css +30 -30
- package/lib/app/views/find/find.component.html +10 -10
- package/lib/app/views/find/find.component.js +113 -113
- package/lib/app/views/find/find.component.ts +111 -111
- package/lib/app/views/inspector/inspector.component.css +14 -14
- package/lib/app/views/inspector/inspector.component.html +17 -17
- package/lib/app/views/inspector/inspector.component.js +64 -64
- package/lib/app/views/inspector/inspector.component.ts +54 -54
- package/lib/app/views/logs/logs.component.css +7 -7
- package/lib/app/views/logs/logs.component.html +13 -13
- package/lib/app/views/logs/logs.component.js +56 -56
- package/lib/app/views/logs/logs.component.ts +46 -46
- package/lib/app/views/requests/request-row.component.css +15 -15
- package/lib/app/views/requests/request-row.component.html +7 -7
- package/lib/app/views/requests/request-row.component.js +68 -68
- package/lib/app/views/requests/request.bodyMenu.js +41 -41
- package/lib/app/views/requests/request.bodyMenu.ts +61 -61
- package/lib/app/views/requests/request.headMenu.js +25 -25
- package/lib/app/views/requests/requests.component.css +49 -49
- package/lib/app/views/requests/requests.component.html +33 -33
- package/lib/app/views/requests/requests.component.js +127 -127
- package/lib/app/views/status/status.component.css +18 -18
- package/lib/app/views/status/status.component.html +8 -8
- package/lib/app/views/status/status.component.js +49 -49
- package/lib/app/views/status/status.component.ts +45 -45
- package/lib/app/views/url-replace/url-replace.component.css +32 -32
- package/lib/app/views/url-replace/url-replace.component.html +36 -36
- package/lib/app/views/url-replace/url-replace.component.js +34 -34
- package/lib/index.js +23 -23
- package/lib/lib.d.ts +2 -2
- package/lib/style.css +100 -100
- package/lib/systemjs.config.js +75 -75
- package/package.json +64 -64
- package/readme.md +5 -5
- package/tsconfig.json +23 -23
- package/typings.json +11 -11
- package/npm-shrinkwrap.json +0 -2568
|
@@ -1,163 +1,163 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
const core_1 = require("@angular/core");
|
|
12
|
-
const socket_service_1 = require("../../service/socket.service");
|
|
13
|
-
const material_1 = require("@angular/material");
|
|
14
|
-
const diff_dialog_1 = require("./diff.dialog");
|
|
15
|
-
const plugins_dialog_1 = require("./plugins.dialog");
|
|
16
|
-
const config_defaultConfig_1 = require("../../service/config.defaultConfig");
|
|
17
|
-
const material_2 = require("@angular/material");
|
|
18
|
-
var diff = nw.require("diff");
|
|
19
|
-
let ConfigComponent = class ConfigComponent {
|
|
20
|
-
constructor(dialog, socketService, cd, snackBar) {
|
|
21
|
-
this.dialog = dialog;
|
|
22
|
-
this.socketService = socketService;
|
|
23
|
-
this.cd = cd;
|
|
24
|
-
this.snackBar = snackBar;
|
|
25
|
-
this.restartNeeded = new core_1.EventEmitter();
|
|
26
|
-
this.isConcurentModification = false;
|
|
27
|
-
this.invalid = false;
|
|
28
|
-
this._message = "";
|
|
29
|
-
this.defaultConfigJson = JSON.stringify(config_defaultConfig_1.default, null, 4);
|
|
30
|
-
}
|
|
31
|
-
set message(message) {
|
|
32
|
-
this._message = message;
|
|
33
|
-
this.invalid = !!message;
|
|
34
|
-
}
|
|
35
|
-
get message() {
|
|
36
|
-
return this._message;
|
|
37
|
-
}
|
|
38
|
-
get dirty() {
|
|
39
|
-
return this.model != this.origModel;
|
|
40
|
-
}
|
|
41
|
-
get model() {
|
|
42
|
-
return this._model;
|
|
43
|
-
}
|
|
44
|
-
set model(model) {
|
|
45
|
-
this._model = model;
|
|
46
|
-
try {
|
|
47
|
-
JSON.parse(this.model);
|
|
48
|
-
this.message = null;
|
|
49
|
-
}
|
|
50
|
-
catch (e) {
|
|
51
|
-
this.message = "Invalid JSON";
|
|
52
|
-
}
|
|
53
|
-
if (this.preNode.nativeElement.innerText != model) {
|
|
54
|
-
this.preNode.nativeElement.innerText = model;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
get resetTitle() {
|
|
58
|
-
if (!this.isConcurentModification) {
|
|
59
|
-
return "";
|
|
60
|
-
}
|
|
61
|
-
return "Config was modified outside of 'Config' tab. Use 'Reset' to load new config. 'Save' will override new config.";
|
|
62
|
-
}
|
|
63
|
-
ngOnInit() {
|
|
64
|
-
this.socketService.configObservable.subscribe(config => {
|
|
65
|
-
var model = JSON.stringify(config, null, 4);
|
|
66
|
-
if (!this.dirty) {
|
|
67
|
-
this.model = model;
|
|
68
|
-
}
|
|
69
|
-
this.origModel = model;
|
|
70
|
-
//if still dirty - concurent modif (else - it was our save reflected back)
|
|
71
|
-
this.isConcurentModification = this.dirty;
|
|
72
|
-
this.cd.markForCheck();
|
|
73
|
-
});
|
|
74
|
-
this.socketService.configObservable
|
|
75
|
-
.filter(config => !config.isEmpty)
|
|
76
|
-
.first()
|
|
77
|
-
.subscribe(config => this.checkPlugins(config));
|
|
78
|
-
this.preNode.nativeElement;
|
|
79
|
-
}
|
|
80
|
-
trySave() {
|
|
81
|
-
this.hBlur();
|
|
82
|
-
if (!this.dirty || this.invalid) {
|
|
83
|
-
return this.msg(this.dirty ? "Invalid JSON!" : "No changes in config!");
|
|
84
|
-
}
|
|
85
|
-
this.save();
|
|
86
|
-
}
|
|
87
|
-
save() {
|
|
88
|
-
var confObj = JSON.parse(this.model); //we do not allow save for invalid
|
|
89
|
-
this.socketService.replaceConfig(confObj);
|
|
90
|
-
this.msg("Config was saved.");
|
|
91
|
-
}
|
|
92
|
-
msg(str) {
|
|
93
|
-
var ref = this.snackBar.open(str, null, {
|
|
94
|
-
duration: 1000,
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
hBlur() {
|
|
98
|
-
if (this.invalid) {
|
|
99
|
-
return;
|
|
100
|
-
}
|
|
101
|
-
this.model = JSON.stringify(JSON.parse(this.model), null, 4);
|
|
102
|
-
this.cd.markForCheck();
|
|
103
|
-
}
|
|
104
|
-
hPaste(evt) {
|
|
105
|
-
evt.preventDefault(); // cancel paste
|
|
106
|
-
var text = evt.clipboardData.getData("text/plain"); // get text representation of clipboard
|
|
107
|
-
document.execCommand("insertHTML", false, text); // insert text manually
|
|
108
|
-
}
|
|
109
|
-
reset() {
|
|
110
|
-
this.model = this.origModel;
|
|
111
|
-
this.isConcurentModification = false;
|
|
112
|
-
}
|
|
113
|
-
showDiff() {
|
|
114
|
-
diff.diffLines(this.origModel, this.model)
|
|
115
|
-
.forEach(part => {
|
|
116
|
-
console.log(`%c ${part.value}`, `color: ${part.added ? "green" : part.removed ? "red" : "black"}`);
|
|
117
|
-
});
|
|
118
|
-
var dialogRef = this.dialog.open(diff_dialog_1.DiffDialog, {
|
|
119
|
-
disableClose: false,
|
|
120
|
-
height: '90%',
|
|
121
|
-
width: '850px'
|
|
122
|
-
});
|
|
123
|
-
dialogRef.componentInstance.diff = diff.diffLines(this.origModel, this.model);
|
|
124
|
-
}
|
|
125
|
-
checkPlugins(config) {
|
|
126
|
-
if (JSON.stringify(config.plugins) == JSON.stringify(config_defaultConfig_1.default.plugins)) {
|
|
127
|
-
return;
|
|
128
|
-
}
|
|
129
|
-
var dialogRef = this.dialog.open(plugins_dialog_1.PluginsDialog, {
|
|
130
|
-
disableClose: true,
|
|
131
|
-
height: '450px',
|
|
132
|
-
width: '850px'
|
|
133
|
-
});
|
|
134
|
-
dialogRef.componentInstance.plugins = { current: config.plugins, expected: config_defaultConfig_1.default.plugins };
|
|
135
|
-
dialogRef.afterClosed().subscribe(doReplace => {
|
|
136
|
-
if (!doReplace) {
|
|
137
|
-
return;
|
|
138
|
-
}
|
|
139
|
-
this.socketService.updateConfig(Object.assign(config, { plugins: config_defaultConfig_1.default.plugins }));
|
|
140
|
-
this.restartNeeded.emit();
|
|
141
|
-
});
|
|
142
|
-
}
|
|
143
|
-
};
|
|
144
|
-
__decorate([
|
|
145
|
-
core_1.Output(),
|
|
146
|
-
__metadata("design:type", Object)
|
|
147
|
-
], ConfigComponent.prototype, "restartNeeded", void 0);
|
|
148
|
-
__decorate([
|
|
149
|
-
core_1.ViewChild("preNode"),
|
|
150
|
-
__metadata("design:type", Object)
|
|
151
|
-
], ConfigComponent.prototype, "preNode", void 0);
|
|
152
|
-
ConfigComponent = __decorate([
|
|
153
|
-
core_1.Component({
|
|
154
|
-
moduleId: module.id,
|
|
155
|
-
templateUrl: "config.component.html",
|
|
156
|
-
styleUrls: ["config.component.css"],
|
|
157
|
-
selector: "config",
|
|
158
|
-
host: { class: "flex-grow" },
|
|
159
|
-
changeDetection: core_1.ChangeDetectionStrategy.OnPush
|
|
160
|
-
}),
|
|
161
|
-
__metadata("design:paramtypes", [material_1.MdDialog, socket_service_1.SocketService, core_1.ChangeDetectorRef, material_2.MdSnackBar])
|
|
162
|
-
], ConfigComponent);
|
|
163
|
-
exports.ConfigComponent = ConfigComponent;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
const core_1 = require("@angular/core");
|
|
12
|
+
const socket_service_1 = require("../../service/socket.service");
|
|
13
|
+
const material_1 = require("@angular/material");
|
|
14
|
+
const diff_dialog_1 = require("./diff.dialog");
|
|
15
|
+
const plugins_dialog_1 = require("./plugins.dialog");
|
|
16
|
+
const config_defaultConfig_1 = require("../../service/config.defaultConfig");
|
|
17
|
+
const material_2 = require("@angular/material");
|
|
18
|
+
var diff = nw.require("diff");
|
|
19
|
+
let ConfigComponent = class ConfigComponent {
|
|
20
|
+
constructor(dialog, socketService, cd, snackBar) {
|
|
21
|
+
this.dialog = dialog;
|
|
22
|
+
this.socketService = socketService;
|
|
23
|
+
this.cd = cd;
|
|
24
|
+
this.snackBar = snackBar;
|
|
25
|
+
this.restartNeeded = new core_1.EventEmitter();
|
|
26
|
+
this.isConcurentModification = false;
|
|
27
|
+
this.invalid = false;
|
|
28
|
+
this._message = "";
|
|
29
|
+
this.defaultConfigJson = JSON.stringify(config_defaultConfig_1.default, null, 4);
|
|
30
|
+
}
|
|
31
|
+
set message(message) {
|
|
32
|
+
this._message = message;
|
|
33
|
+
this.invalid = !!message;
|
|
34
|
+
}
|
|
35
|
+
get message() {
|
|
36
|
+
return this._message;
|
|
37
|
+
}
|
|
38
|
+
get dirty() {
|
|
39
|
+
return this.model != this.origModel;
|
|
40
|
+
}
|
|
41
|
+
get model() {
|
|
42
|
+
return this._model;
|
|
43
|
+
}
|
|
44
|
+
set model(model) {
|
|
45
|
+
this._model = model;
|
|
46
|
+
try {
|
|
47
|
+
JSON.parse(this.model);
|
|
48
|
+
this.message = null;
|
|
49
|
+
}
|
|
50
|
+
catch (e) {
|
|
51
|
+
this.message = "Invalid JSON";
|
|
52
|
+
}
|
|
53
|
+
if (this.preNode.nativeElement.innerText != model) {
|
|
54
|
+
this.preNode.nativeElement.innerText = model;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
get resetTitle() {
|
|
58
|
+
if (!this.isConcurentModification) {
|
|
59
|
+
return "";
|
|
60
|
+
}
|
|
61
|
+
return "Config was modified outside of 'Config' tab. Use 'Reset' to load new config. 'Save' will override new config.";
|
|
62
|
+
}
|
|
63
|
+
ngOnInit() {
|
|
64
|
+
this.socketService.configObservable.subscribe(config => {
|
|
65
|
+
var model = JSON.stringify(config, null, 4);
|
|
66
|
+
if (!this.dirty) {
|
|
67
|
+
this.model = model;
|
|
68
|
+
}
|
|
69
|
+
this.origModel = model;
|
|
70
|
+
//if still dirty - concurent modif (else - it was our save reflected back)
|
|
71
|
+
this.isConcurentModification = this.dirty;
|
|
72
|
+
this.cd.markForCheck();
|
|
73
|
+
});
|
|
74
|
+
this.socketService.configObservable
|
|
75
|
+
.filter(config => !config.isEmpty)
|
|
76
|
+
.first()
|
|
77
|
+
.subscribe(config => this.checkPlugins(config));
|
|
78
|
+
this.preNode.nativeElement;
|
|
79
|
+
}
|
|
80
|
+
trySave() {
|
|
81
|
+
this.hBlur();
|
|
82
|
+
if (!this.dirty || this.invalid) {
|
|
83
|
+
return this.msg(this.dirty ? "Invalid JSON!" : "No changes in config!");
|
|
84
|
+
}
|
|
85
|
+
this.save();
|
|
86
|
+
}
|
|
87
|
+
save() {
|
|
88
|
+
var confObj = JSON.parse(this.model); //we do not allow save for invalid
|
|
89
|
+
this.socketService.replaceConfig(confObj);
|
|
90
|
+
this.msg("Config was saved.");
|
|
91
|
+
}
|
|
92
|
+
msg(str) {
|
|
93
|
+
var ref = this.snackBar.open(str, null, {
|
|
94
|
+
duration: 1000,
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
hBlur() {
|
|
98
|
+
if (this.invalid) {
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
this.model = JSON.stringify(JSON.parse(this.model), null, 4);
|
|
102
|
+
this.cd.markForCheck();
|
|
103
|
+
}
|
|
104
|
+
hPaste(evt) {
|
|
105
|
+
evt.preventDefault(); // cancel paste
|
|
106
|
+
var text = evt.clipboardData.getData("text/plain"); // get text representation of clipboard
|
|
107
|
+
document.execCommand("insertHTML", false, text); // insert text manually
|
|
108
|
+
}
|
|
109
|
+
reset() {
|
|
110
|
+
this.model = this.origModel;
|
|
111
|
+
this.isConcurentModification = false;
|
|
112
|
+
}
|
|
113
|
+
showDiff() {
|
|
114
|
+
diff.diffLines(this.origModel, this.model)
|
|
115
|
+
.forEach(part => {
|
|
116
|
+
console.log(`%c ${part.value}`, `color: ${part.added ? "green" : part.removed ? "red" : "black"}`);
|
|
117
|
+
});
|
|
118
|
+
var dialogRef = this.dialog.open(diff_dialog_1.DiffDialog, {
|
|
119
|
+
disableClose: false,
|
|
120
|
+
height: '90%',
|
|
121
|
+
width: '850px'
|
|
122
|
+
});
|
|
123
|
+
dialogRef.componentInstance.diff = diff.diffLines(this.origModel, this.model);
|
|
124
|
+
}
|
|
125
|
+
checkPlugins(config) {
|
|
126
|
+
if (JSON.stringify(config.plugins) == JSON.stringify(config_defaultConfig_1.default.plugins)) {
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
var dialogRef = this.dialog.open(plugins_dialog_1.PluginsDialog, {
|
|
130
|
+
disableClose: true,
|
|
131
|
+
height: '450px',
|
|
132
|
+
width: '850px'
|
|
133
|
+
});
|
|
134
|
+
dialogRef.componentInstance.plugins = { current: config.plugins, expected: config_defaultConfig_1.default.plugins };
|
|
135
|
+
dialogRef.afterClosed().subscribe(doReplace => {
|
|
136
|
+
if (!doReplace) {
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
this.socketService.updateConfig(Object.assign(config, { plugins: config_defaultConfig_1.default.plugins }));
|
|
140
|
+
this.restartNeeded.emit();
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
__decorate([
|
|
145
|
+
core_1.Output(),
|
|
146
|
+
__metadata("design:type", Object)
|
|
147
|
+
], ConfigComponent.prototype, "restartNeeded", void 0);
|
|
148
|
+
__decorate([
|
|
149
|
+
core_1.ViewChild("preNode"),
|
|
150
|
+
__metadata("design:type", Object)
|
|
151
|
+
], ConfigComponent.prototype, "preNode", void 0);
|
|
152
|
+
ConfigComponent = __decorate([
|
|
153
|
+
core_1.Component({
|
|
154
|
+
moduleId: module.id,
|
|
155
|
+
templateUrl: "config.component.html",
|
|
156
|
+
styleUrls: ["config.component.css"],
|
|
157
|
+
selector: "config",
|
|
158
|
+
host: { class: "flex-grow" },
|
|
159
|
+
changeDetection: core_1.ChangeDetectionStrategy.OnPush
|
|
160
|
+
}),
|
|
161
|
+
__metadata("design:paramtypes", [material_1.MdDialog, socket_service_1.SocketService, core_1.ChangeDetectorRef, material_2.MdSnackBar])
|
|
162
|
+
], ConfigComponent);
|
|
163
|
+
exports.ConfigComponent = ConfigComponent;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
<pre>
|
|
2
|
-
<template ngFor let-item [ngForOf]="diff"><span [style.color]="item.added?'green':item.removed?'red':'auto'">{{item.value}}</span></template>
|
|
3
|
-
</pre>
|
|
1
|
+
<pre>
|
|
2
|
+
<template ngFor let-item [ngForOf]="diff"><span [style.color]="item.added?'green':item.removed?'red':'auto'">{{item.value}}</span></template>
|
|
3
|
+
</pre>
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const core_1 = require("@angular/core");
|
|
13
|
-
const material_1 = require("@angular/material");
|
|
14
|
-
let DiffDialog = class DiffDialog {
|
|
15
|
-
constructor(dialogRef) {
|
|
16
|
-
this.dialogRef = dialogRef;
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
DiffDialog = __decorate([
|
|
20
|
-
core_1.Component({
|
|
21
|
-
moduleId: module.id,
|
|
22
|
-
selector: "diff-dialog",
|
|
23
|
-
styles: ["pre{height: calc(100% - 10px);}"],
|
|
24
|
-
templateUrl: "diff.dialog.html",
|
|
25
|
-
changeDetection: core_1.ChangeDetectionStrategy.OnPush
|
|
26
|
-
}),
|
|
27
|
-
__metadata("design:paramtypes", [material_1.MdDialogRef])
|
|
28
|
-
], DiffDialog);
|
|
29
|
-
exports.DiffDialog = DiffDialog;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const core_1 = require("@angular/core");
|
|
13
|
+
const material_1 = require("@angular/material");
|
|
14
|
+
let DiffDialog = class DiffDialog {
|
|
15
|
+
constructor(dialogRef) {
|
|
16
|
+
this.dialogRef = dialogRef;
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
DiffDialog = __decorate([
|
|
20
|
+
core_1.Component({
|
|
21
|
+
moduleId: module.id,
|
|
22
|
+
selector: "diff-dialog",
|
|
23
|
+
styles: ["pre{height: calc(100% - 10px);}"],
|
|
24
|
+
templateUrl: "diff.dialog.html",
|
|
25
|
+
changeDetection: core_1.ChangeDetectionStrategy.OnPush
|
|
26
|
+
}),
|
|
27
|
+
__metadata("design:paramtypes", [material_1.MdDialogRef])
|
|
28
|
+
], DiffDialog);
|
|
29
|
+
exports.DiffDialog = DiffDialog;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { Component, ChangeDetectionStrategy } from '@angular/core';
|
|
2
|
-
import { MdDialogRef } from '@angular/material';
|
|
3
|
-
|
|
4
|
-
@Component({
|
|
5
|
-
moduleId: module.id,
|
|
6
|
-
selector: "diff-dialog",
|
|
7
|
-
styles: ["pre{height: calc(100% - 10px);}"],
|
|
8
|
-
templateUrl: "diff.dialog.html",
|
|
9
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
10
|
-
})
|
|
11
|
-
export class DiffDialog {
|
|
12
|
-
constructor(public dialogRef: MdDialogRef<DiffDialog>) { }
|
|
13
|
-
|
|
14
|
-
diff: any
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
1
|
+
import { Component, ChangeDetectionStrategy } from '@angular/core';
|
|
2
|
+
import { MdDialogRef } from '@angular/material';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
moduleId: module.id,
|
|
6
|
+
selector: "diff-dialog",
|
|
7
|
+
styles: ["pre{height: calc(100% - 10px);}"],
|
|
8
|
+
templateUrl: "diff.dialog.html",
|
|
9
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
10
|
+
})
|
|
11
|
+
export class DiffDialog {
|
|
12
|
+
constructor(public dialogRef: MdDialogRef<DiffDialog>) { }
|
|
13
|
+
|
|
14
|
+
diff: any
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
<p>Your plugins configuration does not match recommended plugins configuration.</p>
|
|
2
|
-
<p>Some PRO-XY-UI features may not work correctly, or not work at all.</p>
|
|
3
|
-
<p>This state may be caused by updating to newer version, which have different plugins requirements than older version.</p>
|
|
4
|
-
|
|
5
|
-
<table class="table" style="font-size:.875rem">
|
|
6
|
-
<tr>
|
|
7
|
-
<th>Recommended</th>
|
|
8
|
-
<th>Current</th>
|
|
9
|
-
</tr>
|
|
10
|
-
<tr>
|
|
11
|
-
<td [innerHTML]="plugins.expected.join('<br>')"></td>
|
|
12
|
-
<td [innerHTML]="plugins.current.join('<br>')"></td>
|
|
13
|
-
</tr>
|
|
14
|
-
</table>
|
|
15
|
-
|
|
16
|
-
<button class="btn btn-sm btn-primary" (click)="dialogRef.close(true)">Replace plugins order with recommended config</button>
|
|
17
|
-
<button class="btn btn-sm btn-secondary" (click)="dialogRef.close(false)">Keep current config</button>
|
|
1
|
+
<p>Your plugins configuration does not match recommended plugins configuration.</p>
|
|
2
|
+
<p>Some PRO-XY-UI features may not work correctly, or not work at all.</p>
|
|
3
|
+
<p>This state may be caused by updating to newer version, which have different plugins requirements than older version.</p>
|
|
4
|
+
|
|
5
|
+
<table class="table" style="font-size:.875rem">
|
|
6
|
+
<tr>
|
|
7
|
+
<th>Recommended</th>
|
|
8
|
+
<th>Current</th>
|
|
9
|
+
</tr>
|
|
10
|
+
<tr>
|
|
11
|
+
<td [innerHTML]="plugins.expected.join('<br>')"></td>
|
|
12
|
+
<td [innerHTML]="plugins.current.join('<br>')"></td>
|
|
13
|
+
</tr>
|
|
14
|
+
</table>
|
|
15
|
+
|
|
16
|
+
<button class="btn btn-sm btn-primary" (click)="dialogRef.close(true)">Replace plugins order with recommended config</button>
|
|
17
|
+
<button class="btn btn-sm btn-secondary" (click)="dialogRef.close(false)">Keep current config</button>
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const core_1 = require("@angular/core");
|
|
13
|
-
const material_1 = require("@angular/material");
|
|
14
|
-
let PluginsDialog = class PluginsDialog {
|
|
15
|
-
constructor(dialogRef) {
|
|
16
|
-
this.dialogRef = dialogRef;
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
PluginsDialog = __decorate([
|
|
20
|
-
core_1.Component({
|
|
21
|
-
moduleId: module.id,
|
|
22
|
-
selector: "plugins-dialog",
|
|
23
|
-
// styles: ["pre{max-height:800px;}"],
|
|
24
|
-
templateUrl: "plugins.dialog.html",
|
|
25
|
-
changeDetection: core_1.ChangeDetectionStrategy.OnPush
|
|
26
|
-
}),
|
|
27
|
-
__metadata("design:paramtypes", [material_1.MdDialogRef])
|
|
28
|
-
], PluginsDialog);
|
|
29
|
-
exports.PluginsDialog = PluginsDialog;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const core_1 = require("@angular/core");
|
|
13
|
+
const material_1 = require("@angular/material");
|
|
14
|
+
let PluginsDialog = class PluginsDialog {
|
|
15
|
+
constructor(dialogRef) {
|
|
16
|
+
this.dialogRef = dialogRef;
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
PluginsDialog = __decorate([
|
|
20
|
+
core_1.Component({
|
|
21
|
+
moduleId: module.id,
|
|
22
|
+
selector: "plugins-dialog",
|
|
23
|
+
// styles: ["pre{max-height:800px;}"],
|
|
24
|
+
templateUrl: "plugins.dialog.html",
|
|
25
|
+
changeDetection: core_1.ChangeDetectionStrategy.OnPush
|
|
26
|
+
}),
|
|
27
|
+
__metadata("design:paramtypes", [material_1.MdDialogRef])
|
|
28
|
+
], PluginsDialog);
|
|
29
|
+
exports.PluginsDialog = PluginsDialog;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { Component, ChangeDetectionStrategy } from '@angular/core';
|
|
2
|
-
import { MdDialogRef } from '@angular/material';
|
|
3
|
-
|
|
4
|
-
@Component({
|
|
5
|
-
moduleId: module.id,
|
|
6
|
-
selector: "plugins-dialog",
|
|
7
|
-
// styles: ["pre{max-height:800px;}"],
|
|
8
|
-
templateUrl: "plugins.dialog.html",
|
|
9
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
10
|
-
})
|
|
11
|
-
export class PluginsDialog {
|
|
12
|
-
constructor(public dialogRef: MdDialogRef<PluginsDialog>) { }
|
|
13
|
-
|
|
14
|
-
plugins: { current: string[], expected: string[] }
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
1
|
+
import { Component, ChangeDetectionStrategy } from '@angular/core';
|
|
2
|
+
import { MdDialogRef } from '@angular/material';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
moduleId: module.id,
|
|
6
|
+
selector: "plugins-dialog",
|
|
7
|
+
// styles: ["pre{max-height:800px;}"],
|
|
8
|
+
templateUrl: "plugins.dialog.html",
|
|
9
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
10
|
+
})
|
|
11
|
+
export class PluginsDialog {
|
|
12
|
+
constructor(public dialogRef: MdDialogRef<PluginsDialog>) { }
|
|
13
|
+
|
|
14
|
+
plugins: { current: string[], expected: string[] }
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
}
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
class ConfigListBase {
|
|
4
|
-
constructor() {
|
|
5
|
-
this.menuItems = [
|
|
6
|
-
new nw.MenuItem({ label: "Delete", click: () => this.deleteItem(this._lastCtxItem) }),
|
|
7
|
-
new nw.MenuItem({ type: "separator" })
|
|
8
|
-
];
|
|
9
|
-
}
|
|
10
|
-
ngOnInit() {
|
|
11
|
-
this.configObservable = this.socketService.configObservable;
|
|
12
|
-
this.configObservable.subscribe(config => { this.config = config; });
|
|
13
|
-
}
|
|
14
|
-
hChange(item, index) {
|
|
15
|
-
item.disabled = !item.disabled; //changed by reference
|
|
16
|
-
this.socketService.replaceConfig(this.config);
|
|
17
|
-
}
|
|
18
|
-
toggleDisabled() {
|
|
19
|
-
this.config[this.configProperty].disabled = !this.config[this.configProperty].disabled;
|
|
20
|
-
this.socketService.replaceConfig(this.config);
|
|
21
|
-
}
|
|
22
|
-
openUrl($event) {
|
|
23
|
-
$event.preventDefault();
|
|
24
|
-
nw.Shell.openExternal($event.target.href);
|
|
25
|
-
}
|
|
26
|
-
deleteItem(item) {
|
|
27
|
-
var items = this.config[this.configProperty][this.itemsProperty];
|
|
28
|
-
items.splice(items.indexOf(item), 1);
|
|
29
|
-
this.socketService.replaceConfig(this.config);
|
|
30
|
-
}
|
|
31
|
-
hCtxMenu(item, evt) {
|
|
32
|
-
this._lastCtxItem = item;
|
|
33
|
-
evt.menuItems = (evt.menuItems || []).concat(this.menuItems);
|
|
34
|
-
}
|
|
35
|
-
addEmptyConfig() {
|
|
36
|
-
this.socketService.updateConfig({
|
|
37
|
-
[this.configProperty]: {
|
|
38
|
-
disabled: false,
|
|
39
|
-
[this.itemsProperty]: []
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
exports.ConfigListBase = ConfigListBase;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
class ConfigListBase {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.menuItems = [
|
|
6
|
+
new nw.MenuItem({ label: "Delete", click: () => this.deleteItem(this._lastCtxItem) }),
|
|
7
|
+
new nw.MenuItem({ type: "separator" })
|
|
8
|
+
];
|
|
9
|
+
}
|
|
10
|
+
ngOnInit() {
|
|
11
|
+
this.configObservable = this.socketService.configObservable;
|
|
12
|
+
this.configObservable.subscribe(config => { this.config = config; });
|
|
13
|
+
}
|
|
14
|
+
hChange(item, index) {
|
|
15
|
+
item.disabled = !item.disabled; //changed by reference
|
|
16
|
+
this.socketService.replaceConfig(this.config);
|
|
17
|
+
}
|
|
18
|
+
toggleDisabled() {
|
|
19
|
+
this.config[this.configProperty].disabled = !this.config[this.configProperty].disabled;
|
|
20
|
+
this.socketService.replaceConfig(this.config);
|
|
21
|
+
}
|
|
22
|
+
openUrl($event) {
|
|
23
|
+
$event.preventDefault();
|
|
24
|
+
nw.Shell.openExternal($event.target.href);
|
|
25
|
+
}
|
|
26
|
+
deleteItem(item) {
|
|
27
|
+
var items = this.config[this.configProperty][this.itemsProperty];
|
|
28
|
+
items.splice(items.indexOf(item), 1);
|
|
29
|
+
this.socketService.replaceConfig(this.config);
|
|
30
|
+
}
|
|
31
|
+
hCtxMenu(item, evt) {
|
|
32
|
+
this._lastCtxItem = item;
|
|
33
|
+
evt.menuItems = (evt.menuItems || []).concat(this.menuItems);
|
|
34
|
+
}
|
|
35
|
+
addEmptyConfig() {
|
|
36
|
+
this.socketService.updateConfig({
|
|
37
|
+
[this.configProperty]: {
|
|
38
|
+
disabled: false,
|
|
39
|
+
[this.itemsProperty]: []
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.ConfigListBase = ConfigListBase;
|