Skip to content

Commit

Permalink
Use word-wrap in check plugin tables
Browse files Browse the repository at this point in the history
  • Loading branch information
Nuckal777 committed Jan 12, 2024
1 parent be523f2 commit a295f28
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion plugin/impl/condition.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ func (c *Condition) ID() string {
func (c *Condition) Check(params plugin.Parameters) (plugin.CheckResult, error) {
for _, condition := range params.Node.Status.Conditions {
if condition.Type == v1.NodeConditionType(c.Type) {
return plugin.CheckResult{Passed: condition.Status == v1.ConditionStatus(c.Status)}, nil
info := map[string]any{"current": condition.Status, "expected": c.Status}
return plugin.CheckResult{Passed: condition.Status == v1.ConditionStatus(c.Status), Info: info}, nil
}
}
return plugin.FailedWithReason(fmt.Sprintf("condition %s not present", c.Type)), nil
Expand Down
4 changes: 2 additions & 2 deletions static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ <h3 x-text="`${profile.name}: ${profile.state}`"></h3>
<div x-show="transition.chain.passed && !transition.passed">Advancing is likely
blocked by an other profile being in-maintenance.</div>
<div>
<table class="pure-table">
<table class="pure-table" style="table-layout: fixed; width: 98%;">
<thead>
<tr>
<th>Instance</th>
Expand All @@ -138,7 +138,7 @@ <h3 x-text="`${profile.name}: ${profile.state}`"></h3>
</thead>
<tbody x-data="{get plugins() { return entries(transition.chain.info); }}">
<template x-for="plugin in plugins">
<tr>
<tr style="word-wrap: break-word; font-size: 90%;">
<td x-text="plugin[0]"></td>
<td x-text="plugin[1].id"></td>
<td x-text="plugin[1].passed"></td>
Expand Down

0 comments on commit a295f28

Please sign in to comment.