[Backend] API Testing for admin login #81

Issue that this pull request solves
Closes: # (issue number)
Proposed changes
Brief description of what is fixed or changed
Types of changes
Put an x in the boxes that apply

[ ] Bugfix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Documentation update (Documentation content changed)
[ ] Other (please describe):

Checklist
Put an x in the boxes that apply

[ ] My code follows the style guidelines of this project
[ ] I have performed a self-review of my own code
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[ ] My changes generate no new warnings
[ ] My changes does not break the current system and it passes all the current test cases.

Screenshots
Please attach the screenshots of the changes made in case of change in user interface
Other information
Any other information that is important to this pull request

@jackfrost13 please check

@jackfrost13 please check

Will complete all the pending PR's over the weekend. inconvenience regretted!

Will complete all the pending PR's over the weekend. inconvenience regretted!

you may refer to this for a getting some ideas

you may refer to this for a getting some ideas

I cannot see any further commits!

I cannot see any further commits!

i have made into main branch

i have made into main branch

i have made into main branch. #81

You need to add commits to a PR

i have made into main branch. #81

You need to add commits to a PR


Prepare v8.3.1

Purpose of PR?:
prepare v8.3.1

shouldnt this go to stable?

yes, changed

@joernu76 that needs a new approve

@joernu76 that needs a new approve

Yip, but I didn't want to approve before that was clarified. Me being back in CEST next week will help things.


How to disable md-tabs

I've been looking forward how to disable a few <md-tab>'s from my <md-tabs> section with no luck. If I add a disabled attribute as the Angular Material API suggests, the attribute itself seems gone in the element inspector (both Safari and Chrome.) and if I add it manually (within the inspector.), the tab will be properly styled as disabled but still function as it normally would (so, not effectively disabled.).
May anyone guide me in the right direction? Here's a code example of what is not working:

    <md-content>
        <md-tabs md-dynamic-height md-border-bottom md-center-tabs>
            <md-tab label="transportadora">

                <md-tabs md-dynamic-height md-border-bottom md-center-tabs>
                    <md-tab label="Dados Gerais" disabled>

                        <md-content class="md-padding md-padding-top-x2">
                            <form name="empresaForm">

                                    <md-input-container flex>
                                        Razão Social
                                        <input ng-model="empresa.razaoSocial">
                                    </md-input-container>
                                    <md-input-container>
                                        CNPJ
                                        <input ng-model="empresa.doc1">
                                    </md-input-container>

                                    <md-input-container flex>
                                        Nome Fantasia
                                        <input ng-model="empresa.nomeFantasia">
                                    </md-input-container>

                                ...

And this is the browser output of the <md-tab> element:
<md-tab-item tabindex="-1" class="md-tab ng-scope ng-isolate-scope md-active" style="max-width: 957px;" ng-repeat="tab in $mdTabsCtrl.tabs" role="tab" aria-controls="tab-content-5" aria-selected="true" aria-disabled="false" ng-click="$mdTabsCtrl.select(tab.getIndex())" ng-class="{                      'md-active':    tab.isActive(),                      'md-focused':   tab.hasFocus(),                      'md-disabled':  tab.scope.disabled                  }" ng-disabled="tab.scope.disabled" md-swipe-left="$mdTabsCtrl.nextPage()" md-swipe-right="$mdTabsCtrl.previousPage()" md-template="::tab.label" md-scope="::tab.parent">Dados Gerais
<div class="md-ripple md-ripple-placed md-ripple-scaled md-ripple-visible" data-counter="2" style="background-color: rgb(0, 151, 167); border-color: rgb(0, 151, 167); width:<PHONE_NUMBER>7808954px; height:<PHONE_NUMBER>7808954px; margin-top: -84.00608608904477px; margin-left: -84.00608608904477px; left: 50%; top: 50%;">

</md-tab-item>

In this case I actually have two <md-tabs> nested (so a top navigation tab and a context navigation tab.) and what I really needed was to hide all tabs but the main (the one which would be selected by default.) from the second tab level (the context one.) when I'm not editing the form. Or just hide the second nested tab altogether unless I'm updating the model.
Is there any way of doing this within the starter pack? If not, are there any suggestions to achieve the desired behavior?

Hi @nmindz
Thanks for opening an issue here!
Keep in mind that this issue is solely related to Angular Material and this starter package won't change the original behavior - but I'd love to answer your Angular Material questions as well so feel free to ask more :D
I just had a look at Angular Material's demo and you can do this by using the following attribute:
ng-disabled="'true'" instead of disabled
Make sure to copy paste it correctly: double quote single quote true single quote double quote
You can also pass in a model value here so it would be:
ng-disabled="controller.hasInfo"
Let me know if this works for you
Cheers!

Hi, @jadjoubran !
Yes I knew that it was solely related to Angular Material but since a few "recipes" have been added to the starter pack (and as I've seen, there are a few features that ng-material is still missing such as an <md-table> native directive.) I wondered if there was such a functionality or if it had been implemented in this starter pack.
As you've read before I tried the usual method and even looked for a API reference but it is either outdated or I did not find the correct reference. I'll surely try the ng-disabled attribute and let you know. I'm still learning Angular (this is my first project with it... hehehe.).
Thanks a lot bud.
Cheers! :+1:

Works like a charm. The ng-disabled attribute is just what I needed. :)

Glad to hear that!
Feel free to continue contributing by asking more questions
Cheers


Save Local Unpublished-status entry/page crush down app

relate to #142
Steps:

Create an unpublished entry.
Save the entry to Local.
View Unsent Entries.

Expected: Open Unsent Entries screen.
Observed: Crush down app.

修正しました

verified fix!


Dot in comments triggers autocomplete.

Describe the bug
When writing comments, each . press triggers an autocomplete, which is very annoying.
crystalline is enabled, in case it matters.
To Reproduce
Steps to reproduce the behavior:

Create a comment.
Press .

Expected behavior
Autocomplete should be ignored in comments.

Desktop:

OS: macOS
Crystal version: 1.9.2
This plugin version: 0.8.4
crystalline:  0.10.0

Yes, seems like crystalline issue.

This is now happening without Crystalline.


⚠ Bofrost.be has degraded performance

In ec15d48, Bofrost.be (https://www.bofrost.be) experienced degraded performance:

HTTP code: 200
Response time: 821 ms

Resolved: Bofrost.be performance has improved in 4ebc3c8 after 13 minutes.


Window issue crushing the buttons

The screenshot or whichever one of those buttons you enable first covers the minimize button meaning that that button doesn't work and the minimize feature works before that button.

Hmm, interesting. As a workaround, you can for now disable the "Custom window chrome" in "RuneLite" settings.

What does that change out of interest?

Will that not remove the custom RuneLite bar and replace it with the standard window JFrame?

No, it will just change the border to your system one and move the custom buttons to sidebar

No idea :/

Is this still issue?


Fluigi JSON import scaling incorrect

This is what the chip looks like in Inkscape, but when I drag it into fluigi, this is what happens:

The scaling is pretty far off (on top of the issue of the chip not translating into 3Duf properly)
Here is the JSON output by fluigi
{"name":"treelayer","layers":[{"features":{"57e0850c-3033-4ec5-b275-bab5c58e252c":{"set":"Basic","name":"vc","id":"57e0850c-3033-4ec5-b275-bab5c58e252c","type":"Valve3D","params":{"orientation":"V","valveRadius":50,"gap":25,"width":100,"length":100,"position":[1175,2484]}},"7f7abfcd-eed4-4976-b7ba-e883f46923a4":{"set":"Basic","name":"ve","id":"7f7abfcd-eed4-4976-b7ba-e883f46923a4","type":"Valve3D","params":{"orientation":"V","valveRadius":50,"gap":25,"width":100,"length":100,"position":[3175,2486]}},"268f4b0e-bfdc-48ee-98db-eda0b1825b4a":{"set":"Basic","name":"controlport","id":"268f4b0e-bfdc-48ee-98db-eda0b1825b4a","type":"Port","params":{"portRadius":50,"position":[5221,125]}},"fe206c67-4cb0-4e6b-9c59-18fb64c0053a":{"set":"Basic","name":"va","id":"fe206c67-4cb0-4e6b-9c59-18fb64c0053a","type":"Valve3D","params":{"orientation":"V","valveRadius":50,"gap":25,"width":100,"length":100,"position":[1675,1540]}},"fedef4be-cfd2-464d-81b6-94d0c09cb6b1":{"set":"Basic","name":"vb","id":"fedef4be-cfd2-464d-81b6-94d0c09cb6b1","type":"Valve3D","params":{"orientation":"V","valveRadius":50,"gap":25,"width":100,"length":100,"position":[175,2487]}},"e39a836f-f829-45e4-b403-b596985a9277":{"set":"Basic","name":"vd","id":"e39a836f-f829-45e4-b403-b596985a9277","type":"Valve3D","params":{"orientation":"V","valveRadius":50,"gap":25,"width":100,"length":100,"position":[2175,2484]}}},"color":"red","name":"control","type":"control","params":{"flip":true,"z_offset":1200}},{"features":{"2d945b15-f176-41a9-a571-0461256ba1b3":{"set":"Basic","name":"c1a","id":"2d945b15-f176-41a9-a571-0461256ba1b3","type":"Channel","params":{"start":[1725,1339],"end":[1725,1540],"channelWidth":12}},"6c274a3e-fcd6-4c52-a44c-b84631e51f69":{"set":"Basic","name":"vb","id":"6c274a3e-fcd6-4c52-a44c-b84631e51f69","type":"Valve3D","params":{"orientation":"V","valveRadius":50,"gap":25,"width":100,"length":100,"position":[175,2487]}},"123edc15-8831-4e9d-b276-50856b1006bd":{"set":"Basic","name":"flowtree","id":"123edc15-8831-4e9d-b276-50856b1006bd","type":"Tree","params":{"flowChannelWidth":12,"orientation":"H","spacing":1000,"leafs":4,"width":3200,"length":444,"position":[125,1840],"direction":"OUT"}},"0628c7a5-e9c9-4d41-babe-da2766c3273a":{"set":"Basic","name":"c1c","id":"0628c7a5-e9c9-4d41-babe-da2766c3273a","type":"Channel","params":{"start":[1225,2788],"end":[1225,2584],"channelWidth":12}},"f92b6b9f-e237-4872-affa-74b91f72e835":{"set":"Basic","name":"a","id":"f92b6b9f-e237-4872-affa-74b91f72e835","type":"Port","params":{"portRadius":50,"position":[1675,1239]}},"c3314074-188c-41f0-a259-620992e11cbd":{"set":"Basic","name":"b","id":"c3314074-188c-41f0-a259-620992e11cbd","type":"Port","params":{"portRadius":50,"position":[175,2787]}},"411f85c7-702d-4643-8644-1f6207e29fd2":{"set":"Basic","name":"ve","id":"411f85c7-702d-4643-8644-1f6207e29fd2","type":"Valve3D","params":{"orientation":"V","valveRadius":50,"gap":25,"width":100,"length":100,"position":[3175,2486]}},"e55de4b4-28a5-49b2-8353-c7979716213f":{"set":"Basic","name":"c2a","id":"e55de4b4-28a5-49b2-8353-c7979716213f","type":"Channel","params":{"start":[1725,1640],"end":[1725,1840],"channelWidth":12}},"8572b807-37ac-431b-8877-b9bfd49fbda6":{"set":"Basic","name":"c1d","id":"8572b807-37ac-431b-8877-b9bfd49fbda6","type":"Channel","params":{"start":[2225,2785],"end":[2225,2584],"channelWidth":12}},"4066fd37-bfbe-456a-86e4-3a49b294169c":{"set":"Basic","name":"c2d","id":"4066fd37-bfbe-456a-86e4-3a49b294169c","type":"Channel","params":{"start":[2225,2484],"end":[2225,2284],"channelWidth":12}},"7b1982ef-3198-4723-96ef-6906db107e83":{"set":"Basic","name":"va","id":"7b1982ef-3198-4723-96ef-6906db107e83","type":"Valve3D","params":{"orientation":"V","valveRadius":50,"gap":25,"width":100,"length":100,"position":[1675,1540]}},"1e366ebd-2bad-41d4-9ad3-f796b87de330":{"set":"Basic","name":"c1b","id":"1e366ebd-2bad-41d4-9ad3-f796b87de330","type":"Channel","params":{"start":[225,2787],"end":[225,2587],"channelWidth":12}},"d396adb4-732a-4f59-bf5a-6e96d8e36136":{"set":"Basic","name":"vd","id":"d396adb4-732a-4f59-bf5a-6e96d8e36136","type":"Valve3D","params":{"orientation":"V","valveRadius":50,"gap":25,"width":100,"length":100,"position":[2175,2484]}},"94992964-2151-455d-85b8-83c7bb3202b8":{"set":"Basic","name":"c1e","id":"94992964-2151-455d-85b8-83c7bb3202b8","type":"Channel","params":{"start":[3225,2786],"end":[3225,2586],"channelWidth":12}},"73614f15-5501-4e89-acf8-683137f215dd":{"set":"Basic","name":"vc","id":"73614f15-5501-4e89-acf8-683137f215dd","type":"Valve3D","params":{"orientation":"V","valveRadius":50,"gap":25,"width":100,"length":100,"position":[1175,2484]}},"0e86e846-f916-4c2c-8aa9-7291b4bca952":{"set":"Basic","name":"c2e","id":"0e86e846-f916-4c2c-8aa9-7291b4bca952","type":"Channel","params":{"start":[3225,2486],"end":[3225,2284],"channelWidth":12}},"80548d7e-1696-4ce3-af86-4ca26fd1d19d":{"set":"Basic","name":"d","id":"80548d7e-1696-4ce3-af86-4ca26fd1d19d","type":"Port","params":{"portRadius":50,"position":[2175,2785]}},"bb25ce9f-fb06-4f15-addb-90f39473c3b4":{"set":"Basic","name":"c2b","id":"bb25ce9f-fb06-4f15-addb-90f39473c3b4","type":"Channel","params":{"start":[225,2487],"end":[225,2284],"channelWidth":12}},"c9b51fba-c5f6-49a4-a64e-bde54c4ead92":{"set":"Basic","name":"c2c","id":"c9b51fba-c5f6-49a4-a64e-bde54c4ead92","type":"Channel","params":{"start":[1225,2484],"end":[1225,2284],"channelWidth":12}},"cffe2571-24aa-4f1d-a983-99c0f7b3c5a4":{"set":"Basic","name":"c","id":"cffe2571-24aa-4f1d-a983-99c0f7b3c5a4","type":"Port","params":{"portRadius":50,"position":[1175,2788]}},"0a3e3ebf-cb16-47a5-982e-16423b87b091":{"set":"Basic","name":"e","id":"0a3e3ebf-cb16-47a5-982e-16423b87b091","type":"Port","params":{"portRadius":50,"position":[3175,2786]}}},"color":"indigo","name":"flow","type":"flow","params":{"flip":false,"z_offset":0}}],"params":{"lambda":40,"width":215840,"total_wire_length":80440.0,"utilization":-12.912279367114918,"avg_wire_length":8044.0,"total_chip_area":-1.88446976E8,"height":118520,"used_area":2.43328E9}}

This has been modified in the newer development versions of Fluigi


When the GRPC client requests the gateway and forwards it to the GRPC server, transcoding fails due to UTF8MB4

gRPC Error (code: 13, codeName: INTERNAL, message: grpc: failed to unmarshal the received message: string field contains invalid UTF-8, details: [], rawResponse: null, trailers: {})

I'd ask you to fill in more information. Also I'm not sure whether this is relevant to gRPC so I'm closing this.


Training code？

Hi so interesting work！
Do you have plan to release the training code？

SVGDreamer is an optimization-based algorithm that does not rely on training data.

Hi so interesting work！ Do you have plan to release the training code？


faker: Support locale (and few bug fixes)

Abstract
Support locales and fix few bugs.
This changes are based on recent master of faker.
Changes

Support localization by changing faker.locale
See the test.

Support Individual Localization Packages
See the test.

Fix types for faker.helpers.randomize()
If its param is omitted, it should return a string.
See the test.

Fix types for faker.random.objectElement()
If its param is omitted, it should return a string.
See the test.

Fix types for faker.random.arrayElement()
If its param is omitted, it should return a string.
See the test

Fix types for faker.helpers.createCard
It should contains address.streetA.
See the test.

@basp Could you review this PR please?

@Kuniwak Thanks a lot for the fixes and additions. Looks good!

@basp Thanks!

thanks mate!


JPA 2.x

Hey,
I'm not a user of this library, but I develop addons/plugins for various applications. One such application I'm working with depends on this library, but I notice that it only includes a JPA-1.x-compatible javax.persistence in the POM.
Unfortunately, that means that anything that depends on the library can't easily support addons/plugins that require JPA 2.x features.
So, what're the reasons for sticking only with the 1.x API? Is there a problem with using Eclipse's API or Hibernate's API? If this dependency can't be changed, what would be a good fix to advise people in similar situations?

ebean is an alternative to Eclipse and Hibernate. Only a portion of JPA 1.x is used, JPA 2.x makes no sense. ebean is not a JPA implementation.

Just as a slight clarification.
There are some parts of JPA 2.x that we don't yet support in Ebean that we
do want to support (Extra mapping options like @ElementCollection etc) and
there is some extra API to support such as the additional locking options
in JPA 2.x.
So in that sense there are enhancement requests logged to support JPA 2.x
features.  Until that is implemented the dependency is JPA 1.x as it is
currently.
Currently the focus is updating the documentation and later this year we
can look to address the JPA 2.x features.
Cheers, Rob.
On 25 February 2015 at 15:41, Richard Vowles<EMAIL_ADDRESS>wrote:

ebean is an alternative to Eclipse and Hibernate. Only a portion of JPA
1.x is used, JPA 2.x makes no sense. ebean is not a JPA implementation.
—
Reply to this email directly or view it on GitHub
https://github.com/ebean-orm/avaje-ebeanorm/issues/251#issuecomment-75895377
.

ebean is an alternative to Eclipse and Hibernate
ebean is not a JPA implementation

Then ebean isn't an alternative to the two specific libraries I linked.

[Everything from @rbygrave]

Alright, I see. It's just annoying since the JPA 1.x dependency being shaded into the application JAR seems to override any JPA 2. dependency shaded into addon/plugin JARs in this particular instance - I'm not sure what other alternative to take or whether the devs can fix that, though.

> JPA 1.x dependency being shaded into the application JAR seems to
override any JPA 2.
The dev's could exclude the JPA 1.x dependency for example.
On 25 February 2015 at 22:34, Gareth Coles<EMAIL_ADDRESS>wrote:

ebean is an alternative to Eclipse and Hibernate
ebean is not a JPA implementation
Then ebean isn't an alternative to the two specific libraries I linked.
[Everything from @rbygrave https://github.com/rbygrave]
Alright, I see. It's just annoying since the JPA 1.x dependency being
shaded into the application JAR seems to override any JPA 2. dependency
shaded into addon/plugin JARs in this particular instance - I'm not sure
what other alternative to take or whether the devs can fix that, though.
—
Reply to this email directly or view it on GitHub
https://github.com/ebean-orm/avaje-ebeanorm/issues/251#issuecomment-75930776
.

As @rbygrave says, just set an exclusion for the JPA 1 library and you are set.
If you are using Shade for a deployable jar, also potentially consider Spring Boot Loader, its a much better alternative to Shade.

The project isn't mine, so I don't really have that option o/
I doubt they'd do it either, to be honest. I'll ask them, though.

I don't understand, you can exclude it from the dependency in your plugin. If you depend on library X and it depends on eBean, you just put an exclusion in library X for the JPA1 library and it will apply transitively, then you can specifically include the JPA 2.x one.
You speak of Shade, so the implication is Maven, so you can do this. Or is the library you are using already shaded?

No, no, let me try to explain better.
Let's say there's a project, we'll call it Spigot, that depends on ebean and shades it and its dependencies into its main JAR.
Let's say, then, that I write a plugin for Spigot that uses Hibernate or some other library that uses JPA 2.x annotations, or similar. I'll shade my libraries into my JAR.
Spigot loads my plugin, which contains a JPA 2.x dependency, but that dependency has a namespace conflict with the JPA 1.x dependency already included in Spigot, causing some errors.
Someone with a similar problem using Hibernate posted this StackOverflow question, which might provide some context (although they aren't using ebean).

Right, so Spigot is shafting you by shading. :-)
So can you jarjar your dependencies before you include them in your plugin, therefore automatically changing their namespaces and preventing the clash. Thats all I can think of :-(

Hmm.. That looks like a possibility. I'll look into it, thanks for the help \o/

@gdude2002 here from the Spigot bug tracker - as mentioned above whenever you include a depend you should change its namespace, regardless of whether or not we already have it in our native classpath.

Oh, hey @md-5, that was.. Actually a lot faster than I was expecting, lol.
Yeah, I'm gonna look into doing that. Thanks for the quick response.

I think I can close this issue now. Doing so.
Cheers, Rob.


Support address, base-path and ssl.enabled of ManagementServerProperties

Modifications:

Add management server setting's address and enableSsl to InternalServices
Make ArmeriaReactiveWebServerFactoryAutoConfiguration expose InternalServices it creates
Make ArmeriaSpringActuatorAutoConfiguration support base-path by concatenating it with endpoint's base path

Result:

Fixed #4560

Curious about the port setting here. If we use the same port for management.server with internal-services.ports. How should we handle the https setting.
Maybe better to ignore the management server's https setting if the port is the same?
And if the internalserver port == management.server.port, we just add single endpoint of actuator for base-path?

If we use the same port for management.server with internal-services.ports. How should we handle the https setting.

People might want to use the same port for management.server and internal-services, thus this is a valid scenario and we should allow it.
So the issue arises when management.server.ssl is enabled but armeria.internal-services.protocols: https.
armeria:
  internal-services:
    include: metrics, health
    port: 9000
    protocols: http

management:
  server:
    port: 9000
    ssl:
      enabled: true

We can serve HTTP and HTTPS using the same port but we are not sure if the user actually wants it or not.
So we shouldn't do that unless https is also specified in the protocols.
I'm leaning toward using the settings in Armeria and leaving a warning that the TLS settings in the management wouldn't be used.
So yes, I agree with your opinion. 😆

And if the internalserver port == management.server.port, we just add single endpoint of actuator with base-path.

If the management.server.address is also specified, I think we need to use the virtualhost so that we could use the address.

If the management.server.address is also specified, I think we need to use the virtualhost so that we could use the address.
:thinking: this confuses me a little. So Armeria has ip & hostname virtunal host. Base on this we may have below combinations. Pretend management.server.base-path is /foo.

internal-services.port(8000) != management.server.port(9000)

Add actuator to both using sb.virtualHost(port) and management.server.port will use base-path
ip:8000/actuator & ip:9000/foo/actuator

internal-services.port(8000) == management.server.port(8000) && management.server.address is  null

Add actuator to 8000 with sb.virtualHost(port)  and using base-path
We only have ip:8000/foo/actuator, there is no ip:8000/actuator

internal-services.port == management.server.port && management.server.address is not null

Add actuator to 8000 with sb.virtualHost(port)  without base-path
Add actuator to 8000 with sb.virtualHost(management.server.address.getHostName)  with base-path
We will have ip:8000/actuator and host:8000/foo/actuator

like this?

updated and sorry that re-request case removing some reviewers

Great job, @kojilin! Thanks! 😄


Crash when unwrapping optional after disconnection

In SecureDFUExecutor.swift peripheralDidCreateDataObject() the library performs an asyncAfter. When the block runs, down the stack it reaches SecureDFUPeripheral.swift sendNextObject(). This unwraps dfuService. If a disconnection occurs before the asyncAfter block is run, this will crash.
I exhibited it the first time I tried on macOS 10.15.7 (19H15), but have not seen it on iOS. Perhaps I just got lucky with my timing.

Let's say it's fixed. Will be released in 4.10.


Hide Control or group of controls dinamycally

Is it possible to hide a control (or a group of control) based on a value of a EditForm element ?
For example, imagine you have a form with a Combobox with values "Person", "Company".
If the user selects "Person", I have to show fields Firstname/Lastname whereas if user selects "Company" I have to show just "CompanyName".
thanks

I had this issue with a project I was working on.  What I ended up doing was putting a toggle control on the page and two classes that inherited from the base class.  When the page was reloaded it pulled the correct inherited class as the data source for the form.

thanks for your input, but in my case is not applicable.
I need that the input must be defined inside the poco not statically placed on the page, so that I can define a "rule" that hides or shows elements based on the value of another field in the same poco object.