GithubHelp home page GithubHelp logo

ewilliams0305 / weblogger Goto Github PK

View Code? Open in Web Editor NEW
9.0 3.0 4.0 596 KB

Websocket server designed to provide a HTML command line interface on a dotnet Application.

License: MIT License

C# 94.74% HTML 1.01% JavaScript 2.74% CSS 1.51%
console crestron csharp dotnet dotnetstandard logging serilog-sink

weblogger's People

Contributors

ewilliams0305 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

weblogger's Issues

Create Parent Element

Create a parent element object. This parent element should be used as a single string builder for all child elements. The parent element should be able to provide a child with the builder.

Parents should Not be appended or inserted.

A Parent can be any HTML element

A child mutates a parent but stores no state other than its options and element type.

The parent should render and create the child.

Move Color Formatting From JS

Currently the serilog sink colors are being formatted from the JS file with parsing. Sinnce sending HTML data to the WebLogger UI works this should be moved to the Serilog Sink.

Change HtmlElement to Class

Refactor the HtmlElement class as a class or record with immutable guts. Now realizing how this was implemented passing the objects into one another will create copies. At that point heap is probably the lesser of two evils. Continue benchmark tests as well to determine possible builder refactoring for efficiency gains.

Command arguments

Change command arguments to Powershell switch format. Space separated arguments will cause usage issues.

Console Prompts

Provide an optional interface a command can impliment to allow the weblogger to prompt users for confirmations.

i.e. Enter (y) to replace your file system!

user: N

command is never executed.

Generate CommandHandlerAttribute

Currently this attribute was created in the main webLogger library. This should be a generated type in the WebLogger.Generators project.

Create Child Element

Child element should not contain a buffer or builder.

A child element should simply hold the Element enum type and options

A child should be able to add it's self to a parent at the specified location. FirstChild, LastChild, Insert.

Ansync Callback

Change command delegate to force asynchronous code. Not knowing what someone will do with this blocked threads could create issues on the front ent application and or server.

Create Analyzer to Refactor Method Signature

Create a roslyn analyzer to suggest refactoring method signatures with the [CommandHandler] attribute applied. We should be able to instruct the analyzer to identify methods that dont match ICommandResponse (string, List<string>)

Add Before method to HtmlElement

A before method should be added to insert an element before the target element definition.

`
var div

var before = HtmlElement.H1.Before(div)

before =


`

Create generator that can handle multiple command methods.

Create generator that can handle multiple command methods. Each method should create an instance of a command and add it to a collection. This should also implement an interface with a method to register all the commands created by the class.

Move all markers

Markers should be located in the WebLogger project. This will prevent duplicated types when multiple projects in a single assembly are using generated commands.

Invalid Command Response Render

Render an HTML element similar to the Exception SerilogLog sink. When an invalid command is provided it should respond with a neat table or exception block.

Source Generated Commands

Create a WebLogger.Generators library used to create commands with source generation.

Generated commands should be automatically registered with th e weblogger server.

Serilog Minimum Log Level

Create a custom CLI command in the serilog library to change the log level event output at runtime.

Assembly Command Scanning

Provide IWebLogger extension methods to discover all IWebLoggerCommands and Handlers in a given assembly.

Consider using Attributes and Metadata to discover and define edge cases.

Format Command Help Response

Command help is still using string interpolation. Create a HtmlElement render to display the output of a commands help information.

Read and Write Logs

Either create a logging method and write a file. Or possible leverage the internal logging mechanisms and simply output to the websocket server.

Secured Websocket Server

Provide options to enable security and provide a certificate.

var logger = WebLoggerFactory.CreateWebLogger(options => { options.Secured = true; options.WebSocketTcpPort = 54321; options.DestinationWebpageDirectory = "C:/Temp/"; options.CertificatePath = "blah.cert" });

Fully Qualified Command Name

Ensure the fully qualified command name is what gets passed around to handlers. Currently typing a partial command matches the command but passes the partial command to the handler.

Query Assembly Versions

Query the WebLogger assembly and determine if the webpage should be replaced. This will streamline deployments and reduce the need to manually replace or command replace the files. Possibly add a Json file to the embedded resources html as a comparison.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.