@c8y/ng1-modules 1021.80.1 → 1022.3.2
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/alarmsEventsExplorer/alarmsEventsTimelinesConfig/alarmsEventsTimelinesConfig.html +1 -1
- package/assetPropertyWidget/img/asset-properties-widget-pr.png +0 -0
- package/assetPropertyWidget/views/config.html +1 -1
- package/assetTable/assetTable2/img/asset-table-widget-pr.png +0 -0
- package/assetTable/img/asset-table-widget-pr.png +0 -0
- package/core/core/services/audits.js +1 -1
- package/core/core/services/retentions.js +1 -1
- package/core/core/services/tenant.js +1 -1
- package/core/core/services/user.js +1 -1
- package/core/cumulocity.json +0 -1
- package/core/locales/de.po +472 -720
- package/core/locales/es.po +422 -671
- package/core/locales/fr.po +501 -751
- package/core/locales/ja_JP.po +494 -740
- package/core/locales/ko.po +421 -671
- package/core/locales/nl.po +424 -672
- package/core/locales/pl.po +422 -672
- package/core/locales/pt_BR.po +519 -768
- package/core/locales/zh_CN.po +421 -671
- package/core/locales/zh_TW.po +422 -671
- package/core/ui/properties/propertySelector.html +156 -109
- package/core/ui/views/auditList.html +2 -2
- package/core/ui/views/eventList.html +2 -2
- package/core/ui/views/filePicker.html +1 -1
- package/dataBroker/connectors/connectors.service.js +1 -1
- package/dataPointExplorer/img/data-points-graph-widget-pr.png +0 -0
- package/dataPointExplorer/views/widgetConfig.html +92 -94
- package/device-protocols/object-mapping.component.js +1 -1
- package/device-protocols/object-mapping.html +1 -1
- package/deviceDatabase4/modals/configure-discrete-io.html +1 -1
- package/deviceDatabase4/modals/configure-register.html +1 -1
- package/deviceDetail/cumulocity.json +1 -2
- package/deviceStatusWidget/ownerStatus.html +2 -2
- package/deviceStatusWidget/requiredAvailabilityIntervalSetting.html +4 -4
- package/devicemanagement-eventList/index.js +1 -1
- package/enterpriseEdition/cumulocity.json +0 -13
- package/enterpriseEdition/enterpriseEdition.module.js +1 -1
- package/eventList/img/events-list-widget-pr.png +0 -0
- package/eventList/views/eventListConfig.html +39 -32
- package/export/cumulocity.json +0 -1
- package/export/index.js +1 -1
- package/export/services/config.js +1 -1
- package/htmlWidget/index.js +1 -1
- package/kpi/img/data-points-list-widget-pr.png +0 -0
- package/kpi/views/gaugeConfig.html +28 -34
- package/kpi/views/listConfig.html +14 -18
- package/kpi/views/pieChartConfig.html +30 -36
- package/modbusConfiguration4/fieldbus-device-list.component.js +1 -1
- package/modbusWidget4/widget-config.html +74 -84
- package/package.json +11 -13
- package/propertiesLibrary/index.js +1 -1
- package/roles/list/rolesList.html +0 -2
- package/scada/views/componentConfig.html +23 -23
- package/scada/views/mapping.html +41 -39
- package/smartRules/controllers/add.js +1 -1
- package/smartRules/controllers/list.js +1 -1
- package/smartRules/list/smartRulesList.component.js +1 -1
- package/smartRules/list/smartRulesList.html +2 -2
- package/smartRules/services/smartRules.js +1 -1
- package/smartRules/views/add.html +32 -10
- package/smartRules/views/list.html +4 -3
- package/trafficLightWidget/states-mapping.html +82 -69
- package/administration-config/administration-config.module.js +0 -1
- package/administration-config/cumulocity.json +0 -13
- package/asset-notes/assetNotes.component.js +0 -1
- package/asset-notes/assetNotes.html +0 -93
- package/asset-notes/assetNotes.module.js +0 -1
- package/asset-notes/assetNotes.service.js +0 -1
- package/asset-notes/cumulocity.json +0 -13
- package/core/ui/forms/ssh-key-input.html +0 -33
- package/core/ui/forms/ssh-key-input.js +0 -1
- package/devicemanagement-deviceListMap/controllers/deviceListMap.js +0 -1
- package/devicemanagement-deviceListMap/cumulocity.json +0 -19
- package/devicemanagement-deviceListMap/index.js +0 -1
- package/devicemanagement-deviceListMap/views/index.html +0 -21
- package/enterpriseEdition/customBranding/brandingConfiguration.constants.js +0 -1
- package/enterpriseEdition/customBranding/brandingConfiguration.service.js +0 -1
- package/enterpriseEdition/customBranding/brandingConfigurationForm.component.js +0 -1
- package/enterpriseEdition/customBranding/brandingConfigurationForm.html +0 -141
- package/enterpriseEdition/customBranding/brandingConfigurationUi.provider.js +0 -1
- package/enterpriseEdition/customBranding/brandingDeploy.service.js +0 -1
- package/enterpriseEdition/customBranding/brandingProcessExecution.component.js +0 -1
- package/enterpriseEdition/customBranding/brandingProcessExecution.html +0 -120
- package/enterpriseEdition/customBranding/custom-branding.module.js +0 -1
- package/enterpriseEdition/customBranding/microservice.value.js +0 -1
- package/enterpriseEdition/ui-assets/index.js +0 -1
- package/enterpriseEdition/ui-assets/public-options.service.js +0 -1
- package/enterpriseEdition/ui-assets/static-assets.service.js +0 -1
- package/enterpriseEdition/ui-assets/ui-assets.service.js +0 -1
- package/export/controllers/list.js +0 -1
- package/export/views/list.html +0 -298
- package/remoteAccess/clients/remoteAccessClients.service.js +0 -1
- package/remoteAccess/clients/terminal/index.html +0 -30
- package/remoteAccess/clients/terminal/index.js +0 -1
- package/remoteAccess/clients/terminal/shell-adapter.js +0 -1
- package/remoteAccess/clients/terminal/style.css +0 -25
- package/remoteAccess/clients/terminal/telnet-negotiator.js +0 -1
- package/remoteAccess/clients/vnc/vncClient.html +0 -60
- package/remoteAccess/clients/vnc/vncClient.js +0 -1
- package/remoteAccess/cumulocity.json +0 -69
- package/remoteAccess/remoteAccess.module.js +0 -1
- package/remoteAccess/remoteAccess.service.js +0 -1
- package/remoteAccess/remoteAccessEndpointCard/remoteAccessEndpointCard.component.js +0 -1
- package/remoteAccess/remoteAccessEndpointCard/remoteAccessEndpointCard.html +0 -89
- package/remoteAccess/remoteAccessEndpointModal/remoteAccessEndpointModal.component.js +0 -1
- package/remoteAccess/remoteAccessEndpointModal/remoteAccessEndpointModal.html +0 -484
- package/remoteAccess/remoteAccessEndpointModal/suggestedIPAddressTemplate.html +0 -8
- package/remoteAccess/remoteAccessEndpointsList/remoteAccessEndpointsList.component.js +0 -1
- package/remoteAccess/remoteAccessEndpointsList/remoteAccessEndpointsList.html +0 -75
- package/remoteAccess/remoteAccessSettings/remoteAccessSettings.component.js +0 -1
- package/remoteAccess/remoteAccessSettings/remoteAccessSettings.html +0 -37
- package/remoteAccess/remoteAccessUI.provider.js +0 -1
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html>
|
|
3
|
-
|
|
4
|
-
<head>
|
|
5
|
-
<title>Terminal</title>
|
|
6
|
-
<meta charset="utf-8">
|
|
7
|
-
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
8
|
-
|
|
9
|
-
<script src="../remoteAccessClients.service.js"></script>
|
|
10
|
-
|
|
11
|
-
<script>
|
|
12
|
-
var terminalSize = { cols: 132, rows: 43 };
|
|
13
|
-
var clientService = new RemoteAccessClientsService(window.location, window.localStorage);
|
|
14
|
-
|
|
15
|
-
clientService.loadCss('style.css');
|
|
16
|
-
clientService.loadCss('xterm.css');
|
|
17
|
-
clientService.loadJs('xterm.js');
|
|
18
|
-
clientService.loadJs('xterm-addon-fit.js');
|
|
19
|
-
clientService.loadJs('text.min.js');
|
|
20
|
-
clientService.loadJs('telnet-negotiator.js');
|
|
21
|
-
clientService.loadJs('shell-adapter.js');
|
|
22
|
-
clientService.loadJs('index.js');
|
|
23
|
-
</script>
|
|
24
|
-
</head>
|
|
25
|
-
|
|
26
|
-
<body>
|
|
27
|
-
<div id="terminal"></div>
|
|
28
|
-
</body>
|
|
29
|
-
|
|
30
|
-
</html>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(()=>{var c,a,r=!1;window.onload=function(){var e=document.getElementById("terminal"),n=new Terminal({fontSize:18,fontFamily:"consolas, monospace",cursorBlink:!0,cols:terminalSize.cols,rows:terminalSize.rows}),t=new FitAddon.FitAddon,i=(n.loadAddon(t),new ShellAdapter),o=(i.setTermType("xterm-256color"),clientService.getParams());o?(clientService.setConnectionStatus(clientService.STATUSES.CONNECTING),document.title=unescape(o.title),c=o.wsProtocol+"//"+o.host+"/"+o.path,n.open(e),t.fit(),n.focus(),setTimeout(function(){(a=new WebSocket(c,"binary")).binaryType="arraybuffer",a.onopen=function(){n.writeln("[92mWebsocket connection was established successfully, waiting for device... [39m \r\n")},a.onclose=function(){n.writeln(""),n.writeln("\r\n[91mDevice disconnected. [39m \r\n"),n.writeln("\r\n[91mWebsocket connection was closed. [39m \r\n"),clientService.setConnectionStatus(clientService.STATUSES.ERROR)},a.onmessage=function(e){e.data&&clientService.getConnectionStatus()===clientService.STATUSES.CONNECTING&&clientService.setConnectionStatus(clientService.STATUSES.CONNECTED),r||(r=!0,n.writeln("[92mDevice connection was established successfully. [39m \r\n"));e=i.filterReceiveData(e.data);e.dataToSend.length&&a.send(e.dataToSend),e.dataToDisplay.length&&n.write(e.dataToDisplay)},n.onData(function(e){r&&(e=i.filterSendData(e)).length&&a.send(e)}),window.onbeforeunload=function(){for(var e="exit\n",n=[],t=0;t<e.length;t++)n.push(e.charCodeAt(t));a.send(new Uint8Array(n))}})):(n.writeln(""),n.writeln("\r\n[91mConnection parameters could not be retrieved. Please close this window and try again [39m \r\n"),clientService.setConnectionStatus(clientService.STATUSES.ERROR))}})();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function ShellAdapter(){var n="";this.setTermType=function(e){n=e},this.filterReceiveData=function(e){var t=new TelnetNegotiator,t=(t.setTermType(n),t.negotiate(e)),e=(new TextDecoder).decode(e);return{dataToSend:t.dataToSend,dataToDisplay:t.isOutput?e.split("�").join(""):""}},this.filterSendData=function(e){for(var t=[],n=0;n<e.length;n++)t.push(e.charCodeAt(n));return t.length?new Uint8Array(t):""}}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
html, body {
|
|
2
|
-
margin: 0;
|
|
3
|
-
padding: 0;
|
|
4
|
-
background-color: black;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
#terminal {
|
|
8
|
-
margin: 15px;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
::-webkit-scrollbar {
|
|
12
|
-
width: 5px;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
::-webkit-scrollbar-track {
|
|
16
|
-
background: black;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
::-webkit-scrollbar-thumb {
|
|
20
|
-
background: rgb(148, 57, 14);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
::-webkit-scrollbar-thumb:hover {
|
|
24
|
-
background: rgb(196, 75, 19);
|
|
25
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function TelnetNegotiator(){var f="";this.setTermType=function(e){f=e},this.negotiate=function(e){for(var t,e=new Uint8Array(e),s=Array.prototype.slice.call(e),i=[],r="",n="",a="";0<s.length;)switch(t=s.shift()){case 255:switch(n=s.shift(),a=s.shift(),n){case 253:24===a?i.push(255,251,a):31===a?(i.push(255,251,31),i.push(255,250,31,0,terminalSize.cols,0,terminalSize.rows,255,240)):i.push(255,252,a);break;case 251:i.push(255,1===a?253:254,a);break;case 250:if(24===a)if(1===s[0]&&255===s[1]&&240===s[2]){s.shift(),s.shift(),s.shift(),i.push(255,250,24,0),c=o=h=void 0;for(var h=f,o=i,c=0;c<h.length;c++)o.push(h.charCodeAt(c));i.push(255,240)}else console.warn("Invalid subnegotiation received"+s);else console.warn("Ignoring SB "+a)}break;case 242:n=s.shift(),a=s.shift();break;default:r+=String.fromCharCode(t)}return{dataToSend:i.length?new Uint8Array(i):"",isOutput:!!r.length}}}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html>
|
|
3
|
-
<head>
|
|
4
|
-
<title>noVNC</title>
|
|
5
|
-
<meta charset="utf-8">
|
|
6
|
-
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
7
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
|
8
|
-
|
|
9
|
-
<script src="../remoteAccessClients.service.js"></script>
|
|
10
|
-
|
|
11
|
-
<script>
|
|
12
|
-
var INCLUDE_URI = '';
|
|
13
|
-
var clientService = new RemoteAccessClientsService(window.location, window.localStorage);
|
|
14
|
-
|
|
15
|
-
clientService.loadCss('base.css');
|
|
16
|
-
clientService.loadJs('lodash.min.js');
|
|
17
|
-
clientService.loadJs('util.js');
|
|
18
|
-
startVncClient();
|
|
19
|
-
|
|
20
|
-
function startVncClient() {
|
|
21
|
-
window.setTimeout(function () {
|
|
22
|
-
if (window.Util) {
|
|
23
|
-
clientService.loadJs('vncClient.js');
|
|
24
|
-
} else {
|
|
25
|
-
startVncClient();
|
|
26
|
-
}
|
|
27
|
-
}, 10);
|
|
28
|
-
}
|
|
29
|
-
</script>
|
|
30
|
-
</head>
|
|
31
|
-
|
|
32
|
-
<body>
|
|
33
|
-
<div id="noVNC_container">
|
|
34
|
-
<div id="noVNC_status_bar" class="noVNC_status_bar m-t-0">
|
|
35
|
-
<table border=0 width="100%">
|
|
36
|
-
<tr>
|
|
37
|
-
<td>
|
|
38
|
-
<div id="noVNC_status" class="p-relative" style="height: auto;">
|
|
39
|
-
Loading
|
|
40
|
-
</div>
|
|
41
|
-
</td>
|
|
42
|
-
<td width="1%">
|
|
43
|
-
<div id="noVNC_buttons">
|
|
44
|
-
<input type=button value="Send Ctrl+Alt+Del" id="sendCtrlAltDelButton">
|
|
45
|
-
<span id="noVNC_xvp_buttons">
|
|
46
|
-
<input type=button value="Shutdown" id="xvpShutdownButton">
|
|
47
|
-
<input type=button value="Reboot" id="xvpRebootButton">
|
|
48
|
-
<input type=button value="Reset" id="xvpResetButton">
|
|
49
|
-
</span>
|
|
50
|
-
</div>
|
|
51
|
-
</td>
|
|
52
|
-
</tr>
|
|
53
|
-
</table>
|
|
54
|
-
</div>
|
|
55
|
-
<canvas id="noVNC_canvas" width="640px" height="20px">
|
|
56
|
-
Canvas not supported.
|
|
57
|
-
</canvas>
|
|
58
|
-
</div>
|
|
59
|
-
</body>
|
|
60
|
-
</html>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(()=>{var i,t,e=clientService.getParams(),l={LOADED:"loaded",NORMAL:"normal",FAILED:"failed",FATAL:"fatal",DISCONNECTED:"disconnected"},S=clientService.STATUSES.DISCONNECTED;function n(){var t,e,n;WebUtil.getConfigVar("resize",!1)&&(t=window.innerWidth,e=window.innerHeight,n=$D("noVNC_status_bar").offsetHeight,void 0!==t)&&void 0!==e&&i.requestDesktopSize(t,e-n-5)}function s(t){n(),t.set_onFBUComplete(function(){})}function o(){return i.sendCtrlAltDel(),!1}function c(){return i.xvpShutdown(),!1}function a(){return i.xvpReboot(),!1}function r(){return i.xvpReset(),!1}function u(t,e,n,i){var s=(t=>{var e;switch(t){case l.FAILED:case l.FATAL:e="error";break;case l.NORMAL:case l.DISCONNECTED:case l.LOADED:e="normal";break;default:e="warn"}return e})(e),o=(t=>{switch(t){case l.FAILED:case l.FATAL:status=clientService.STATUSES.ERROR,S=clientService.STATUSES.ERROR;break;case l.NORMAL:status=clientService.STATUSES.CONNECTED;break;case l.DISCONNECTED:S!=clientService.STATUSES.ERROR&&(status=clientService.STATUSES.DISCONNECTED);break;case l.LOADED:status=clientService.STATUSES.DISCONNECTED,S=clientService.STATUSES.DISCONNECTED;break;case l.CONNECT:status=clientService.STATUSES.CONNECTING,S=clientService.STATUSES.CONNECTING;break;default:status=clientService.STATUSES.DISCONNECTED,S=clientService.STATUSES.DISCONNECTED}return status})(e),c=$D("noVNC_status"),a=$D("noVNC_status_bar"),r=$D("sendCtrlAltDelButton");e===l.NORMAL?r.disabled=!1:(r.disabled=!0,T(0)),void 0!==i&&(a.setAttribute("class","noVNC_status_".concat(s)),c.textContent=i),clientService.setConnectionStatus(o)}function T(t){var e=$D("noVNC_xvp_buttons");e.style.display=1<=t?"inline":"none"}Util.load_scripts(["webutil.js","base64.js","websock.js","des.js","keysymdef.js","keyboard.js","input.js","display.js","inflator.js","rfb.js","keysym.js"]),window.onresize=function(){clearTimeout(t),t=setTimeout(function(){n()},500)},window.onscriptsload=function(){var t=$D("sendCtrlAltDelButton");if(t.style.display="inline",t.onclick=o,$D("xvpShutdownButton").onclick=c,$D("xvpRebootButton").onclick=a,$D("xvpResetButton").onclick=r,e)if(WebUtil.init_logging(e.logging||"warn"),document.title=unescape(e.title||"noVNC"),e.host&&e.port){try{i=new RFB(_.defaults(_.omit(e,["path","host","viewport","port","password","status","title","protocol","wsProtocol"]),{target:$D("noVNC_canvas"),onUpdateState:u,onXvpInit:T,onFBUComplete:s}))}catch(t){return void u(0,l.FATAL,0,"Unable to create RFB client -- ".concat(t))}i.connect(e.host,e.port,e.password,e.path)}else u(0,l.FATAL,0,"Must specify host and port in URL");else u(0,l.FATAL,0,"Connection parameters could not be retrieved. Please close this window and try again")}})();
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "Remote access",
|
|
3
|
-
"ngModules": ["c8y.remoteAccess"],
|
|
4
|
-
"category": "Remote access",
|
|
5
|
-
"description": "Configure remote access and handle remote sessions to devices.",
|
|
6
|
-
"js": [
|
|
7
|
-
"remoteAccess.module.js",
|
|
8
|
-
|
|
9
|
-
"remoteAccess.service.js",
|
|
10
|
-
"remoteAccessUI.provider.js",
|
|
11
|
-
|
|
12
|
-
"clients/remoteAccessClients.service.js",
|
|
13
|
-
|
|
14
|
-
"remoteAccessEndpointsList/remoteAccessEndpointsList.component.js",
|
|
15
|
-
"remoteAccessEndpointModal/remoteAccessEndpointModal.component.js",
|
|
16
|
-
"remoteAccessEndpointCard/remoteAccessEndpointCard.component.js",
|
|
17
|
-
|
|
18
|
-
"remoteAccessSettings/remoteAccessSettings.component.js"
|
|
19
|
-
],
|
|
20
|
-
"copy": [
|
|
21
|
-
"clients/remoteAccessClients.service.js",
|
|
22
|
-
"clients/vnc/*",
|
|
23
|
-
{
|
|
24
|
-
"cwd": "node_modules/noVNC/include",
|
|
25
|
-
"files": [
|
|
26
|
-
"base.css",
|
|
27
|
-
"util.js",
|
|
28
|
-
"webutil.js",
|
|
29
|
-
"base64.js",
|
|
30
|
-
"websock.js",
|
|
31
|
-
"des.js",
|
|
32
|
-
"keysymdef.js",
|
|
33
|
-
"keyboard.js",
|
|
34
|
-
"input.js",
|
|
35
|
-
"display.js",
|
|
36
|
-
"inflator.js",
|
|
37
|
-
"rfb.js",
|
|
38
|
-
"keysym.js"
|
|
39
|
-
],
|
|
40
|
-
"output": "clients/vnc"
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
"cwd": "node_modules/lodash",
|
|
44
|
-
"files": ["lodash.min.js"],
|
|
45
|
-
"output": "clients/vnc"
|
|
46
|
-
},
|
|
47
|
-
"clients/terminal/*",
|
|
48
|
-
{
|
|
49
|
-
"cwd": "node_modules/xterm/css",
|
|
50
|
-
"files": ["xterm.css"],
|
|
51
|
-
"output": "clients/terminal"
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
"cwd": "node_modules/xterm/lib",
|
|
55
|
-
"files": ["xterm.js"],
|
|
56
|
-
"output": "clients/terminal"
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
"cwd": "node_modules/xterm-addon-fit/lib",
|
|
60
|
-
"files": ["xterm-addon-fit.js"],
|
|
61
|
-
"output": "clients/terminal"
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
"cwd": "node_modules/fast-text-encoding",
|
|
65
|
-
"files": ["text.min.js"],
|
|
66
|
-
"output": "clients/terminal"
|
|
67
|
-
}
|
|
68
|
-
]
|
|
69
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
angular.module("c8y.remoteAccess",[]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ownKeys(t,e){var n,o=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),o.push.apply(o,n)),o}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(n),!0).forEach(function(e){_defineProperty(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function _defineProperty(e,t,n){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"==_typeof(e)?e:e+""}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!=_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(()=>{function e(n,r,e,a,i,c,l,o,s,u){var t="service/remoteaccess",p="127.0.0.1",d=":::PLUGIN_PATH:::/clients/terminal/index.html",f="top=30,left=30,height=933,width=1350,location=no,menubar=no,toolbar=no,status=no,resizable=no",y=a.url("".concat(t,"/keypair/generate")),m={http:"ws:",https:"wss:"}[e.protocol()]||"ws:",e="wss:"===m,b="XSRF-TOKEN",S=a.createEnum([{name:"NONE",value:"NONE",label:s("No password")},{name:"USER_PASS",value:"USER_PASS",label:s("Username and password")},{name:"PASS_ONLY",value:"PASS_ONLY",label:s("Password only")},{name:"KEY_PAIR",value:"KEY_PAIR",label:s("Public/private keys")},{name:"CERTIFICATE",value:"CERTIFICATE",label:s("Certificate")}]),v=[{name:"VNC",value:"VNC",label:s("VNC"),supportedCredentialsTypes:[S.NONE,S.PASS_ONLY],defaults:{host:p,port:5900},clientWindowPath:":::PLUGIN_PATH:::/clients/vnc/vncClient.html",clientWindowParams:"top=0,left=0,location=no,menubar=no,toolbar=no,status=no,resizable=yes",extraConnectionParams:{encrypt:e,true_color:!0,local_cursor:!1,viewport:!0,shared:!0,view_only:!1,disconnectTimeout:10,repeaterID:"",port:window.location.port,host:window.location.hostname,password:""}},{name:"TELNET",value:"TELNET",label:s("Telnet"),supportedCredentialsTypes:[S.NONE],defaults:{host:p,port:23},clientWindowPath:d,clientWindowParams:f},{name:"SSH",value:"SSH",label:s("SSH"),supportedCredentialsTypes:[S.USER_PASS,S.KEY_PAIR,S.CERTIFICATE],defaults:{host:p,port:22},clientWindowPath:d,clientWindowParams:f},{name:"PASSTHROUGH",value:"PASSTHROUGH",label:s("PASSTHROUGH"),supportedCredentialsTypes:[],defaults:{host:p,port:22},isConnectDissalowed:!0,tooltipConnectDissalowed:s("PASSTHROUGH protocol configuration should be used with native client only.")}];return{DEFAULT_HOST:p,getProtocols:function(){return n.all(_.map(v,function(e){return l.configureVisibility(e,"visible")})).then(function(e){return _.filter(e,"visible")})},CREDENTIALS_TYPES:S,save:function(t,n){try{return((e,t)=>{var n=_.includes([S.USER_PASS.value,S.PASS_ONLY.value],t.credentialsType),o=_.includes([S.KEY_PAIR.value],t.credentialsType),n=(_.defaults(t,{password:n?_.get(t,"credentials.password"):void 0,privateKey:o?_.get(t,"credentials.privateKey"):void 0}),_.unset(t,"credentials"),_.unset(t,"attrs"),w(e,t));return r.put(n,t).then(a.getResData)})(t,n)}catch(e){return((e,t)=>(e=P(e),r.post(e,t).then(a.getResData)))(t,n)}},list:function(e){e=P(e);return r.get(e).then(a.getResData)},detail:function(e,t){e=w(e,t);return r.get(e).then(a.getResData)},remove:function(e,t){e=w(e,t);return r.delete(e)},getConnectionParams:function(e,t){return n.all({title:u.getString("Connected to: {{name}}",t),protocol:_.find(v,{value:t.protocol}),host:n.resolve(window.location.host),path:((n,o)=>c.current().then(function(e){var e={deviceId:a.getId(n),configurationId:o.id,token:i.encodeToken(e.userName,i.getPassword(),e.tenant)},e="service/remoteaccess/client/".concat(e.deviceId,"/configurations/").concat(e.configurationId,"?token=").concat(e.token),t=l.getCookieValue(b);return t&&(t=encodeURIComponent(t),e="".concat(e,"&").concat(b,"=").concat(t)),e}))(e,t),wsProtocol:m}).then(function(e){return _objectSpread(_objectSpread({},e),e.protocol.extraConnectionParams)})},isMicroServiceAvailable:function(t){return o.isAvailable({name:"cloud-remote-access",type:"MICROSERVICE"}).then(function(e){e=e?r.head(P(t),{silentError:!0}).then(_.constant(!0),_.constant(!1)):n.resolve(e);return e})},parseSshKeyFile:function(o){return n(function(t,e){var n=new FileReader;n.onload=function(e){e=e.target;return t(e.result)},n.onerror=function(){return e({feedback:{type:"error",summary:s("Could not read file.")}})},n.readAsText(o)})},generateKeys:function(e){return r.post(y,{hostname:e}).then(a.getResData)},exportSshKey:function(e){e=new Blob([e],{type:"text/plain"});window.saveAs(e,"key.pub")}};function P(e){e=[t,"devices",a.getId(e),"configurations"].join("/");return a.url(e)}function w(e,t){return[P(e),a.getId(t)].join("/")}}e.$inject=["$q","$http","$location","c8yBase","c8yAuth","c8yUser","c8yUiUtil","c8yApplication","gettext","gettextCatalog"],angular.module("c8y.remoteAccess").factory("c8yRemoteAccess",e)})();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(()=>{function n(n,o,t){var e=this,c=t("Local"),i=t("Connect"),t=t("Show connection");function s(n){n=r(n);return n&&!!n.isConnectDissalowed}function r(o){return _.find(e.protocols,function(n){return n.value===o.config.protocol})}_.assign(e,{$onInit:function(){o.getProtocols().then(function(n){e.protocols=n})},isLocal:function(){return n.isLocalEndpoint(e.endpoint)},labelLocal:c,labelConnect:i,labelShowConnection:t,connectBtnCls:function(){var n=(e.endpoint.connection||{}).status;return{btn:!0,"btn-block":!0,"btn-default":!n,"btn-danger":"ERROR"===n,"btn-warning":"CONNECTING"===n,"btn-success":"CONNECTED"===n}},connect:function(){var n=(e.endpoint.connection||{}).clientWindow;n?n.focus():e.onConnect({endpoint:e.endpoint})},edit:function(){e.onEdit({endpoint:e.endpoint})},remove:function(){e.onRemove({endpoint:e.endpoint})},isDisabled:s,getDisabledTooltip:function(n){var o=r(n);return s(n)?_.get(o,"tooltipConnectDissalowed"):""}})}n.$inject=["c8yRemoteAccessUI","c8yRemoteAccess","gettext"],angular.module("c8y.remoteAccess").component("c8yRemoteAccessEndpointCard",{bindings:{endpoint:"<",onConnect:"&",onEdit:"&",onRemove:"&"},templateUrl:":::PLUGIN_PATH:::/remoteAccessEndpointCard/remoteAccessEndpointCard.html",controller:n,controllerAs:"vm"})})();
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
<div class="c8y-list__item__block">
|
|
2
|
-
<div class="c8y-list__item__icon">
|
|
3
|
-
<i
|
|
4
|
-
c8y-icon="{{ vm.isLocal() ? 'laptop' : 'globe' }}"
|
|
5
|
-
ng-attr-data-label-local="{{ vm.isLocal() ? (vm.labelLocal | translate) : undefined }}"
|
|
6
|
-
></i>
|
|
7
|
-
</div>
|
|
8
|
-
<div class="c8y-list__item__body">
|
|
9
|
-
<div class="content-flex-60">
|
|
10
|
-
<div class="col-3">
|
|
11
|
-
<div class="text-truncate">
|
|
12
|
-
<span ng-bind="vm.endpoint.config.name" title="{{ vm.endpoint.config.name }}"></span>
|
|
13
|
-
</div>
|
|
14
|
-
</div>
|
|
15
|
-
<div class="col-4">
|
|
16
|
-
<div
|
|
17
|
-
class="text-truncate"
|
|
18
|
-
title="{{ vm.endpoint.config.hostname }} : {{ vm.endpoint.config.port }}"
|
|
19
|
-
>
|
|
20
|
-
<span ng-bind="vm.endpoint.config.hostname"></span>
|
|
21
|
-
:
|
|
22
|
-
<span ng-bind="vm.endpoint.config.port" class="text-muted"></span>
|
|
23
|
-
</div>
|
|
24
|
-
</div>
|
|
25
|
-
<div class="col-3">
|
|
26
|
-
<span
|
|
27
|
-
ng-bind="vm.endpoint.config.protocol"
|
|
28
|
-
title="{{ vm.endpoint.config.protocol }}"
|
|
29
|
-
></span>
|
|
30
|
-
</div>
|
|
31
|
-
<div class="col-2">
|
|
32
|
-
<button
|
|
33
|
-
class="btn btn-dot"
|
|
34
|
-
type="button"
|
|
35
|
-
aria-label="{{
|
|
36
|
-
(vm.getDisabledTooltip(vm.endpoint)
|
|
37
|
-
? vm.getDisabledTooltip(vm.endpoint)
|
|
38
|
-
: vm.endpoint.connection.status
|
|
39
|
-
? labelShowConnection
|
|
40
|
-
: labelConnect
|
|
41
|
-
) | translate
|
|
42
|
-
}}"
|
|
43
|
-
uib-tooltip="{{
|
|
44
|
-
(vm.getDisabledTooltip(vm.endpoint)
|
|
45
|
-
? vm.getDisabledTooltip(vm.endpoint)
|
|
46
|
-
: vm.endpoint.connection.status
|
|
47
|
-
? labelShowConnection
|
|
48
|
-
: labelConnect
|
|
49
|
-
) | translate
|
|
50
|
-
}}"
|
|
51
|
-
tooltip-popup-delay="500"
|
|
52
|
-
tooltip-append-to-body="true"
|
|
53
|
-
ng-click="vm.connect()"
|
|
54
|
-
ng-disabled="vm.isDisabled(vm.endpoint)"
|
|
55
|
-
>
|
|
56
|
-
<i ng-if="!vm.endpoint.connection.status" data-cy="remoteAccessEndpointCard--icon-disconnected" c8y-icon="disconnected"></i>
|
|
57
|
-
<i ng-if="vm.endpoint.connection.status" data-cy="remoteAccessEndpointCard--connection-status-eye" c8y-icon="eye"></i>
|
|
58
|
-
</button>
|
|
59
|
-
</div>
|
|
60
|
-
</div>
|
|
61
|
-
</div>
|
|
62
|
-
<div class="c8y-list__item__actions">
|
|
63
|
-
<div class="dropdown" uib-dropdown>
|
|
64
|
-
<button
|
|
65
|
-
class="dropdown-toggle c8y-dropdown"
|
|
66
|
-
type="button"
|
|
67
|
-
title="{{ 'Actions' | translate }}"
|
|
68
|
-
uib-dropdown-toggle
|
|
69
|
-
aria-haspopup="true"
|
|
70
|
-
>
|
|
71
|
-
<i c8y-icon="ellipsis-v"></i>
|
|
72
|
-
</button>
|
|
73
|
-
<ul class="dropdown-menu dropdown-menu-right" uib-dropdown-menu>
|
|
74
|
-
<li>
|
|
75
|
-
<button type="button" title="{{ 'Edit' | translate }}" data-cy="remoteAccessEndpointCard--edit-option" ng-click="vm.edit()">
|
|
76
|
-
<i c8y-icon="pencil"></i>
|
|
77
|
-
{{ 'Edit' | translate }}
|
|
78
|
-
</button>
|
|
79
|
-
</li>
|
|
80
|
-
<li>
|
|
81
|
-
<button type="button" title="{{ 'Remove' | translate }}" data-cy="remoteAccessEndpointCard--remove-option" ng-click="vm.remove()">
|
|
82
|
-
<i c8y-icon="minus-circle"></i>
|
|
83
|
-
{{ 'Remove' | translate }}
|
|
84
|
-
</button>
|
|
85
|
-
</li>
|
|
86
|
-
</ul>
|
|
87
|
-
</div>
|
|
88
|
-
</div>
|
|
89
|
-
</div>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(()=>{function e(n,i){var o,c,s,r,a,l,d=this;function p(){if(d.endpoint.config.credentialsType=d.selectedCredentialsType.value,e(!1),t(!1),f(!1),u(!1),d.selectedCredentialsType.value!==d.initialCredentialType)switch(d.endpoint.config.credentialsType){case"KEY_PAIR":_.set(d.endpoint,"config.privateKey",""),_.set(d.endpoint,"config.publicKey","");break;case"CERTIFICATE":_.set(d.endpoint,"config.privateKey",""),_.set(d.endpoint,"config.certificate","")}}function e(e){g("config.password",d.changingPassword=e,o)}function t(e){g("config.username",d.changingCredentials=e,c),g("config.password",e,o)}function f(e){g("config.privateKey",d.changingKeyPair=e,r),g("config.publicKey",e,s)}function u(e){g("config.privateKey",d.changingCertificate=e,r),g("config.certificate",e,l)}function g(e,t,n){t?_.set(d.endpoint,e,""):n&&!t&&_.set(d.endpoint,e,n)}_.assign(d,{$onInit:function(){n.getProtocols().then(function(e){d.protocols=e}).then(function(){var t=d.resolve.endpoint,e=d.resolve.rootDevice;o=_.get(t,"config.credentials.password"),c=_.get(t,"config.credentials.username"),s=_.get(t,"config.credentials.publicKey"),r=_.get(t,"config.credentials.privateKey"),a=_.get(t,"config.credentials.hostKey"),l=_.get(t,"config.credentials.certificate"),d.passwordAlreadyExists=!_.isEmpty(o),d.usernameAlreadyExists=!_.isEmpty(c),d.publicKeyAlreadyExists=!_.isEmpty(s),d.privateKeyAlreadyExists=!_.isEmpty(r),d.hostKeyAlreadyExists=!_.isEmpty(a),d.certificateAlreadyExists=!_.isEmpty(l),d.generating=!1,d.initialCredentialType=_.get(t,"config.credentials.type"),void 0===t?(d.selectedProtocol=_.find(d.protocols,function(e){return"VNC"===e.value}),d.selectedCredentialsType=d.selectedProtocol.supportedCredentialsTypes[0]):(d.selectedProtocol=_.find(d.protocols,function(e){return e.value===t.config.protocol}),d.selectedCredentialsType=t.config.credentials.type?_.find(d.credentialsTypes.values(),{value:t.config.credentials.type}):d.selectedProtocol.supportedCredentialsTypes[0]),d.endpoint=_.defaults(t,{device:e,config:{hostname:d.selectedProtocol.defaults.host,port:d.selectedProtocol.defaults.port,protocol:d.selectedProtocol.value,credentialsType:d.selectedCredentialsType.value}}),p(),e=d.resolve.rootDevice,i.getSuggestedIPAddresses(e).then(function(e){d.suggestedIPAddresses=e})})},save:function(){var e=d.endpoint,t=e.device,e=e.config;n.save(t,e).then(function(){return d.modalInstance.close(d.endpoint)})},cancel:function(){d.modalInstance.dismiss()},changePassword:function(){return e(!0)},cancelChangePassword:function(){return e(!1)},changeCredentials:function(){return t(!0)},cancelChangeCredentials:function(){return t(!1)},changeKeyPair:function(){return f(!0)},cancelChangeKeyPair:function(){return f(!1)},changeCertificate:function(){return u(!0)},cancelChangeCertificate:function(){return u(!1)},onProtocolChange:function(){d.selectedCredentialsType=d.selectedProtocol.supportedCredentialsTypes[0],_.assign(d.endpoint.config,{protocol:_.get(d,"selectedProtocol.value"),port:_.get(d,"selectedProtocol.defaults.port"),hostname:_.get(d,"selectedProtocol.defaults.host"),credentialsType:_.get(d,"selectedCredentialsType.value","NONE")})},onCredentialsTypeChange:p,credentialsTypes:n.CREDENTIALS_TYPES,credentialsAvailable:function(){return!!c&&!!o},keyPairAvailable:function(){return r&&s&&"KEY_PAIR"===d.initialCredentialType},certificateAvailable:function(){return l&&r&&"CERTIFICATE"===d.initialCredentialType},downloadPublicKey:function(){n.exportSshKey(_.get(d,"endpoint.config.publicKey"))},generateKeys:function(){var e=d.endpoint.config.hostname||d.selectedProtocol.defaults.host;d.generating=!0,n.generateKeys(e).then(function(e){var t=e.privateKey,e=e.publicKey;t&&e&&_.assign(d.endpoint.config,{privateKey:t,publicKey:e})}).finally(function(){d.generating=!1})},showIdentifiedType:function(e){d.identifiedType=e}})}e.$inject=["c8yRemoteAccess","c8yRemoteAccessUI"],angular.module("c8y.remoteAccess").component("c8yRemoteAccessEndpointModal",{bindings:{resolve:"<",modalInstance:"<"},templateUrl:":::PLUGIN_PATH:::/remoteAccessEndpointModal/remoteAccessEndpointModal.html",controller:e,controllerAs:"vm"})})();
|