From 4f124fb857e9fac7f4381a6fd835a3b0b21d16e0 Mon Sep 17 00:00:00 2001 From: Christopher Meiklejohn Date: Tue, 6 Aug 2013 15:51:38 -0700 Subject: [PATCH] Incompatible is less serious. Ensure that the message regarding incompatible nodes is explicitly clear and doesn't trigger errors. This is necessary because even in a pure 1.4.1 cluster, depending on how nodes are started capability negotation might take a few seconds, where some nodes will be shown as incompatible. Conflicts: priv/admin/js/generated/templates.js --- priv/admin/css/compiled/style.css | 9 +++++++++ priv/admin/css/snapshot.styl | 8 ++++++++ priv/admin/js/generated/templates.js | 2 +- priv/admin/js/templates/snapshot.hbs | 6 +++++- 4 files changed, 23 insertions(+), 2 deletions(-) diff --git a/priv/admin/css/compiled/style.css b/priv/admin/css/compiled/style.css index 9500da3..423832e 100644 --- a/priv/admin/css/compiled/style.css +++ b/priv/admin/css/compiled/style.css @@ -937,6 +937,15 @@ input.gui-point-button-right:active { #snapshot-page #healthy-cluster h3, #snapshot-page #unhealthy-cluster h3 { margin-top: 30px; + line-height: 1.5; +} +#snapshot-page #healthy-cluster h4, +#snapshot-page #unhealthy-cluster h4 { + font-family: 'noticia', georgia, serif; + margin-top: 20px; + font-size: 14px; + font-style: italic; + line-height: 1.5; } #snapshot-page #healthy-cluster ul, #snapshot-page #unhealthy-cluster ul { diff --git a/priv/admin/css/snapshot.styl b/priv/admin/css/snapshot.styl index 48d9e54..a22e6b8 100644 --- a/priv/admin/css/snapshot.styl +++ b/priv/admin/css/snapshot.styl @@ -18,7 +18,15 @@ CSS to be applied ONLY on the snapshot page h3 margin-top : 30px + line-height : 1.5 + h4 + copy-font() + margin-top : 20px + font-size: 14px + font-style: italic + line-height : 1.5 + ul margin : 10px 0 0 20px diff --git a/priv/admin/js/generated/templates.js b/priv/admin/js/generated/templates.js index 2e507c1..bb49394 100644 --- a/priv/admin/js/generated/templates.js +++ b/priv/admin/js/generated/templates.js @@ -1,5 +1,5 @@ Ember.TEMPLATES['application'] = Ember.Handlebars.compile('
{{outlet}}
'); -Ember.TEMPLATES['snapshot'] = Ember.Handlebars.compile('

Current Snapshot

{{#if healthyCluster}}

Your cluster is healthy.

You currently have...

  • 0 Unreachable nodes
  • 0 Incompatible nodes
  • 0 Nodes marked as down
  • 0 Nodes experiencing low memory
  • Nothing to worry about because Riak is your friend
{{else}}

Your cluster has problems.

{{#if areUnreachableNodes}}

The following nodes are currently unreachable:

    {{#each unreachableNodes}}
  • {{name}}
  • {{/each}}
{{/if}} {{#if areIncompatibleNodes}}

The following nodes are currently incompatible with Riak Control:

    {{#each incompatibleNodes}}
  • {{name}}
  • {{/each}}
{{/if}} {{#if areDownNodes}}

The following nodes are currently marked down:

    {{#each downNodes}}
  • {{name}}
  • {{/each}}
{{/if}} {{#if areLowMemNodes}}

The following nodes are currently experiencing low memory:

    {{#each lowMemNodes}}
  • {{name}}
  • {{/each}}
{{/if}}
{{/if}}
'); +Ember.TEMPLATES['snapshot'] = Ember.Handlebars.compile('

Current Snapshot

{{#if healthyCluster}}

Your cluster is healthy.

You currently have...

  • 0 Unreachable nodes
  • 0 Incompatible nodes
  • 0 Nodes marked as down
  • 0 Nodes experiencing low memory
  • Nothing to worry about because Riak is your friend
{{else}}

Your cluster has problems.

{{#if areUnreachableNodes}}

The following nodes are currently unreachable:

    {{#each unreachableNodes}}
  • {{name}}
  • {{/each}}
{{/if}} {{#if areIncompatibleNodes}}

Some information about the following nodes may be temporarily unavailable:

    {{#each incompatibleNodes}}
  • {{name}}
  • {{/each}}

This may be triggered by using control in the middle of a rolling upgrade or during startup of the node.

{{/if}} {{#if areDownNodes}}

The following nodes are currently marked down:

    {{#each downNodes}}
  • {{name}}
  • {{/each}}
{{/if}} {{#if areLowMemNodes}}

The following nodes are currently experiencing low memory:

    {{#each lowMemNodes}}
  • {{name}}
  • {{/each}}
{{/if}}
{{/if}}
'); Ember.TEMPLATES['cluster'] = Ember.Handlebars.compile('

Cluster Management

{{#if standalone}}

Join Node

Type the name of a node in an existing cluster to join this node to. {{else}}

Add Node

Type the name of a node to add to this cluster. {{/if}}
{{view RiakControl.JoinNodeView}} {{#if standalone}} JOIN NODE {{else}} ADD NODE {{/if}}
{{#if errorMessage}} {{/if}}

Current Cluster

{{#if controller.isLoading}}

Loading...

{{else}}
  • Actions

  • Name & Status

  • Partitions

  • RAM Usage

{{collection RiakControl.CurrentClusterView contentBinding="activeCurrentCluster"}} {{/if}}

Staged Changes (Your new cluster after convergence.)

{{#if controller.displayPlan}}
  • Name & Status

  • Partitions

  • Action

  • Replacement

{{collection RiakControl.StagedClusterView contentBinding="activeStagedCluster"}}
COMMIT
Changed your mind? Click this button to remove all staged changes. CLEAR PLAN
{{else}}
{{#if controller.ringNotReady}}

Please wait, the ring is converging.

{{else}} {{#if controller.legacyRing}}

You are currently running a legacy version of Riak that does not support staged changes.

{{else}} {{#if controller.emptyPlan}}

Currently no staged changes to display.

{{else}} {{#if controller.isLoading}}

Loading...

{{/if}} {{/if}} {{/if}} {{/if}}
{{/if}}
'); Ember.TEMPLATES['nodes'] = Ember.Handlebars.compile('

Node Management

{{#if errorMessage}} {{/if}}

Current Cluster

Click the radio button for each node you would like to stop or mark as down, then click "APPLY" to apply your changes. If the radio button is grayed out, the action is not available due to the current status of the node.
{{#if controller.isLoading}}

Loading...

{{else}}
  • Stop

  • Down

  • Name & Status

  • Partitions

  • RAM Usage

{{collection RiakControl.CurrentNodesView contentBinding="content"}} {{/if}}
APPLY CLEAR
'); Ember.TEMPLATES['ring'] = Ember.Handlebars.compile('

Ring Status

Availability

{{view RiakControl.DegeneratePreflistChart}}
{{view RiakControl.QuorumUnavailableChart}}
{{view RiakControl.AllUnavailableChart}}

Partitions

Partitions

{{collection RiakControl.PartitionsView contentBinding="content"}}

Partition Information

{{#if partitionSelected}}

Index

{{selectedPartition.index}}
{{#if selectedPartition.unavailable}}

Unavailable Primaries

    {{#each selectedPartition.unavailable_nodes}}
  • {{this}}
  • {{/each}}
{{/if}}
{{#if selectedPartition.all_nodes.length}}

All Primaries

    {{#each selectedPartition.all_nodes}}
  • {{this}}
  • {{/each}}
{{else}}

No Primaries To Display

{{/if}}
{{else}} Click on a partition square to view its more information. {{/if}}

Legend

Only fallbacks available.
Majority of primary replicas down.
Replicas do not live on unique nodes.
Available.
'); diff --git a/priv/admin/js/templates/snapshot.hbs b/priv/admin/js/templates/snapshot.hbs index bcf83ae..750adfb 100644 --- a/priv/admin/js/templates/snapshot.hbs +++ b/priv/admin/js/templates/snapshot.hbs @@ -45,12 +45,16 @@ {{#if areIncompatibleNodes}} -

The following nodes are currently incompatible with Riak Control:

+

Some + information about the following nodes may be temporarily + unavailable:

+

This may be triggered by using control in the middle + of a rolling upgrade or during startup of the node.

{{/if}} {{#if areDownNodes}}