Esempio n. 1
0
    def __init__(self, master):
        tk.Frame.__init__(self, master, background="lightblue")
        #self.master.geometry("650x200")

        tk.Label(self,
                 text="Node-Dashboard",
                 bg="lightblue",
                 height=1,
                 width=20).grid(row=0, column=0, padx='0', pady='0')
        tk.Button(self,
                  text="Return to start page",
                  bg="lightblue",
                  height=1,
                  width=20,
                  command=lambda: master.switch_frame(StartPage)).grid(
                      row=3, column=2, padx='0', pady='0')

        label1 = tk.Label(self,
                          text=" Hornet Dashboard ",
                          bg="lightblue",
                          height=1,
                          width=20).grid(row=2, column=0, padx='0', pady='0')
        button1 = tk.Button(self,
                            text="Open",
                            bg="lightblue",
                            height=1,
                            width=20,
                            command=hornet_dashboard).grid(row=2,
                                                           column=1,
                                                           padx='0',
                                                           pady='0')


#####################################End of Window frames############################################
Esempio n. 2
0
    def __init__(self,
                 parent,
                 data=None,
                 lines=None,
                 ubis=None,
                 image=None,
                 pars=None,
                 spline=None):
        """
        Data would be your observed g-vectors. Lines will
        be a computed lattice
        """
        Tk.Toplevel.__init__(self, parent)
        self.parent = parent
        if data != None:
            xyz = data.copy()
        else:
            xyz = numpy.array([0, 0, 0])
        self.ps = Tk.StringVar()
        self.ps.set('1.')
        self.pointsize = 1.
        self.npeaks = xyz.shape[0]

        self.o = myOpengl(self, width=400, height=400, double=1)
        self.o.redraw = self.redraw
        self.o.autospin_allowed = 1
        self.o.fovy = 5
        self.o.near = 1e6
        self.o.far = 1e-6
        import math
        self.o.distance = 3.
        #numpy.maximum.reduce(numpy.ravel(xyz))*4 / \
        #            math.tan(self.o.fovy*math.pi/180)
        print(type(xyz), xyz.dtype.char, xyz.shape)
        self.xyz = xyz
        f = Tk.Frame(self)
        Tk.Button(f, text="Help", command=self.o.help).pack(side=Tk.LEFT)
        Tk.Button(f, text="Reset", command=self.o.reset).pack(side=Tk.LEFT)
        Tk.Button(f, text="Pointsize", command=self.setps).pack(side=Tk.LEFT)
        Tk.Entry(f, textvariable=self.ps).pack(side=Tk.LEFT)
        Tk.Button(f, text="Quit", command=self.goaway).pack(side=Tk.RIGHT)
        self.dataoff = 0
        self.o.pack(side='top', expand=1, fill='both')
        f.pack(side=Tk.BOTTOM, expand=Tk.NO, fill=Tk.X)
        Tk.Label(self, text="Red=[1,0,0] Green=[0,1,0] Blue=[0,0,1]").pack(
            side=Tk.BOTTOM, expand=Tk.NO, fill=Tk.X)
        self.ubis = ubis
        self.color = numpy.ones((xyz.shape[0], 3), numpy.float)
        print(self.color.shape)
        self.tex = False
        if ubis is not None:
            self.ubis = self.readubis(ubis)
            self.scorecolor(0)
        if pars is not None:
            self.tex = True
            self.readspline(spline)
            self.readprms(pars)
            self.readimage(image)
        self.changedata(xyz)
Esempio n. 3
0
    def __init__(self, master):
        tk.Frame.__init__(self, master, background="lightblue")
        #self.master.geometry("650x200")

        tk.Label(self, text="Informations", bg="lightblue", height=1,
                 width=20).grid(row=0, column=0, padx='0', pady='0')
        tk.Button(self,
                  text="Return to start page",
                  bg="lightblue",
                  height=1,
                  width=20,
                  command=lambda: master.switch_frame(StartPage)).grid(
                      row=3, column=2, padx='0', pady='0')

        label1 = tk.Label(self,
                          text=" About Raspihive ",
                          bg="lightblue",
                          height=1,
                          width=20).grid(row=2, column=0, padx='0', pady='0')
        button1 = tk.Button(self,
                            text="About",
                            bg="lightblue",
                            height=1,
                            width=20,
                            command=about).grid(row=2,
                                                column=1,
                                                padx='0',
                                                pady='0')

        label2 = tk.Label(self,
                          text="Bug Report",
                          bg="lightblue",
                          height=1,
                          width=20).grid(row=3, column=0, padx='0', pady='0')
        button2 = tk.Button(self,
                            text="Report",
                            bg="lightblue",
                            height=1,
                            width=20,
                            command=report).grid(row=3,
                                                 column=1,
                                                 padx='0',
                                                 pady='0')

        label3 = tk.Label(self,
                          text="Preparations",
                          bg="lightblue",
                          height=1,
                          width=20).grid(row=4, column=0, padx='0', pady='0')
        button3 = tk.Button(self,
                            text="Ports and FW settings",
                            bg="lightblue",
                            height=1,
                            width=20,
                            command=infopreparations).grid(row=4,
                                                           column=1,
                                                           padx='0',
                                                           pady='0')
Esempio n. 4
0
    def __init__(self, master):

        self.master = master
        self.frame = Tk.Frame(self.master)
        self.quitButton = Tk.Button(self.frame, text='Quit', width=25,
                                    command=self.close_windows)
        self.quitButton.pack()
        self.frame.pack()
Esempio n. 5
0
    def __init__(self, master):
        tk.Frame.__init__(self, master, background="lightblue")
        #self.master.geometry("650x200")

        tk.Label(self, text="Useful tools", bg="lightblue", height=1,
                 width=20).grid(row=0, column=0, padx='0', pady='0')
        tk.Button(self,
                  text="Return to start page",
                  bg="lightblue",
                  height=1,
                  width=20,
                  command=lambda: master.switch_frame(StartPage)).grid(
                      row=3, column=2, padx='0', pady='0')

        label1 = tk.Label(self,
                          text=" Ping test ",
                          bg="lightblue",
                          height=1,
                          width=20).grid(row=2, column=0, padx='0', pady='0')
        button1 = tk.Button(self,
                            text="Ping",
                            bg="lightblue",
                            height=1,
                            width=20,
                            command=Ping_function).grid(row=2,
                                                        column=1,
                                                        padx='0',
                                                        pady='0')

        label2 = tk.Label(self,
                          text=" Mount Hornet DB to SSD",
                          bg="lightblue",
                          height=1,
                          width=20).grid(row=3, column=0, padx='0', pady='0')
        button2 = tk.Button(self,
                            text="mount",
                            bg="lightblue",
                            height=1,
                            width=20,
                            command=mounthornetDBtoextDrive).grid(row=3,
                                                                  column=1,
                                                                  padx='0',
                                                                  pady='0')
Esempio n. 6
0
    python = sys.executable
    os.execl(python, python, *sys.argv)


def cambio(valoraciones2, z, valoraciones3):
    auxiliar = []
    if (z < 3):
        auxiliar = valoraciones2[0][z].replace("'", ".")
        valoraciones3.append(auxiliar)
        z = z + 1
        cambio(valoraciones2, z, valoraciones3)


######################################## BOTONES ##########################################

raiz.Button = ttk.Button(raiz, command=aceptar, text="Aceptar")
raiz.Button.place(x=295, y=25)

raiz.Button2 = ttk.Button(raiz, command=aceptar2, text="Aceptar")
raiz.Button2.place(x=295, y=65)

raiz.Button3 = ttk.Button(raiz, command=aceptar3, text="Aceptar")
raiz.Button3.place(x=295, y=105)

raiz.Button4 = ttk.Button(raiz, command=aceptar4, text="Aceptar")
raiz.Button4.place(x=295, y=145)

raiz.Button5 = ttk.Button(raiz, command=aceptar5, text="Aceptar")
raiz.Button5.place(x=295, y=185)

raiz.Button7 = ttk.Button(raiz, command=buscar, text="BUSCAR")
Esempio n. 7
0
    def __init__(self, master):
        tk.Frame.__init__(self, master, background="lightblue")
        #self.master.geometry("650x200")

        tk.Label(self, text="Update menu", bg="lightblue", height=1,
                 width=20).grid(row=0, column=0, padx='0', pady='0')
        tk.Button(self,
                  text="Return to start page",
                  bg="lightblue",
                  height=1,
                  width=20,
                  command=lambda: master.switch_frame(StartPage)).grid(
                      row=3, column=2, padx='0', pady='0')
        """
        tk.Label(self, text="Update OS").grid(row=1, column=0, padx='0', pady='0')
        tk.Button(self, text="update", command=lambda: master.switch_frame(StartPage)).grid(row=1, column=1, padx='0', pady='0')
        """
        label1 = tk.Label(self,
                          text="Update OS",
                          bg="lightblue",
                          height=1,
                          width=20).grid(row=2, column=0, padx='0', pady='0')
        button1 = tk.Button(self,
                            text="OS-update",
                            bg="lightblue",
                            height=1,
                            width=20,
                            command=update_os_function).grid(row=2,
                                                             column=1,
                                                             padx='0',
                                                             pady='0')

        label2 = tk.Label(self,
                          text="Update packages",
                          bg="lightblue",
                          height=1,
                          width=20).grid(row=3, column=0, padx='0', pady='0')
        button2 = tk.Button(self,
                            text="P-update",
                            bg="lightblue",
                            height=1,
                            width=20,
                            command=update_packages_function).grid(row=3,
                                                                   column=1,
                                                                   padx='0',
                                                                   pady='0')

        label3 = tk.Label(self,
                          text="Update Hornet Node",
                          bg="lightblue",
                          height=1,
                          width=20).grid(row=4, column=0, padx='0', pady='0')
        button3 = tk.Button(self,
                            text="H-update",
                            bg="lightblue",
                            height=1,
                            width=20,
                            command=update_hornet_node).grid(row=4,
                                                             column=1,
                                                             padx='0',
                                                             pady='0')

        label4 = tk.Label(self,
                          text="Update Raspihive",
                          bg="lightblue",
                          height=1,
                          width=20).grid(row=5, column=0, padx='0', pady='0')
        button4 = tk.Button(self,
                            text="R-update",
                            bg="lightblue",
                            height=1,
                            width=20,
                            command=update_raspihive).grid(row=5,
                                                           column=1,
                                                           padx='0',
                                                           pady='0')
Esempio n. 8
0
            def __init__(self, master):
                tk.Frame.__init__(self, master, background="lightblue")
                #self.master.geometry("650x200")

                tk.Label(self,
                         text="This is page five",
                         bg="lightblue",
                         height=1,
                         width=20).grid(row=0, column=0, padx='0', pady='0')
                tk.Button(self,
                          text="Return to start page",
                          bg="lightblue",
                          height=1,
                          width=20,
                          command=lambda: master.switch_frame(StartPage)).grid(
                              row=3, column=2, padx='0', pady='0')

                label1 = tk.Label(self,
                                  text=" Start hornet node ",
                                  bg="lightblue",
                                  height=1,
                                  width=20).grid(row=2,
                                                 column=0,
                                                 padx='0',
                                                 pady='0')
                button1 = tk.Button(self,
                                    text="Start hornet node",
                                    bg="lightblue",
                                    height=1,
                                    width=20,
                                    command=start_h_function).grid(row=2,
                                                                   column=1,
                                                                   padx='0',
                                                                   pady='0')

                label2 = tk.Label(self,
                                  text=" Stop hornet node ",
                                  bg="lightblue",
                                  height=1,
                                  width=20).grid(row=3,
                                                 column=0,
                                                 padx='0',
                                                 pady='0')
                button2 = tk.Button(self,
                                    text="Stop hornet node",
                                    bg="lightblue",
                                    height=1,
                                    width=20,
                                    command=stop_h_function).grid(row=3,
                                                                  column=1,
                                                                  padx='0',
                                                                  pady='0')

                label3 = tk.Label(self,
                                  text=" Restart hornet node ",
                                  bg="lightblue",
                                  height=1,
                                  width=20).grid(row=4,
                                                 column=0,
                                                 padx='0',
                                                 pady='0')
                button3 = tk.Button(self,
                                    text="Restart hornet node",
                                    bg="lightblue",
                                    height=1,
                                    width=20,
                                    command=restart_h_function).grid(row=4,
                                                                     column=1,
                                                                     padx='0',
                                                                     pady='0')

                label4 = tk.Label(self,
                                  text=" Check hornet status ",
                                  bg="lightblue",
                                  height=1,
                                  width=20).grid(row=5,
                                                 column=0,
                                                 padx='0',
                                                 pady='0')
                button4 = tk.Button(self,
                                    text="Check hornet status",
                                    bg="lightblue",
                                    height=1,
                                    width=20,
                                    command=status_h_function).grid(row=5,
                                                                    column=1,
                                                                    padx='0',
                                                                    pady='0')

                label5 = tk.Label(self,
                                  text=" Watch the logs ",
                                  bg="lightblue",
                                  height=1,
                                  width=20).grid(row=6,
                                                 column=0,
                                                 padx='0',
                                                 pady='0')
                button5 = tk.Button(self,
                                    text="Watch the logs",
                                    bg="lightblue",
                                    height=1,
                                    width=20,
                                    command=logs_h_function).grid(row=6,
                                                                  column=1,
                                                                  padx='0',
                                                                  pady='0')

                label6 = tk.Label(self,
                                  text=" Remove the mainnetdb ",
                                  bg="lightblue",
                                  height=1,
                                  width=20).grid(row=7,
                                                 column=0,
                                                 padx='0',
                                                 pady='0')
                button6 = tk.Button(self,
                                    text="Remove the mainnnetdb",
                                    bg="lightblue",
                                    height=1,
                                    width=20,
                                    command=mainnetdb_h_function).grid(
                                        row=7, column=1, padx='0', pady='0')
Esempio n. 9
0
    def __init__(self, master):
        tk.Frame.__init__(self, master, background="lightyellow")
        #self.master.geometry("600x200")

        tk.Label(self, text="Main Page", bg="lightyellow", height=1,
                 width=20).grid(row=0, column=0, padx='0', pady='0')
        # For page one
        tk.Button(self,
                  text="Update menu",
                  bg="lightyellow",
                  height=1,
                  width=20,
                  command=lambda: master.switch_frame(PageOne)).grid(row=1,
                                                                     column=0,
                                                                     padx='10',
                                                                     pady='0')
        # For page two
        tk.Button(self,
                  text="Install menu",
                  bg="lightyellow",
                  height=1,
                  width=20,
                  command=lambda: master.switch_frame(PageTwo)).grid(row=1,
                                                                     column=1,
                                                                     padx='10',
                                                                     pady='0')
        # For page three
        tk.Button(self,
                  text="Tools",
                  bg="lightyellow",
                  height=1,
                  width=20,
                  command=lambda: master.switch_frame(PageThree)).grid(
                      row=3, column=0, padx='10', pady='0')
        # For page four
        tk.Button(self,
                  text="Help",
                  bg="lightyellow",
                  height=1,
                  width=20,
                  command=lambda: master.switch_frame(PageFour)).grid(
                      row=3, column=1, padx='10', pady='0')
        # For page five
        tk.Button(self,
                  text="Node control",
                  bg="lightyellow",
                  height=1,
                  width=20,
                  command=lambda: master.switch_frame(PageFive)).grid(
                      row=2, column=0, padx='10', pady='0')

        # For page Dashboard Access
        tk.Button(self,
                  text="Dashboard Access",
                  bg="lightyellow",
                  height=1,
                  width=20,
                  command=lambda: master.switch_frame(PageSix)).grid(row=2,
                                                                     column=1,
                                                                     padx='10',
                                                                     pady='0')
Esempio n. 10
0
    def __init__(self, master):
        tk.Frame.__init__(self, master, background="lightblue")
        #self.master.geometry("650x200")

        tk.Label(self, text="Install menu", bg="lightblue", height=1,
                 width=20).grid(row=0, column=0, padx='0', pady='0')
        tk.Button(self,
                  text="Return to start page",
                  bg="lightblue",
                  height=1,
                  width=20,
                  command=lambda: master.switch_frame(StartPage)).grid(
                      row=3, column=2, padx='0', pady='0')

        label1 = tk.Label(self,
                          text="Install Hornet-Node",
                          bg="lightblue",
                          height=1,
                          width=20).grid(row=2, column=0, padx='0', pady='0')
        button1 = tk.Button(self,
                            text="Install Hornet",
                            bg="lightblue",
                            height=1,
                            width=20,
                            command=Hornet_install_function).grid(row=2,
                                                                  column=1,
                                                                  padx='0',
                                                                  pady='0')

        label1u = tk.Label(self,
                           text="Uninstall Hornet-Node",
                           bg="lightblue",
                           height=1,
                           width=20).grid(row=2, column=2, padx='0', pady='0')
        button1u = tk.Button(self,
                             text="Uninstall Hornet",
                             bg="lightblue",
                             height=1,
                             width=20,
                             command=Hornet_uninstall_function).grid(row=2,
                                                                     column=2,
                                                                     padx='0',
                                                                     pady='0')

        label2 = tk.Label(self,
                          text="Install Bee-Node",
                          bg="lightblue",
                          height=1,
                          width=20).grid(row=3, column=0, padx='0', pady='0')
        button2 = tk.Button(self,
                            text="Install Bee",
                            bg="lightblue",
                            height=1,
                            width=20,
                            command=Bee_install_function).grid(row=3,
                                                               column=1,
                                                               padx='0',
                                                               pady='0')

        label3 = tk.Label(self,
                          text="Install rev. proxy + ssl",
                          bg="lightblue",
                          height=1,
                          width=20).grid(row=4, column=0, padx='0', pady='0')
        button3 = tk.Button(self,
                            text="install RP + SSL",
                            bg="lightblue",
                            height=1,
                            width=20,
                            command=SSL_reverse_proxy_install_function).grid(
                                row=4, column=1, padx='0', pady='0')