+
+ }
+ color="danger"
+ >
+
+ {statusCode}: {errorString}. {message}
+
+
+
+
+
+
+
+
+ );
+ }
+
+ let nodeOptions = Object.keys(nodes).map((attrs) => ({
+ text: `${attrs} (${nodes[attrs].length})`,
+ value: attrs,
+ }));
+
+ nodeOptions.sort((a, b) => a.value.localeCompare(b.value));
+ if (nodeOptions.length) {
+ nodeOptions = [
+ {
+ text: i18n.translate('xpack.indexLifecycleMgmt.editPolicy.defaultNodeAllocation', {
+ defaultMessage: "Default allocation (don't use attributes)",
+ }),
+ value: '',
+ },
+ ...nodeOptions,
+ ];
+ }
+ if (!nodeOptions.length) {
+ return (
+