Files
django.remote/__pycache__/remote_commands_tab.cpython-38.pyc

77 lines
6.8 KiB
Plaintext
Raw Normal View History

2025-08-31 11:00:32 +08:00
U
*<2A><>h<EFBFBD>$<00>@s<>ddlmZmZmZmZmZmZmZmZm Z m
Z
m Z m Z ddl mZmZmZddlmZGdd<05>de <0B>ZGdd<07>de<0F>ZGdd <09>d e<01>Zd
S) <0B>) <0C>QWidget<65> QVBoxLayout<75> QHBoxLayout<75>QLabel<65> QLineEdit<69> QPushButton<6F> QGroupBox<6F> QTextEdit<69> QMessageBox<6F> QFormLayout<75>QDialog<6F>QDialogButtonBox)<03>Qt<51>QThread<61>Signal)<01>loggercs&eZdZd<06>fdd<03> Zdd<05>Z<04>ZS)<07>PasswordDialogNcs<>t<00><00>|<01>|<00>d<01>|<00>d<02>t<04>}td<03>}|<02>|<03>t<07>|_|j<08> tj
<EFBFBD>|<02>|j<08>t t j t j B<00>}|j<0E>|j<10>|j<11>|j<12>|<02>|<04>|<00>|<02>dS)Nu 输入密码i,u请输入sudo密码:)<14>super<65>__init__<5F>setWindowTitle<6C>setMinimumWidthrr<00> addWidgetr<00>password_input<75> setEchoMode<64>Passwordr <00>Ok<4F>Cancel<65>accepted<65>connect<63>accept<70>rejected<65>reject<63> setLayout)<05>self<6C>parent<6E>layout<75>labelZ
button_box<EFBFBD><01> __class__<5F><00>Sc:\Users\xiaji\Documents\个人文件夹\夏骥\桌面部署\remote_commands_tab.pyrs 


 
zPasswordDialog.__init__cCs
|j<00><01>S<00>N)r<00>text<78>r#r)r)r*<00> get_password szPasswordDialog.get_password)N)<06>__name__<5F>
__module__<EFBFBD> __qualname__rr.<00> __classcell__r)r)r'r*rsrcsDeZdZee<04>Zeee<04>Ze<03>Z<08>fdd<02>Z dd<04>Z
dd<06>Z <0B>Z S)<07>RemoteCommandThreadcs&t<00><00><01>||_||_d|_d|_dS<00>NF)rr<00>
ssh_client<EFBFBD>command<6E>password<72>waiting_for_password)r#r5r6r'r)r*r(s

zRemoteCommandThread.__init__cCs||_d|_dSr4)r7r8)r#r7r)r)r*<00> set_password/sz RemoteCommandThread.set_passwordc
Cs<><00>z<>t<00>d|j<02><00><02>d|jkr<>|j<02>dd<03>}|j<04>|<01>\}}}d}|D],}|j<06>|<06>d|<06><08>ksld|krHd}qvqH|r<>d|_ |j
<EFBFBD><07>|j r<>|<00> d<08>q<>|j r<>|<02> |j d <00>|<02><0E>n|j<04>|j<02>\}}}d
}|D]}||7}|j<06>|<06>q<>d
}|D]2}||7}d|<06><08>kr<>d|kr<>|j<06>d |<06><00><02>q<>|j<0F><10>} | d k<02>rdt<00>d |j<02><00><02>|j<11>dd<0E>n$t<00>d| <09><00><02>|j<11>dd| <09><00><02>Wnftk
<EFBFBD>r<>}
zFt<00>dt|
<EFBFBD><01><00><02>|j<06>d t|
<EFBFBD><01><00><02>|j<11>ddt|
<EFBFBD><01><00><02>W5d}
~
XYnXdS)Nu执行远程命令: Zsudozsudo -SFz password foru密码T<E7A081>d<00>
<EFBFBD>u错误: ru命令执行成功: u命令执行成功u#命令执行失败,退出状态: u执行命令时发生错误: )r<00>infor6<00>replacer5<00> exec_command<6E> output_signal<61>emit<69>lowerr8<00>password_request_signalZmsleepr7<00>write<74>flush<73>channel<65>recv_exit_status<75>finished_signal<61>error<6F> Exception<6F>str) r#Zcommand_with_sudo<64>stdin<69>stdout<75>stderrZpassword_prompt<70>line<6E>outputrI<00> exit_status<75>er)r)r*<00>run3sN
 
 


zRemoteCommandThread.run) r/r0r1rrKr@<00>boolrHrCrr9rSr2r)r)r'r*r3#s 
 r3csTeZdZ<02>fdd<02>Zdd<04>Zdd<06>Zdd<08>Zd d
<EFBFBD>Zd d <0C>Zd d<0E>Z dd<10>Z
<EFBFBD>Z S)<11>RemoteCommandsTabcs,t<00><00><01>t<02>d<01>d|_d|_|<00><06>dS)Nu初始化远程命令标签页)rrrr=r5<00>command_thread<61>init_uir-r'r)r*rqs


zRemoteCommandsTab.__init__cCs8t<00>}td<01>}t<00>}t<02>}td<02>|_|jj<05>|j<07>|<04>|j<04>|<04> <09>|<03>
|<04>t <0B>}t <0C>|_ |<05>d|j <0A>td<04>|_|jj<05>|j<10>|<05>|j<0F>|<03>
|<05>|<02>|<03>|<01>|<02>td<05>}t<00>}t<12>|_|j<13>d<06>|<07>|j<13>|<06>|<07>|<01>|<06>td<07>|_|j<16>tj<19>|<01>|j<16>|<01> <09>|<00>|<01>t<1A>d<08>dS) Nu Git操作<E6938D> 安装Gitu
仓库URL:u 克隆项目u 命令输出Tu就绪u&远程命令标签页UI初始化完成)rrrrZinstall_git_button<6F>clickedr<00> install_gitr<00>
addStretch<EFBFBD> addLayoutr r<00>repo_url_input<75>addRowZ clone_button<6F>clone_repositoryr"r <00> output_text<78> setReadOnlyr<00> status_label<65> setAlignmentr<00> AlignCenterrr=)r#<00> main_layoutZ git_groupZ
git_layoutZinstall_git_layoutZ clone_layoutZ output_groupZ output_layoutr)r)r*rWys>
 

 


  


 
zRemoteCommandsTab.init_uicCsLt<00>d<01>||_|jr0|j<03>d<02>|j<03>d<03>n|j<03>d<04>|j<03>d<05>dS)Nu设置SSH客户端u已连接到服务器<E58AA1> color: green;u未连接到服务器<E58AA1> color: red;)rr=r5rb<00>setText<78> setStyleSheet)r#r5r)r)r*<00>set_ssh_client<6E>s
  z RemoteCommandsTab.set_ssh_clientcCs<>t<00>d<01>|js"t<03>|dd<03>dS|j<05><06>|j<07>d<04>t |jd<05>|_
|j
j <0B> |j <0A>|j
j<0E> |j<0F>|j
j<10> |j<11>|j
<EFBFBD><12>dS)NrX<00>警告<E8ADA6>请先连接到服务器u正在安装Git...z*sudo apt update && sudo apt install -y git)rr=r5r
<00>warningr`<00>clearrbrhr3rVr@r<00> append_outputrH<00>on_command_finishedrC<00>request_password<72>startr-r)r)r*rZ<00>s

 zRemoteCommandsTab.install_gitcCsjt<00>d<01>t|<00>}|<01><03>tjkrF|<01><06>}|rf|j<07>|<02>|j <09>
d<02>n |j <09>
d<03>|j<07>d<04>d|j_ dS)Nu请求输入sudo密码u密码已发送
u已取消输入密码
r<F) rr=r<00>execr <00>Acceptedr.rVr9r`<00>appendr8)r#Zdialogr7r)r)r*rq<00>s
   z"RemoteCommandsTab.request_passwordcCs<>t<00>d<01>|js"t<03>|dd<03>dS|j<05><06><00><07>}|sFt<03>|dd<04>dS|j<08> <09>|j
<EFBFBD> d<05>t |jd|<01><00><02>|_ |j j<0E>|j<10>|j j<11>|j<12>|j <0A><13>dS)Nu 克隆仓库rkrlu请输入仓库URLu正在克隆仓库...z
git clone )rr=r5r
rmr]r,<00>stripr`rnrbrhr3rVr@rrorHrprr)r#Zrepo_urlr)r)r*r_<00>s

 z"RemoteCommandsTab.clone_repositorycCs|j<00>|<01>dSr+)r`ru)r#r,r)r)r*ro<00>szRemoteCommandsTab.append_outputcCsV|r,|j<00>|<02>|j<00>d<01>t<03>|d|<02>n&|j<00>|<02>|j<00>d<03>t<03>|d|<02>dS)Nrfu成功rgu错误)rbrhrir
<00> informationrm)r#<00>success<73>messager)r)r*rp<00>s    z%RemoteCommandsTab.on_command_finished) r/r0r1rrWrjrZrqr_rorpr2r)r)r'r*rUps 3 rUN)<16>PySide6.QtWidgetsrrrrrrrr r
r r r <00>PySide6.QtCorerrr<00>logururrr3rUr)r)r)r*<00><module>s
8 M