mirror of
https://github.com/tstack/lnav
synced 2024-11-05 21:21:19 +00:00
Merge pull request #216 from sureshsundriyal/wip
[init.sql] Check in a static init.sql and remove init_sql.py.
This commit is contained in:
commit
1b9f96852b
@ -22,10 +22,7 @@ dump-pid-sh.c: $(srcdir)/dump-pid.sh bin2c
|
||||
default-log-formats-json.c: $(srcdir)/default-log-formats.json bin2c
|
||||
$(BIN2C_V)./bin2c -z -c $(srcdir)/default-log-formats.json $@
|
||||
|
||||
init.sql: $(srcdir)/init_sql.py
|
||||
$(PYTHON) $(srcdir)/init_sql.py > $@
|
||||
|
||||
init-sql.c: $(srcdir)/init.sql bin2c
|
||||
init-sql.c: bin2c
|
||||
$(BIN2C_V)./bin2c -z -c $(srcdir)/init.sql $@
|
||||
|
||||
TIME_FORMATS = \
|
||||
@ -240,9 +237,6 @@ libdiag_a_SOURCES += yajl/yajl.c \
|
||||
endif
|
||||
|
||||
|
||||
dist_noinst_SCRIPTS = \
|
||||
init_sql.py
|
||||
|
||||
TEXT2C_FILES = \
|
||||
dump-pid-sh.o \
|
||||
help.o \
|
||||
|
47
src/init.sql
47
src/init.sql
@ -1,6 +1,3 @@
|
||||
|
||||
-- This file was created by init_sql.py --
|
||||
|
||||
CREATE TABLE IF NOT EXISTS http_status_codes (
|
||||
status integer PRIMARY KEY,
|
||||
message text,
|
||||
@ -8,6 +5,9 @@ CREATE TABLE IF NOT EXISTS http_status_codes (
|
||||
FOREIGN KEY(status) REFERENCES access_log(sc_status)
|
||||
);
|
||||
|
||||
INSERT INTO http_status_codes VALUES (100, "Continue");
|
||||
INSERT INTO http_status_codes VALUES (101, "Switching Protocols");
|
||||
INSERT INTO http_status_codes VALUES (102, "Processing");
|
||||
INSERT INTO http_status_codes VALUES (200, "OK");
|
||||
INSERT INTO http_status_codes VALUES (201, "Created");
|
||||
INSERT INTO http_status_codes VALUES (202, "Accepted");
|
||||
@ -15,6 +15,18 @@ INSERT INTO http_status_codes VALUES (203, "Non-Authoritative Information");
|
||||
INSERT INTO http_status_codes VALUES (204, "No Content");
|
||||
INSERT INTO http_status_codes VALUES (205, "Reset Content");
|
||||
INSERT INTO http_status_codes VALUES (206, "Partial Content");
|
||||
INSERT INTO http_status_codes VALUES (207, "Multi-Status");
|
||||
INSERT INTO http_status_codes VALUES (208, "Already Reported");
|
||||
INSERT INTO http_status_codes VALUES (226, "IM Used");
|
||||
INSERT INTO http_status_codes VALUES (300, "Multiple Choices");
|
||||
INSERT INTO http_status_codes VALUES (301, "Moved Permanently");
|
||||
INSERT INTO http_status_codes VALUES (302, "Found");
|
||||
INSERT INTO http_status_codes VALUES (303, "See Other");
|
||||
INSERT INTO http_status_codes VALUES (304, "Not Modified");
|
||||
INSERT INTO http_status_codes VALUES (305, "Use Proxy");
|
||||
INSERT INTO http_status_codes VALUES (306, "(Unused)");
|
||||
INSERT INTO http_status_codes VALUES (307, "Temporary Redirect");
|
||||
INSERT INTO http_status_codes VALUES (308, "Permanent Redirect");
|
||||
INSERT INTO http_status_codes VALUES (400, "Bad Request");
|
||||
INSERT INTO http_status_codes VALUES (401, "Unauthorized");
|
||||
INSERT INTO http_status_codes VALUES (402, "Payment Required");
|
||||
@ -28,24 +40,27 @@ INSERT INTO http_status_codes VALUES (409, "Conflict");
|
||||
INSERT INTO http_status_codes VALUES (410, "Gone");
|
||||
INSERT INTO http_status_codes VALUES (411, "Length Required");
|
||||
INSERT INTO http_status_codes VALUES (412, "Precondition Failed");
|
||||
INSERT INTO http_status_codes VALUES (413, "Request Entity Too Large");
|
||||
INSERT INTO http_status_codes VALUES (414, "Request-URI Too Long");
|
||||
INSERT INTO http_status_codes VALUES (413, "Payload Too Large");
|
||||
INSERT INTO http_status_codes VALUES (414, "URI Too Long");
|
||||
INSERT INTO http_status_codes VALUES (415, "Unsupported Media Type");
|
||||
INSERT INTO http_status_codes VALUES (416, "Requested Range Not Satisfiable");
|
||||
INSERT INTO http_status_codes VALUES (416, "Range Not Satisfiable");
|
||||
INSERT INTO http_status_codes VALUES (417, "Expectation Failed");
|
||||
INSERT INTO http_status_codes VALUES (100, "Continue");
|
||||
INSERT INTO http_status_codes VALUES (101, "Switching Protocols");
|
||||
INSERT INTO http_status_codes VALUES (300, "Multiple Choices");
|
||||
INSERT INTO http_status_codes VALUES (301, "Moved Permanently");
|
||||
INSERT INTO http_status_codes VALUES (302, "Found");
|
||||
INSERT INTO http_status_codes VALUES (303, "See Other");
|
||||
INSERT INTO http_status_codes VALUES (304, "Not Modified");
|
||||
INSERT INTO http_status_codes VALUES (305, "Use Proxy");
|
||||
INSERT INTO http_status_codes VALUES (306, "(Unused)");
|
||||
INSERT INTO http_status_codes VALUES (307, "Temporary Redirect");
|
||||
INSERT INTO http_status_codes VALUES (421, "Misdirected Request");
|
||||
INSERT INTO http_status_codes VALUES (422, "Unprocessable Entity");
|
||||
INSERT INTO http_status_codes VALUES (423, "Locked");
|
||||
INSERT INTO http_status_codes VALUES (424, "Failed Dependency");
|
||||
INSERT INTO http_status_codes VALUES (426, "Upgrade Required");
|
||||
INSERT INTO http_status_codes VALUES (428, "Precondition Required");
|
||||
INSERT INTO http_status_codes VALUES (429, "Too Many Requests");
|
||||
INSERT INTO http_status_codes VALUES (431, "Request Header Fields Too Large");
|
||||
INSERT INTO http_status_codes VALUES (500, "Internal Server Error");
|
||||
INSERT INTO http_status_codes VALUES (501, "Not Implemented");
|
||||
INSERT INTO http_status_codes VALUES (502, "Bad Gateway");
|
||||
INSERT INTO http_status_codes VALUES (503, "Service Unavailable");
|
||||
INSERT INTO http_status_codes VALUES (504, "Gateway Timeout");
|
||||
INSERT INTO http_status_codes VALUES (505, "HTTP Version Not Supported");
|
||||
INSERT INTO http_status_codes VALUES (506, "Variant Also Negotiates");
|
||||
INSERT INTO http_status_codes VALUES (507, "Insufficient Storage");
|
||||
INSERT INTO http_status_codes VALUES (508, "Loop Detected");
|
||||
INSERT INTO http_status_codes VALUES (510, "Not Extended");
|
||||
INSERT INTO http_status_codes VALUES (511, "Network Authentication Required");
|
||||
|
@ -1,19 +0,0 @@
|
||||
#! /usr/bin/env python
|
||||
|
||||
import httplib
|
||||
|
||||
TABLES = """
|
||||
-- This file was created by init_sql.py --
|
||||
|
||||
CREATE TABLE IF NOT EXISTS http_status_codes (
|
||||
status integer PRIMARY KEY,
|
||||
message text,
|
||||
|
||||
FOREIGN KEY(status) REFERENCES access_log(sc_status)
|
||||
);
|
||||
"""
|
||||
|
||||
print TABLES
|
||||
|
||||
for item in httplib.responses.iteritems():
|
||||
print "INSERT INTO http_status_codes VALUES (%d, \"%s\");" % item
|
Loading…
Reference in New Issue
Block a user