Esempio n. 1
0
 def test_server_connections(self):
     for name, url in servers_to_check.items():
         threading.Thread(target=self.check_ssh,
                          kwargs={
                              'name': name,
                              'url': url
                          }).start()
Esempio n. 2
0
    def __init__(self):
        self.root = Tk()

        self.root.title("Server Status")
        self.root.protocol("WM_DELETE_WINDOW", self.on_delete)

        Label(self.root, text="Servers", bg="black", fg="white").pack()
        for name, url in servers_to_check.items():
            self.ssh_labels[name] = Label(self.root, text=name)
            self.ssh_labels[name].bind(
                "<Button-1>", lambda e, name=name, url=url: self.open_server_detail_window(name, url)  # Mouse click
            )
            self.ssh_labels[name].pack(anchor=W)

        check_all_button = Button(self.root, text="Check All", command=self.test_server_connections)
        check_all_button.pack()
Esempio n. 3
0
    def __init__(self):
        self.root = Tk()

        self.root.title('Server Status')
        self.root.protocol("WM_DELETE_WINDOW", self.on_delete)

        Label(self.root, text='Servers', bg='black', fg='white').pack()
        for name, url in servers_to_check.items():
            self.ssh_labels[name] = Label(self.root, text=name)
            self.ssh_labels[name].bind(
                "<Button-1>",  # Mouse click
                lambda e, name=name, url=url: self.open_server_detail_window(
                    name, url))
            self.ssh_labels[name].pack(anchor=W)

        check_all_button = Button(self.root,
                                  text='Check All',
                                  command=self.test_server_connections)
        check_all_button.pack()
Esempio n. 4
0
 def test_server_connections(self):
     for name, url in servers_to_check.items():
         threading.Thread(target=self.check_ssh, kwargs={"name": name, "url": url}).start()