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

Update hypervisor UI #862

Closed
ersonp opened this issue Aug 20, 2021 · 0 comments
Closed

Update hypervisor UI #862

ersonp opened this issue Aug 20, 2021 · 0 comments
Labels

Comments

@ersonp
Copy link
Contributor

ersonp commented Aug 20, 2021

Feature description
Due to the recent changes to how the transports work the UI needs a few updates.

Describe the feature
Is your feature request related to a problem? Please describe.

  • Now the transport is either online or not there at all i.e. there is no offline state.
  • We need a UI element for setting persistent_transports

Additional context

Online/offline Transport

If there is an entry for the transport that means it is up. If there is no entry then we don't need to show anything. I.e. there is no offline state anymore.

Persistent transports

As for persistent_transports, it is just a field in the skywire visor config. On start-up, the visor takes the pk and type from it and tries to establish a connection. If the connection is successfully established the transport will showup in the usual transports field with all the required fields.
What we need is a way for the user to make changes to this persistent_transports field in the config via the UI. Because a new visor will have an empty persistent_transports in their config. And we do not want the user to make changes to the config directly. So basically the persistent_transports field is for the user to set up transports on the visor startup.

The API for persistent_transports are:

  1. PUT /api/visors/<pk>/persistent-transports. Required json
[{"pk":"03843fcc425fd85947c1fc16255539d61f99a2308bc514cd8bceb691ff4c39c8ac","type":"dmsg"}]
  1. persistent_transports from the config will be in the summary.
{
  "overview": {
    "local_pk": "03c1d911914f4306bf88f3345edc856c29f9b674fba2e6009a2fe4e4a2ce22fb66",
    "build_info": {
      "version": "v0.4.0-tr5-470-g1b8e547c",
      "commit": "1b8e547c10a0e3971eb596b3b1840c3a073d9100",
      "date": "2021-08-23T07:49:57Z"
    },
    "app_protocol_version": "0.1.0",
    "apps": [
      {
        "name": "vpn-server",
        "auto_start": false,
        "port": 44,
        "status": 0,
        "detailed_status": ""
      },
      {
        "name": "vpn-client",
        "args": [
          "-srv",
          "03c1d911914f4306bf88f3345edc856c29f9b674fba2e6009a2fe4e4a2ce22fb66"
        ],
        "auto_start": false,
        "port": 43,
        "status": 0,
        "detailed_status": ""
      },
      {
        "name": "skychat",
        "args": [
          "-addr",
          ":8001"
        ],
        "auto_start": true,
        "port": 1,
        "status": 1,
        "detailed_status": ""
      },
      {
        "name": "skysocks",
        "auto_start": true,
        "port": 3,
        "status": 1,
        "detailed_status": ""
      },
      {
        "name": "skysocks-client",
        "auto_start": false,
        "port": 13,
        "status": 0,
        "detailed_status": ""
      }
    ],
    "transports": null,
    "routes_count": 0,
    "local_ip": "192.168.0.177"
  },
  "health": {
    "transport_discovery": 200,
    "route_finder": 200,
    "setup_node": 200,
    "uptime_tracker": 200,
    "address_resolver": 200
  },
  "uptime": 21.67109,
  "routes": [],
  "dmsg_stats": {
    "public_key": "03c1d911914f4306bf88f3345edc856c29f9b674fba2e6009a2fe4e4a2ce22fb66",
    "server_public_key": "035915c609f71d0c7df27df85ec698ceca0cb262590a54f732e3bbd0cc68d89282",
    "round_trip": 125378641
  },
  "online": false,
  "min_hops": 0,
  "persistent_transports": [
    {
      "pk": "02fd1233eadf19f29feae90fa2e2b1c681ad2f06882a5e2178c307ed5a854c5dd0",
      "type": "dmsg"
    }
  ]
}

Changes can be made according to this .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants