Giter Club home page Giter Club logo

aws-smc-greasemonkey's People

Contributors

nathan-d avatar

Watchers

 avatar

aws-smc-greasemonkey's Issues

Refactor

Post-PoC the script needs auditing and tidying up. Focus on the following areas...

Robustness of existing code

There are at least a few areas which work in spite of the logic used. There is obvious fragility in the rowHandler that should be addressed.

Making the script lean

In a few areas we're dropping through multiple levels of HTML collections where a single direct quertySelectorAll might be a better fit. We've also got some slight overlaps in functions handling headers, rows, and more specific data structure parsing such as for radio buttons.

KISS code

There are a few functions related to row handling functionality which should be split out into distinct functions with wrapping calls. At the very least we should keep the functions to less than 20 lines.

Correct unit fields

Some fields within the form tables have trailing unit text. We should capture this where possible to give context to the script output.

image
image

Validation of account identifier

Problem statement

At the moment we allow any numeric figure to be passed as an identifier for the customer account. We should to implement some sort of validation functionality to ensure only FAWS customer IDs can be used.

Solution one

We add some basic field length and format checks to ensure the number used looks like a real account id.

Pros

  • This can be easily implemented in the client side JS
  • Doesn't require any background API events

Cons

  • Typos are going to slip through
  • Give users a false sense of security

Solution two

We add an async on submission check which exposes a Export failed - Unknown or incorrect account number used notification (Not a JS alert but likely a flash - Not adobe flash) to the user.

Pros

  • Proactively validates the user input
  • Notifies user when an issue is encountered
  • Ensures only signed up accounts can enter imp stage

Cons

  • More work involved in implementation with async callback function to be written and tied to API event

Improve styling

At the moment we're using some very basic styling for the FAWS export stripe. We should look to add the following:

  • Support for notification flashes, both good and bad, in place of alerts
  • Rackspace styling on the stripe div itself as well as some general alignment improvements
  • Selected tab context to the export strip

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.