Skip to content
This repository was archived by the owner on Feb 16, 2022. It is now read-only.

TV Panel Scaffold#260

Open
josephom12 wants to merge 16 commits into
masterfrom
TV-Panel-Fall2019
Open

TV Panel Scaffold#260
josephom12 wants to merge 16 commits into
masterfrom
TV-Panel-Fall2019

Conversation

@josephom12

@josephom12 josephom12 commented Oct 9, 2019

Copy link
Copy Markdown

This PR includes routing for the TV panel at /tvpanel and base components for tvpanel, Map, Header, ETAs and News.

Builds the front-end scaffold to implement:

  • ETA functionality
  • News functionality

Note: I'm unsure on how to fix those CI errors.

@codecov

codecov Bot commented Oct 9, 2019

Copy link
Copy Markdown

Codecov Report

Merging #260 into master will increase coverage by 0.04%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #260      +/-   ##
=========================================
+ Coverage   37.45%   37.5%   +0.04%     
=========================================
  Files          17      17              
  Lines        1559    1560       +1     
=========================================
+ Hits          584     585       +1     
  Misses        911     911              
  Partials       64      64
Impacted Files Coverage Δ
api/api.go 80.73% <100%> (+0.17%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update af012aa...8a00a6b. Read the comment docs.

@josephom12 josephom12 marked this pull request as ready for review October 9, 2019 04:35

@quuu quuu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Don't really like the redundant title bar, please try other configurations of putting "Shuttle Tracker" and "shuttles.rpi.edu" on the page

Otherwise, good starting design with the side bar

@josephom12

Copy link
Copy Markdown
Author

image

Don't really like the redundant title bar, please try other configurations of putting "Shuttle Tracker" and "shuttles.rpi.edu" on the page

Otherwise, good starting design with the side bar

image

Banner on the bottom

@quuu

quuu commented Oct 9, 2019

Copy link
Copy Markdown
Contributor

image
Don't really like the redundant title bar, please try other configurations of putting "Shuttle Tracker" and "shuttles.rpi.edu" on the page
Otherwise, good starting design with the side bar

image

Banner on the bottom

When i said redundant, I meant how you have both "Shuttle Tracker" and the URL both in the same bar

@josephom12

Copy link
Copy Markdown
Author

image
Don't really like the redundant title bar, please try other configurations of putting "Shuttle Tracker" and "shuttles.rpi.edu" on the page
Otherwise, good starting design with the side bar

image
Banner on the bottom

When i said redundant, I meant how you have both "Shuttle Tracker" and the URL both in the same bar

LOOOL oh gotcha!

Here's another variation just in case it appeals to you before I start moving the names.

image

@quuu

quuu commented Oct 9, 2019

Copy link
Copy Markdown
Contributor

LOOOL oh gotcha!

Here's another variation just in case it appeals to you before I start moving the names.

image

Leave it for now, build out the rest of the UI and then we'll ask others what they think of it as well.

@josephom12

Copy link
Copy Markdown
Author

Looking at the console of the TV Panel, I see an error that says:
image

When I go to localhost:8080/fusion, I get the error:
image

Did I miss something or is this error popping up because I'm running it on my machine? I don't seem to get these errors when I run localhost:8080 though.. thoughts?

@quuu @IncognitoCactus @evanlazaro

@josephom12

Copy link
Copy Markdown
Author

I have a question! @evanlazaro @quuu @IncognitoCactus

Is using fusion necessary for the TV panel? I'm not exactly sure what fusion does but does it have any impact on the main application? (Besides the bus-button)

If anyone knows what exactly fusion/websocket does in this application, please let me know!

Comment thread api/api.go Outdated
@@ -1,3 +1,213 @@
<<<<<<< HEAD

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

expected 'package', found '<<'

Comment thread api/api.go Outdated
@@ -1,3 +1,213 @@
<<<<<<< HEAD

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

expected 'package', found '<<'

Comment thread api/routes.go Outdated
WriteJSON(w, stop)
}
func (api *API) StopsDeleteHandler(w http.ResponseWriter, r *http.Request) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exported method API.StopsDeleteHandler should have comment or be unexported

Comment thread api/vehicles.go Outdated
}
}
func (api *API) VehiclesDeleteHandler(w http.ResponseWriter, r *http.Request) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exported method API.VehiclesDeleteHandler should have comment or be unexported

Comment thread api/vehicles.go Outdated
}
}
func (api *API) VehiclesEditHandler(w http.ResponseWriter, r *http.Request) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exported method API.VehiclesEditHandler should have comment or be unexported

Comment thread api/routes.go Outdated
WriteJSON(w, stop)
}
func (api *API) StopsDeleteHandler(w http.ResponseWriter, r *http.Request) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exported method API.StopsDeleteHandler should have comment or be unexported

Comment thread eta/eta.go Outdated
const earthRadius = 6371000.0 // meters
// ETAManager implements ETAService and provides ETAs for Vehicles to Stops.
type ETAManager struct {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

type name will be used as eta.ETAManager by other packages, and that stutters; consider calling this Manager

Comment thread api/vehicles.go Outdated
}
}
func (api *API) VehiclesDeleteHandler(w http.ResponseWriter, r *http.Request) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exported method API.VehiclesDeleteHandler should have comment or be unexported

Comment thread api/vehicles.go Outdated
}
}
func (api *API) VehiclesEditHandler(w http.ResponseWriter, r *http.Request) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exported method API.VehiclesEditHandler should have comment or be unexported

Comment thread updater/updater.go Outdated
return updater, nil
}

func NewConfig(v *viper.Viper) *Config {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exported function NewConfig should have comment or be unexported

Comment thread updater/updater.go Outdated
subscribers []func(*shuttletracker.Location)
}

type Config struct {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exported type Config should have comment or be unexported

Comment thread log/log.go Outdated
WithFields(contextFields()).Debug(args...)
}

func Debugf(format string, args ...interface{}) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exported function Debugf should have comment or be unexported

Comment thread log/log.go Outdated
WithFields(contextFields()).Infof(format, args...)
}

func Debug(args ...interface{}) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exported function Debug should have comment or be unexported

Comment thread log/log.go Outdated
WithFields(contextFields()).Info(args...)
}

func Infof(format string, args ...interface{}) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exported function Infof should have comment or be unexported

Comment thread log/log.go Outdated
return logger.WithField(f, v)
}

func WithFields(f ...Fields) *logrus.Entry {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exported function WithFields should have comment or be unexported

Comment thread log/log.go Outdated
}
}

func WithField(f string, v interface{}) *logrus.Entry {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exported function WithField should have comment or be unexported

Comment thread log/log.go Outdated
return cfg
}

func SetLevel(level string) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exported function SetLevel should have comment or be unexported

Comment thread log/log.go Outdated
Level string
}

type Fields map[string]interface{}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exported type Fields should have comment or be unexported

Comment thread log/log.go Outdated
logger *logrus.Logger
)

type Config struct {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exported type Config should have comment or be unexported

Comment thread frontend/src/assets/vars.scss Outdated
$link: #ff0000;
$primary-invert: findColorInvert($primary);
$twitter: #4099ff;
$twitter-invert: findColorInvert($twitter);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Name of function findColorInvert should be written in all lowercase letters with hyphens instead of underscores

Comment thread frontend/src/assets/vars.scss Outdated
$primary: #ed1c24;
$link: #ff0000;
$primary-invert: findColorInvert($primary);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Name of function findColorInvert should be written in all lowercase letters with hyphens instead of underscores

Comment thread frontend/src/assets/styles.scss Outdated
top: 0;
width: 100%;
}
html,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rule set contains (11/10) properties

Comment thread frontend/src/admin/js/admin.js Outdated
return {
state: 0,
mainStyle: {position: "fixed",width: "auto",right:"0px",top:"50px",height: "auto", overflow: "scroll", bottom: "0",left: "150px"}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants