Giter Site home page Giter Site logo

tritondatacenter / sdc-adminui Goto Github PK

View Code? Open in Web Editor NEW
15.0 15.0 27.0 14.32 MB

Operator portal for Triton DataCenter

License: Mozilla Public License 2.0

Makefile 0.14% Shell 0.10% HTML 25.10% Python 0.17% CSS 1.68% JavaScript 57.46% Perl 0.89% Pug 0.05% Less 10.77% Handlebars 3.65%

sdc-adminui's People

Contributors

andyyatskov avatar arc311 avatar arekinath avatar bahamat avatar cburroughs avatar dan-luk avatar danluk avatar dwlf avatar jclulow avatar johananlai avatar joshwilsdon avatar kusor avatar marsell avatar rjloura avatar thekvn avatar travispaul avatar trentm avatar twhiteman avatar yzaicev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sdc-adminui's Issues

disk.size is MB or GB ?

sdc-adminui/www/js/components/pages/vm/index.jsx:
116: quota = quota + (k.size/1024); // disk.size is in mib
but
207:Total: {quota} GB

RFE: Lower learning curve administration

Background: I come from a world of Linux and Windows with a very small amount of UNIX experience. My current position, I am an IT Army of one. So, I need solutions that make it easy to do the most common tasks.

I have been looking into container hosts and I keep trying to come back to SmartOS, but it has such a steep learning curve. There is so much you have to know about the systems functions to even get started. Complex API syntax, json embedded in CLI commands, seemingly arbitrary command separation, etc. When I get discouraged by it, I start looking at things like CoreOS or just running Docker/LX/KVM on an Ubuntu server because it doesn't require me to understand deep system operations to make anything happen. A few how-tos later and I can be deploying containers and guests.

Just to deploy a image, you have to use a UUID. Completely unfriendly to mere IT mortals and people who have no clue how to even lookup the UUID. I get that there is a reason for the UUID, but that doesn't mean you have to use it as the primary interaction. Docker uses owner/image names. LDAP (specifically AD) has a UUID but also a CN that is unique and friendly.

Take this example from the private cloud post-install doc:

echo '{"metadata": {"IMGAPI_ALLOW_LOCAL_CREATE_IMAGE_FROM_VM": true}}' | sapiadm update $(sdc-sapi /services?name=imgapi | json -H 0.uuid)

Put yourself in the shoes of someone completely new to SDC/SmartOS and think of all of the things you would have to learn about the system to build that command on your own. How would you get from zero to that command on your own?

Another example, creating a basic firewall rule: https://docs.joyent.com/public-cloud/network/firewall

Turn on the firewall:

sdc-enablemachinefirewall 98338d48-d2a7-4e17-bbc7-b44054b04503
Random command that isn't in the sdcadm command for an unknown reason to the new users and UUID.

To check the status:

sdc-getmachine 98338d48-d2a7-4e17-bbc7-b44054b04503 | json firewall_enabled
Different command, UUID and you have know the specific json attribute.

Huge learning curve just to digest what is going on.

I don't know what the best solution is, but as someone who doesn't know SmartOS and doesn't have the time to dedicate to learning the ins and outs of the system just to get started, there has to be something better. My one idea, arguably blue skies and has some issues, would be to look at how networking equipment is configured. A single file to configure the entire system. A series of "set" commands (JunOS/VyOS/EOS/etc.) to build up the configuration. In the case of VyOS/EdgeOS, these are just huge wrappers around the entire OS. They abstract away the configuring of the individual files and services. The CLI shell includes things like tab-completion and contextual help to guide you towards your goal. "What command is next? oh, I need foo." With just a single set command, I can bring up and interface and configure an IP and assign it to a VLAN.

set interfaces ethernet eth0 vif 100 address 10.0.1.1/24;commit;save;

Reading the resulting configuration is very intuitive. I don't have to figure out where the configuration file is or know the syntax. The CLI prevents me from messing it up by validating the input.

show interfaces ethernet eth0

vif 20 {
address 10.0.1.1/24
}
mtu 1500
}

** This is just a simple example to show how easy it can be. It doesn't necessarily translate well to this RFE.

I think SmartOS and SDC could benefit a lot from this model of configuration. Take the CoaL-setup doc for example. https://github.com/joyent/sdc/blob/master/docs/developer-guide/coal-setup.md

Why does there need to be 8 commands to just update the system. If all of those are the typical workflow, make it one command "sdcadm full-system-update" and the prompt me to reboot when you are done.

Why are there post-install steps at all? Shouldn't the system just do that stuff and prompt for input when needed? The assumption is, most of that process are things that are done by everyone anyway, why make the admin wade through extra commands to complete the common workflow?

I am not necessarily suggesting removing all of the underlying pieces or things that give it a robustness, just remove the complexity from getting started and the day-to-day administration. Come up with a "default" model, set the install process to build to it and be done. Anyone who knows that the defaults don't meet their requirements aren't the ones targeted by this. Make it easy to configure the system in the most common use cases.

Apologies for the rambling. I really really want to use SmartOS/SDC, which in my opinion is the best overall solution/architecture, but damn it is so hard to just use.

Default hostname to name/alias when provisioning a new VM

Any time I provision a VM through AdminUI such as a native SmartOS zone and then SSH into the zone, the hostname is the UUID which makes for an unfriendly PS1 so I need to run mdata-get sdc:alias > /etc/nodename && reboot to change it but that won't persist across reprovisions. It seems like creating a VM via node-triton (CloudAPI) defaults the hostname to the VM name/alias so AdminUI should be consistent.

I also tried manually calling VMAPI after the VM was provisioned to update the hostname but according to the documentation hostname is not a field that can be updated.

[root@headnode (neptune) ~]# sdc-vmapi /vms/73d03c63-c00a-4c67-bc5c-3047eeb78312?action=update -X POST -d '{"hostname":"nginx"}'
HTTP/1.1 409 Conflict
Connection: close
Content-Type: application/json
Content-Length: 77
Date: Fri, 06 May 2022 19:09:57 GMT
Server: VMAPI/9.14.1
x-request-id: 9cd50b8b-8468-42d5-88f8-0f386a65a189
x-response-time: 19
x-server-name: 50172949-5150-42ba-967d-c1e3434820d9

{
  "code": "ValidationFailed",
  "message": "No VM parameters provided",
  "errors": []
}

adminui allows packages to be created with Invalid value(s) for: max_swap

Creating a package through the web interface allows the creation of a package with 128M for swap but when trying to use this package, other APIs error. For example, sdc-docker:

{"name":"vmadm","req_id":"f8823110-db2a-11e6-9e66-1d5c88f263d5","hostname":"headnode","pid":29654,"stack":"vmadm.create","level":30,"evt":{"args":{"result":-1},"ph":"e","name":"create"},"msg":"","time":"2017-01-15T14:00:45.404Z","v":0} Invalid value(s) for: max_swap at parseResponse (/opt/smartdc/docker/node_modules/sdc-clients/node_modules/restify/lib/clients/json_client.js:67:23) at IncomingMessage.done (/opt/smartdc/docker/node_modules/sdc-clients/node_modules/restify/lib/clients/string_client.js:151:17) at IncomingMessage.g (events.js:180:16) at IncomingMessage.emit (events.js:117:20) at _stream_readable.js:944:16 at process._tickDomainCallback (node.js:502:13)

Custom hostname ignored for compute node

Not sure whether this is the right repo for this issue, please see below:

Custom hostname is dropped after initial setup of compute nodes.
I have retested this multiple times, even on different SDC releases (affecting latest build as well).

Steps to reproduce:

  • click on Setup for new compute node
  • select custom hostname
  • type in hostname, save

Impact:

  • after compute node reboots hostname reverts back to ID

Tried this multiple times after factory reset - same result.

Change primary NIC doesn't update the default route

I just switched to SDC 20160107.

Apparently in the new version, when adding a new NIC to a zone, the option to make this new NIC primary is gone. This is kind of annoying but it's fine, since we can still access it through the NIC settings after adding it.

What bother me is that after adding a new NIC and changing the settings for this NIC to be primary, the following happen:

  1. The NIC does become primary (I checked with the vmapi)
  2. The adminui keep showing the old primary still being primary
  3. The default gateway of the zone is still the gateway of the previous primary interface

Example

  1. Initially:
sdc-vmapi /vms/80f2973d-a778-4519-9bf0-45ff198e36df | json nics
[
  {
    "interface": "net0",
    "mac": "90:b8:d0:5c:06:9a",
    "vlan_id": 107,
    "nic_tag": "external",
    "gateway": "10.10.7.254",
    "gateways": [
      "10.10.7.254"
    ],
    "netmask": "255.255.255.0",
    "ip": "10.10.7.68",
    "ips": [
      "10.10.7.68/24"
    ],
    "network_uuid": "2afe7b88-166a-4e6d-8b8e-24b0b56ca3b7",
    "mtu": 1500,
    "primary": true
  }
]
netstat -rn

Routing Table: IPv4
  Destination           Gateway           Flags  Ref     Use     Interface 
-------------------- -------------------- ----- ----- ---------- --------- 
default              10.10.7.254          UG        1          0 net0      
10.0.0.0             10.10.7.254          UG        1          0 net0      
10.10.7.0            10.10.7.68           U         3         39 net0      
127.0.0.1            127.0.0.1            UH        2          0 lo0       

Routing Table: IPv6
  Destination/Mask            Gateway                   Flags Ref   Use    If   
--------------------------- --------------------------- ----- --- ------- ----- 
::1                         ::1                         UH      2       0 lo0   
  1. After adding and setting the new NIC as primary
netstat -rn

Routing Table: IPv4
  Destination           Gateway           Flags  Ref     Use     Interface 
-------------------- -------------------- ----- ----- ---------- --------- 
default              10.10.7.254          UG        1          0 net0      
10.0.0.0             10.10.7.254          UG        1          0 net0      
10.10.7.0            10.10.7.68           U         3         38 net0      
x.x.x.x                 x.x.x.y      U         2          0 net1      
127.0.0.1            127.0.0.1            UH        2          0 lo0       

Routing Table: IPv6
  Destination/Mask            Gateway                   Flags Ref   Use    If   
--------------------------- --------------------------- ----- --- ------- ----- 
::1                         ::1                         UH      2       0 lo0   
sdc-vmapi /vms/80f2973d-a778-4519-9bf0-45ff198e36df | json nics
[
  {
    "interface": "net0",
    "mac": "90:b8:d0:5c:06:9a",
    "vlan_id": 107,
    "nic_tag": "external",
    "gateway": "10.10.7.254",
    "gateways": [
      "10.10.7.254"
    ],
    "netmask": "255.255.255.0",
    "ip": "10.10.7.68",
    "ips": [
      "10.10.7.68/24"
    ],
    "network_uuid": "2afe7b88-166a-4e6d-8b8e-24b0b56ca3b7",
    "mtu": 1500
  },
  {
    "interface": "net1",
    "mac": "90:b8:d0:d7:b2:11",
    "vlan_id": 20,
    "nic_tag": "external",
    "gateway": "x.x.x.y",
    "gateways": [
      "x.x.x.y"
    ],
    "netmask": "255.255.255.240",
    "ip": "x.x.x.x",
    "ips": [
      "x.x.x.x/28"
    ],
    "network_uuid": "7c9339b2-d613-4a53-b815-096b1d16b279",
    "mtu": 1500,
    "primary": true
  }
]

Clicking Analytics in adminui causes stack trace in browser (CoaL joyent_20150108T081734Z)

New install of joyent_20150108T081734Z CoaL. After installing (no other changes/configuration) login to adminui and click 'Analytics' from top.

The page is almost empty with 'Cloud Analytics' for a title and a grey box. The js console has a stack trace:

[Error] TypeError: null is not an object (evaluating 'metric_encoded.indexOf')
    baseMetric (ca.js, line 1244)
    metricSelected (ca.js, line 1256)
    caWidgetCreateInstn (ca.js, line 1234)
    capInitSelectors (fishbulb, line 118)
    (anonymous function) (fishbulb, line 100)
    (anonymous function) (ca.js, line 238)
    success (subr.js, line 282)
    fire (jquery-1.8.3.js, line 974)
    fireWith (jquery-1.8.3.js, line 1084)
    done (jquery-1.8.3.js, line 7803)
    callback (jquery-1.8.3.js, line 8518)

VM Detail Page breaks after adjusting KVM disks

We created a KVM VM, and then deleted the original disks and added an empty one (as we were imaging a server from another source). This results in admin-ui not being able to display the VM's detail page. I get this error in my JS console:

Failed to load resource: the server responded with a status of 500 (Internal Server Error) https://sdc.domain.com/api/page/vm?uuid=0ca40fef-89a9-ecc2-92e1-e2a660486f42

When I try to browse to that URI:

{
"message": "uuid (string) is required"
}

Request to expose more VM metadata via adminui

Particularly stuff like VNC information.
Or maybe even an HTML 5 virtual terminal across SmartOS's coveted TTY.

Without SSH access to the headnode, one's options for troubleshooting a VM startup/kernel-crash/grub issues is very limited.
Also worth mentioning, the way SmartOS recycles VNC sessions per VM boot makes it particularly unhelpful here.

compute node DISK UTILIZATION is NAN

disk-overview.jsx-32
usedInGB is NAN
VM state 'configured',quota is undefined:
{ uuid: '20e0e132-9d9b-6827-fb26-edb6f5de77aa',
owner_uuid: 'd4b7c98f-ea11-689b-828d-f67e93baf6d2',
max_physical_memory: 1024,
zone_state: 'configured',
state: 'configured',
brand: 'joyent',
cpu_cap: 300,
last_modified: '2015-03-23T01:40:36.000Z' }

problems starting adminui in development mode (dev deps missing)

I have installed sdc-adminui and when I try to run

make devrun

I get the error about missing node-dev:

$ make devrun
Will rebundle when needed
***** Starting adminui server on port 4443
./tools/devrun.sh: line 17: ./node_modules/.bin/node-dev: No such file or directory

the file is not there:

$ ls -la ./node_modules/.bin/node-dev
ls: ./node_modules/.bin/node-dev: No such file or directory

Rendering on portrait displays

I suppose this is a feature request, rather than an issue.

I have noticed that AdminUI doesn't render correctly when used with portrait resolutions. I only use Safari, so the issue could be isolated to that browser. The resolution for this display is 1080x1920.

I have attached a couple of screenshots that demonstrate the issue - let me know if I can do anything else to help out (installing other browsers, etc.). And feel free to kill off this ticket if you don't consider this a target feature :)

Fixed header ends up double height - probably due to reduced display width, navigation sidebar and main scrollable inset get truncated;
screen shot 2016-09-11 at 14 22 58

Text columns in disks table overlap each other, likely due to the same thing;
screen shot 2016-09-11 at 14 23 35

Given a network, provision IPs on it with specific MAC addreses

Given a network, provision IPs on it with specific MAC addreses.

For instance on ovh (dedicated host), you can buy ip subnets, however you need to pre-generate them in their admin menu.

It would be helpful if I was able to prefill the entire subnet with mac addresses rather than use these commands manually:

sdc sdc-napi /nics -X POST -d '{ "vlan_id": 0, "nic_tag": "external", "ip" :"xxx.xxx.xxx.xxx", "primary": true, "owner_uuid": "UUID", "belongs_to_uuid": "UUID", "network_uuid": "UUID", "belongs_to_type": "zone", "mac":"00:00:00:00:00:00"}'

sdc sdc-vmapi /vms/UUID?action=add_nics -X POST -d '{"macs":"00:00:00:00:00:00"}'

Web-GUI not working after Reboot

Hi,

after rebooting CoaL i'm not able to login via web-GUI. I'm getting the following error:

"Services required for authentication are currently unavailable. Signin will be re-enabled when service is restored"

It seems to be kind of a timing issue: after reboot adminui checks if authentication service is available - but not all zones are finished booting up. So adminui needs to check again after some time if authentication is available now.

I can fix the problem via "svcadm restart adminui" when i'm logged in to the adminui zone.

Logfile gives me the following:

[2016-04-02T15:37:35.054Z]  INFO: adminui/audit/15389 on 002ef8fe-783c-4a1c-b2fd-977ade7eed20: handled: 503 (req_id=d263dfd0-f8e8-11e5-a021-b7edb026542f, route=getapiauth, audit=true, remoteAddress=192.168.2.130, remotePort=60730, latency=2, _audit=true)
    GET /api/auth HTTP/1.1
    host: 192.168.9.101
    accept-language: de-de
    accept-encoding: gzip, deflate
    connection: keep-alive
    accept: */*
    user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/601.5.17 (KHTML, like Gecko) Version/9.1 Safari/601.5.17
    x-adminui-token: cd20668f3d5592a8934026d69cdc2a5dfd15d294
    referer: https://192.168.9.101/
    x-requested-with: XMLHttpRequest
    --
    HTTP/1.1 503 Service Unavailable
    content-encoding: gzip
    content-type: application/json

    {
      "code": "ServiceUnavailableError",
      "message": "service unavailable (moray)"
    }
    --
     ServiceUnavailableError: service unavailable (moray)
        at Server.requireAuth (/opt/smartdc/adminui/lib/auth.js:76:21)
        at next (/opt/smartdc/adminui/node_modules/restify/lib/server.js:745:30)
        at f (/opt/smartdc/adminui/node_modules/restify/node_modules/once/once.js:17:25)
        at attachOtherClients (/opt/smartdc/adminui/lib/adminui.js:180:16)
        at next (/opt/smartdc/adminui/node_modules/restify/lib/server.js:745:30)
        at f (/opt/smartdc/adminui/node_modules/restify/node_modules/once/once.js:17:25)
        at Server.attachSdcClients (/opt/smartdc/adminui/lib/sdc-clients.js:36:9)
        at next (/opt/smartdc/adminui/node_modules/restify/lib/server.js:745:30)
        at f (/opt/smartdc/adminui/node_modules/restify/node_modules/once/once.js:17:25)
        at Server.<anonymous> (/opt/smartdc/adminui/lib/trace-event.js:24:13)
    --
    req.timers: {
      "bunyan": 42,
      "parseQueryString": 18,
      "gzip": 162,
      "parseAccept": 59,
      "handler-4": 18,
      "attachSdcClients": 10,
      "handler-6": 11,
      "requireAuth": 522
    }

In Addition, i'm seeing an unhandled expection right after the services has started (not quite shure if it is related to my problem):

[2016-04-02T15:25:11.851Z]  INFO: adminui/15389 on 002ef8fe-783c-4a1c-b2fd-977ade7eed20: HTTP Server started on 0.0.0.0:80
[2016-04-02T15:25:11.852Z]  INFO: adminui/15389 on 002ef8fe-783c-4a1c-b2fd-977ade7eed20: HTTPS Server started on 0.0.0.0:443
[ Apr  2 15:25:12 Rereading configuration. ]
[ Apr  2 15:25:12 No 'refresh' method defined.  Treating as :true. ]
[2016-04-02T15:26:11.928Z] FATAL: adminui/15389 on 002ef8fe-783c-4a1c-b2fd-977ade7eed20: Uncaught Exception
    AssertionError: connection state change after close
        at Object.module.exports.(anonymous function) [as notEqual] (/opt/smartdc/adminui/node_modules/assert-plus/assert.js:242:35)
        at Client._onConnection (/opt/smartdc/adminui/node_modules/moray/node_modules/fast/lib/client.js:430:12)
        at /opt/smartdc/adminui/node_modules/moray/node_modules/fast/lib/client.js:196:14
        at FunctionCall.doCallback_ (/opt/smartdc/adminui/node_modules/moray/node_modules/backoff/lib/function_call.js:162:20)
        at FunctionCall.abort (/opt/smartdc/adminui/node_modules/moray/node_modules/backoff/lib/function_call.js:121:10)
        at Client.close (/opt/smartdc/adminui/node_modules/moray/node_modules/fast/lib/client.js:180:30)
        at /opt/smartdc/adminui/node_modules/moray/lib/connection_pool.js:134:16
        at Array.forEach (native)
        at ConnectionPool.removeHost (/opt/smartdc/adminui/node_modules/moray/lib/connection_pool.js:132:19)
        at /opt/smartdc/adminui/node_modules/moray/lib/connection_pool.js:76:14

Thanks,
Kilian

AdminUI lacks a Delete Snapshot button

In the Snapshots section of a VM, the GUI only presents create and rollback buttons, despite DeleteMachineSnapshot being exposed via CloudAPI. This seems to be an unintentional omission.

image

adminui tries to change the mtu on primary flag change

When trying to issue an update nic request througth the admiui to flip primary nic flag between 2 nics, adminui sends in the mtu as part of the json payload and it seems to be generating the error.

JSON Payload:
{"nics":[{"interface":"net0","mac":"90:b8:d0:99:86:63","mtu":1500},{"interface":"net1","mac":"90:b8:d0:3c:9d:bb","allow_ip_spoofing":true,"allow_mac_spoofing":true,"mtu":1500,"primary":true}]}

Error in vmapi logs:
POST /vms/be69f445-d176-6a7f-a3e0-ed4775e1f3e4?action=update_nics HTTP/1.1
x-request-id: ec9c4200-412f-11e5-b23f-4f447d8d011b
accept: application/json
content-type: application/json
user-agent: restify/2.8.5 (ia32-sunos; v8/3.14.5.9; OpenSSL/1.0.1e) node/0.10.26
date: Wed, 12 Aug 2015 20:22:59 GMT
content-length: 192
content-md5: 9hzARfs8m8/VCnseOqDssw==
host: vmapi.dc1.alesium.net
connection: keep-alive

{
  "nics": [
    {
      "interface": "net0",
      "mac": "90:b8:d0:99:86:63",
      "mtu": 1500
    },
    {
      "interface": "net1",
      "mac": "90:b8:d0:3c:9d:bb",
      "allow_ip_spoofing": true,
      "allow_mac_spoofing": true,
      "mtu": 1500,
      "primary": true
    }
  ]
}
--
HTTP/1.1 409 Conflict
content-type: application/json
content-length: 165
content-md5: C5QIBJaKjmrlhJpqKDhItw==
date: Wed, 12 Aug 2015 20:22:59 GMT
server: VMAPI
x-request-id: ec9c4200-412f-11e5-b23f-4f447d8d011b
x-response-time: 6
x-server-name: 8f89fe04-7dbe-4f5c-b192-741e7ad94bae

{
  "code": "ValidationFailed",
  "message": "Invalid VM update parameters",
  "errors": [
    {
      "field": "nics",
      "code": "Invalid",
      "message": "'mtu' is not a valid property to update"
    }
]
}
--
ValidationFailedError: Invalid VM update parameters
    at new ValidationFailedError (/opt/smartdc/vmapi/lib/errors.js:125:23)
    at Object.exports.validateNics (/opt/smartdc/vmapi/lib/common/validation.js:1709:15)
    at Server.updateNics (/opt/smartdc/vmapi/lib/endpoints/vms.js:696:16)
    at Server.updateVm (/opt/smartdc/vmapi/lib/endpoints/vms.js:442:19)
    at next (/opt/smartdc/vmapi/node_modules/restify/lib/server.js:731:30)
    at f (/opt/smartdc/vmapi/node_modules/restify/node_modules/once/once.js:16:25)
    at onGetVm (/opt/smartdc/vmapi/lib/interceptors.js:69:13)
    at EventEmitter.<anonymous> (/opt/smartdc/vmapi/lib/apis/moray.js:208:16)
    at EventEmitter.g (events.js:180:16)
    at EventEmitter.emit (events.js:92:17)
--
req.timers: {
  "handler-0": 24,
  "bunyan": 73,
  "handler-2": 383,
  "parseAccept": 196,
  "readBody": 462,
  "parseBody": 53,
  "parseDate": 36,
  "parseQueryString": 208,
  "addProxies": 18,
  "checkWfapi": 14,
  "loadVm": 3528,
  "updateVm": 517
}

account/user limits allows for "undefined" datacenter

I'm seeing a "undefined" table entry on the provisioning limits page...which seems...inelegant.

screen shot 2016-06-10 at 11 02 26 am

I can observe the UI is making a call to the cloudapi, and it gets a response like this:

[
  {
    "dn": "dclimit=tacoma, uuid=0efe93a4-a0dd-49af-c127-c9df46352694, ou=users, o=smartdc",
    "datacenter": "tacoma",
    "limit": [
      {
        "check": "os",
        "os": "any",
        "by": "ram",
        "value": "2000"
      }
    ]
  },
  {
    "dn": "dclimit=undefined, uuid=0efe93a4-a0dd-49af-c127-c9df46352694, ou=users, o=smartdc",
    "datacenter": "undefined",
    "limit": []
  }
]

So, the UI is displaying each element of the array, but the data in the array is bad.

Here's the problem. This UI allowed me to create a bad array element by creating a limit WITHOUT specifying a datacenter. And, further, if I update/modify a new limit WITHOUT specifying the dc, the "undefined" array entry gets update with my values - though the record is still titled "undefined". If I then delete the limit from the "undefined" dc, that limit is removed from array, but the "undefined" dc still exists in the array.

I'm not sure what the intent is here. If the datacenter is a requirement for setting a limit, the UI should prevent a POST to the API without the missing data. Furthermore, the API should validate required data exists and prevent any update if the validation fails.

Alternatively, if the datacenter is NOT a requirement, and instead this is an attempt to allow for a "global" or "all datacenters" limits to be managed, then the "undefined" label should be changed to something more user-friendly.

Intermittent blank page problem

There seems to be an intermittent issue where the page will show up blank when logging in or clicking on any of the menu items inside adminui.

This is what comes out of console when it fails to load;

image

image

And this is what comes out when it does load;

image

image

I'm guessing there's some sort of race condition within JS, but I'm not entirely sure where it's happening.

Attempting to call start manually results in the following;

require('adminui').start();
libs.js:1 Uncaught Error: Backbone.history has already been started(…)

Ping continues to show in the network log;

{"services":{"moray":true,"ufds":true},"time":"2016-09-06T10:31:38.267Z"}
{"services":{"moray":true,"ufds":true},"time":"2016-09-06T10:31:44.272Z"}

The response from /api/auth and /api/services?name=cloudapi seem to look fine to the naked eye.

I'm running adminui release-20160804-20160804T183018Z-g71e8e54. Tried updating to the next latest version, but ran into TritonDataCenter/triton#210

Anything else I can do to help try diagnose the bug?

Zone/Server UUIDs are not "clickable" anymore

When browsing the IP Address Allocations section of a network, it was previously possible to click on the UUID of a zone/server using a specific IP and be directly sent to the page of this specific zone/server.

It is apparently gone on 20160107.
I was previously using 20151015.

Before:
20151015

Now:
20160107

hosting adminui without triton headnode requirements

short question: i am looking for a simple webui alternative to project fifo. for managing my smartos nodes. would it be possible to selfhost the adminui without the full triton overhead/requirements? installing it in a vm on my notebook would be an awesome usecase for me.
thanks for these awesome oss hypervisor to the whole joyent team (switched from proxmox);)

Please add Content-Type header in all responses

I'm having a difficult time getting adminui to work behind Traefik. The best theory we have is that because Content-Type isn't being set by adminui Traefik is trying to guess what it is and sets it to application/x-gzip which results in just getting a downloaded .gz file instead of a rendered page.

No way to enter JSON types != strings via browser

Although adminui offers an Edit Metadata GUI interface, values entered there are always interpreted as json strings.
This renders the adminui useless for such tasks as enabling custom image creation (as with the triton packer builder) since entering "true" into the Edit Metadata interface results in the string literal: "true" rather than the JSON type of true.

The only workaround is if you have shell access to the SmartOS headnode and can enter the following directly:

echo '{"metadata": {"IMGAPI_ALLOW_LOCAL_CREATE_IMAGE_FROM_VM": true}}' \ | sapiadm update $(sdc-sapi /services?name=imgapi | json -H 0.uuid)

per https://docs.joyent.com/private-cloud/install/image-management

RBAC rules required for sub-account login

I created two sub-accounts on my local SDC following the documentation. Login into the AdminUI using the sub-accounts doesn't seem to work (even when using the account/subaccount syntax).

This is my current policy:
screenshot from 2016-02-15 18-23-48

What are the rules required for a sub-account to log into the AdminUI ?

Would it be possible to add this to the User management section of the documentation ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.