Skip to content
This repository was archived by the owner on Nov 24, 2025. It is now read-only.

TP - delivery service form layout redesign#3658

Merged
dangogh merged 6 commits intoapache:masterfrom
mitchell852:ds-form-redesign
Jul 25, 2019
Merged

TP - delivery service form layout redesign#3658
dangogh merged 6 commits intoapache:masterfrom
mitchell852:ds-form-redesign

Conversation

@mitchell852
Copy link
Copy Markdown
Member

@mitchell852 mitchell852 commented Jun 4, 2019

What does this PR (Pull Request) do?

The delivery service forms for HTTP*, DNS*, Steering and any map delivery services have been reorganized into 3 groups - general config, cache config and routing config. Unlike before, none of the fields are hidden, however, each group can be collapsed if desired. This should help communicate the purpose of each delivery service attribute.

  • This PR is not related to any Issue

Which Traffic Control components are affected by this PR?

  • Traffic Portal

What is the best way to verify this PR?

Run the UI tests - https://github.com/apache/trafficcontrol/tree/master/traffic_portal/test/end_to_end

Note (tests): there are no new UI tests as functionality did not change. However, running the existing UI tests will ensure that the changes made to the ds forms do not prevent create, update or delete of a ds.

Note (docs): There are currently no docs that show what the ds forms looks like, therefore, none to update.

Note (changelog.md): I do not believe a changelog.md entry is required as functionality did not change in any way.

The following criteria are ALL met by this PR

  • This PR includes tests OR I have explained why tests are unnecessary
  • This PR includes documentation OR I have explained why documentation is unnecessary
  • This PR includes an update to CHANGELOG.md OR such an update is not necessary
  • This PR includes any and all required license headers
  • This PR ensures that database migration sequence is correct OR this PR does not include a database migration
  • This PR DOES NOT FIX A SERIOUS SECURITY VULNERABILITY (see the Apache Software Foundation's security guidelines for details)

@mitchell852 mitchell852 added Traffic Portal v1 related to Traffic Portal version 1 improvement The functionality exists but it could be improved in some way. labels Jun 4, 2019
@asfgit
Copy link
Copy Markdown
Contributor

asfgit commented Jun 4, 2019

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/trafficcontrol-PR/3820/
Test PASSed.

@asfgit
Copy link
Copy Markdown
Contributor

asfgit commented Jun 5, 2019

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/trafficcontrol-PR/3824/
Test PASSed.

@asfgit
Copy link
Copy Markdown
Contributor

asfgit commented Jun 5, 2019

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/trafficcontrol-PR/3827/
Test PASSed.

@mitchell852 mitchell852 marked this pull request as ready for review June 5, 2019 21:45
@asfgit
Copy link
Copy Markdown
Contributor

asfgit commented Jun 5, 2019

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/trafficcontrol-PR/3829/
Test PASSed.

@asfgit
Copy link
Copy Markdown
Contributor

asfgit commented Jun 5, 2019

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/trafficcontrol-PR/3830/
Test FAILed.

@asfgit
Copy link
Copy Markdown
Contributor

asfgit commented Jun 7, 2019

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/trafficcontrol-PR/3842/
Test PASSed.

@asfgit
Copy link
Copy Markdown
Contributor

asfgit commented Jun 7, 2019

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/trafficcontrol-PR/3844/
Test FAILed.

@mitchell852
Copy link
Copy Markdown
Member Author

retest this pleaase

@asfgit
Copy link
Copy Markdown
Contributor

asfgit commented Jun 10, 2019

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/trafficcontrol-PR/3849/
Test FAILed.

@asfgit
Copy link
Copy Markdown
Contributor

asfgit commented Jun 10, 2019

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/trafficcontrol-PR/3851/
Test PASSed.

Copy link
Copy Markdown
Contributor

@ocket8888 ocket8888 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still need to check out the UI test updates.

By the way, as long as we're re-doing the DS forms, it'd be neat to use input[type="checkbox"] instead of select option[ng-value="true"], select option[ng-value="false"] for inputs that represent boolean concepts. Though that may be out of scope for this PR.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this isn't the time to change this, but you can do this whole loop thing in one line:

const URLstring = ds.exampleURLs.join('<br/>');

which has the added benefit of not including a trailing <br>. Unless you want that, in which case you can append it with + on that same line. But that shouldn't be necessary, because paragraphs should force a line break between them anyway.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of two ngShow listeners on two separate <i> tags, you could accomplish this by toggling the state of exactly one chevron like so:

<i class="fa" ng-class="showGeneralConfig ? 'fa-caret-down' : 'fa-caret-up'></i>

You may also want to consider the HTML5 <details> tag - although that isn't supported by Edge and I'm never really clear on which browsers TP is purported to support.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this ng-show could be combined with the ng-if - since that's what the other buttons do

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This ng-show could be an ng-if

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably no longer be autofocused now that it's not the first control encountered by the user.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This URL no longer works - if you want to fix it it would be https://traffic-control-cdn.readthedocs.io/en/latest/overview/delivery_services.html#ds-types. Or you could just remove it entirely.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'll fix it. i think it's probably helpful

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hrefs that use AngularJS string interpolation should instead use the ngHref directive.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'm guessing there are a lot of places where this could be fixed...is this issue part of your TP best practices issue?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not currently - you think it's common enough to be added?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'm guessing it probably is

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The readthedocs page will redirect this to HTTPS automatically - but it'd be nice to let users skip that step by taking them to the HTTPS page from the start.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

confused. is this not correct?

See <a href="https://traffic-control-cdn.readthedocs.io/en/latest/admin/traffic_router.html#tr-ngb" target="_blank">GeoLimit Failure Redirect</a> feature...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue is with http://traffic-control-cdn.readthedocs.io/en/latest/admin/traffic_router.html#pattern-based-consistenthash - but because you updated your PR (several times) while I was reviewing, GitHub became very confused about where certain comments are anchored.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, i see. will fix

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'll look for all instances of http on the ds forms

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A lot of these routing configuration changes don't get used by ANY_MAP Delivery Services - should they still be presented to the user? e.g. Geolocation Provider is used by TR to route client requests, but since TR doesn't route ANY_MAPs, the field has no effect on them.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point. these fields have always been present on the any_map form and like you said, probably ignored.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you create a separate issue for this as these fields have been present on the any map form for so long and i'd like to address their removal separate from this PR. good catch!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's already tracked by #1943

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh wow. look at that. :)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This link no longer exists. If you want to fix it, the new location is: https://traffic-control-cdn.readthedocs.io/en/latest/overview/delivery_services.html#ds-multi-site-origin. Or you could just get rid of it.

@asfgit
Copy link
Copy Markdown
Contributor

asfgit commented Jun 10, 2019

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/trafficcontrol-PR/3852/
Test PASSed.

@asfgit
Copy link
Copy Markdown
Contributor

asfgit commented Jun 10, 2019

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/trafficcontrol-PR/3854/
Test PASSed.

@asfgit
Copy link
Copy Markdown
Contributor

asfgit commented Jun 10, 2019

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/trafficcontrol-PR/3856/
Test PASSed.

Copy link
Copy Markdown
Contributor

@ocket8888 ocket8888 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UI tests pass, page looks good.

@asfgit
Copy link
Copy Markdown
Contributor

asfgit commented Jul 25, 2019

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/trafficcontrol-PR/4036/
Test PASSed.

@dangogh
Copy link
Copy Markdown
Member

dangogh commented Jul 25, 2019

I see @ocket8888 reviewed the hell out of this.. merging..

@dangogh dangogh merged commit 384c237 into apache:master Jul 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

improvement The functionality exists but it could be improved in some way. Traffic Portal v1 related to Traffic Portal version 1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants