Git Product home page Git Product logo

galaxyharvester's People

Contributors

azure-pipelines[bot] avatar cbortz avatar mrkraken avatar pwillworth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

galaxyharvester's Issues

Resource alerts settings ("My Alerts") load in an unreadable state

Expected behavior

Viewing resource alerts settings displays each setting's configuration (option, type, stat % weights)

Actual Behavior

Viewing resource alerts displays each setting, but then:

  • unsets the resource type
  • blacks out the stat % values

Note: After clicking the correct resource option, the correct type is populated and the stat % become visible again.

giphy

Steps to reproduce

  1. Sign in and navigate to My Alerts
  2. Set some alerts for Group resources (e.g. mineral)
  3. Save/update your settings
  4. Reload the page

Note: Sometimes (rarely) the buggy behavior doesn't happen.

OS/Browser Context

  • OS: Windows 10
  • Browser: Firefox (latest) & Chrome (latest)

postResource.py Proposed Wiki Change

Good morning, sorry to send out another post but I ran into another documentation issue with the postResource.py wiki yesterday that I think could be beneficial to modify.

Currently the documentation states:

galaxy: Galaxy Harvester user name
planet: Galaxy Harvester user password

This is incorrect.

Proposed modifications:

gh_sid: Session token value provided by authentication utilizing authUser.py.

galaxy: This is the numeric galaxy ID for the target server. This can be found by clicking on a specific resource located on the target server example: http://www.galaxyharvester.net/resource.py/ 14 /kaipi.

planet: The planet the resource inhabits. A list of valid entries can be found in the planet.csv seed data here.

resID: Numeric resource spawn ID. This is not required but can be utilized instead of resName.

resName: Resource spawn name. This is not required but can be utilized instead of resID.

resType: Name of resource type. Example: "aluminum_agrinium". If your data is coming from the core3 .lua file, the type header is a valid entry. Valid entries can be located in seed data here.

forceOp: Can be set to (edit or verify) to indicate post is to edit or verify an existing resource. for adds, you can just pass "add" via this field.

I think that adding either this or something like this would make it much easier for people to get up and running utilizing the postResource service. I think it might also be beneficial some guidelines about appropriate post rates so that people don't flood the application.

Thanks for taking the time to consider!

Force HTTPS?

I know not necessarily repo related, depending on host.

Site does not strict to HTTPS

authUser wiki update

The authUser wiki entry does not appear to be accurate based on the source code, at least that has been my experience when trying to auth via a custom app.

Current wording reads:

Request Parameters

loginp: Galaxy Harvester user name
passp: Galaxy Harvester user password

Proposed Change:

Request Parameters

loginu: Galaxy Harvester user name
passu: Galaxy Harvester user password

This changed is based on: https://github.com/pwillworth/galaxyharvester/blob/master/html/authUser.py

Lines 54 & 55:

loginp = form.getfirst('loginu')
passp = form.getfirst('passu')

When I send post requests with loginp and passp I get a no turn, when I utilize loginu and passu I get a successful request.

Schematic ingredient tracking could be more helpful

Problem

When viewing a schematic, I want to see if a required ingredient is currently spawned and/or if I already have the ingredient in my inventory. However, when the stats don't matter, the UI doesn't tell me this information. Instead, it just tells me that the stats do no matter. For example:

before

Proposal

When the stats don't matter, display the current spawns and my inventory (if logged in) with a note that the stat doesn't matter. This allows me to quickly determine if: I already have the required ingredients, can gather a current spawn, or need to wait for a spawn. Without this change, I would have to remember the ingredient type and manually look through my inventory to see if I have it.

after


Opening a PR for feedback.

Resource alerts settings ("My Alerts") will not save changes while logged in.

Summary

Expected behavior

Update MyAlerts list, click save, list is saved.

Actual Behavior

Receive error alert, and MyAlert changes are not saved. (Error: must be logged in to update alerts)

bug

Steps to reproduce

Sign in and navigate to [My Alerts](https://galaxyharvester.net/myAlerts.py?)
Set some alerts for Group resources (e.g. mineral)
Save/update your settings
Reload the page

OS/Browser Context

OS: Windows 10
Browser: Firefox (latest) & Chrome (latest)

Visual: Resource Type container does not expand with result set

Issues

  1. With fewer results, the #resourceTypeInfo container is much taller than the result set

    tall
    (see: Corellian Wooly Hide)

  2. With more results, the #resourceTypeInfo container doesn't expand with the result set

    overflow
    (see: Wooly Hide)


Solution

Don't set an explicit height on the #resourceTypeInfo. Currently, there is a height of 1600px being set on the item, inline:

<div id="resourceTypeInfo" class="ghWidgetBox" style="height:1600px;">
  <!-- ... -->
</div>

The fix should be as simple as removing the inline style:

<div id="resourceTypeInfo" class="ghWidgetBox">
  <!-- ... -->
</div>

Resource dropdown is empty when adding a new filter row

Steps to Reproduce

  1. Visit "My Alerts"
  2. Click the "+" icon to add a new filter

Expected Behavior

  • a new blank row is populated with "Type" radio selected
  • the Resource dropdown is pre-populated with options

Actual Behavior

  • ☑️ a new blank row is populated with "Type" radio selected
  • ❌ the Resource dropdown is empty

behavior

Additional Context

It looks like this regression was introduced with #20. While the call to setTGlist was decoupled from addFilterRow, no row number is being passed to setTGlist when adding a new row, thus skipping pre-populating the dropdown with data (e.g. "#oTypeundefined" doesn't exist).


Opening a PR to address this.

Dev: Lots of repeated code

While working on the creature harvesting feature (thanks for merging it by the way!), I noticed there's a lot of repeated code around the app. I've created this issue as a place to open a discussion about possibly cleaning some of this up.

Take for instance in 73b610d, the following line is repeated 7 times:

$("#typeSel").load(BASE_SCRIPT_URL + "getResourceTypeList.py", {galaxy:$("#galaxySel").val()});

@pwillworth What are your thoughts here? Do you think some time should be spent refactoring some of the existing code to not be so repetitive? If so, do you have any preference or methodology for doing so?

`getComponentList.py` include all existing components

Summary

There isn't a galaxy check nor an Overrides check on components similar to what is done in getSchematicList.py. Therefore all existing component schematics are returned.

Steps to reproduce

You will need two different galaxies. We'll call them Galaxy A and Galaxy B

  1. Create a custom armor component in Galaxy A
  2. Edit a schematic in Galaxy B, selecting the Armor tab

Expected Behavior

Only the stock component schematics and any custom armor component schematics for Galaxy B appear.

Actual Behavior

The stock component schematics and custom component schematics for Galaxy A appears.

I suspect (but haven't tested yet) that all non-NGE and NGE stock schematics are included if they exist (i.e. where galaxy = -1)

Notes

The galaxy is already included in the request, but it isn't used. As mentioned in the summary, the getSchematicList.py accounts for galaxy and galaxy-specific overrides using this snippet:

if galaxy.isdigit():
	baseProfs = '0, 1337'
	checkCursor = conn.cursor()
	if (checkCursor):
		checkCursor.execute('SELECT galaxyNGE FROM tGalaxy WHERE galaxyID={0};'.format(str(galaxy)))
		checkRow = checkCursor.fetchone()
		if (checkRow != None) and (checkRow[0] > 0):
			baseProfs = '-1, 1337'
		checkCursor.close()
	filterStr = filterStr + ' AND tSchematic.galaxy IN ({1}, {0}) AND tSchematic.schematicID NOT IN (SELECT schematicID FROM tSchematicOverrides WHERE galaxyID={0})'.format(galaxy, baseProfs)

I think we can copy this over to getComponentList.py, making sure to establish the conn and galaxy beforehand, and it will produce the expected results.

Opening a PR for review & discussion.

Can't setup development environment

Hey @pwillworth love the project, and thank you for open sourcing it!

I can't seem to get this thing set up and running locally. Here's my setup:

  • Python 2.7
  • Mac OSX 10.12 (I have a Windows machine if necessary)
  • MySQL 5.7.18
  • Apache 2.4 (w/ mod_python)

My primary issue is that jinja2 can't find the templates, and I keep getting TemplateNotFound errors. Then, when I comment everything out and just do a simple print statement, I get a 404. What gives?

Can you post up a sample Apache configuration to get this thing running?

Alternative link breaking intermittently on alert mails

Was messaged by someone on discord as they didn't know where to go to report bugs, had a scan through some of my alert mails to double check. the href for the image remains unbroken

Every now and then, the link will break on the alternative
image

image

image

Test server email verification links direct to main site

Minor issue, but when I registered on the test environment (really awesome that you put this together by the way), I received an email that directed me to the main galaxyharvester.net domain. Of course, I copied the link and prepended the test subdomain and everything worked fine, but just a heads up!

Jumbled layout in more detailed Resource List Layout

It seems that recently the resource boxes that display in the long format with the extra info like on the resource list page have thier components jumbled now.
How they look now:
jumble
How they should look:
correct

components should not overlap and should spread out to fill the width of the container

Creature food and Creature structural old spawns not removed with new droid report

When submitting a new Flora droid report, only the "flora food" and "flora structural" old spawns are treated correctly (removed).
For Creature food and creature structural the old spawn is not removed and we must parse manually the list to remove it.
We should always have as a result 13 creature food type , 7 creature structural type for each planet.

Add exact Python/Stack versions to README

@pwillworth I am planning to make a couple PRs here in the near future, but I know last time there was an issue with the version of Python I was using.

You'll see that in 0f9187a, I had to make a change in the syntax for Python 2.7 to process the line properly. Subsequently in c100db8, you reverted those changes (assuming they broke something locally for you and/or on the production environment). I'm not 💯 sure, but I think this may be the result of conflicting versions of Python (or another part of the stack).

Can you update the README to include the exact version of Python and all other required items in the tech stack?

  • Python
  • MySQL
  • python-MySQLdb
  • jinja2

`getComponentList.py` excludes manually-entered components

Manually-entered component schematics are not included in this list, and therefore not available as components in other schematics. For example:

  1. Create a new schematic for an Armor Component, choosing manual entry
    • set Crafting Tab to Armor
    • set Object Type to Armor Schematic
  2. Create a new armor schematic
  3. Edit the armor schematic
  4. Choose "Component" from the Ingredient Selector
  5. Choose "Armor" from the filter

You won't see the Armor Component from step 1.

This also applies to any components copied from manually-entered component schematics.


Diving in a bit, it looks like there's two conditions for a component schematic to be included in the list:

  • its tSchematic.craftingTab matches the filtered crafting tab (required)
  • either:
    • tSchematic.objectGroup contains "component" in the path, or
    • tSchematic.objectType is equal to 262144 (one of the generic "Component" types)

The problem here is that manually-entered schematics do not set an objectGroup. The code sets it to an empty string. Therefore it can never match %component%. A possible workaround is to select the "correct" objectType (there are 4 or 5 of them).

As for solutions, I think we could:

  1. join on tObjectType and add an OR condition where tObjectType.typeName LIKE "%component%"
  2. extend the condition for tSchematic.objectType to use an IN syntax with a list of object type IDs

Personally, I'm inclined to start with option 1, as its fairly obvious (e.g. any object type with the word "component" in it) and gives us backward-and-forward-compatibility. I'm going to open a PR with this proposed change, but open to other proposals!

Planet name missing from hover text on planet bar when available

Looks like the planet name is included in the hover text message when you hover over a planet that is not available, but is missing when the planet is marked available.
planethover
The hover message in this picture should instead say "Lok marked available by TarkinSWG"

Verify on individual resource page

Add planet selection to resource.py for when on an individual resource page
Verify click throws error. No way to verify on page without going back to list page or add for planet.

Possibly make a site-wide "what planet are you on" dropdown that retains through single sessions?

`schematics.py` function `getComponentLink/3` should account for current galaxy

Custom components can show up in the ingredient group of other galaxies. For example, viewing the Schematic: Enhanced E11 Carbine shows:

image

Notice these two components:

When this screenshot was taken, I was using Galaxy ID: 64.

I think this script needs to filter the results based on the current galaxy, similar to what was done in #68


I'll open a PR for this shortly.

Visual: Horizontal page overflow

GH has an issue with a slight horizontal overflow. Also, the top-right navigation doesn't align with elements on the page.

css-bugs


This is the case for the latest versions of Firefox and Chrome on OSX 10.12.

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.