> On Jan. 7, 2019, 10:52 p.m., Benjamin Mahler wrote:
> > Hm.. it looks like the rows are bigger in this table? (I measured in the 
> > screenshot and it appears to be the case). is it missing some attributes 
> > that the reservation table has?

Very good catch, thanks! There was a typo in one of the table attributes 
(`table-triped` instead of `table-striped`). For some reason this lead to 
bootstrap not applying the properties for `table-condensed` (i.e., `padding: 
8px` instead of `padding: 5px`). This should be fixed now, screenshot is 
updated. Note that this table is modelled after the agents table in 
`agents.html`, but it should still look similar to the resources table below.


To debug this without even starting a resource provider (`test-csi-plugin` is 
not supported on macos), I hardcoded the RP information during development and 
confirmed with a real RP,
```
diff --git a/src/webui/app/controllers.js b/src/webui/app/controllers.js
index 08c9f1c0b..57491c6bd 100644
--- a/src/webui/app/controllers.js
+++ b/src/webui/app/controllers.js
@@ -694,7 +694,97 @@
           $scope.agent = {};
           $scope.agent.frameworks = {};
           $scope.agent.completed_frameworks = {};
-          $scope.agent.resource_providers = $scope.state.resource_providers;
+          $scope.agent.resource_providers = [{
+            "resource_provider_info": {
+              "id": {
+                "value": "bea4ab63-5a61-45ad-a00b-1a3345f46ca2"
+              },
+              "type": "org.apache.mesos.rp.local.storage",
+              "name": "test_slrp",
+              "default_reservations": [
+                {
+                  "type": "DYNAMIC",
+                  "role": "test-role"
+                }
+              ],
+              "storage": {
+                "plugin": {
+                  "type": "org.apache.mesos.csi.test",
+                  "name": "test_plugin",
+                  "containers": [
+                    {
+                      "services": [
+                        "CONTROLLER_SERVICE",
+                        "NODE_SERVICE"
+                      ],
+                      "command": {
+                        "uris": [
+                          {
+                            "value": 
"/home/bbannier/src/mesos/_/src/test-csi-plugin",
+                            "executable": true,
+                            "extract": true
+                          }
+                        ],
+                        "shell": true,
+                        "value": "./test-csi-plugin --available_capacity=2GB 
--work_dir=workdir --volumes='volume1:1GB;volume2:2GB'"
+                      },
+                      "resources": [
+                        {
+                          "name": "cpus",
+                          "type": "SCALAR",
+                          "scalar": {
+                            "value": 0.1
+                          }
+                        },
+                        {
+                          "name": "mem",
+                          "type": "SCALAR",
+                          "scalar": {
+                            "value": 200
+                          }
+                        }
+                      ]
+                    }
+                  ]
+                }
+              }
+            },
+            "total_resources": [
+              {
+                "provider_id": {
+                  "value": "bea4ab63-5a61-45ad-a00b-1a3345f46ca2"
+                },
+                "name": "disk",
+                "type": "SCALAR",
+                "scalar": {
+                  "value": 1024
+                },
+                "reservations": [
+                  {
+                    "type": "DYNAMIC",
+                    "role": "test-role"
+                  }
+                ],
+                "disk": {
+                  "source": {
+                    "type": "RAW",
+                    "vendor": "org.apache.mesos.csi.test.test_plugin",
+                    "id": "volume1",
+                    "metadata": {
+                      "labels": [
+                        {
+                          "key": "path",
+                          "value": "workdir/1GB-volume1"
+                        }
+                      ]
+                    }
+                  }
+                }
+              }
+            ]
+          }
+          ];
+
           $scope.agent.url_prefix = agentURLPrefix(agent, false);
 
           // The agent attaches a "/slave/log" file when either
```


- Benjamin


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/69662/#review211741
-----------------------------------------------------------


On Jan. 7, 2019, 11:33 p.m., Benjamin Bannier wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/69662/
> -----------------------------------------------------------
> 
> (Updated Jan. 7, 2019, 11:33 p.m.)
> 
> 
> Review request for mesos, Armand Grillet, Benjamin Mahler, and Chun-Hung 
> Hsiao.
> 
> 
> Bugs: MESOS-8380
>     https://issues.apache.org/jira/browse/MESOS-8380
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Displayed resource provider information in the Mesos webui.
> 
> 
> Diffs
> -----
> 
>   src/webui/app/agents/agent.html a101a93dcdb95f257fe0ee967c92d2cdc1c84f84 
>   src/webui/app/controllers.js 8049cf611895edea7c54b3c58d71e00d823a1fd3 
> 
> 
> Diff: https://reviews.apache.org/r/69662/diff/4/
> 
> 
> Testing
> -------
> 
> `make check`
> 
> Ran a local test with a `./src/test-csi-plugin`.
> 
> 
> File Attachments
> ----------------
> 
> Screenshot Agent screen
>   
> https://reviews.apache.org/media/uploaded/files/2019/01/04/ed920e7b-4072-49be-8801-3b875d529fad__Screen_Shot_2019-01-04_at_11.11.51_AM.png
> Screenshot Agent screen
>   
> https://reviews.apache.org/media/uploaded/files/2019/01/07/8f494c0f-1c76-4734-9aae-7fb899589120__Screen_Shot_2019-01-07_at_9.42.51_PM.png
> Screenshot Agent screen
>   
> https://reviews.apache.org/media/uploaded/files/2019/01/07/8a850bcd-dd30-4d25-bb37-60cd872ddd62__Screen_Shot_2019-01-07_at_11.27.49_PM.png
> 
> 
> Thanks,
> 
> Benjamin Bannier
> 
>

Reply via email to