Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pve-manager
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
pve-manager
Commits
634b38d0
Commit
634b38d0
authored
Oct 10, 2011
by
Dietmar Maurer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug #3: implement sendKeys
parent
003f70eb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
109 additions
and
0 deletions
+109
-0
SendKeyMenu.js
www/manager/qemu/SendKeyMenu.js
+109
-0
No files found.
www/manager/qemu/SendKeyMenu.js
0 → 100644
View file @
634b38d0
Ext
.
define
(
'
PVE.qemu.SendKeyMenu
'
,
{
extend
:
'
Ext.button.Button
'
,
alias
:
[
'
widget.pveQemuSendKeyMenu
'
],
initComponent
:
function
()
{
var
me
=
this
;
if
(
!
me
.
nodename
)
{
throw
"
no node name specified
"
;
}
if
(
!
me
.
vmid
)
{
throw
"
no VM ID specified
"
;
}
var
sendKey
=
function
(
key
)
{
PVE
.
Utils
.
API2Request
({
params
:
{
key
:
key
},
url
:
'
/nodes/
'
+
me
.
nodename
+
'
/qemu/
'
+
me
.
vmid
+
"
/sendkey
"
,
method
:
'
PUT
'
,
waitMsgTarget
:
me
,
failure
:
function
(
response
,
opts
)
{
Ext
.
Msg
.
alert
(
'
Error
'
,
response
.
htmlStatus
);
}
});
};
Ext
.
apply
(
me
,
{
text
:
'
SendKey
'
,
menu
:
new
Ext
.
menu
.
Menu
({
height
:
200
,
items
:
[
{
text
:
'
Ctrl-Alt-Delete
'
,
handler
:
function
()
{
sendKey
(
'
ctrl-alt-delete
'
);
}
},
{
text
:
'
Ctrl-Alt-Backspace
'
,
handler
:
function
()
{
sendKey
(
'
ctrl-alt-backspace
'
);
}
},
{
text
:
'
Ctrl-Alt-F1
'
,
handler
:
function
()
{
sendKey
(
'
ctrl-alt-f1
'
);
}
},
{
text
:
'
Ctrl-Alt-F2
'
,
handler
:
function
()
{
sendKey
(
'
ctrl-alt-f2
'
);
}
},
{
text
:
'
Ctrl-Alt-F3
'
,
handler
:
function
()
{
sendKey
(
'
ctrl-alt-f3
'
);
}
},
{
text
:
'
Ctrl-Alt-F4
'
,
handler
:
function
()
{
sendKey
(
'
ctrl-alt-f4
'
);
}
},
{
text
:
'
Ctrl-Alt-F5
'
,
handler
:
function
()
{
sendKey
(
'
ctrl-alt-f5
'
);
}
},
{
text
:
'
Ctrl-Alt-F6
'
,
handler
:
function
()
{
sendKey
(
'
ctrl-alt-f6
'
);
}
},
{
text
:
'
Ctrl-Alt-F7
'
,
handler
:
function
()
{
sendKey
(
'
ctrl-alt-f7
'
);
}
},
{
text
:
'
Ctrl-Alt-F8
'
,
handler
:
function
()
{
sendKey
(
'
ctrl-alt-f8
'
);
}
},
{
text
:
'
Ctrl-Alt-F9
'
,
handler
:
function
()
{
sendKey
(
'
ctrl-alt-f9
'
);
}
},
{
text
:
'
Ctrl-Alt-F10
'
,
handler
:
function
()
{
sendKey
(
'
ctrl-alt-f10
'
);
}
},
{
text
:
'
Ctrl-Alt-F11
'
,
handler
:
function
()
{
sendKey
(
'
ctrl-alt-f11
'
);
}
},
{
text
:
'
Ctrl-Alt-F12
'
,
handler
:
function
()
{
sendKey
(
'
ctrl-alt-f12
'
);
}
}
]
})
});
me
.
callParent
();
}
});
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment