Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

CIRCLE / cloud

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 94
  • Merge Requests 10
  • Pipelines
  • Wiki
  • Snippets
  • Members
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Merged
Merge request !88 opened Jun 03, 2014 by Kálmán Viktor@kviktor 
  • Report abuse
Report abuse

Feature Http Forwards Link

Closes #166 (closed)

  • Discussion 4
  • Commits 2
  • Changes
{{ resolvedDiscussionCount }}/{{ discussionCount }} {{ resolvedCountText }} resolved
  • Őry Máté
    @orymate started a discussion on an old version of the diff Jun 03, 2014
    circle/dashboard/templatetags/network_tags.py
    1 from django import template
    2
    3 register = template.Library()
    4
    5
    6 LINKABLE_PORTS = [80, 8080, 443, 8010]
    • Őry Máté @orymate commented Jun 03, 2014
      Owner

      {80: 'http', 8080: 'http', 443: 'https'}?

      `{80: 'http', 8080: 'http', 443: 'https'}`?
    Please register or sign in to reply
  • Bach Dániel @bachdaniel commented Jun 03, 2014
    Owner

    +1

    +1
  • Őry Máté
    @orymate started a discussion on the diff Jun 03, 2014
    circle/dashboard/templatetags/network_tags.py
    2
    3 register = template.Library()
    4
    5
    6 LINKABLE_PORTS = {80: "http", 8080: "http", 443: "https", 21: "ftp"}
    7
    8
    9 @register.simple_tag(name="display_portforward")
    10 def display_pf(ports):
    11 is_ipv6 = "ipv6" in ports
    12 data = ports["ipv6" if is_ipv6 else "ipv4"]
    13
    14 if ports['private'] in LINKABLE_PORTS.keys():
    15 href = "%s:%d" % (data['host'], data['port'])
    16 return '<a href="%s://%s">%s</a>' % (
    17 LINKABLE_PORTS.get(ports['private']), href, href)
    • Őry Máté @orymate commented Jun 03, 2014
      Owner

      LINKABLE_PORTS[ports['private']]?

      `LINKABLE_PORTS[ports['private']]`?
    Please register or sign in to reply
  • Őry Máté
    @orymate started a discussion on the diff Jun 03, 2014
    circle/dashboard/templatetags/network_tags.py
    1 from django import template
    2
    3 register = template.Library()
    4
    5
    6 LINKABLE_PORTS = {80: "http", 8080: "http", 443: "https", 21: "ftp"}
    7
    8
    9 @register.simple_tag(name="display_portforward")
    10 def display_pf(ports):
    11 is_ipv6 = "ipv6" in ports
    12 data = ports["ipv6" if is_ipv6 else "ipv4"]
    13
    14 if ports['private'] in LINKABLE_PORTS.keys():
    • Őry Máté @orymate commented Jun 03, 2014
      Owner

      if ports['private'] in LINKABLE_PORTS:?

      `if ports['private'] in LINKABLE_PORTS:`?
    Please register or sign in to reply
  • Write
  • Preview
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment
Őry Máté
Assignee
Őry Máté @orymate
Assign to
None
Milestone
None
Assign milestone
Time tracking
0
Labels
None
Assign labels
  • View labels
3
3 participants
Reference: circle/cloud!88