From 3d6ae286d31e3aa656204102615fd354e2861fd1 Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Wed, 25 Jan 2017 16:55:06 +0000 Subject: [PATCH] css, sys --- share/db/sys.sql | 1 + share/db/update.sh | 4 +++- www/dbq/html/default.css | 6 +++--- www/dbq/html/default.min.css | 2 +- www/dbq/html/default.min.js | 7 +------ 5 files changed, 9 insertions(+), 11 deletions(-) diff --git a/share/db/sys.sql b/share/db/sys.sql index f26ce745..562728b0 100644 --- a/share/db/sys.sql +++ b/share/db/sys.sql @@ -36,5 +36,6 @@ CREATE TABLE ovh_dedicated ( cpu VARCHAR(150), ram VARCHAR(150), disk VARCHAR(150), + option VARCHAR(100), price float(5,2) ); diff --git a/share/db/update.sh b/share/db/update.sh index 394d2e6f..0b3f1583 100755 --- a/share/db/update.sh +++ b/share/db/update.sh @@ -47,7 +47,9 @@ data_src() { > "$tmp/port.csv" csv2table port "$tmp/port.csv" - curl -s https://www.ovh.co.uk/dedicated_servers/ | perl -MNB -e '$_=join("",<>);s/[\t\s\r\n]+/ /g;for $tr (/]+OffersList.*?>(.*?)<.tr>/g) { @r=(); for $td ($tr=~/(\w.*?)<.td>/g){ $td=~s/\s*
\s*/, /; push(@r,$td) if $td=str_trim(html2txt($td)) and $td!~/Configure/}; $r[5] =~ s/,//g; print $_ if @r==6 and $_=join("\t",map{s/[\t\s\r\n]+/ /g;s/ ex\. VAT.*$//; $_}@r)."\n" and $r[0]!~/Intel/ and $r[5]>0 and !$dbl{$_}++;}' > "$tmp/ovh_dedicated.csv" + html-table2csv https://www.ovh.co.uk/dedicated_servers/|perl -ne \ + '/^\w/ or next; @F=split("\t",$_);splice(@F,6,1); $F[6] =~s/ ex.*$//; $F[6] =~s/[^\d\.]//g; print $_ if $_=join("\t",map{$_ eq "-" ? "" : $_} @F[0..6])."\n" and !$dbl{$_}++' \ + > "$tmp/ovh_dedicated.csv" csv2table ovh_dedicated "$tmp/ovh_dedicated.csv" return 0 diff --git a/www/dbq/html/default.css b/www/dbq/html/default.css index 243f3372..f3b99ae1 100644 --- a/www/dbq/html/default.css +++ b/www/dbq/html/default.css @@ -30,7 +30,7 @@ a { } p a, div > a, li a, td a { - color: #E59B24; + color: #3572B0; } a, a:visited { @@ -190,14 +190,14 @@ ul.row li label, div.row div label { box-shadow: 1px 1px 1px #888888; border-top: solid 1px #EEEEEE; border: solid 1px #EEEEEE; + font-weight: bold; */ - color: #E59B24; + color: #3572B0; background-color: #EEEEEE; background: linear-gradient(to bottom right, #EEEEEE, #DDDDDD); box-shadow: 0px 1px 1px #BBBBBB; - font-weight: bold; } .menu, .nav, .rows, .buttons, td.button, .center { diff --git a/www/dbq/html/default.min.css b/www/dbq/html/default.min.css index b7da9c8e..b01328f8 100644 --- a/www/dbq/html/default.min.css +++ b/www/dbq/html/default.min.css @@ -1 +1 @@ -html{font:90% 'Trebuchet MS',sans-serif;background-color:#EEE}body{display:table;margin-left:auto;margin-right:auto;padding-left:1em;padding-right:1em;color:#444}h1{margin:0 0 0.2em 0;font-size:180%;padding-bottom:0.3em;margin-bottom:0.5em;border-bottom:dashed 1px #444}a{color:inherit}p a,div > a,li a,td a{color:#E59B24}a,a:visited{text-decoration:none}a:hover,.button:hover{opacity:0.8}ul{padding:0;margin:0}li{list-style:none;padding:0 0 0 0.3em}table{border-collapse:collapse}td,th{padding:0.2em 0.7em}th a.sort{padding:0 0.3em}textarea,select,input:not([type]),input[type='text'],input[type='password'],input[type='date'],input[type='email'],input[type='url'],input[type='']{border-radius:3px;border:solid 1px #DDD;padding:0.3em 0.4em;box-shadow:0 1px 1px #EEE}input[size]{max-width:70%}div.row div label:after,form label:after{content:':'}form label,form input,form select{vertical-align:middle;margin:0.2em 0.4em 0.2em 0}table.rows,div.row,ul.row,form.edit,.menu,.block,object,iframe,pre{border-radius:4px;border-spacing:0;padding:0.5em 0.2em;margin-bottom:0.5em;border:solid 1px #DDD;background-color:#FAFAFA;box-shadow:0 1px 2px #EEE}.rows{padding:0}table.rows{border-style:hidden;border-collapse:collapse;box-shadow:0 0 0 1px #DDD;table-layout:fixed}table.rows.fixed{width:100%}table.rows tr:nth-child(even) td{background-color:#FEFEFE}ul.row li,div.row div,table.rows th,table.rows td{border-bottom:solid 1px #DDD}ul.row li,div.row div,table.rows tr:last-child td{border-bottom:none}table.rows th,table.rows td{border-right:dashed 1px #DDD}table.rows td{padding:0.3em 0.3em}table.rows td .view,table.rows td .delete{width:1%;white-space:nowrap}table.rows.fixed td{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}table.rows th{text-align:left}div.row div{margin:0}ul.row li label,div.row div label{padding:0.1em 0.5em 0.1em 0;min-width:20%;display:inline-block}.button{font:inherit;display:inline-block;text-decoration:none;line-height:1.5em;cursor:pointer;border-radius:4px;white-space:nowrap;box-sizing:border-box;margin:0 0.1em 0 0;padding:0 0.1em;cursor:pointer;padding:0.1em 0.3em;border:none;color:#E59B24;background-color:#EEE;background:linear-gradient(to bottom right,#EEE,#DDD);box-shadow:0 1px 1px #BBB;font-weight:bold}.menu,.nav,.rows,.buttons,td.button,.center{margin-left:auto;margin-right:auto;display:table}form.menu{padding:0.5em;background-color:#FAFAFA}form.menu .button.add{float:right;margin-top:0.3ex;display:inline}form.menu .criterias{border-top:dashed 1px #DDD;margin-top:0.3em;padding-top:0.3em}form.menu .criterias span.label{border-right:solid 1px #fff;padding:0.2em 0.1em;margin:0.2em 0.2em 0 0;border-radius:3px}form.menu .criterias span.label:last-child{border-right:none}form.menu select:focus{max-width:auto}form.menu select{max-width:20%}form.menu .criterias input[type=text]:focus{width:auto}form.menu .criterias input[type=text]{width:4em}form.edit .fields label{width:25%;text-align:right;display:inline-block;margin-right:1em;vertical-align:top}form.edit .fields .label span{width:54%;display:inline-block;text-align:left}form.edit .fields input,form.edit .fields textarea,form.edit .fields select{width:65%}form.edit .fields label{width:25%;text-align:right;display:inline-block;margin-right:1em;vertical-align:top}form.edit .fields .label span{width:54%;display:inline-block;text-align:left} \ No newline at end of file +table,table.rows{border-collapse:collapse}.button,a,a:visited{text-decoration:none}html{font:90% 'Trebuchet MS',sans-serif;background-color:#EEE}body{display:table;margin-left:auto;margin-right:auto;padding-left:1em;padding-right:1em;color:#444}h1{margin:0 0 .5em;font-size:180%;padding-bottom:.3em;border-bottom:dashed 1px #444}a{color:inherit}.button,div>a,li a,p a,td a{color:#3572B0}.button:hover,a:hover{opacity:.8}ul{padding:0;margin:0}li{list-style:none;padding:0 0 0 .3em}td,th{padding:.2em .7em}th a.sort{padding:0 .3em}input:not([type]),input[type=text],input[type=password],input[type=date],input[type=email],input[type=url],input[type=''],select,textarea{border-radius:3px;border:1px solid #DDD;padding:.3em .4em;box-shadow:0 1px 1px #EEE}input[size]{max-width:70%}div.row div label:after,form label:after{content:':'}form input,form label,form select{vertical-align:middle;margin:.2em .4em .2em 0}.block,.menu,div.row,form.edit,iframe,object,pre,table.rows,ul.row{border-radius:4px;border-spacing:0;padding:.5em .2em;margin-bottom:.5em;border:1px solid #DDD;background-color:#FAFAFA;box-shadow:0 1px 2px #EEE}.rows{padding:0}table.rows{border-style:hidden;box-shadow:0 0 0 1px #DDD;table-layout:fixed}table.rows.fixed{width:100%}table.rows tr:nth-child(even) td{background-color:#FEFEFE}div.row div,table.rows td,table.rows th,ul.row li{border-bottom:solid 1px #DDD}div.row div,table.rows tr:last-child td,ul.row li{border-bottom:none}table.rows td,table.rows th{border-right:dashed 1px #DDD}table.rows td{padding:.3em}table.rows td .delete,table.rows td .view{width:1%;white-space:nowrap}table.rows.fixed td{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}table.rows th{text-align:left}div.row div{margin:0}div.row div label,ul.row li label{padding:.1em .5em .1em 0;min-width:20%;display:inline-block}.button{font:inherit;display:inline-block;line-height:1.5em;border-radius:4px;white-space:nowrap;box-sizing:border-box;margin:0 .1em 0 0;cursor:pointer;padding:.1em .3em;border:none;background-color:#EEE;background:linear-gradient(to bottom right,#EEE,#DDD);box-shadow:0 1px 1px #BBB}.buttons,.center,.menu,.nav,.rows,td.button{margin-left:auto;margin-right:auto;display:table}form.menu{padding:.5em;background-color:#FAFAFA}form.menu .button.add{float:right;margin-top:.3ex;display:inline}form.menu .criterias{border-top:dashed 1px #DDD;margin-top:.3em;padding-top:.3em}form.menu .criterias span.label{border-right:solid 1px #fff;padding:.2em .1em;margin:.2em .2em 0 0;border-radius:3px}form.menu .criterias span.label:last-child{border-right:none}form.menu select:focus{max-width:auto}form.menu select{max-width:20%}form.menu .criterias input[type=text]:focus{width:auto}form.menu .criterias input[type=text]{width:4em}form.edit .fields input,form.edit .fields select,form.edit .fields textarea{width:65%}form.edit .fields label{width:25%;text-align:right;display:inline-block;margin-right:1em;vertical-align:top}form.edit .fields .label span{width:54%;display:inline-block;text-align:left} diff --git a/www/dbq/html/default.min.js b/www/dbq/html/default.min.js index fdd7ab99..433495c2 100644 --- a/www/dbq/html/default.min.js +++ b/www/dbq/html/default.min.js @@ -1,6 +1 @@ -function form_clean(e){var t -for(i=0;i'+document.querySelector(".nav.bottom").innerHTML+""),document.querySelectorAll("table").forEach(function(e){parseInt(e.offsetWidth)>parseInt(window.innerWidth)&&(e.className=e.className.replace(/(^| +)fixed($| )/,"")+" fixed",e.className=e.className.trim())}),document.querySelectorAll("form.menu input[type=submit]").forEach(function(e){e.insertAdjacentHTML("afterend",' '+(window._dbq["table.rw"]?' ':""))})}) +function form_clean(e){var t;for(i=0;i'+document.querySelector(".nav.bottom").innerHTML+""),document.querySelectorAll("table").forEach(function(e){parseInt(e.offsetWidth)>parseInt(window.innerWidth)&&(e.className=e.className.replace(/(^| +)fixed($| )/,"")+" fixed",e.className=e.className.trim())}),document.querySelectorAll("form.menu input[type=submit]").forEach(function(e){e.insertAdjacentHTML("afterend",' '+(window._dbq["table.rw"]?' ':""))})}); -- 2.47.3