Git Product home page Git Product logo

trolley-tracker-api-dot-net's Issues

Add trolley icon color

Add field to trolley definition for suggested trolley icon color in the app. Formatted as HTML #RRGGBB

Stop maintenance improvement

Rather than collecting stop locations by entering numbers, make an interface to edit, add, or remove stops via a map interface.

Optionally, also update those corresponding stop locations in FourSquare.

Add passenger load information to Trolley record

Add 2 fields to both trolley and runningTrolley records:
Capacity - Integer total number of passengers the trolley can carry
PassengerLoad - floating point number, 0..1 , where 1 = 100% of capacity

This information will be derived from the Syncromatics API after the switchover.

Authentication for Web API

Microsoft doesn't support Basic Authentication out of the box, so it was manually added in the App_Start folder. The passwords were embedded in the software. What is the proper way to assign basic auth credentials so that they don't appear in the public Repo? Is there a better way to authenticate our web app?

Add Vector route editor

There are frequent route deviations when one or more blocks are closed for an event. It is useful to have the capability to create derived routes based on standard routes, and schedule them for the duration of the event. The ideal solution is a Javascript-based vector editor to allow the client to edit route travel paths directly and easily. Should minimize mouse clicks and edit time to modify a route.

  • Need to indicate direction of travel.
  • Should snap to intersections for ease and quickness of use
  • Indicate bidirectional travel and allow edits on either direction.
  • Check for continuous circular loop before final save
    * Support for "temporary route" which automatically expires after a period of time if not referenced by a schedule to prevent endless buildup of similar route names that cannot be re-used or relocated. Alternatively create a method of indexing to allow a large number of routes to be stored and reused.

Trolley not showing up on North Main loop sat 6/16

I was downtown and saw one trolley running and show up, and the second which I also saw physically did not show up in app. We also got feedback that it wasn’t running.

Not sure if this was user error or system

Monitor trolleys for route match

Match trolleys to route based on percentage of route stops seen. These may change at runtime, in which case the trolley color will be updated to the new matching route in the database.

Potential Time Zone issue.

I noticed inside of TrolleyTracker/Controllers/UTCToLocalTime.cs on line 14, the time zone is set as "Eastern Standard Time." I'm not sure if this has caused any issues in the project, but it would give incorrect results while we're in daylight savings time. However, you should be able to use "Eastern Time" to cover both standard and daylight savings. Either way, great work on the project!

Review route formatting

@MarkMcDaniels , great work on the route formatting! Please check the result on the Dev Server where I have 4 simulated routes to match what will be running this summer. http://yeahthattrolley.azurewebsites.net/ClientWeb

Also, I noticed that the route schedule appears immediately - previously it came up only upon request or if there was nothing running.

I also moved the HTML formatting out of the code and into the web page where it belongs. It should make future tuning much easier!

Security Notice from Github Bootstrap.Less

Wanted to post an issue since I didn't see one here. Via GitHub

Known moderate severity security vulnerability detected in Bootstrap.Less >= 3.0.0, < 3.4.1 defined in packages.config.

packages.config update suggested: Bootstrap.Less ~> 3.4.1.

Proper authorization for maintenance

The application used the Web Authorization - with a local DB. This is normally best for web sites where users sign themselves up for membership. I couldn't find how to set up a role that that could be used with the local DB so that edits could be assigned to a role.

Add Web client hosting

Host web client in a folder which could be converted to an FTP site to allow it to be maintained separately. Transfer existing functionality from the trolley-tracker-web repo.
Add support for trolley and route colors
Add support for highlighting active route when trolley is clicked
Add support to display arrival time when stop is clicked.

User Feedback/Bug Identification - Add Route Identification on Label

Remove the capacity labels, as currently they are not accurate (for multiple reasons), so we want to remove this when you tap the trolley. We should add the route name to the label when a user taps on the route.

When a trolley is off route, the trolley will be assigned a black route color. We should add a label for this off route/undefined value to "Detour Route" so the user understands it might not follow an expected pathway.

When you select the 'Schedule' link, currently all routes are showing as black, and should be showing the proper colors so that a user has understanding and can plan ahead.

Return IconColorRGB in /api/v1/Trolleys/Running

It would simplify some of the front-end logic if we return the IconColorRGB in the 'Running' endpoint. That way I don't have to download the entire list of trolleys and loop through them to find the color of the running trolleys!

Recommendations

I have a couple of recommendations for you.

  • Move to CodeFirst: it will be easier to sure everyone is on the same page with migrations, reduce developer startup and allow for seeding test data. This should be fairly easy.
  • Upgrade to Bootstrap 3
  • Upgrade to LESS or SASS
    • Setup a grunt/gulp task to compile to CSS
  • Use .Net Identity 2 for users and roles if you're not already
    • It would be a good idea to make sure that all the controller has the proper authorize/role detection on them. Only one page asked me to log in
  • Migrate the DB Visualizer to a view that either hides the menu or has a null layout

Trolley not tracking

I’ve got two user reports last night and tonight that the Trolleys aren’t tracking. They don’t se to be working for me either. New API issue? @bikeoid

Add schedule overrides by date

There are frequent route changes for special events. While the schedule can be edited up to 1 week in advance, the original schedule must be restored or updated for the following week's special schedule. This is error-prone.

Add the concept of 'schedule overrides' by date so that service can be cancelled, a specific route can be changed or added by event date without needing to change the fixed schedule which only rarely changes.

Retain compatibility with existing route schedule API clients by sending the resultant schedule for the upcoming 7 days. The order of days of the week might possibly change to begin with the current day.

Trolley color doesn't match any route

@bikeoid

It looks like one of the Trolley colors doesn't match any Route color.

The Trolley in question shows as green on the map, and has ID 1, Number 6, IconColorRGB cfdf01.

It appears to be running the "Top of Main" route, RouteColorRGB acb71d (which is also green, but a different green).

I don't remember if I ever sent you the colors I was using in the app initially, but I think I had changed the green a bit (from the Greenlink color) to make it stand out more on the map. Possibly one of the colors is the official color, and one is the altered value I used?

Trolleys off Route

I don’t think this is an API issue, but reporting just in case. Got an email from a user and checked and am also seeing the same behavior:

I have some feedback to provide about the TrolleyTracker app:

None of your trolley tracking is updating. It shows two trolleys way off the route in the middle of nothing, and the other has been in the same place for 3 hours.

Remove old log entries

Automatically purge old log entries when viewing logs to prevent growing logs forever

Add last-seen time to trolley

Record last beacon time for each trolley for debug purposes. Return only with the detailed trolley record, not in the "Active Running" API call.

Remove menu items that don't apply to current role

Not all menu items should be shown to all user roles - remove those items not applicable. For example a user not yet logged in or having a role for editing would not see any Edit or Delete options and only the System Admin should see the role manager.

Tasks to complete the MVP of Route Calculations

Tasks to complete the MVP of Route Calculations as discussed at the Meetup:
The goal is to create a basic MVP of giving a user the ability to have an estimation of how long it will be for a trolley to get to their selected stop on a given route. There are obviously more improvements which could be made, but this is the basic MVP implementation to give a user some insight into timing.

The completion of these tasks would allow the client apps to be provided the timing on a given route, and then they would be responsible for determining what the route is that the client needs the data for and when to make the request to the server to get this data. Again, going for the MVP here :)

Assumptions:
We are working under the assumption that in the near future we're going to have a defined route, given by the trolley operator upon start, which we will pull an ID for.

Tasks:
() Match the trolley route based on id and assigned to a color (that's already defined here
() Determine the location of the trolley and it's direction of travel
() Match the location of the trolley on the route path
() Determine the timing between stops for all stops in a single loop (partially completed in this file
() Return that list of stop id's with the route id and the calculated time of arrival to each stop on that route loop

Sort Routes by name

Add route name sort clause so that multiple route names at the same time will always be in a defined order.

GeoJSON for Trolley Stops

Mike,
We were talking about eventually having the option for the Trolley Tracker to utilize public map layers.

I wondered if it would be possible to publish a read-only GeoJSON version of the trolley stops and we could include it in the available map layers.

The near term vision is to put these map layers behind something like Cloudflare caching to make them super scalable. That should allow us to syndicate fresh data and avoid putting non-app load on origin servers.

Thoughts?

Excessive SQL queries for user authentication

There are an excessive number of SQL queries, even with in the same page. For example, to render the /Trolleys page generates 10 queries of the sequence

exec sp_executesql N'SELECT TOP (1)
[Extent1].[Id] AS [Id],
[Extent1].[Email] AS [Email],
[Extent1].[EmailConfirmed] AS [EmailConfirmed],
[Extent1].[PasswordHash] AS [PasswordHash],
[Extent1].[SecurityStamp] AS [SecurityStamp],
[Extent1].[PhoneNumber] AS [PhoneNumber],
[Extent1].[PhoneNumberConfirmed] AS [PhoneNumberConfirmed],
[Extent1].[TwoFactorEnabled] AS [TwoFactorEnabled],
[Extent1].[LockoutEndDateUtc] AS [LockoutEndDateUtc],
[Extent1].[LockoutEnabled] AS [LockoutEnabled],
[Extent1].[AccessFailedCount] AS [AccessFailedCount],
[Extent1].[UserName] AS [UserName]
FROM [dbo].[AspNetUsers] AS [Extent1]
WHERE [Extent1].[Id] = @p__linq__0',N'@p__linq__0 nvarchar(4000)',@p__linq__0=N'ccea5518-acc1-403d-8b4c-c9b4fafe49d2'

exec sp_executesql N'SELECT
[Extent1].[Id] AS [Id],
[Extent1].[UserId] AS [UserId],
[Extent1].[ClaimType] AS [ClaimType],
[Extent1].[ClaimValue] AS [ClaimValue]
FROM [dbo].[AspNetUserClaims] AS [Extent1]
WHERE [Extent1].[UserId] = @p__linq__0',N'@p__linq__0 nvarchar(4000)',@p__linq__0=N'ccea5518-acc1-403d-8b4c-c9b4fafe49d2'

exec sp_executesql N'SELECT
[Extent1].[LoginProvider] AS [LoginProvider],
[Extent1].[ProviderKey] AS [ProviderKey],
[Extent1].[UserId] AS [UserId]
FROM [dbo].[AspNetUserLogins] AS [Extent1]
WHERE [Extent1].[UserId] = @p__linq__0',N'@p__linq__0 nvarchar(4000)',@p__linq__0=N'ccea5518-acc1-403d-8b4c-c9b4fafe49d2'

exec sp_executesql N'SELECT
[Extent1].[UserId] AS [UserId],
[Extent1].[RoleId] AS [RoleId]
FROM [dbo].[AspNetUserRoles] AS [Extent1]
WHERE [Extent1].[UserId] = @p__linq__0',N'@p__linq__0 nvarchar(4000)',@p__linq__0=N'ccea5518-acc1-403d-8b4c-c9b4fafe49d2'

Change Entity Framework context usages to 'using' pattern

Change all database context usages to 'using' pattern to ensure that the connection can be closed by the framework in every case. Otherwise if the database connection pool fills and gets stuck, it is difficult to prove that there is a server problem since there can be several reasons for an Entity Framework query not to automatically close (exceptions, a break statement, etc)

Route variations and uploads

Add an option to create route variation based on the original route color.

Also add link for KML upload when creating a new route definition since that will be the next step 90% of the time.

Final server address?

Hodges and I are going to Greenlink tomorrow morning to update the apps to server info and such. Are we on the production server for the API? Mostly, I'm asking if we change the app info to the current server we're not going to have to go back to Greenlink again to change server info are we?

Route path travel time prediction

Design a system to collect the reported trolley location data in a way that it can be analyzed to predict travel times, and eventually arrival times at any particular user's stop.

KML Upload form on Chrome

For the KML file upload form, Chrome (and only Chrome) disregards the submit() behavior in certain cases.

WebAPI Default to JSON

Make WebAPI return JSON by default when viewed in a browser since this is supported by most tools. Will still support XML with explicit text/xml request

Add logging

Add logging, primarily to create an audit trail of who-modified-what-when. Secondarily, add exception handling and logging at key locations to improve diagnostics. Consider using the nlog framework.

Trolley Time to Stop Issue

@bikeoid Just wanted to give a heads up. On Sat we caught the trolley at Falls Park and it was only about .5mi away and the iOS app estimated time to stop said 25min, I knew that wouldn't be accurate so I timed it. Trolley 00 took 11min to arrive. Just wanted to give a heads up. I'm not sure if we are using this from the Greenlink system, or if this is our calculation, but I would say that at that far off it is more of a deterrent than a help, as if I didn't know it wasn't going to take that long I probably would have walked instead of waiting.

Thoughts?

Share the route total loop time on the map

A user came in tonight and shared an idea which I think would be a great addition. She is new to town and found the app and was trying to plan a trip using the app. Since there isn't a schedule she wondered how she would plan ahead. I mentioned that the trolley loop typically takes somewhere between 45-60min, but I realize that is not something you would know.

She mentioned it would be really helpful to give some idea of how long the full loop takes so that you can plan accordingly. I was thinking it might be good to time the full loop length and then put that on the route when you select it. I realize that each loop will be different, so maybe we average the last 3 loops, but generally, I think that could be a great thing to share, or at least just make a general hardcoded label the loops typically take around an hour. Thoughts @bikeoid @austin9350 @ajhodges ?

Add route colors

Add colors to route definition so they can match the official Greenlink map colors.

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.