From b3f140fee69a0e7affd67ffccb67da1a65bf861a Mon Sep 17 00:00:00 2001 From: Michael Lange Date: Sat, 2 May 2020 21:30:20 -0700 Subject: [PATCH] Plugins table on the plugins list page --- ui/app/controllers/csi/plugins/index.js | 2 +- ui/app/templates/csi/plugins/index.hbs | 53 +++++++++++++++++++++++++ 2 files changed, 54 insertions(+), 1 deletion(-) diff --git a/ui/app/controllers/csi/plugins/index.js b/ui/app/controllers/csi/plugins/index.js index 9902b3f22..14e3a9a1e 100644 --- a/ui/app/controllers/csi/plugins/index.js +++ b/ui/app/controllers/csi/plugins/index.js @@ -34,7 +34,7 @@ export default Controller.extend(SortableFactory([]), { actions: { gotoPlugin(plugin) { - this.transitionToRoute('csi.plugins.plugin', plugin.id); + this.transitionToRoute('csi.plugins.plugin', plugin.plainId); }, }, }); diff --git a/ui/app/templates/csi/plugins/index.hbs b/ui/app/templates/csi/plugins/index.hbs index d5d75773a..05b53d372 100644 --- a/ui/app/templates/csi/plugins/index.hbs +++ b/ui/app/templates/csi/plugins/index.hbs @@ -9,5 +9,58 @@ {{#if isForbidden}} {{partial "partials/forbidden-message"}} {{else}} + {{#if sortedPlugins}} + {{#list-pagination + source=sortedPlugins + size=pageSize + page=currentPage as |p|}} + {{#list-table + source=p.list + sortProperty=sortProperty + sortDescending=sortDescending + class="with-foot" as |t|}} + {{#t.head}} + {{#t.sort-by prop="plainId"}}ID{{/t.sort-by}} + {{#t.sort-by prop="controllersHealthyProportion"}}Controller Health{{/t.sort-by}} + {{#t.sort-by prop="nodesHealthyProportion"}}Node Health{{/t.sort-by}} + {{#t.sort-by prop="provider"}}Provider{{/t.sort-by}} + {{/t.head}} + {{#t.body key="model.id" as |row|}} + + + {{#link-to "csi.plugins.plugin" row.model.plainId class="is-primary"}}{{row.model.plainId}}{{/link-to}} + + + {{if (gt row.model.controllersHealthy 0) "Healthy" "Unhealthy"}} + ({{row.model.controllersHealthy}}/{{row.model.controllersExpected}}) + + + {{if (gt row.model.nodesHealthy 0) "Healthy" "Unhealthy"}} + ({{row.model.nodesHealthy}}/{{row.model.nodesExpected}}) + + {{row.model.provider}} + + {{/t.body}} + {{/list-table}} +
+ {{page-size-select onChange=(action resetPagination)}} + +
+ {{/list-pagination}} + {{else}} +
+

No Plugins

+

+ The cluster currently has no registered CSI Plugins. +

+
+ {{/if}} {{/if}}