Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IPC GUI todo #732

Closed
5 of 12 tasks
JustArchi opened this issue Jan 26, 2018 · 53 comments
Closed
5 of 12 tasks

IPC GUI todo #732

JustArchi opened this issue Jan 26, 2018 · 53 comments
Labels
✨ Enhancement Issues marked with this label indicate further enhancements to the program, such as new features. 🤝 Help welcome Issues marked with this label are open for help. If you could offer us a hand, please do! ⚪ No priority Issues marked with this label are not being actively worked on for time being. 🙏 Wishlist Issues marked with this label are wishlisted. We'd like to make them happen but they're not crucial.

Comments

@JustArchi
Copy link
Member

JustArchi commented Jan 26, 2018

I'm opening a single issue for this one, as most tasks won't be coded by me.

IPC GUI source code is available here. Feel free to make appropriate modifications and send a PR.

Best practice

  • IPC GUI should not use /Api/Command for anything that doesn't involve user sending such command.
  • IPC GUI should not do any parsing of output of /Api/Command - if there is some action that IPC GUI needs access to, it should be in appropriate (new) API endpoint.
  • IPC GUI must support ASF's IPCPassword through request headers. User needs to be asked about the password, since IPC GUI should not read/save any files directly, only call API endpoints.

Bugs

  • [Log] Review websocket connection for potential issues and provide more detailed error output to the user.
  • [Bots] Fix expanding box animation (wont show first time expanding it)
  • [Global] Fix loading animation 'overlay' (broke w/ font-awesome 5 upgrade)
  • [Global] Add updated font-awesome values from AdminLTE.css to app.css

Suggestions

  • [Log] Check out NLog and think about default ASF layout
  • [Global] Dark Theme
  • [Global] Add Localization
  • [Global] Optimize and clean code
  • [Global] Check for input/output sanitation
  • [Generator] Add page content
  • [Command] Add command description from wiki
  • [Command] Add "quick commands" feature
@JustArchi JustArchi added ✨ Enhancement Issues marked with this label indicate further enhancements to the program, such as new features. 🤝 Help welcome Issues marked with this label are open for help. If you could offer us a hand, please do! ⛔ On hold Issues marked with this label are blocked from being worked on, very often due to third-parties. 🙏 Wishlist Issues marked with this label are wishlisted. We'd like to make them happen but they're not crucial. labels Jan 26, 2018
@JourneyOver
Copy link

JourneyOver commented Jan 27, 2018

Mark 2 is still an issue but I guess it's because the bots thing is currently not fully implemented so it'll always show 0 / 0 / 0 on bots until it's fully implemented?

Mark 5 is fixed, no more errors in the chrome dev console window.

See you moved the log update function to the log.html, had me confused at first on why I couldn't find it in app.js file to change the url bit to how I have things laid out for ASF.

@JourneyOver
Copy link

JourneyOver commented Jan 27, 2018

mm still shows 0 / 0 / 0 for me, have tried with and without "CurrentCulture": null in my ASF.json file. Maybe it's due to the whole running only 1 account thing? unless I'm reading the whole bots thing completely wrong on what the green/orange/red stat things are for..

Screenshot

chrome_01-27-2018_08-11-16


Edit: realtime feature in Log doesn't seem to work either, have to either press the green button (even though it's already on) or refresh the page for the page to fetch the log and update it. tested with updated log and waiting a full minute without it doing anything.

@JustArchi
Copy link
Member Author

@MrBurrBurr You shouldn't use any ASF strings being used for display purposes - this includes e.g. parsing log.txt or commands output. It's not only because your GUI won't work in any ASF language other than english, but also because original english strings can change anytime as well, together with their structure. That's what API calls are for, and that's what my first 2 points are for.

Do you think it would be a good idea to add some kind of IPC Api where I can read the current state of bots? Or is there already a way for it I didnt see?

That's what /Api/Bot/{Bot} is for.

@JustArchi
Copy link
Member Author

JustArchi commented Jan 27, 2018

Version yes - there is no endpoint for that yet. I'll add it once I get some time. You can open a separate issue so I won't forget.

@JourneyOver
Copy link

JourneyOver commented Jan 27, 2018

@MrBurrBurr Still shows 0 / 0 / 0 for bot status, as for the log function it now looks to be working on it updating the log without intervention.

@JourneyOver
Copy link

like in the picture I put above, in the normal status page I see

Bot is not idling anything.
There are 1/1 bots running, with total of 0 games (0 cards) left to idle

which indicated that the status is being seen somewhat, but the green/orange/red status things on the "bots" tab just continue to show as the 0 / 0 / 0

@JourneyOver
Copy link

JourneyOver commented Jan 27, 2018

Yes I have values for KeepRunning, SteamID and TimeRemaining when I do the API call.

{"Message":"OK","Result":[{"BotName":"Main","CardsFarmer":{"CurrentGamesFarming":[],"GamesToFarm":[],"TimeRemaining":"00:00:00","Paused":false},"AccountFlags":540805,"SteamID":76561198037630370,"BotConfig":{"AcceptGifts":true,"AutoSteamSaleEvent":false,"CustomGamePlayedWhileFarming":null,"CustomGamePlayedWhileIdle":null,"DismissInventoryNotifications":true,"Enabled":true,"FarmingOrder":9,"FarmOffline":true,"GamesPlayedWhileIdle":[],"HandleOfflineMessages":false,"HoursUntilCardDrops":0,"IdleRefundableGames":true,"IsBotAccount":false,"LootableTypes":[1,3,5],"MatchableTypes":[5],"PasswordFormat":0,"Paused":false,"RedeemingPreferences":0,"SendOnFarmingFinished":false,"SendTradePeriod":0,"ShutdownOnFarmingFinished":false,"SteamTradeToken":null,"SteamUserPermissions":{"76561198037630370":3},"TradingPreferences":1,"UseLoginKeys":true,"SteamMasterClanID":0},"KeepRunning":true}],"Success":true}

Don't think there is anything bad in that to throw it on here..but if there is let me know so I can take it down..though I'll have to have @JustArchi delete the #github-updates notification on discord that corresponds with this message..

@JustArchi
Copy link
Member Author

There is no sensitive info in any API call, if by sensitive we understand passwords or other login details.

@JourneyOver
Copy link

There is no sensitive info in any API call, if by sensitive we understand passwords or other login details.

Good to know! ^^ kinda figured that was the case as I didn't see any login details in the api call anyways

@JustArchi
Copy link
Member Author

/Api/Bot/ASF already exists.

@JourneyOver
Copy link

JourneyOver commented Jan 27, 2018

@JustArchi you can remove

If running with only 1 account, the bots dropdown is completely blank.
Along with 1, if running only 1 account the bot status buttons end up just showing 0 / 0 / 0 and the bots page is blank other than the content-header bit.
Dashboard is blank except for content-header (dunno if this is supposed to be blank or not exactly?)
both Config Generator and Config Manager are blank pages except for content-header (dunno if these are currently supposed to be blank or not exactly?).
below screenshot is being thrown on every single page in chrome console constantly other than the logs page.
Screenshot
Layout Options do not seem to stay at all when moving between pages.

for the most part as everything has been squashed in #733 for all that other than the layout options bug. You can replace it with

  • Config Generator / Config Changer (change current values of ASF.json or Bots.json)
  • Bots Overview (manage bots via buttons example: https://i.imgur.com/SZWs48P.png)
  • Stats Overview on dashboard (memory usage for example, process name etc)
  • Wiki in sidebar (searchable)
  • News from ASF (example: latest updates) in sidebar
  • GUI improvements as task progress in sidebar
  • Add ToDo List (this list for example) on dashboard
  • Add IPC GUI Password protection? Like a login?
  • Fix Layout options not being saved or loaded
  • Make Start/Stop one button on bots overview page
  • Make Pause/(Unpause (Not added yet)) one button on bots overview page
  • Fix realtime logging buttons
  • Add "ASF Uptime" to dashboard (Waiting on addition into API)
  • Make bot page button popups more beautiful

if you want, as they are things that should/will be added over time.

@JustArchi
Copy link
Member Author

What stats?

@JustArchi
Copy link
Member Author

That's not Bot info, that requires another API endpoint.

JustArchi added a commit that referenced this issue Jan 28, 2018
@JustArchi
Copy link
Member Author

IPC GUI should not do any parsing of output of /Api/Command

@JustArchi
Copy link
Member Author

No, you should use /Api/Bot/ASF.

@JustArchi
Copy link
Member Author

JustArchi commented Jan 29, 2018

Everything that !status gives is already available through various pieces of /Api/Bot/ASF - redundancy is unwanted, not needed and would degrade API quality. Instead, analyze more deeply what data you have, and make use of it.

@JustArchi
Copy link
Member Author

You're designing the web UI and what exactly it provides. You don't have to use all data that API provides, you can cherry-pick the information you're interested in. Personally I see no reason for doing that - I'd instead add basic overview of active bots in the panel, like now, and provide more info (e.g. about currently farmed game/games, and remaining ones, even with fancy banners or anything) when user asks about that, e.g. on-hover as a popup, or some detailed bot info.

In any case, that's your choice.

@JourneyOver
Copy link

like the little tweaks you did to our todo list @MrBurrBurr :p btw you know you can checkmark them on there, instead of deleting them when they are done lol xD

@JustArchi JustArchi assigned JustArchi and unassigned JustArchi Jan 31, 2018
@Luckz
Copy link
Contributor

Luckz commented Feb 5, 2018

For main account usage, a one-click 2faok button would be desirable. I'll probably add a separate !r input box of some form for myself, maybe as a multi-line textarea.

As an option, people might not want the #commandReply and cmdInput automagically cleared before/after commands. For personal usage I made both persist => Luckz@e990424 (one could even go as far as persist output in localStorage)

Nice-to-have would be a command history accessible via keyboard up & down arrows (like this) - this one definitely is a candidate to keep the last 25 commands or so in localStorage.

@Luckz
Copy link
Contributor

Luckz commented Feb 6, 2018

@MrBurrBurr
I mean having user-set per-bot "quick commands". Some people mainly use ASF to control single bots with one/two/three repetitive commands like key redemption and market confirmation, others have vastly different use cases and desires.
Actually, I think most powerful would be configurable buttons/textboxes stored in localStorage or some additional config file. Config file has the advantage of being "portable" for all that access it, localStorage has the advantage that multiple IPC UI users (shared ASF) can have different settings.
I suppose a "real" (beyond people you trust 101%) multi-user setup would require per-ID64 (SteamOwnerID & SteamUserPermissions) IPCPassword in ASF. Don't know if that last one is the best feature to add.

image

Btw even if one doesn't show more than one reply at a time by wiping the #commandReply between responses, maybe it should still be scrollable (css: overflow-y: auto;?) for users with more bots than lines or who want to redeem more keys than they have available lines.

@MrBurrBurr MrBurrBurr mentioned this issue Feb 19, 2018
2 tasks
@Nuklon
Copy link

Nuklon commented Feb 19, 2018

Just gonna list some features I'm missing still in the UI or don't find very useful as-is @MrBurrBurr . Hope you don't mind 👍

  • The command generator doesn't auto append a space at the end so I have to manually type in a space to do a command.
  • The command generator doesn't remember the last used bot (and command). I rarely execute actions on my other bots and it's a rather tedious task now.
  • I'm missing quick commands, such as a 2fa token (which should ideally be copied to clipboard automatically) and redeem (see ASFui, which also uses multiline input, which can be useful for this UI too I think).
  • I think Config at the left side should be renamed to Bot config, I initially thought this was ASF config (which still seems to be missing).

@JustArchi
Copy link
Member Author

@MrBurrBurr Time remaining doesn't work when TimeSpan exceeds 1 day. It's then encoded as e.g. "TimeRemaining":"16.21:00:00" (for 16 days and 21 hours). You might want to correct it. The default format is [-][d.]hh:mm:ss[.fffffff] - https://msdn.microsoft.com/en-US/library/1ecy8h51(v=vs.110).aspx

@Yur0K
Copy link

Yur0K commented Mar 15, 2018

@MrBurrBurr For the first suggestion is yes, you are right. As for the second: I ment that user needs to press arrowUp key 15 times, for example, to repeat a command he used 14 commands back. So the list of 10-20 last commands in form of clickable links or buttons would be easier.
And one more thing: what about saving last used command and bot in drop-down menus? For example, I want to use redeem command for different bots. Each time I need to click and choose redeem, choose a bot and paste a key. I will provide screenshots later to show exactly what I suggested)

@Yur0K
Copy link

Yur0K commented Mar 17, 2018

First two screenshots is about saving last used command and bot in drop-down menus. So after sending addlicense command for example to all bots (screenshot 1), you paste another apdID and send it without choosing command and that bot again (screenshot 2).
asf gui 1 step
asf gui 2 step
This one is about list of recent commands. Command (link) on the left and an argument (key, appID, etc.). When user clicks the link command goes to commands dropdown, bot to bots dropdown and the input field is empty.
asf gui commands

@MrMarble
Copy link

MrMarble commented Mar 17, 2018

I'm having this error when trying to display the logs, currently i'm 3.1.1.1 docker x64 but it also appears in windows version
**EDIT: I've updated to version 3.1.1.7 and still same error

image

@JourneyOver
Copy link

@MrMarble do you use an adblocker of any sorts?

@MrMarble
Copy link

@JourneyOver Yes, I'm using uBlock Origin, but I already tried to disable it and still the same error

@JourneyOver
Copy link

firewall, router, anything else that could be blocking it? I know someone else was having this issue as well on discord with the log throwing an error for them, dunno if they fixed it or not though :x

@MrMarble
Copy link

MrMarble commented Mar 17, 2018 via email

@JourneyOver
Copy link

Then I'm not sure, sorry :/ since it works fine on my end on both windows and a raspberry pi then I am unable to help troubleshoot much further since I can't produce it.

@Luckz
Copy link
Contributor

Luckz commented Mar 18, 2018

WebSocket stuff (ASF Log) isn't supported on Win 7 clients. I assume it's that, @MrMarble

@JourneyOver
Copy link

oh yes, I totally forget that is a thing xD guess I could of helped him troubleshoot with just one more question.

@MrMarble
Copy link

@Luckz My main pc is Windows 10 and currently I have it running in my server with Debian 8 and my laptop is Ubuntu 17, I'm using Firefox if it helps

@MrMarble
Copy link

@MrBurrBurr Yes, this is the response I got:
HTTP/1.1 200 OK Server: Microsoft-NetCore/2.0 Date: Mon, 19 Mar 2018 08:24:01 GMT Transfer-Encoding: chunked

@mxalbert1996
Copy link

Is there any settings needed to enable IPC GUI command execution? I got a 405 - Method Not Allowed with any commands submitted in the web GUI. And I don't quite understand the explanation for it in the wiki.

@JourneyOver
Copy link

JourneyOver commented Mar 20, 2018

@mxalbert1996 You can wait until #759 gets merged and ASF updates to include the changes, or if you want for now until then you can go in to the app.js file in the www/js folder, and change line 201 from

type: 'GET',

to

type: 'POST',

if you update ASF before the pull request gets merged in, you'll of course have to go in and change that line again any time you update until the pull request gets merged.

@JustArchi
Copy link
Member Author

JustArchi commented Mar 20, 2018

@MrBurrBurr

  • Strings that aren't supposed to be translated shouldn't be included in strings.json file, such as global-github.

  • You should never compose final string out of various string parts, since it gives imprecise and very often incorrect translation. For example I see stuff like global-changer and it makes no sense in Polish language to include that word alone. Even if that word is indeed used alone, it should be configuration changer or likewise, never changer alone because configuration changer and bots changer can have entirely different translations. Even in ASF I try to avoid concatenation as much as possible.

  • Remember to update that file not only for new strings but also in terms of strings you no longer use (such as removing global-github once it's no longer needed).

  • As you already know, never change files other than strings.json since they're updated automatically. I added proper disclaimer in the structure for that.

@oubeichen
Copy link

oubeichen commented Mar 27, 2018

@JourneyOver I am currently using windows 7 and got the same error while it works flawlessly on my laptop running OS X.
I checked the chrome console and found there was a 403 Forbidden.
wx20180327-112619 2x

Please check, thank you.

@JourneyOver
Copy link

JourneyOver commented Mar 27, 2018

@oubeichen WebSocket stuff (ASF Log) isn't supported on Win 7, you'll either have to upgrade to windows 8/8.1/10 or live without seeing the log in the IPC GUI on machines that are using windows 7 and below.

@oubeichen
Copy link

@JourneyOver No, the ASF server is running on my VPS, using CentOS 7 with Docker.

@JourneyOver
Copy link

JourneyOver commented Mar 27, 2018

@oubeichen yet above you said

I am currently using windows 7

so make up your mind on what you are running.

Either way it doesn't really matter what OS you are running the server on, it all depends on what OS you are using to access the IPC GUI on, which is why it works when you view the log on OS X but not on windows 7

@MrMarble
Copy link

Currently I'm using ASF version 3.1.1.8 in a docker container running in Debian 8.
In my client pc I have Ubuntu 17 running latest version of Firefox without adblocker and still can't access log page:

Error!
Event code: 1006

@JustArchi
Copy link
Member Author

But this is not IPC GUI support page, this is IPC GUI development. You already reported your bug, it's pointless to spam about it.

@MrMarble
Copy link

@JustArchi Oh sorry, it was only because I didn't saw it in the current bug list so I was reporting is still failing in the new version.

Sorry for the spam

@JustArchi JustArchi added ⚪ No priority Issues marked with this label are not being actively worked on for time being. and removed ⛔ On hold Issues marked with this label are blocked from being worked on, very often due to third-parties. labels Mar 27, 2018
@JustArchi
Copy link
Member Author

JustArchi commented Mar 27, 2018

@MrBurrBurr Can you open new issue on ASF GitHub as lead IPC GUI developer, so you could keep track of IPC GUI todo list and edit it accordingly without a need of my help? I can edit the issue if needed anyway. Thanks.

@JustArchi
Copy link
Member Author

Thanks! From now on please use #773 issue instead for IPC GUI development.

fadillzzz pushed a commit to fadillzzz/ArchiSteamFarm that referenced this issue Apr 11, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Jun 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
✨ Enhancement Issues marked with this label indicate further enhancements to the program, such as new features. 🤝 Help welcome Issues marked with this label are open for help. If you could offer us a hand, please do! ⚪ No priority Issues marked with this label are not being actively worked on for time being. 🙏 Wishlist Issues marked with this label are wishlisted. We'd like to make them happen but they're not crucial.
Projects
None yet
Development

No branches or pull requests

8 participants