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

88 lines
7.4 KiB
Plaintext
Raw Normal View History

2025-08-31 11:00:32 +08:00
U
2025-08-31 11:02:17 +08:00
ݺ<>h!)<00>@s<>ddlmZmZmZmZmZmZmZmZm Z m
2025-08-31 11:00:32 +08:00
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 
2025-08-31 11:02:17 +08:00
 r3cs\eZdZ<02>fdd<02>Zdd<04>Zdd<06>Zdd<08>Zd d
2025-08-31 11:00:32 +08:00
<EFBFBD>Zd d <0C>Zd d<0E>Z dd<10>Z
2025-08-31 11:02:17 +08:00
dd<12>Z <0B>Z S)<13>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
2025-08-31 11:00:32 +08:00


2025-08-31 11:02:17 +08:00
zRemoteCommandsTab.__init__c
Cs<>t<00>}td<01>}t<00>}t<02>}td<02>|_|jj<05>|j<07>|<04>|j<04>|<04> <09>|<03>
|<04>t<02>}t <0B>}t <0C>|_ |<06>d|j <0A>t <0C>|_|j<0F>d<04>|<06>d|j<0F>|<05>
|<06>t<00>}td<06>|_|jj<05>|j<12>|<07>|j<11>|<07> <09>|<05>
|<07>|<03>
|<05>|<02>|<03>|<01>|<02>td<07>}t<00>} t<14>|_|j<15>d<04>| <09>|j<15>|<08>| <09>|<01>|<08>td<08>|_|j<17>tj<1A>|<01>|j<17>|<01> <09>|<00>|<01>t<1B>d <09>dS)
Nu Git操作<E6938D> 安装Gitu
仓库URL:Tu 远程目录:u 克隆项目u 命令输出u就绪u&远程命令标签页UI初始化完成)rrrrZinstall_git_button<6F>clickedr<00> install_gitr<00>
addStretch<EFBFBD> addLayoutr r<00>repo_url_input<75>addRow<6F>remote_dir_display<61> setReadOnlyZ clone_button<6F>clone_repositoryr"r <00> output_textr<00> status_label<65> setAlignmentr<00> AlignCenterrr=)
r#<00> main_layoutZ git_groupZ
git_layoutZinstall_git_layoutZ clone_layoutZ left_layoutZ right_layoutZ output_groupZ output_layoutr)r)r*rWysN
2025-08-31 11:00:32 +08:00
 
2025-08-31 11:02:17 +08:00
 

 

2025-08-31 11:00:32 +08:00


  


 
2025-08-31 11:02:17 +08:00
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=r5rc<00>setText<78> setStyleSheet)r#r5r)r)r*<00>set_ssh_client<6E>s
  z RemoteCommandsTab.set_ssh_clientcCs2t<00>d|<01>d|<02><00><04>|j<02>|<01>|j<04>|<02>dS)Nu设置服务器配置: git_url=z , remote_dir=)rr=r]rir_)r#<00>git_url<72>
remote_dirr)r)r*<00>set_server_config<69>s z#RemoteCommandsTab.set_server_configcCs<>t<00>d<01>|js"t<03>|dd<03>dS|j<05><06>|j<07>d<04>t |jd<05>|_
2025-08-31 11:00:32 +08:00
|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
2025-08-31 11:02:17 +08:00
<00>warningrb<00>clearrcrir3rVr@r<00> append_outputrH<00>on_command_finishedrC<00>request_password<72>startr-r)r)r*rZ<00>s
2025-08-31 11:00:32 +08:00

 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已取消输入密码
2025-08-31 11:02:17 +08:00
r<F) rr=r<00>execr <00>Acceptedr.rVr9rb<00>appendr8)r#Zdialogr7r)r)r*ru<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><06><00><07>}|j <09>
<EFBFBD>|j <0B> d<05>|r<>d|<02>d|<02>d|<01><00>}n
d |<01><00>}t |j|<03>|_|jj<0F>|j<11>|jj<12>|j<13>|j<0E><14>dS)
Nu 克隆仓库rorpu请输入仓库URLu正在克隆仓库...z mkdir -p z && cd z && git clone z
git clone )rr=r5r
rqr]r,<00>stripr_rbrrrcrir3rVr@rrsrHrtrv)r#Zrepo_urlrmZ clone_commandr)r)r*ra<00>s$

 
z"RemoteCommandsTab.clone_repositorycCs|j<00>|<01>dSr+)rbry)r#r,r)r)r*rsszRemoteCommandsTab.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)Nrgu成功rhu错误)rcrirjr
<00> informationrq)r#<00>success<73>messager)r)r*rt s    z%RemoteCommandsTab.on_command_finished) r/r0r1rrWrkrnrZrurarsrtr2r)r)r'r*rUps A rUN)<16>PySide6.QtWidgetsrrrrrrrr r
2025-08-31 11:00:32 +08:00
r r r <00>PySide6.QtCorerrr<00>logururrr3rUr)r)r)r*<00><module>s
8 M