standalone server page pixel fixes and log purging (#17, 1h)
This commit is contained in:
		
							parent
							
								
									466ba4cf65
								
							
						
					
					
						commit
						776ffcb296
					
				
					 1 changed files with 46 additions and 13 deletions
				
			
		|  | @ -28,13 +28,26 @@ body | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | .floatright | ||||||
|  | { | ||||||
|  |    float: right; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
| /* content - tables */ | /* content - tables */ | ||||||
| 
 | 
 | ||||||
| table | table | ||||||
| { | { | ||||||
|    width: 100%; |    width: 100%; | ||||||
|    margin-top: 5px; |    /*margin-top: 5px;*/ | ||||||
|    border-spacing: 0; |    /*border-spacing: 0;*/ | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | table | ||||||
|  | { | ||||||
|  |    border-spacing: 0 4px; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| table thead | table thead | ||||||
|  | @ -59,6 +72,7 @@ table td | ||||||
|    color: #505050; |    color: #505050; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | 
 | ||||||
| tbody tr:nth-child(even) | tbody tr:nth-child(even) | ||||||
| { | { | ||||||
|    background-color: #f0f0f0; |    background-color: #f0f0f0; | ||||||
|  | @ -123,6 +137,8 @@ tbody input | ||||||
| tbody td button | tbody td button | ||||||
| { | { | ||||||
|    padding: 2px 7px 2px 7px; |    padding: 2px 7px 2px 7px; | ||||||
|  |    text-transform: uppercase; | ||||||
|  |    font-weight: bold; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| tbody td.center | tbody td.center | ||||||
|  | @ -132,6 +148,11 @@ tbody td.center | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | .outsidetable td | ||||||
|  | { | ||||||
|  |    padding-top: 30px; | ||||||
|  |    background-color: #fafafa; | ||||||
|  | } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | @ -225,6 +246,7 @@ tbody td.center | ||||||
| #header-title > span, #header-connection, #header-host, | #header-title > span, #header-connection, #header-host, | ||||||
| #nav, | #nav, | ||||||
| th, | th, | ||||||
|  | #login > button, | ||||||
| p, | p, | ||||||
| label | label | ||||||
| { | { | ||||||
|  | @ -232,12 +254,11 @@ label | ||||||
|    text-transform: uppercase; |    text-transform: uppercase; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| #login > input, #login > button | #login > input | ||||||
| { | { | ||||||
|    font: normal bold 11pt Arial, sans-serif; |    font: normal bold 11pt Arial, sans-serif; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| 
 |  | ||||||
| td | td | ||||||
| { | { | ||||||
|    font: normal normal 10pt Arial, sans-serif; |    font: normal normal 10pt Arial, sans-serif; | ||||||
|  | @ -391,7 +412,8 @@ td | ||||||
|             'timeout': 2500, |             'timeout': 2500, | ||||||
|             'error': function() |             'error': function() | ||||||
|             { |             { | ||||||
|                setHeaderState('disconnected'); |                //setHeaderState('disconnected'); | ||||||
|  |                showTab('disconnect'); | ||||||
|             }, |             }, | ||||||
|             'success': function(d) |             'success': function(d) | ||||||
|             { |             { | ||||||
|  | @ -471,8 +493,8 @@ td | ||||||
| 
 | 
 | ||||||
| //TODO fixme login creds | //TODO fixme login creds | ||||||
|                var host = $('<input>').attr('type', 'text').attr('placeholder', 'http://localhost:4242'); |                var host = $('<input>').attr('type', 'text').attr('placeholder', 'http://localhost:4242'); | ||||||
|                var user = $('<input>').attr('type', 'text').attr('placeholder', 'USERNAME');/*.attr('value', 'testaccount'); */ |                var user = $('<input>').attr('type', 'text').attr('placeholder', 'USERNAME').attr('value', 'testaccount'); | ||||||
|                var pass = $('<input>').attr('type', 'password').attr('placeholder', 'PASSWORD');/*.attr('value', 'pisvlek'); */ |                var pass = $('<input>').attr('type', 'password').attr('placeholder', 'PASSWORD').attr('value', 'pisvlek'); | ||||||
|                var conn = $('<button>').click(function() |                var conn = $('<button>').click(function() | ||||||
|                { |                { | ||||||
|                   // get login info |                   // get login info | ||||||
|  | @ -511,7 +533,7 @@ td | ||||||
|                         console.log('error logging in: ' + errorstr); |                         console.log('error logging in: ' + errorstr); | ||||||
|                      } |                      } | ||||||
|                   }); |                   }); | ||||||
|                }).text('connect'); |                }).text('login'); | ||||||
| 
 | 
 | ||||||
|                $('#page').append( |                $('#page').append( | ||||||
|                   $('<div>').attr('id', 'login').append(host).append(user).append(pass).append(conn) |                   $('<div>').attr('id', 'login').append(host).append(user).append(pass).append(conn) | ||||||
|  | @ -550,7 +572,7 @@ td | ||||||
| 
 | 
 | ||||||
|                   tr.append( $('<td>').attr('class', 'center').append( $('<button>').click(function() |                   tr.append( $('<td>').attr('class', 'center').append( $('<button>').click(function() | ||||||
|                              { |                              { | ||||||
|                                 var id = $(this).parent().attr('id').replace('protocol-', ''); |                                 var id = $(this).parent().parent().attr('id').replace('protocol-', ''); | ||||||
|                                 delete settings.settings.config.protocols[protocol]; |                                 delete settings.settings.config.protocols[protocol]; | ||||||
|                                 $(this).parent().parent().remove(); |                                 $(this).parent().parent().remove(); | ||||||
|                                 loadSettings(); |                                 loadSettings(); | ||||||
|  | @ -561,7 +583,7 @@ td | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|                // add new limit! |                // add new limit! | ||||||
|                $nprot = $('<tr>'); |                $nprot = $('<tr>').attr('class', 'outsidetable'); | ||||||
|                // protocol select |                // protocol select | ||||||
|                $pname = $('<select>').attr('id', 'new-protocol-name'); |                $pname = $('<select>').attr('id', 'new-protocol-name'); | ||||||
|                $pname.append( $('<option>').attr('value', 'HTTP').text('HTTP') ); |                $pname.append( $('<option>').attr('value', 'HTTP').text('HTTP') ); | ||||||
|  | @ -569,7 +591,7 @@ td | ||||||
| 
 | 
 | ||||||
|                $nprot.append( $('<td>').append($pname) ); |                $nprot.append( $('<td>').append($pname) ); | ||||||
|                // val |                // val | ||||||
|                $nprot.append( $('<td>').append( $('<input>').attr('type', 'text').attr('id', 'new-protocol-val') ) ); |                $nprot.append( $('<td>').append( $('<input>').attr('type', 'number').attr('id', 'new-protocol-val') ) ); | ||||||
| 
 | 
 | ||||||
|                $nprot.append( |                $nprot.append( | ||||||
|                   $('<td>').attr('class', 'center').append( |                   $('<td>').attr('class', 'center').append( | ||||||
|  | @ -668,7 +690,7 @@ $('#page').append( $('<p>').text('TODO stream settings: ' + sname + ' / ' + stre | ||||||
| 
 | 
 | ||||||
|                   tr.append( $('<td>').attr('class', 'center').append( $('<button>').click(function() |                   tr.append( $('<td>').attr('class', 'center').append( $('<button>').click(function() | ||||||
|                              { |                              { | ||||||
|                                 var id = $(this).parent().attr('id').replace('limits-', ''); |                                 var id = $(this).parent().parent().attr('id').replace('limits-', ''); | ||||||
|                                 settings.settings.config.limits.splice(id, 1); |                                 settings.settings.config.limits.splice(id, 1); | ||||||
|                                 $(this).parent().parent().remove(); |                                 $(this).parent().parent().remove(); | ||||||
| 
 | 
 | ||||||
|  | @ -679,7 +701,7 @@ $('#page').append( $('<p>').text('TODO stream settings: ' + sname + ' / ' + stre | ||||||
|                } |                } | ||||||
| 
 | 
 | ||||||
|                // add new limit! |                // add new limit! | ||||||
|                $nltr = $('<tr>'); |                $nltr = $('<tr>').attr('class', 'outsidetable'); | ||||||
| 
 | 
 | ||||||
|                // type select |                // type select | ||||||
|                $ltype = $('<select>').attr('id', 'new-limit-type'); |                $ltype = $('<select>').attr('id', 'new-limit-type'); | ||||||
|  | @ -757,6 +779,17 @@ $('#page').append( $('<p>').text('TODO stream settings: ' + sname + ' / ' + stre | ||||||
|                $table.append($tbody); |                $table.append($tbody); | ||||||
|                $('#page').append($table); |                $('#page').append($table); | ||||||
| 
 | 
 | ||||||
|  |                $('#page').append( | ||||||
|  |                   $('<button>').attr('class', 'floatright').click(function() | ||||||
|  |                   { | ||||||
|  |                      settings.settings.clearstatlogs = 1; | ||||||
|  |                      loadSettings(function() | ||||||
|  |                      { | ||||||
|  |                         showTab('logs'); | ||||||
|  |                      }); | ||||||
|  |                   }).text('Purge logs') | ||||||
|  |                ); | ||||||
|  | 
 | ||||||
|                break; |                break; | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 That-Guy
						That-Guy