diff --git a/INSTALL b/INSTALL index f272ec8..b2eff33 100644 --- a/INSTALL +++ b/INSTALL @@ -31,8 +31,8 @@ the privileges for accessing and modifying it. Create database-user for application with minimum necessary rights. - CREATE USER 'yms'@'localhost' IDENTIFIED BY '********'; - GRANT SELECT, INSERT, UPDATE, DELETE ON yms.* TO 'yms'@'localhost'; + CREATE USER 'ymsgui'@'localhost' IDENTIFIED BY '********'; + GRANT SELECT, INSERT, UPDATE, DELETE ON yms.* TO 'ymsgui'@'localhost'; 3. Run database import diff --git a/yms/ui/main.ui b/yms/ui/main.ui index 56b4ac0..35909da 100644 --- a/yms/ui/main.ui +++ b/yms/ui/main.ui @@ -214,7 +214,8 @@ True False - label + Equipment +Here be dragons 1 @@ -252,6 +253,126 @@ False + + + True + False + vertical + + + + + + + + + + + + 3 + + + + + True + False + Provisions + + + 3 + False + + + + + True + False + vertical + + + + + + + + + + + + 4 + + + + + True + False + Maintenance + + + 4 + False + + + + + True + False + vertical + + + + + + + + + + + + 5 + + + + + True + False + Projects + + + 5 + False + + + + + True + False + vertical + + + + + + + + + + + + 6 + + + + + True + False + Documents + + + 6 + False + + diff --git a/ymsgui.py b/ymsgui.py index aa63cba..2f66300 100755 --- a/ymsgui.py +++ b/ymsgui.py @@ -6,9 +6,12 @@ Configuration file located at ~/.config/ymsgui.conf: [DB] host = localhost db = yms - user = yms + user = ymsgui pass = topsecret + [Documents] + basepath = /var/local/yms + """ import os @@ -58,6 +61,12 @@ class Frontend(): else: self.vname = "Ghost(0)" + # get list of vessels + db.cur.execute("SELECT vid, vesselname, model FROM vessel ORDER BY vid") + for row in db.cur.fetchall(): + print(row) + print(type(self.combo['vessel'])) + def run(self): self.label['vessel'].set_text(self.vname) self.window.show_all() @@ -66,7 +75,7 @@ class Frontend(): def on_but_info_clicked(self, widget): # Userlist - sql = ("SELECT userid, login FROM user ORDER BY login") + sql = ("SELECT userid, login, displayname FROM user ORDER BY login") db.cur.execute(sql) for row in db.cur.fetchall(): print(row) @@ -95,7 +104,9 @@ def create_config(cfgfile): fh.write('host = localhost\n') fh.write('db = yms\n') fh.write('user = yms\n') - fh.write('pass = geheim\n') + fh.write('pass = geheim\n\n') + fh.write('[documents]\n') + fh.write('basepath = /var/local/yms\n') if __name__ == "__main__": locale.setlocale(locale.LC_ALL, '')