-
Notifications
You must be signed in to change notification settings - Fork 53
TV Panel Scaffold #260
base: master
Are you sure you want to change the base?
TV Panel Scaffold #260
Conversation
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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! |
- Added placeholders and styling for ETAs and news articles.
…isplayed (i.e. blue for West, green for East) to match the map
api/api.go
Outdated
@@ -1,3 +1,213 @@ | |||
<<<<<<< HEAD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
expected 'package', found '<<'
api/api.go
Outdated
@@ -1,3 +1,213 @@ | |||
<<<<<<< HEAD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
expected 'package', found '<<'
api/routes.go
Outdated
WriteJSON(w, stop) | ||
} | ||
|
||
func (api *API) StopsDeleteHandler(w http.ResponseWriter, r *http.Request) { |
There was a problem hiding this comment.
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
api/vehicles.go
Outdated
} | ||
} | ||
|
||
func (api *API) VehiclesDeleteHandler(w http.ResponseWriter, r *http.Request) { |
There was a problem hiding this comment.
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
api/vehicles.go
Outdated
} | ||
} | ||
|
||
func (api *API) VehiclesEditHandler(w http.ResponseWriter, r *http.Request) { |
There was a problem hiding this comment.
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
api/routes.go
Outdated
WriteJSON(w, stop) | ||
} | ||
|
||
func (api *API) StopsDeleteHandler(w http.ResponseWriter, r *http.Request) { |
There was a problem hiding this comment.
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
eta/eta.go
Outdated
const earthRadius = 6371000.0 // meters | ||
|
||
// ETAManager implements ETAService and provides ETAs for Vehicles to Stops. | ||
type ETAManager struct { |
There was a problem hiding this comment.
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
api/vehicles.go
Outdated
} | ||
} | ||
|
||
func (api *API) VehiclesDeleteHandler(w http.ResponseWriter, r *http.Request) { |
There was a problem hiding this comment.
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
api/vehicles.go
Outdated
} | ||
} | ||
|
||
func (api *API) VehiclesEditHandler(w http.ResponseWriter, r *http.Request) { |
There was a problem hiding this comment.
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
updater/updater.go
Outdated
return updater, nil | ||
} | ||
|
||
func NewConfig(v *viper.Viper) *Config { |
There was a problem hiding this comment.
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
updater/updater.go
Outdated
subscribers []func(*shuttletracker.Location) | ||
} | ||
|
||
type Config struct { |
There was a problem hiding this comment.
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
log/log.go
Outdated
WithFields(contextFields()).Debug(args...) | ||
} | ||
|
||
func Debugf(format string, args ...interface{}) { |
There was a problem hiding this comment.
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
log/log.go
Outdated
WithFields(contextFields()).Infof(format, args...) | ||
} | ||
|
||
func Debug(args ...interface{}) { |
There was a problem hiding this comment.
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
log/log.go
Outdated
WithFields(contextFields()).Info(args...) | ||
} | ||
|
||
func Infof(format string, args ...interface{}) { |
There was a problem hiding this comment.
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
log/log.go
Outdated
return logger.WithField(f, v) | ||
} | ||
|
||
func WithFields(f ...Fields) *logrus.Entry { |
There was a problem hiding this comment.
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
log/log.go
Outdated
} | ||
} | ||
|
||
func WithField(f string, v interface{}) *logrus.Entry { |
There was a problem hiding this comment.
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
log/log.go
Outdated
return cfg | ||
} | ||
|
||
func SetLevel(level string) { |
There was a problem hiding this comment.
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
log/log.go
Outdated
Level string | ||
} | ||
|
||
type Fields map[string]interface{} |
There was a problem hiding this comment.
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
log/log.go
Outdated
logger *logrus.Logger | ||
) | ||
|
||
type Config struct { |
There was a problem hiding this comment.
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
frontend/src/assets/vars.scss
Outdated
$link: #ff0000; | ||
$primary-invert: findColorInvert($primary); | ||
$twitter: #4099ff; | ||
$twitter-invert: findColorInvert($twitter); |
There was a problem hiding this comment.
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
frontend/src/assets/vars.scss
Outdated
|
||
$primary: #ed1c24; | ||
$link: #ff0000; | ||
$primary-invert: findColorInvert($primary); |
There was a problem hiding this comment.
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
frontend/src/assets/styles.scss
Outdated
top: 0; | ||
width: 100%; | ||
} | ||
html, |
There was a problem hiding this comment.
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
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"} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
06c3e83
to
8a5f9ba
Compare
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:
Note: I'm unsure on how to fix those CI errors.