Browse Source

v3.2.4

pull/42/head
Aidaho12 6 years ago
parent
commit
f0e825eda1
  1. 4
      app/haproxy-wi.db.sql
  2. 2
      app/sql.py
  3. 14
      inc/nprogress.css

4
app/haproxy-wi.db.sql

@ -1,8 +1,8 @@
CREATE TABLE IF NOT EXISTS `user` (`id` INTEGER NOT NULL AUTO_INCREMENT,`username` VARCHAR ( 64 ) UNIQUE,`email` VARCHAR ( 120 ) UNIQUE, `password` VARCHAR ( 128 ),`role` VARCHAR ( 128 ),`groups` VARCHAR ( 120 ),PRIMARY KEY(`id`) );
CREATE TABLE IF NOT EXISTS `user` (`id` INTEGER NOT NULL AUTO_INCREMENT,`username` VARCHAR ( 64 ) UNIQUE,`email` VARCHAR ( 120 ) UNIQUE, `password` VARCHAR ( 128 ),`role` VARCHAR ( 128 ),`groups` VARCHAR ( 120 ), PRIMARY KEY(`id`) );
INSERT INTO `user` (username, email, password, role, groups) VALUES ('admin','admin@localhost','admin','admin','1');
INSERT INTO `user` (username, email, password, role, groups) VALUES ('editor','editor@localhost','editor','editor','1');
INSERT INTO `user` (username, email, password, role, groups) VALUES ('guest','guest@localhost','guest','guest','1');
CREATE TABLE IF NOT EXISTS `servers` (`id` INTEGER NOT NULL AUTO_INCREMENT,`hostname` VARCHAR ( 64 ) UNIQUE,`ip` VARCHAR ( 64 ) UNIQUE,`groups` VARCHAR ( 64 ), type_ip INTEGER NOT NULL DEFAULT 0, enable INTEGER NOT NULL DEFAULT 1, master INTEGER NOT NULL DEFAULT 0, cred INTEGER NOT NULL DEFAULT 1, alert INTEGER NOT NULL DEFAULT 0, metrics INTEGER NOT NULL DEFAULT 0PRIMARY KEY(`id`) );
CREATE TABLE IF NOT EXISTS `servers` (`id` INTEGER NOT NULL AUTO_INCREMENT,`hostname` VARCHAR ( 64 ) UNIQUE,`ip` VARCHAR ( 64 ) UNIQUE,`groups` VARCHAR ( 64 ), type_ip INTEGER NOT NULL DEFAULT 0, enable INTEGER NOT NULL DEFAULT 1, master INTEGER NOT NULL DEFAULT 0, cred INTEGER NOT NULL DEFAULT 1, alert INTEGER NOT NULL DEFAULT 0, metrics INTEGER NOT NULL DEFAULT 0, PRIMARY KEY(`id`) );
CREATE TABLE IF NOT EXISTS `role` (`id` INTEGER NOT NULL AUTO_INCREMENT,`name` VARCHAR ( 80 ) UNIQUE,`description` VARCHAR ( 255 ),PRIMARY KEY(`id`) );
INSERT INTO `role` (name, description) VALUES ('admin','Can do everything');
INSERT INTO `role` (name, description) VALUES ('editor','Can edit configs');

2
app/sql.py

@ -192,7 +192,7 @@ def select_users(**kwargs):
try:
cur.execute(sql)
except sqltool.Error as e:
print("An error occurred:", e.args[0])
print("An error occurred:", e)
else:
return cur.fetchall()
cur.close()

14
inc/nprogress.css

@ -1,4 +1,3 @@
/* Make clicks pass-through */
#nprogress {
pointer-events: none;
}
@ -29,16 +28,17 @@
display: block;
position: fixed;
z-index: 1031;
top: 10px;
top: 40%;
left: 50%;
float: right;
}
#nprogress .spinner-icon {
width: 18px;
height: 18px;
width: 40px;
height: 40px;
box-sizing: border-box;
border: solid 2px transparent;
border-top-color: #fff;
border-left-color: #fff;
border: solid 5px transparent;
border-top-color: #5d9ceb;
border-left-color: #5d9ceb;
border-radius: 50%;
-webkit-animation: nprogress-spinner 400ms linear infinite;
animation: nprogress-spinner 400ms linear infinite;

Loading…
Cancel
Save