github.com/Ilhicas/nomad@v1.0.4-0.20210304152020-e86851182bc3/ui/app/templates/optimize.hbs (about)

     1  <PageLayout>
     2    <section class="section">
     3      {{#if @model}}
     4        <div class="toolbar collapse">
     5          <div class="toolbar-item">
     6            {{#if @model}}
     7              <SearchBox
     8                data-test-recommendation-summaries-search
     9                @onChange={{this.syncActiveSummary}}
    10                @searchTerm={{mut this.searchTerm}}
    11                @placeholder="Search {{this.model.length}} {{pluralize "recommendation" this.model.length}}..." />
    12            {{/if}}
    13          </div>
    14          <div class="toolbar-item is-right-aligned is-mobile-full-width">
    15            <div class="button-bar">
    16              <MultiSelectDropdown
    17                data-test-type-facet
    18                @label="Type"
    19                @options={{this.optionsType}}
    20                @selection={{this.selectionType}}
    21                @onSelect={{action this.setFacetQueryParam "qpType"}} />
    22              <MultiSelectDropdown
    23                data-test-status-facet
    24                @label="Status"
    25                @options={{this.optionsStatus}}
    26                @selection={{this.selectionStatus}}
    27                @onSelect={{action this.setFacetQueryParam "qpStatus"}} />
    28              <MultiSelectDropdown
    29                data-test-datacenter-facet
    30                @label="Datacenter"
    31                @options={{this.optionsDatacenter}}
    32                @selection={{this.selectionDatacenter}}
    33                @onSelect={{action this.setFacetQueryParam "qpDatacenter"}} />
    34              <MultiSelectDropdown
    35                data-test-prefix-facet
    36                @label="Prefix"
    37                @options={{this.optionsPrefix}}
    38                @selection={{this.selectionPrefix}}
    39                @onSelect={{action this.setFacetQueryParam "qpPrefix"}} />
    40            </div>
    41          </div>
    42        </div>
    43        {{#if this.system.shouldShowNamespaces}}
    44          <div class="toolbar">
    45            <div class="toolbar-item is-right-aligned is-mobile-full-width">
    46              <Toggle
    47                data-test-all-namespaces-toggle
    48                @class="is-flex"
    49                @isActive={{this.includeAllNamespaces}}
    50                @onToggle={{this.toggleIncludeAllNamespaces}}
    51              >
    52                <div class="is-size-7 label">Include all namespaces</div>
    53              </Toggle>
    54            </div>
    55          </div>
    56        {{/if}}
    57  
    58        {{#if this.filteredSummaries}}
    59          {{outlet}}
    60  
    61          <ListTable
    62            @source={{this.filteredSummaries}} as |t|>
    63            <t.head>
    64              <th>Job</th>
    65              <th>Recommended At</th>
    66              <th># Allocs</th>
    67              <th>CPU</th>
    68              <th>Mem</th>
    69              <th>Agg. CPU</th>
    70              <th>Agg. Mem</th>
    71            </t.head>
    72            <t.body as |row|>
    73              {{#if row.model.isProcessed}}
    74                <Das::RecommendationRow
    75                  class="is-disabled"
    76                  @summary={{row.model}}
    77                />
    78              {{else}}
    79                <Das::RecommendationRow
    80                  class="is-interactive {{if (eq row.model this.activeRecommendationSummary) 'is-active'}}"
    81                  @summary={{row.model}}
    82                  {{on "click" (fn this.transitionToSummary row.model)}}
    83                />
    84              {{/if}}
    85  
    86            </t.body>
    87          </ListTable>
    88        {{else}}
    89          <div class="empty-message" data-test-empty-recommendations>
    90            <h3 class="empty-message-headline" data-test-empty-recommendations-headline>No Matches</h3>
    91            <p class="empty-message-body">
    92              No recommendations match your current filter selection.
    93            </p>
    94          </div>
    95        {{/if}}
    96      {{else}}
    97        <div class="empty-message" data-test-empty-recommendations>
    98          <h3 class="empty-message-headline" data-test-empty-recommendations-headline>No Recommendations</h3>
    99          <p class="empty-message-body">
   100            All recommendations have been accepted or dismissed. Nomad will continuously monitor applications so expect more recommendations in the future.
   101          </p>
   102        </div>
   103      {{/if}}
   104    </section>
   105  </PageLayout>