Closed dominikriemer closed 1 year ago
Hey, @bossenti I'm interested in contributing to this issue. How can I get started with it?
great to hear! First of all you need to setup StreamPipes locally in that way that you can develop the UI. Have a look at this documentation.
The gif below demonstrates the described issue:
Empty names for API tokens should be avoided, therefore we need a validator here. The corresponding Angular component can be found here.
Hopefully, this provides you with enough information to start. Otherwise, just let me know.
Hey @bossenti I'm following the documentation to setup streampipes locally and I'm unable to configure streampipes for ui development.
I have followed all the mentioned steps.
On running
./streampipes env --set ui
I get
[INFO] Set environment to 'ui'
cp: target 'source/streampipes/installer/cli/.spenv' is not a directory
When starting streampipes backend
./streampipes up -d
I get
[ERROR] Environment missing. See 'streampipes env --help'
Hi @aamirxshaikh, which OS are using?
There shouldn't be a cp
error when setting the environment - the env --set
command should only create a new file called .spenv
which includes all services defined for the environment.
Hey @dominikriemer I'm using windows 11 (bash shell),
I think the CLI is a unix bash script and doesn't work with the Windows bash. Under Windows 11, you can use e.g. Git bash or WSL to run the CLI.
By bash shell I meant Git bash. So, I'll try running with WSL.
Ok, Git bash should also work without problems. If WSL doesn't work, we can further investigate why the script doesn't work in your environment!
Hey @dominikriemer Unfortunately with GitBash, I'm facing the same issue as previously I have mentioned. Coming to WSL, It takes forever to open the project. The terminal is just blank and does not not load up.
Can you suggest anything else? Thanks.
Hm thats really strange, both have always worked on my Windows 10 machine 🤔 Are you able to run usual terminal commands in both of them?
Hm thats really strange, both have always worked on my Windows 10 machine 🤔
Are you able to run usual terminal commands in both of them?
Yes, I can run usual terminal commands
Okay, then I think the easiest way is to follow this workaround:
.spenv
installer/cli/environments/
and copy the content of the file ui
into .spenv
This finally does the same as the script that is not working on your machine. Let me know if that works for you.
Hey, @bossenti Thanks for providing the guide. It seems that the issue was because of the whitespace in my parent directory. I'm now able to run it locally. I'm currently going through API docs.
Regarding email and password, where can I register the account?
👍 The default user is the following:
You can change that once you are logged in if you want or create additional users.
Hello @bossenti, I am trying to implement the validation for the input field as mentioned in the issue. I have tried it, but I'm having trouble getting it to work. I'm new to learning Angular. I've read the documentation and tried various approaches, but I'm still stuck. Can you please point me to any relevant resources or similar code in the codebase that I can refer to for guidance? Also, could you provide some more information about the validation conditions? For example, are there specific validation rules that need to be followed or specific error messages that should be displayed? I want to make sure I'm meeting all the requirements. I'd really appreciate it. Thank you in advance for your help!
thanks for catching up on this @aamirxshaikh.
Fom my perspective the token name should be longer than three characters and only consist of alphanumeric symbols including -
and _
.
@dominikriemer @tenthe can you provide Aamir with a sample of our codebase where we use a validator?
Hi @aamirxshaikh, I couldn't find a validator in the code, but here is a tutorial on typed reactive forms [1]. It also includes a regex validator. Since you are new to Anular, I would recommend trying the tutorial first. It is quite short and provides a good introduction.
[1] https://www.syncfusion.com/blogs/post/strictly-typed-reactive-forms-in-angular.aspx
Thanks @tenthe, I'll check it out.
Currently, StreamPipes allows to have an empty string as name when generating an API token in the UI. We should add a validator here.
Imported from Jira STREAMPIPES-645. Original Jira may contain additional context. Reported by: bossenti.
Mentoring
As this ticket is marked as
good first issue
: @bossenti is happy to provide help for getting started