From e8cdd5b44663cd2987e392c0923e7a99a2a83317 Mon Sep 17 00:00:00 2001
From: suomiy
Date: Wed, 25 Jul 2018 17:06:51 +0200
Subject: [PATCH] eslint: Enable "semi" rule
- fix semicolons in all files
---
.eslintrc.json | 2 +-
pkg/apps/application-list.jsx | 2 +-
pkg/apps/utils.jsx | 12 +++---
pkg/dashboard/list.js | 8 ++--
pkg/docker/atomic.js | 2 +-
pkg/docker/containers-view.jsx | 16 ++++----
pkg/docker/details.js | 4 +-
pkg/docker/overview.js | 2 +-
pkg/docker/search.js | 6 +--
pkg/docker/storage.jsx | 4 +-
pkg/docker/util.js | 4 +-
pkg/kdump/kdump-view.jsx | 10 ++---
pkg/kubernetes/scripts/dashboard.js | 2 +-
pkg/kubernetes/scripts/graphs.js | 26 ++++++-------
pkg/kubernetes/scripts/kube-client-cockpit.js | 4 +-
pkg/kubernetes/scripts/kube-client.js | 2 +-
pkg/kubernetes/scripts/nodes.js | 12 +++---
.../virtual-machines/action-creators.jsx | 8 ++--
.../virtual-machines/components/VmActions.jsx | 4 +-
.../virtual-machines/components/VmMessage.jsx | 8 ++--
.../components/VmMetricsTab.jsx | 2 +-
.../components/VmOverviewTabKubevirt.jsx | 6 +--
.../components/createVmButton.jsx | 6 +--
.../components/createVmDialog.jsx | 2 +-
.../scripts/virtual-machines/index.jsx | 10 ++---
.../scripts/virtual-machines/reducers.jsx | 6 +--
.../scripts/virtual-machines/utils.jsx | 4 +-
.../virtual-machines/watch-metrics.es6 | 2 +-
pkg/lib/cockpit-components-install-dialog.jsx | 4 +-
pkg/lib/cockpit-components-listing.jsx | 2 +-
pkg/lib/cockpit-components-logs-panel.jsx | 2 +-
pkg/lib/patterns.js | 2 +-
pkg/lib/plot.js | 8 ++--
pkg/lib/service.js | 2 +-
pkg/machines/app.jsx | 4 +-
pkg/machines/components/consoles.jsx | 8 ++--
pkg/machines/components/deleteDialog.jsx | 2 +-
pkg/machines/components/desktopConsole.jsx | 18 ++++-----
pkg/machines/components/diskAdd.jsx | 4 +-
pkg/machines/components/dropdownButtons.jsx | 6 +--
pkg/machines/components/infoRecord.jsx | 2 +-
pkg/machines/components/libvirtSlate.jsx | 2 +-
.../components/notification/notification.jsx | 2 +-
.../notification/notificationArea.jsx | 2 +-
pkg/machines/components/vcpuModal.jsx | 8 ++--
pkg/machines/components/vmDisksTabLibvirt.jsx | 2 +-
pkg/machines/libvirt.es6 | 4 +-
pkg/machines/store.es6 | 2 +-
pkg/machines/vmnetworktab.jsx | 16 ++++----
pkg/networkmanager/firewall.jsx | 8 ++--
pkg/networkmanager/interfaces.js | 20 +++++-----
pkg/ovirt/components/ClusterTemplates.jsx | 2 +-
pkg/ovirt/components/ClusterVms.jsx | 4 +-
pkg/ovirt/components/HostToMaintenance.jsx | 6 +--
pkg/ovirt/components/OVirtTab.jsx | 8 ++--
pkg/ovirt/components/VdsmView.jsx | 26 ++++++-------
pkg/ovirt/components/vcpuModal.jsx | 6 +--
pkg/packagekit/autoupdates.jsx | 6 +--
pkg/packagekit/updates.jsx | 16 ++++----
pkg/playground/react-demo-onoff.jsx | 2 +-
pkg/playground/test.js | 2 +-
pkg/realmd/operation.js | 4 +-
pkg/selinux/setroubleshoot-view.jsx | 2 +-
pkg/shell/base_index.js | 10 ++---
pkg/storaged/client.js | 18 ++++-----
pkg/storaged/content-views.jsx | 2 +-
pkg/storaged/crypto-tab.jsx | 10 ++---
pkg/storaged/details.jsx | 2 +-
pkg/storaged/dialog.js | 2 +-
pkg/storaged/dialogx.jsx | 38 +++++++++----------
pkg/storaged/drives-panel.jsx | 2 +-
pkg/storaged/format-dialog.jsx | 2 +-
pkg/storaged/fsys-panel.jsx | 2 +-
pkg/storaged/fsys-tab.jsx | 4 +-
pkg/storaged/iscsi-panel.jsx | 4 +-
pkg/storaged/logs-panel.jsx | 2 +-
pkg/storaged/lvol-tabs.jsx | 2 +-
pkg/storaged/nfs-panel.jsx | 2 +-
pkg/storaged/optional-panel.jsx | 2 +-
pkg/storaged/overview.jsx | 4 +-
pkg/storaged/plot.jsx | 10 ++---
pkg/storaged/storage-controls.jsx | 8 ++--
pkg/storaged/utils.js | 8 ++--
pkg/storaged/vdo-details.jsx | 2 +-
pkg/storaged/vdos-panel.jsx | 2 +-
pkg/storaged/vgroup-details.jsx | 2 +-
pkg/storaged/vgroups-panel.jsx | 2 +-
pkg/systemd/host.js | 8 ++--
pkg/systemd/hwinfo.jsx | 2 +-
pkg/systemd/init.js | 2 +-
pkg/users/local.js | 8 ++--
webpack.config.js | 1 +
92 files changed, 276 insertions(+), 277 deletions(-)
diff --git a/.eslintrc.json b/.eslintrc.json
index 7a48da07790d..3b7538e9271c 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -25,6 +25,7 @@
"lines-between-class-members": ["error", "always", { "exceptAfterSingleLine": true }],
"prefer-promise-reject-errors": ["error", { "allowEmptyReject": true }],
"react/jsx-indent": ["error", 4],
+ "semi": ["error", "always", { "omitLastInOneLineBlock": true }],
"camelcase": "off",
"comma-dangle": "off",
@@ -36,7 +37,6 @@
"react/jsx-curly-spacing": "off",
"react/jsx-indent-props": "off",
"react/prop-types": "off",
- "semi": "off",
"space-before-function-paren": "off",
"standard/no-callback-literal": "off",
diff --git a/pkg/apps/application-list.jsx b/pkg/apps/application-list.jsx
index 26ea79754d05..908c68976f1f 100644
--- a/pkg/apps/application-list.jsx
+++ b/pkg/apps/application-list.jsx
@@ -128,7 +128,7 @@ class ApplicationList extends React.Component {
refresh_button = ;
} else {
refresh_progress = null;
- refresh_button =
+ refresh_button = ;
}
table_classes = "table app-list";
diff --git a/pkg/apps/utils.jsx b/pkg/apps/utils.jsx
index 6b928108343b..35746be7679e 100644
--- a/pkg/apps/utils.jsx
+++ b/pkg/apps/utils.jsx
@@ -43,10 +43,10 @@ export function icon_url(path_or_url) {
payload: "fsread1",
binary: "raw",
path: path_or_url,
- }
+ };
if (path_or_url.endsWith(".svg")) {
- queryobj.external = {"content-type": "image/svg+xml"}
+ queryobj.external = {"content-type": "image/svg+xml"};
}
var query = window.btoa(JSON.stringify(queryobj));
@@ -75,7 +75,7 @@ export const ProgressBar = ({ title, data }) => {
);
}
-}
+};
export const CancelButton = ({ data }) => {
return (
@@ -85,7 +85,7 @@ export const CancelButton = ({ data }) => {
{_("Cancel")}
);
-}
+};
export const show_error = ex => {
if (ex.code == "cancelled")
@@ -107,7 +107,7 @@ export const show_error = ex => {
cancel_caption: _("Close"),
actions: [ ]
});
-}
+};
export const launch = (comp) => {
var i;
@@ -117,4 +117,4 @@ export const launch = (comp) => {
return;
}
}
-}
+};
diff --git a/pkg/dashboard/list.js b/pkg/dashboard/list.js
index f09ed52d65d5..1c8517f15b57 100644
--- a/pkg/dashboard/list.js
+++ b/pkg/dashboard/list.js
@@ -75,7 +75,7 @@ var resource_monitors = [
};
},
options: { yaxis: { tickColor: "#e1e6ed",
- tickFormatter: function(v) { return v + "%"; }} },
+ tickFormatter: function(v) { return v + "%" }} },
ymax_min: 100
},
{ selector: "#dashboard-plot-1",
@@ -350,7 +350,7 @@ PageDashboard.prototype = {
});
$.each(seen, function(addr) {
- series[addr].forEach(function (s) { s.remove(); });
+ series[addr].forEach(function (s) { s.remove() });
delete series[addr];
});
@@ -455,7 +455,7 @@ PageDashboard.prototype = {
}
function plot_refresh() {
- self.plots.forEach(function (p) { p.refresh(); });
+ self.plots.forEach(function (p) { p.refresh() });
}
function plot_add(addr, info) {
@@ -525,7 +525,7 @@ PageDashboard.prototype = {
}
$(window).on('resize.dashboard', function () {
- self.plots.forEach(function (p) { p.resize(); });
+ self.plots.forEach(function (p) { p.resize() });
});
renderer();
diff --git a/pkg/docker/atomic.js b/pkg/docker/atomic.js
index 0b4a597f84fe..e128fff0fe6b 100644
--- a/pkg/docker/atomic.js
+++ b/pkg/docker/atomic.js
@@ -58,7 +58,7 @@ function updateVulnerableInfo() {
/* Atomic sometimes returns containers for which it doesn't
* have scan results. Remove those. */
- var ids = Object.keys(infos).filter(function (id) { return infos[id].json_file; });
+ var ids = Object.keys(infos).filter(function (id) { return infos[id].json_file });
if (ids.length > 0) {
promises = ids.map(function (id) {
diff --git a/pkg/docker/containers-view.jsx b/pkg/docker/containers-view.jsx
index 2b920faebbd9..bf7592fc8275 100644
--- a/pkg/docker/containers-view.jsx
+++ b/pkg/docker/containers-view.jsx
@@ -80,7 +80,7 @@ var ContainerHeader = React.createClass({
return {
filter: 'running',
filterText: ''
- }
+ };
},
filterChanged: function () {
@@ -144,7 +144,7 @@ var ContainerProblems = React.createClass({
problem_cursors.push(
{problem[i][1]}
- )
+ );
}
return (
@@ -255,7 +255,7 @@ var ContainerList = React.createClass({
$(this.props.client).off('container.containers', this.containersChanged);
$(this.props.client).off('container.container-details', this.containersChanged);
this.service.removeEventListener("Crash", this.newProblemOccurred);
- this.problems_client.close()
+ this.problems_client.close();
},
render: function () {
@@ -276,9 +276,9 @@ var ContainerList = React.createClass({
var state;
if (this.props.client.waiting[container.Id]) {
- state = { element: , tight: true }
+ state = { element: , tight: true };
} else {
- state = util.render_container_status(container.State)
+ state = util.render_container_status(container.State);
}
var image = container.Image;
@@ -287,7 +287,7 @@ var ContainerList = React.createClass({
if (shortContID in this.state.problems) {
hasProblem = true;
- state = {state}
+ state = {state}
;
}
var columns = [
@@ -600,11 +600,11 @@ var ImageList = React.createClass({
var element;
if (this.props.client.waiting[image.Id]) {
- element =
+ element = ;
} else {
element =
+ data-image={image.Id} />;
}
var columns = [
diff --git a/pkg/docker/details.js b/pkg/docker/details.js
index 6a5dcbf68766..8e9d6d0fe8e4 100644
--- a/pkg/docker/details.js
+++ b/pkg/docker/details.js
@@ -253,7 +253,7 @@
var id = this.container_id;
this.client.start(this.container_id).
fail(function(ex) {
- util.handle_scope_start_container(self.client, id, ex.message, function() { self.maybe_reconnect_terminal(); }, null);
+ util.handle_scope_start_container(self.client, id, ex.message, function() { self.maybe_reconnect_terminal() }, null);
}).
done(function() {
self.maybe_reconnect_terminal();
@@ -285,7 +285,7 @@
_("Deleting a container will erase all data in it."),
_("Delete")).
done(function () {
- util.docker_container_delete(self.client, self.container_id, function() { location.go("/"); }, function () { });
+ util.docker_container_delete(self.client, self.container_id, function() { location.go("/") }, function () { });
});
}
diff --git a/pkg/docker/overview.js b/pkg/docker/overview.js
index 5ef62127806d..34355d1f9e6c 100644
--- a/pkg/docker/overview.js
+++ b/pkg/docker/overview.js
@@ -70,7 +70,7 @@
var mem_series;
var cpu_options = plot.plot_simple_template();
- $.extend(cpu_options.yaxis, { tickFormatter: function(v) { return v.toFixed(0); },
+ $.extend(cpu_options.yaxis, { tickFormatter: function(v) { return v.toFixed(0) },
max: 100
});
$.extend(cpu_options.grid, { hoverable: true,
diff --git a/pkg/docker/search.js b/pkg/docker/search.js
index 43c914a214b5..9364b2963e02 100644
--- a/pkg/docker/search.js
+++ b/pkg/docker/search.js
@@ -179,9 +179,9 @@
$(function() {
dialog.setup();
$("#containers-search-image-dialog").
- on('show.bs.modal', function () { dialog.enter(); }).
- on('shown.bs.modal', function () { dialog.show(); }).
- on('hidden.bs.modal', function () { dialog.leave(); });
+ on('show.bs.modal', function () { dialog.enter() }).
+ on('shown.bs.modal', function () { dialog.show() }).
+ on('hidden.bs.modal', function () { dialog.leave() });
});
function search(client) {
diff --git a/pkg/docker/storage.jsx b/pkg/docker/storage.jsx
index a5cb4d434d90..bca9581c1ebb 100644
--- a/pkg/docker/storage.jsx
+++ b/pkg/docker/storage.jsx
@@ -363,7 +363,7 @@
function add_drives() {
var dfd = cockpit.defer();
- var devs = drives.map(function (d) { return d.path; });
+ var devs = drives.map(function (d) { return d.path });
if (docker_will_be_stopped)
client.close();
@@ -452,7 +452,7 @@
cockpit.location.go('/');
});
- $('#storage-reset').on('click', function () { reset_storage(client); });
+ $('#storage-reset').on('click', function () { reset_storage(client) });
function add_callback(drives, model) {
add_storage(client, drives, model);
diff --git a/pkg/docker/util.js b/pkg/docker/util.js
index 0f44ea07aa79..92713e94c80d 100644
--- a/pkg/docker/util.js
+++ b/pkg/docker/util.js
@@ -119,7 +119,7 @@
};
util.multi_line = function multi_line(strings) {
- return strings.map(function (str) { return Mustache.render("{{.}}", str); }).join('
');
+ return strings.map(function (str) { return Mustache.render("{{.}}", str) }).join('
');
};
util.format_cpu_shares = function format_cpu_shares(priority) {
@@ -244,7 +244,7 @@
var self = this;
$(self).hide().
siblings("div.spinner").show();
- util.docker_container_delete(client, id, function() { }, function () { $(self).show().siblings("div.spinner").hide(); });
+ util.docker_container_delete(client, id, function() { }, function () { $(self).show().siblings("div.spinner").hide() });
return false;
});
var btn_play = $('
- )
+ );
}
return (
diff --git a/pkg/kubernetes/scripts/dashboard.js b/pkg/kubernetes/scripts/dashboard.js
index af8ae6017c7b..9464962a6176 100644
--- a/pkg/kubernetes/scripts/dashboard.js
+++ b/pkg/kubernetes/scripts/dashboard.js
@@ -186,7 +186,7 @@
el = angular.element("
")
.attr("href", href)
.attr("target", "_blank")
- .on("click", function(ev) { ev.stopPropagation(); });
+ .on("click", function(ev) { ev.stopPropagation() });
element.append(el);
} else {
el = element;
diff --git a/pkg/kubernetes/scripts/graphs.js b/pkg/kubernetes/scripts/graphs.js
index f6afa356208e..93ac70fabd1d 100644
--- a/pkg/kubernetes/scripts/graphs.js
+++ b/pkg/kubernetes/scripts/graphs.js
@@ -598,17 +598,17 @@
cpu: {
label: _("CPU"),
step: 1000 * 1000 * 1000 * 10,
- formatter: function(v) { return (v / (100 * 1000 * 1000)) + "%"; }
+ formatter: function(v) { return (v / (100 * 1000 * 1000)) + "%" }
},
memory: {
label: _("Memory"),
step: 1024 * 1024 * 64,
- formatter: function(v) { return KubeFormat.formatBytes(v); }
+ formatter: function(v) { return KubeFormat.formatBytes(v) }
},
network: {
label: _("Network"),
step: 1000 * 1000 * 10,
- formatter: function(v) { return KubeFormat.formatBitsPerSec((v / 10), "Mbps"); }
+ formatter: function(v) { return KubeFormat.formatBitsPerSec((v / 10), "Mbps") }
}
};
@@ -617,13 +617,13 @@
.selectAll("li")
.data(Object.keys(tabs))
.enter().append("li")
- .attr("data-metric", function(d) { return d; })
+ .attr("data-metric", function(d) { return d })
.append("a")
- .text(function(d) { return tabs[d].label; });
+ .text(function(d) { return tabs[d].label });
function metric_tab(tab) {
outer.selectAll("ul li")
- .attr("class", function(d) { return tab === d ? "active": null; });
+ .attr("class", function(d) { return tab === d ? "active": null });
grid.metric(tab);
}
@@ -667,9 +667,9 @@
var offset = 0;
var line = d3.svg.line()
- .defined(function(d) { return d !== undefined; })
- .x(function(d, i) { return x((grid.beg + i) - offset); })
- .y(function(d, i) { return y(d); });
+ .defined(function(d) { return d !== undefined })
+ .x(function(d, i) { return x((grid.beg + i) - offset) })
+ .y(function(d, i) { return y(d) });
/* Initial display: 1024 px, 5 minutes of data */
var factor = 300000 / 1024;
@@ -773,12 +773,12 @@
var rows = grid.rows;
var series = stage.selectAll("path.line")
- .data(rows, function(d, i) { return i; });
+ .data(rows, function(d, i) { return i });
series
- .style("stroke", function(d, i) { return colors(i); })
- .attr("d", function(d) { return line(d); })
- .classed("highlight", function(d) { return d.uid === highlighted; });
+ .style("stroke", function(d, i) { return colors(i) })
+ .attr("d", function(d) { return line(d) })
+ .classed("highlight", function(d) { return d.uid === highlighted });
series.enter().append("path")
.attr("class", "line")
diff --git a/pkg/kubernetes/scripts/kube-client-cockpit.js b/pkg/kubernetes/scripts/kube-client-cockpit.js
index b74fabbea3ea..f7a725a1161d 100644
--- a/pkg/kubernetes/scripts/kube-client-cockpit.js
+++ b/pkg/kubernetes/scripts/kube-client-cockpit.js
@@ -547,7 +547,7 @@
bufferedAmount: { value: 0 },
extensions: { value: "" },
protocol: { value: base64 ? "base64.channel.k8s.io" : "" },
- readyState: { get: function() { return state; } },
+ readyState: { get: function() { return state } },
url: { value: url },
close: { value: close },
send: { value: send },
@@ -617,7 +617,7 @@
bufferedAmount: { value: 0 },
extensions: { value: "" },
protocol: { value: protocols[0] },
- readyState: { get: function() { return state; } },
+ readyState: { get: function() { return state } },
url: { value: url },
close: { value: close },
send: { value: send },
diff --git a/pkg/kubernetes/scripts/kube-client.js b/pkg/kubernetes/scripts/kube-client.js
index a1ce50cffae8..d3c1f7d311f6 100644
--- a/pkg/kubernetes/scripts/kube-client.js
+++ b/pkg/kubernetes/scripts/kube-client.js
@@ -879,7 +879,7 @@
length: {
enumerable: false,
configurable: true,
- get: function() { return cached(this).length; }
+ get: function() { return cached(this).length }
}
};
for (name in filters) {
diff --git a/pkg/kubernetes/scripts/nodes.js b/pkg/kubernetes/scripts/nodes.js
index 9d6421769705..760ae57e5900 100644
--- a/pkg/kubernetes/scripts/nodes.js
+++ b/pkg/kubernetes/scripts/nodes.js
@@ -713,15 +713,15 @@
var tabs = {
cpu: {
label: _("CPU"),
- tooltip: function(r) { return format.format(_("CPU Utilization: $0%"), Math.round((r.used / r.total) * 100)); }
+ tooltip: function(r) { return format.format(_("CPU Utilization: $0%"), Math.round((r.used / r.total) * 100)) }
},
memory: {
label: _("Memory"),
- tooltip: function(r) { return format.format(_("Memory Utilization: $0%"), Math.round((r.used / r.total) * 100)); }
+ tooltip: function(r) { return format.format(_("Memory Utilization: $0%"), Math.round((r.used / r.total) * 100)) }
},
fs: {
label: _("Disk"),
- tooltip: function(r) { return format.format(_("Disk Utilization: $0%"), Math.round((r.used / r.total) * 100)); }
+ tooltip: function(r) { return format.format(_("Disk Utilization: $0%"), Math.round((r.used / r.total) * 100)) }
}
};
@@ -729,14 +729,14 @@
.selectAll("li")
.data(Object.keys(tabs))
.enter().append("li")
- .attr("data-metric", function(d) { return d; })
+ .attr("data-metric", function(d) { return d })
.append("a")
- .text(function(d) { return tabs[d].label; });
+ .text(function(d) { return tabs[d].label });
function changeTab(tab) {
currentTab = tab;
outer.selectAll("ul.nav-tabs li")
- .attr("class", function(d) { return tab === d ? "active": null; });
+ .attr("class", function(d) { return tab === d ? "active": null });
refreshData();
}
diff --git a/pkg/kubernetes/scripts/virtual-machines/action-creators.jsx b/pkg/kubernetes/scripts/virtual-machines/action-creators.jsx
index 567d04db4ad2..88752f19a8e1 100644
--- a/pkg/kubernetes/scripts/virtual-machines/action-creators.jsx
+++ b/pkg/kubernetes/scripts/virtual-machines/action-creators.jsx
@@ -17,27 +17,27 @@
* along with Cockpit; If not, see .
*/
-import * as actionConstants from './action-types.jsx'
+import * as actionConstants from './action-types.jsx';
export function setVms(vms) {
return {
type: actionConstants.SET_VMS,
payload: vms
- }
+ };
}
export function setPVs(pvs) {
return {
type: actionConstants.SET_PVS,
payload: pvs
- }
+ };
}
export function setSettings(settings) {
return {
type: actionConstants.SET_SETTINGS,
payload: settings
- }
+ };
}
export function vmActionFailed({ vm, message, detail }) {
diff --git a/pkg/kubernetes/scripts/virtual-machines/components/VmActions.jsx b/pkg/kubernetes/scripts/virtual-machines/components/VmActions.jsx
index 4d36c303c662..f93b7a6ad6de 100644
--- a/pkg/kubernetes/scripts/virtual-machines/components/VmActions.jsx
+++ b/pkg/kubernetes/scripts/virtual-machines/components/VmActions.jsx
@@ -21,7 +21,7 @@
import React, { PropTypes } from 'react';
import { gettext as _ } from 'cockpit';
-import { connect } from 'react-redux'
+import { connect } from 'react-redux';
import type { Vm } from '../types.jsx';
import { vmIdPrefx, mouseClick } from '../utils.jsx';
@@ -52,7 +52,7 @@ const VmActions = ({ vm, onFailure }: { vm: Vm, onFailure: Function }) => {
{buttonDelete}
);
-}
+};
VmActions.propTypes = {
vm: PropTypes.object.isRequired,
diff --git a/pkg/kubernetes/scripts/virtual-machines/components/VmMessage.jsx b/pkg/kubernetes/scripts/virtual-machines/components/VmMessage.jsx
index e93c9e31e43c..722dde79adcf 100644
--- a/pkg/kubernetes/scripts/virtual-machines/components/VmMessage.jsx
+++ b/pkg/kubernetes/scripts/virtual-machines/components/VmMessage.jsx
@@ -18,11 +18,11 @@
*/
// @flow
-import React, { PropTypes } from 'react'
-import { connect } from 'react-redux'
+import React, { PropTypes } from 'react';
+import { connect } from 'react-redux';
-import type { Vm, VmMessages } from '../types.jsx'
-import { vmIdPrefx } from '../utils.jsx'
+import type { Vm, VmMessages } from '../types.jsx';
+import { vmIdPrefx } from '../utils.jsx';
import { Alert } from '../../../../machines/components/notification/inlineNotification.jsx';
import { removeVmMessage } from '../action-creators.jsx';
diff --git a/pkg/kubernetes/scripts/virtual-machines/components/VmMetricsTab.jsx b/pkg/kubernetes/scripts/virtual-machines/components/VmMetricsTab.jsx
index 8512dead662e..10e06f61a756 100644
--- a/pkg/kubernetes/scripts/virtual-machines/components/VmMetricsTab.jsx
+++ b/pkg/kubernetes/scripts/virtual-machines/components/VmMetricsTab.jsx
@@ -19,7 +19,7 @@
// @flow
import React, { PropTypes } from 'react';
-import { DonutChart } from 'patternfly-react'
+import { DonutChart } from 'patternfly-react';
import cockpit, { gettext as _ } from 'cockpit';
import './VmMetricsTab.less';
diff --git a/pkg/kubernetes/scripts/virtual-machines/components/VmOverviewTabKubevirt.jsx b/pkg/kubernetes/scripts/virtual-machines/components/VmOverviewTabKubevirt.jsx
index 7d93f65a70ad..ce5c0354bf44 100644
--- a/pkg/kubernetes/scripts/virtual-machines/components/VmOverviewTabKubevirt.jsx
+++ b/pkg/kubernetes/scripts/virtual-machines/components/VmOverviewTabKubevirt.jsx
@@ -34,8 +34,8 @@ const getLabels = (vm: Vm) => {
if (vm.metadata.labels) {
labels = getPairs(vm.metadata.labels).map(pair => {
const printablePair = `${pair.key}=${pair.value}`;
- return ({printablePair}
)
- })
+ return ({printablePair}
);
+ });
}
return labels;
};
@@ -44,7 +44,7 @@ function getMemory(vm: Vm) {
const memory = getValueOrDefault(() => vm.spec.domain.resources.requests.memory, null);
if (memory !== null) {
- return memory
+ return memory;
}
const memoryValue = getValueOrDefault(() => vm.spec.domain.memory.value, null);
diff --git a/pkg/kubernetes/scripts/virtual-machines/components/createVmButton.jsx b/pkg/kubernetes/scripts/virtual-machines/components/createVmButton.jsx
index 76bcd0cec79e..985d52968887 100644
--- a/pkg/kubernetes/scripts/virtual-machines/components/createVmButton.jsx
+++ b/pkg/kubernetes/scripts/virtual-machines/components/createVmButton.jsx
@@ -21,10 +21,10 @@ import cockpit from 'cockpit';
import React from 'react';
import DialogPattern from 'cockpit-components-dialog.jsx';
-import CreateVmDialog from './createVmDialog.jsx'
+import CreateVmDialog from './createVmDialog.jsx';
import { vmCreate } from '../kube-middleware.jsx';
-import { mouseClick } from '../utils.jsx'
+import { mouseClick } from '../utils.jsx';
const _ = cockpit.gettext;
@@ -41,7 +41,7 @@ class CreateVmButton extends React.Component {
const dialogProps = {
title: _("Create Virtual Machine"),
body: (
- { dialog = d; return d; } } />
+ { dialog = d; return d } } />
),
};
diff --git a/pkg/kubernetes/scripts/virtual-machines/components/createVmDialog.jsx b/pkg/kubernetes/scripts/virtual-machines/components/createVmDialog.jsx
index 9c632ee22336..a9157934ab55 100644
--- a/pkg/kubernetes/scripts/virtual-machines/components/createVmDialog.jsx
+++ b/pkg/kubernetes/scripts/virtual-machines/components/createVmDialog.jsx
@@ -21,7 +21,7 @@ import cockpit from 'cockpit';
import React from 'react';
import './createVmDialog.less';
-import { preventDefault } from '../utils.jsx'
+import { preventDefault } from '../utils.jsx';
const _ = cockpit.gettext;
diff --git a/pkg/kubernetes/scripts/virtual-machines/index.jsx b/pkg/kubernetes/scripts/virtual-machines/index.jsx
index 41fec8cc7d4b..0637f4b6ca96 100644
--- a/pkg/kubernetes/scripts/virtual-machines/index.jsx
+++ b/pkg/kubernetes/scripts/virtual-machines/index.jsx
@@ -49,13 +49,13 @@ function initReduxStore() {
function addKubeLoaderListener ($scope, kubeLoader, kubeSelect) {
// register load callback( callback, until )
kubeLoader.listen(() => {
- const vms = kubeSelect().kind('VirtualMachine')
- const persistentVolumes = kubeSelect().kind('PersistentVolume')
+ const vms = kubeSelect().kind('VirtualMachine');
+ const persistentVolumes = kubeSelect().kind('PersistentVolume');
const pods = kubeSelect().kind('Pod');
- reduxStore.dispatch(actionCreators.setVms(Object.values(vms)))
- reduxStore.dispatch(actionCreators.setPVs(Object.values(persistentVolumes)))
- reduxStore.dispatch(actionCreators.setPods(Object.values(pods)))
+ reduxStore.dispatch(actionCreators.setVms(Object.values(vms)));
+ reduxStore.dispatch(actionCreators.setPVs(Object.values(persistentVolumes)));
+ reduxStore.dispatch(actionCreators.setPods(Object.values(pods)));
}, $scope);
// enable watching( watched-entity-type, until )
diff --git a/pkg/kubernetes/scripts/virtual-machines/reducers.jsx b/pkg/kubernetes/scripts/virtual-machines/reducers.jsx
index f0936097ff38..979c071a13d1 100644
--- a/pkg/kubernetes/scripts/virtual-machines/reducers.jsx
+++ b/pkg/kubernetes/scripts/virtual-machines/reducers.jsx
@@ -17,9 +17,9 @@
* along with Cockpit; If not, see .
*/
-import { combineReducers } from 'redux'
+import { combineReducers } from 'redux';
-import * as actionTypes from './action-types.jsx'
+import * as actionTypes from './action-types.jsx';
const createReducer = (initialState, actionHandlerMap) => (state = initialState, action) => {
if (actionHandlerMap[action.type]) {
@@ -43,7 +43,7 @@ const pvsReducer = createReducer([], {
const podsReducer = createReducer([], {
[actionTypes.SET_PODS]: (state = [], { payload }) => payload || []
-})
+});
/**
* state = [
diff --git a/pkg/kubernetes/scripts/virtual-machines/utils.jsx b/pkg/kubernetes/scripts/virtual-machines/utils.jsx
index ab775e6bd79c..8913f1af92aa 100644
--- a/pkg/kubernetes/scripts/virtual-machines/utils.jsx
+++ b/pkg/kubernetes/scripts/virtual-machines/utils.jsx
@@ -28,11 +28,11 @@ export function getPairs(object) {
return Object.keys(object).map(key => ({
key,
value: object[key]
- }))
+ }));
}
export function vmIdPrefx(vm) {
- return `vm-${vm.metadata.name}`
+ return `vm-${vm.metadata.name}`;
}
// TODO: set log level, i.e. reuse window.debug
diff --git a/pkg/kubernetes/scripts/virtual-machines/watch-metrics.es6 b/pkg/kubernetes/scripts/virtual-machines/watch-metrics.es6
index cede04ebd80d..b63251cfb79f 100644
--- a/pkg/kubernetes/scripts/virtual-machines/watch-metrics.es6
+++ b/pkg/kubernetes/scripts/virtual-machines/watch-metrics.es6
@@ -61,7 +61,7 @@ export function watchMetrics(store) {
const node = getNodeName(vm);
if (node) {
if (!metrics.watchedNodes[node] && !nodes[node]) {
- refresh = true
+ refresh = true;
}
nodes[node] = node;
}
diff --git a/pkg/lib/cockpit-components-install-dialog.jsx b/pkg/lib/cockpit-components-install-dialog.jsx
index ee2bd926eb80..87abaf3ca674 100644
--- a/pkg/lib/cockpit-components-install-dialog.jsx
+++ b/pkg/lib/cockpit-components-install-dialog.jsx
@@ -57,7 +57,7 @@ export function install_dialog(pkg) {
var cancel = null;
var done = null;
- var prom = new Promise((resolve, reject) => { done = f => { if (f) resolve(); else reject(); }; });
+ var prom = new Promise((resolve, reject) => { done = f => { if (f) resolve(); else reject(); } });
var dialog = null;
function update() {
@@ -120,7 +120,7 @@ export function install_dialog(pkg) {
],
static_error: error_message,
idle_message: footer_message,
- dialog_done: f => { if (!f && cancel) cancel(); done(f); }
+ dialog_done: f => { if (!f && cancel) cancel(); done(f) }
};
if (dialog) {
diff --git a/pkg/lib/cockpit-components-listing.jsx b/pkg/lib/cockpit-components-listing.jsx
index c7d7c28c6a8d..c667a5510bec 100644
--- a/pkg/lib/cockpit-components-listing.jsx
+++ b/pkg/lib/cockpit-components-listing.jsx
@@ -340,7 +340,7 @@ var Listing = React.createClass({
);
} else {
- headerRow =
+ headerRow =
;
}
var caption;
if (this.props.title || (this.props.actions && this.props.actions.length > 0))
diff --git a/pkg/lib/cockpit-components-logs-panel.jsx b/pkg/lib/cockpit-components-logs-panel.jsx
index 7831bdc55f44..062f2016318b 100644
--- a/pkg/lib/cockpit-components-logs-panel.jsx
+++ b/pkg/lib/cockpit-components-logs-panel.jsx
@@ -115,7 +115,7 @@ export class LogsPanel extends React.Component {
render.prepend(entries[i]);
render.prepend_flush();
out.limit(this.props.max);
- this.setState({ logs: out.logs })
+ this.setState({ logs: out.logs });
});
}
diff --git a/pkg/lib/patterns.js b/pkg/lib/patterns.js
index 41aa2194f667..40a51cd68338 100644
--- a/pkg/lib/patterns.js
+++ b/pkg/lib/patterns.js
@@ -228,7 +228,7 @@
function onoff_refresh(sel) {
/* During testing, no Cockpit dependency */
- var _ = cockpit.gettext || function(x) { return x; };
+ var _ = cockpit.gettext || function(x) { return x };
sel = sel.find(".btn-onoff-ct").addBack().filter(".btn-onoff-ct");
sel.each(function(x, el) {
diff --git a/pkg/lib/plot.js b/pkg/lib/plot.js
index c619048ff009..a5234c0cd298 100644
--- a/pkg/lib/plot.js
+++ b/pkg/lib/plot.js
@@ -969,8 +969,8 @@ plotter.setup_plot_controls = function setup_plot_controls(container, element, p
p = [ ];
plots = p;
plots.forEach(function (p) {
- $(p).on("zoomstart", function (event) { zoom_plot_start(); });
- $(p).on("zoom", function (event, x_range, x_stop) { zoom_plot_in(x_range, x_stop); });
+ $(p).on("zoomstart", function (event) { zoom_plot_start() });
+ $(p).on("zoom", function (event, x_range, x_stop) { zoom_plot_in(x_range, x_stop) });
});
plot_reset();
}
@@ -991,8 +991,8 @@ function setup_plot(graph_id, grid, data, user_options) {
fill: 1.0
}
},
- xaxis: { tickFormatter: function() { return ""; } },
- yaxis: { tickFormatter: function() { return ""; } },
+ xaxis: { tickFormatter: function() { return "" } },
+ yaxis: { tickFormatter: function() { return "" } },
// The point radius influences
// the margin around the grid
// even if no points are plotted.
diff --git a/pkg/lib/service.js b/pkg/lib/service.js
index 0aa782507bb1..2b664b3f9827 100644
--- a/pkg/lib/service.js
+++ b/pkg/lib/service.js
@@ -294,7 +294,7 @@
return call_manager(method, args).then(function () {
var dfd = cockpit.defer();
call_manager("Reload", [ ]).
- done(function () { dfd.resolve(); }).
+ done(function () { dfd.resolve() }).
fail(function (error) {
// HACK: https://bugzilla.redhat.com/show_bug.cgi?id=1560549
// some systemd versions disconnect too fast from the bus
diff --git a/pkg/machines/app.jsx b/pkg/machines/app.jsx
index 164e79e0221a..e7177fab8c89 100644
--- a/pkg/machines/app.jsx
+++ b/pkg/machines/app.jsx
@@ -18,7 +18,7 @@
*/
import React from "react";
import HostVmsList from "./hostvmslist.jsx";
-import LibvirtSlate from "./components/libvirtSlate.jsx"
+import LibvirtSlate from "./components/libvirtSlate.jsx";
import { createVmAction } from "./components/create-vm-dialog/createVmDialog.jsx";
const App = ({ store }) => {
@@ -26,7 +26,7 @@ const App = ({ store }) => {
const dispatch = store.dispatch;
if (systemInfo.libvirtService.activeState !== 'running') {
- return ()
+ return ();
}
// pass ui object
diff --git a/pkg/machines/components/consoles.jsx b/pkg/machines/components/consoles.jsx
index a6f760c7a89f..5451e48ca679 100644
--- a/pkg/machines/components/consoles.jsx
+++ b/pkg/machines/components/consoles.jsx
@@ -159,7 +159,7 @@ class Consoles extends React.Component {
this.setState({
consoleType: key,
consoleDetail,
- })
+ });
});
} else {
consoleDetail = vm.displays.vnc;
@@ -169,7 +169,7 @@ class Consoles extends React.Component {
this.setState({
consoleType: key,
consoleDetail,
- })
+ });
}
onDesktopConsoleDownload (type) {
@@ -189,7 +189,7 @@ class Consoles extends React.Component {
const serialConsoleCommand = config.provider.serialConsoleCommand({ vm });
const onDesktopConsole = () => { // prefer spice over vnc
- this.onDesktopConsoleDownload(vm.displays.spice ? 'spice' : 'vnc')
+ this.onDesktopConsoleDownload(vm.displays.spice ? 'spice' : 'vnc');
};
logDebug('Consoles render, this.state.consoleType: ', this.state.consoleType);
@@ -204,7 +204,7 @@ class Consoles extends React.Component {
actions = ;
break;
case 'desktop':
- console =
+ console = ;
break;
default:
console = ;
diff --git a/pkg/machines/components/deleteDialog.jsx b/pkg/machines/components/deleteDialog.jsx
index 66c2250b0888..8d8988fc3b13 100644
--- a/pkg/machines/components/deleteDialog.jsx
+++ b/pkg/machines/components/deleteDialog.jsx
@@ -66,7 +66,7 @@ const DeleteDialogBody = ({ values, onChange }) => {
{disks}
);
-}
+};
export function deleteDialog(vm, dispatch) {
let values = {
diff --git a/pkg/machines/components/desktopConsole.jsx b/pkg/machines/components/desktopConsole.jsx
index 9dce7c706db8..79d382178326 100644
--- a/pkg/machines/components/desktopConsole.jsx
+++ b/pkg/machines/components/desktopConsole.jsx
@@ -35,7 +35,7 @@ const MoreInformationInstallVariant = ({ os, command, innerHtml }) => {
);
-}
+};
const MoreInformationContent = () => {
const msg1 = cockpit.format(_("Clicking \"Launch Remote Viewer\" will download a .vv file and launch $0."),
@@ -61,7 +61,7 @@ const MoreInformationContent = () => {
);
-}
+};
class MoreInformation extends React.Component {
constructor(props) {
@@ -89,7 +89,7 @@ class MoreInformation extends React.Component {
if (provider.ConsoleClientResources) {
// external provider can have specific instructions for console setup
const ProviderConsoleClientResources = provider.ConsoleClientResources; // (vm, providerState);
- content =
+ content = ;
}
return content;
@@ -134,7 +134,7 @@ const ConnectWithRemoteViewer = ({ vm, config, onDesktopConsole }) => {
);
-}
+};
const ManualConnectionDetails = ({ displays, idPrefix }) => {
const spiceAddress = displays.spice && displays.spice.address;
@@ -173,11 +173,11 @@ const ManualConnectionDetails = ({ displays, idPrefix }) => {
{vncTlsPort && ({vncTlsPort})}
);
-}
+};
const ManualConnection = ({ displays, idPrefix }) => {
- const isVNC = !!displays.vnc
- const isSPICE = !!displays.spice
+ const isVNC = !!displays.vnc;
+ const isSPICE = !!displays.spice;
if (!isVNC && !isSPICE) {
return null;
@@ -197,8 +197,8 @@ const ManualConnection = ({ displays, idPrefix }) => {
- )
-}
+ );
+};
const DesktopConsoleDownload = ({ vm, onDesktopConsole, config }) => {
return (
diff --git a/pkg/machines/components/diskAdd.jsx b/pkg/machines/components/diskAdd.jsx
index 34066264b192..916e78492cf7 100644
--- a/pkg/machines/components/diskAdd.jsx
+++ b/pkg/machines/components/diskAdd.jsx
@@ -358,7 +358,7 @@ function getDiskFileName(storagePools, vm, poolName, volumeName) {
const addDiskDialog = (dispatch, provider, idPrefix, vm, storagePools) => {
let dialogObj;
let dialogState = {};
- const onStateChanged = stateDelta => { Object.assign(dialogState, stateDelta); };
+ const onStateChanged = stateDelta => { Object.assign(dialogState, stateDelta) };
const dialogProps = {
'title': _("Add Disk"),
@@ -427,7 +427,7 @@ const addDiskDialog = (dispatch, provider, idPrefix, vm, storagePools) => {
// https://bugzilla.redhat.com/show_bug.cgi?id=1578836
dispatch(getStoragePools(vm.connectionName))
.then(() => {
- dialogObj = DialogPattern.show_modal_dialog(dialogProps, footerProps)
+ dialogObj = DialogPattern.show_modal_dialog(dialogProps, footerProps);
});
};
diff --git a/pkg/machines/components/dropdownButtons.jsx b/pkg/machines/components/dropdownButtons.jsx
index 9fbc5ef04d62..f3b3d5ab1c78 100644
--- a/pkg/machines/components/dropdownButtons.jsx
+++ b/pkg/machines/components/dropdownButtons.jsx
@@ -37,7 +37,7 @@ const DropdownButtons = ({ buttons }) => {
{button.title}
- )
+ );
});
const caretId = buttons[0]['id'] ? `${buttons[0]['id']}-caret` : undefined;
@@ -59,9 +59,9 @@ const DropdownButtons = ({ buttons }) => {
{buttons[0].title}
);
-}
+};
DropdownButtons.propTypes = {
buttons: PropTypes.array.isRequired
-}
+};
export default DropdownButtons;
diff --git a/pkg/machines/components/infoRecord.jsx b/pkg/machines/components/infoRecord.jsx
index 24378a162c46..51360ed482fb 100644
--- a/pkg/machines/components/infoRecord.jsx
+++ b/pkg/machines/components/infoRecord.jsx
@@ -46,6 +46,6 @@ InfoRecord.propTypes = {
PropTypes.element
]).isRequired,
tooltip: PropTypes.string,
-}
+};
export default InfoRecord;
diff --git a/pkg/machines/components/libvirtSlate.jsx b/pkg/machines/components/libvirtSlate.jsx
index b22fe1754df0..6408576148ce 100644
--- a/pkg/machines/components/libvirtSlate.jsx
+++ b/pkg/machines/components/libvirtSlate.jsx
@@ -79,7 +79,7 @@ class LibvirtSlate extends React.Component {
goToServicePage() {
const name = this.props.libvirtService.name ? this.props.libvirtService.name : 'libvirtd.service'; // fallback
- cockpit.jump("/system/services#/" + name)
+ cockpit.jump("/system/services#/" + name);
}
render() {
diff --git a/pkg/machines/components/notification/notification.jsx b/pkg/machines/components/notification/notification.jsx
index 3f4b9c8a8ac3..818d7343fcbb 100644
--- a/pkg/machines/components/notification/notification.jsx
+++ b/pkg/machines/components/notification/notification.jsx
@@ -20,7 +20,7 @@
import React, { PropTypes } from "react";
import { mouseClick } from "../../helpers.es6";
-import './notification.css'
+import './notification.css';
export const NotificationMessage = ({ description, message }) => {
const messageNode = message ? (
diff --git a/pkg/machines/components/notification/notificationArea.jsx b/pkg/machines/components/notification/notificationArea.jsx
index b8ecccb8daff..1c81fd3c371f 100644
--- a/pkg/machines/components/notification/notificationArea.jsx
+++ b/pkg/machines/components/notification/notificationArea.jsx
@@ -53,4 +53,4 @@ Notification.propTypes = {
id: PropTypes.string,
};
-export default NotificationArea
+export default NotificationArea;
diff --git a/pkg/machines/components/vcpuModal.jsx b/pkg/machines/components/vcpuModal.jsx
index 4bf594601dfb..f8ae460ec39a 100644
--- a/pkg/machines/components/vcpuModal.jsx
+++ b/pkg/machines/components/vcpuModal.jsx
@@ -23,11 +23,11 @@ const dividers = (num) => {
}
return divs;
-}
+};
const clamp = (value, max, min) => {
return value < min || isNaN(value) ? min : (value > max ? max : value);
-}
+};
const Select = function ({ id, items, onChange, value }) {
return (
@@ -35,7 +35,7 @@ const Select = function ({ id, items, onChange, value }) {
{t}
))}
);
-}
+};
class VCPUModalBody extends React.Component {
constructor(props) {
@@ -211,7 +211,7 @@ export default function ({ vm, dispatch, config }) {
let state = {};
const onStateChange = (st) => {
state = Object.assign({}, st);
- }
+ };
return show_modal_dialog(
{
title: cockpit.format(_("$0 vCPU Details"), vm.name),
diff --git a/pkg/machines/components/vmDisksTabLibvirt.jsx b/pkg/machines/components/vmDisksTabLibvirt.jsx
index b8858fe158f5..76a70abe1e6e 100644
--- a/pkg/machines/components/vmDisksTabLibvirt.jsx
+++ b/pkg/machines/components/vmDisksTabLibvirt.jsx
@@ -68,7 +68,7 @@ class VmDisksTabLibvirt extends React.Component {
return _("Upgrade to a more recent version of libvirt to view disk statistics");
}
- return _("Start the VM to see disk statistics.")
+ return _("Start the VM to see disk statistics.");
}
prepareDiskData(disk, diskStats, idPrefix) {
diff --git a/pkg/machines/libvirt.es6 b/pkg/machines/libvirt.es6
index 29c15a4aa1c2..75bd58ccace1 100644
--- a/pkg/machines/libvirt.es6
+++ b/pkg/machines/libvirt.es6
@@ -195,7 +195,7 @@ LIBVIRT_PROVIDER = {
// TODO: add support for other pool types then just the "directory"
return dispatch => cockpit
.script(command, null, { err: "message", environ: ['LC_ALL=en_US.UTF-8'] })
- .stream(output => { poolList += output; })
+ .stream(output => { poolList += output })
.then(() => { // so far only pool names are needed, extend here otherwise
const promises = parseStoragePoolList(dispatch, connectionName, poolList)
.map(poolName => dispatch(getStorageVolumes(connectionName, poolName)));
@@ -215,7 +215,7 @@ LIBVIRT_PROVIDER = {
let data = '';
return dispatch => cockpit
.script(command, null, {err: "message", environ: ['LC_ALL=en_US.UTF-8']})
- .stream(output => { data += output; })
+ .stream(output => { data += output })
.then(() => parseStorageVolumes(dispatch, connectionName, poolName, data))
.fail((exception, data) => {
console.error('Failed to get list of Libvirt storage volumes for connection: ', connectionName, ', pool: ', poolName, ': ', data, exception);
diff --git a/pkg/machines/store.es6 b/pkg/machines/store.es6
index 505a1f874412..e489026f7e2b 100644
--- a/pkg/machines/store.es6
+++ b/pkg/machines/store.es6
@@ -19,7 +19,7 @@
import { createStore, applyMiddleware } from 'redux';
import reducer from './reducers.es6';
-import thunkMiddleware from 'redux-thunk'
+import thunkMiddleware from 'redux-thunk';
const store = createStore(
reducer,
diff --git a/pkg/machines/vmnetworktab.jsx b/pkg/machines/vmnetworktab.jsx
index 8e5194087f69..8aec36f2d742 100644
--- a/pkg/machines/vmnetworktab.jsx
+++ b/pkg/machines/vmnetworktab.jsx
@@ -38,14 +38,14 @@ const VmNetworkTab = function ({ vm, dispatch, hostDevices }) {
}
}
return false;
- }
+ };
const sourceJump = (source) => {
return () => {
if (source !== null && checkDeviceAviability(source)) {
cockpit.jump(`/network#/${source}`, cockpit.transport.host);
}
- }
+ };
};
const onChangeState = (network) => {
@@ -54,8 +54,8 @@ const VmNetworkTab = function ({ vm, dispatch, hostDevices }) {
if (network.mac) {
dispatch(changeNetworkState(vm, network.mac, network.state === 'up' ? 'down' : 'up'));
}
- }
- }
+ };
+ };
const addressPortSource = (source, networkId) => (
{_("Address")} | {source.address} |
{_("Port")} | {source.port} |
@@ -77,9 +77,9 @@ const VmNetworkTab = function ({ vm, dispatch, hostDevices }) {
server: addressPortSource,
client: addressPortSource,
udp: addressPortSource,
- }
+ };
if (mapSource[network.type] !== undefined) {
- return {mapSource[network.type](network.source, networkId)}
+ return {mapSource[network.type](network.source, networkId)}
;
} else {
return null;
}
@@ -145,7 +145,7 @@ const VmNetworkTab = function ({ vm, dispatch, hostDevices }) {
column = d.value(target, networkId);
}
return column;
- })
+ });
networkId++;
return ();
@@ -153,7 +153,7 @@ const VmNetworkTab = function ({ vm, dispatch, hostDevices }) {
);
-}
+};
VmNetworkTab.propTypes = {
vm: React.PropTypes.object.isRequired,
diff --git a/pkg/networkmanager/firewall.jsx b/pkg/networkmanager/firewall.jsx
index 4d953a684d83..5ee9bab66737 100644
--- a/pkg/networkmanager/firewall.jsx
+++ b/pkg/networkmanager/firewall.jsx
@@ -44,7 +44,7 @@ function EmptyState(props) {
function ServiceRow(props) {
if (!props.service.name)
- return
+ return ;
var tcp = props.service.ports.filter(p => p.protocol.toUpperCase() == 'TCP');
var udp = props.service.ports.filter(p => p.protocol.toUpperCase() == 'UDP');
@@ -109,7 +109,7 @@ class SearchInput extends React.Component {
render() {
return
+ onChange={this.onValueChanged} />;
}
}
@@ -144,7 +144,7 @@ class AddServicesDialogBody extends React.Component {
let selected = new Set(oldState.selected);
if (enabled)
- selected.add(service)
+ selected.add(service);
else
selected.delete(service);
@@ -228,7 +228,7 @@ export class Firewall extends React.Component {
if (prevState.pendingTarget === firewall.enabled)
return { firewall, pendingTarget: null };
- return { firewall }
+ return { firewall };
});
}
diff --git a/pkg/networkmanager/interfaces.js b/pkg/networkmanager/interfaces.js
index 90d375ee4df8..3277624d83df 100644
--- a/pkg/networkmanager/interfaces.js
+++ b/pkg/networkmanager/interfaces.js
@@ -117,7 +117,7 @@ function connection_settings(c) {
// each Connection object to have "connection" settings.
console.warn("Incomplete 'Connection' object accessed", c);
// HACK - phantomjs console.trace() prints nothing
- try { throw new Error(); } catch (e) { console.log(e.stack); }
+ try { throw new Error() } catch (e) { console.log(e.stack) }
return { };
}
}
@@ -394,7 +394,7 @@ function NetworkManagerModel() {
if (!export_pending) {
export_pending = true;
- window.setTimeout(function () { export_pending = false; doit(); }, 300);
+ window.setTimeout(function () { export_pending = false; doit() }, 300);
}
}
@@ -1335,7 +1335,7 @@ function NetworkManagerModel() {
if (priv(obj).type === type_Interface)
result.push(obj);
}
- return result.sort(function (a, b) { return a.Name.localeCompare(b.Name); });
+ return result.sort(function (a, b) { return a.Name.localeCompare(b.Name) });
};
self.find_interface = peek_interface;
@@ -1352,7 +1352,7 @@ function NetworkManagerModel() {
function compare_versions(a, b) {
function to_ints(str) {
- return str.split(".").map(function (s) { return s ? parseInt(s, 10) : 0; });
+ return str.split(".").map(function (s) { return s ? parseInt(s, 10) : 0 });
}
var a_ints = to_ints(a);
@@ -2371,7 +2371,7 @@ PageNetworkInterface.prototype = {
if (con && dev && dev.ActiveConnection && dev.ActiveConnection.Connection === con) {
if (con.Settings.connection.interface_name &&
con.Settings.connection.interface_name != dev.Interface) {
- return dev.disconnect().then(function () { return con.activate(null, null); }).
+ return dev.disconnect().then(function () { return con.activate(null, null) }).
fail(show_unexpected_error);
} else {
return con.activate(dev, null).
@@ -2719,7 +2719,7 @@ PageNetworkInterface.prototype = {
$('').append(
$('').
append(link_text).
- syn_click(self.model, function () { configure(); })));
+ syn_click(self.model, function () { configure() })));
}
function render_ip_settings_row(topic, title) {
@@ -2727,7 +2727,7 @@ PageNetworkInterface.prototype = {
return null;
return render_settings_row(title, render_ip_settings(topic),
- function () { configure_ip_settings(topic); });
+ function () { configure_ip_settings(topic) });
}
function render_mtu_settings_row() {
@@ -4603,9 +4603,9 @@ function PageNetworkMacSettings() {
function dialog_setup(d) {
d.setup();
$('#' + d.id).
- on('show.bs.modal', function () { d.enter(); }).
- on('shown.bs.modal', function () { d.show(); }).
- on('hidden.bs.modal', function () { d.leave(); });
+ on('show.bs.modal', function () { d.enter() }).
+ on('shown.bs.modal', function () { d.show() }).
+ on('hidden.bs.modal', function () { d.leave() });
}
function page_show(p, arg) {
diff --git a/pkg/ovirt/components/ClusterTemplates.jsx b/pkg/ovirt/components/ClusterTemplates.jsx
index bd6030e79339..d528b39917ea 100644
--- a/pkg/ovirt/components/ClusterTemplates.jsx
+++ b/pkg/ovirt/components/ClusterTemplates.jsx
@@ -55,7 +55,7 @@ class CreateVmFromTemplate extends React.Component {
}
onVmNameChanged (e) {
- this.setState({ vmName: e.target.value })
+ this.setState({ vmName: e.target.value });
}
onDoCreateVm () {
diff --git a/pkg/ovirt/components/ClusterVms.jsx b/pkg/ovirt/components/ClusterVms.jsx
index 8e9c868caa7f..c4556c41e2f2 100644
--- a/pkg/ovirt/components/ClusterVms.jsx
+++ b/pkg/ovirt/components/ClusterVms.jsx
@@ -68,7 +68,7 @@ const VmHost = ({ id, hosts, dispatch }) => {
const cockpitUrl = `https://${host.address}:${CONFIG.cockpitPort}/machines`;
// just the without the tabIndex="0" onClick handler is not working
- return ( { window.top.location = cockpitUrl; }}>
+ return ( { window.top.location = cockpitUrl }}>
{host.name}
);
};
@@ -81,7 +81,7 @@ const VmTemplate = ({ id, templates }) => {
const template = templates[id];
const baseTemplateName = template.version.baseTemplateId && templates[template.version.baseTemplateId] ? templates[template.version.baseTemplateId].name : '';
const tooltip = `${_("Description")}: ${template.description}\n${_("Version")}: ${valueOrDefault(template.version.name, '')}\n${_("Version num")}: ${valueOrDefault(template.version.number, '')}\n${_("Base template")}: ${baseTemplateName}\n`;
- return {template.name}
+ return {template.name};
};
const VmActions = ({ vm, hostName, dispatch }) => {
diff --git a/pkg/ovirt/components/HostToMaintenance.jsx b/pkg/ovirt/components/HostToMaintenance.jsx
index ef1b420e110e..222b0ffa965a 100644
--- a/pkg/ovirt/components/HostToMaintenance.jsx
+++ b/pkg/ovirt/components/HostToMaintenance.jsx
@@ -43,7 +43,7 @@ const hostToMaintenanceDialog = (dispatch, host) => {
let footerProps = {
'actions': [
- { 'clicked': () => { return dispatch(switchHostToMaintenance({ hostId })); },
+ { 'clicked': () => { return dispatch(switchHostToMaintenance({ hostId })) },
'caption': _("OK"),
'style': 'primary',
},
@@ -59,7 +59,7 @@ const showHostToMaintenanceDialog = (dispatch, hosts) => {
return;
}
hostToMaintenanceDialog(dispatch, hosts);
- }
+ };
};
const hostToMaintenance = ({ dispatch, host }) => {
@@ -75,7 +75,7 @@ const hostToMaintenance = ({ dispatch, host }) => {
{_("Host to Maintenance")}
- )
+ );
};
export default hostToMaintenance;
diff --git a/pkg/ovirt/components/OVirtTab.jsx b/pkg/ovirt/components/OVirtTab.jsx
index 9f4405ca92a4..4d4f20c85149 100644
--- a/pkg/ovirt/components/OVirtTab.jsx
+++ b/pkg/ovirt/components/OVirtTab.jsx
@@ -37,7 +37,7 @@ function canVmMigrateToHost ({ host }) {
class MigrateTo extends React.Component {
constructor (props) {
- super(props)
+ super(props);
this.state = {
confirmAction: false,
@@ -48,9 +48,9 @@ class MigrateTo extends React.Component {
render () {
const { vm, hosts, dispatch } = this.props;
- const onHostChange = e => { this.setState({selectedHostId: e.target.value}); };
- const onAction = () => { this.setState({ confirmAction: true }); };
- const onActionCanceled = () => { this.setState({ confirmAction: false }); };
+ const onHostChange = e => { this.setState({selectedHostId: e.target.value}) };
+ const onAction = () => { this.setState({ confirmAction: true }) };
+ const onActionCanceled = () => { this.setState({ confirmAction: false }) };
const onActionConfirmed = () => {
this.setState({ confirmAction: false });
dispatch(migrateVm(vm.id, vm.name, this.state.selectedHostId));
diff --git a/pkg/ovirt/components/VdsmView.jsx b/pkg/ovirt/components/VdsmView.jsx
index 91c3309ef6ec..cf19c8420259 100644
--- a/pkg/ovirt/components/VdsmView.jsx
+++ b/pkg/ovirt/components/VdsmView.jsx
@@ -28,7 +28,7 @@ const _ = cockpit.gettext;
class VdsmConf extends React.Component { // TODO: needs design
constructor (props) {
- super(props)
+ super(props);
this.state = {
fileContent: _("Loading data ..."),
@@ -63,29 +63,29 @@ class VdsmConf extends React.Component { // TODO: needs design
})
.fail(error => { // TODO: more visible for the user
logError(`Error reading ${VDSM_CONF_FILE}: ${JSON.stringify(error)}`);
- })
+ });
}
doSave () {
cockpit.file(VDSM_CONF_FILE, { superuser: 'try' }).replace(this.state.fileContent)
.done(() => {
- logDebug('Content of vdsm.conf replaced.')
+ logDebug('Content of vdsm.conf replaced.');
this.setState({ changed: false });
})
.fail(error => {
logError(`Error writing ${VDSM_CONF_FILE}: ${JSON.stringify(error)}`);
- })
+ });
}
- onSave () { this.setState({saveConfirmation: true}); } // render confirmation buttons
- onSaveConfirmed () { this.doSave(); this.setState({saveConfirmation: false}); }
- onSaveCanceled () { this.setState({saveConfirmation: false}); }
+ onSave () { this.setState({saveConfirmation: true}) } // render confirmation buttons
+ onSaveConfirmed () { this.doSave(); this.setState({saveConfirmation: false}) }
+ onSaveCanceled () { this.setState({saveConfirmation: false}) }
- onReload () { this.setState({reloadConfirmation: true}); } // render confirmation buttons
- onReloadConfirmed () { this.doReload(); this.setState({reloadConfirmation: false}); }
- onReloadCanceled () { this.setState({reloadConfirmation: false}); }
+ onReload () { this.setState({reloadConfirmation: true}) } // render confirmation buttons
+ onReloadConfirmed () { this.doReload(); this.setState({reloadConfirmation: false}) }
+ onReloadCanceled () { this.setState({reloadConfirmation: false}) }
- onEditorChange (event) { this.setState({fileContent: event.target.value, changed: true}); }
+ onEditorChange (event) { this.setState({fileContent: event.target.value, changed: true}) }
render () {
let reloadButton = null;
@@ -109,9 +109,9 @@ class VdsmConf extends React.Component { // TODO: needs design
- )
+ );
} else {
- saveButton = ()
+ saveButton = ();
}
}
diff --git a/pkg/ovirt/components/vcpuModal.jsx b/pkg/ovirt/components/vcpuModal.jsx
index ea645842f0b1..421f31ae9042 100644
--- a/pkg/ovirt/components/vcpuModal.jsx
+++ b/pkg/ovirt/components/vcpuModal.jsx
@@ -15,7 +15,7 @@ class VCPUModalBody extends React.Component {
threads: props.cpu.topology.threads || 1,
cores: props.cpu.topology.cores || 1,
count: (props.cpu.topology.sockets * props.cpu.topology.cores * props.cpu.topology.threads) || 1
- }
+ };
this.handleChange = this.handleChange.bind(this);
props.onChange(this.state);
@@ -38,7 +38,7 @@ class VCPUModalBody extends React.Component {
state.count = Object.values(state).reduce((accumulator, currentValue) => accumulator * currentValue, 1);
this.setState(state);
- }
+ };
}
render () {
@@ -84,7 +84,7 @@ export default function ({ vm, dispatch }) {
let state = {};
const onStateChange = (st) => {
state = Object.assign({}, st);
- }
+ };
return show_modal_dialog(
{
diff --git a/pkg/packagekit/autoupdates.jsx b/pkg/packagekit/autoupdates.jsx
index cb85b2e556a1..80320e7a4805 100644
--- a/pkg/packagekit/autoupdates.jsx
+++ b/pkg/packagekit/autoupdates.jsx
@@ -111,7 +111,7 @@ class DnfImpl extends ImplBase {
// check if we have a day of week
if (daysOfWeek.indexOf(words[0]) >= 0)
- this.day = words.shift()
+ this.day = words.shift();
else
this.day = ""; // daily
@@ -205,7 +205,7 @@ class DnfImpl extends ImplBase {
// automatic updates are not supported, backend will be null.
function getBackend() {
if (!getBackend.promise) {
- debug("getBackend() called first time, initializing promise")
+ debug("getBackend() called first time, initializing promise");
let dfd = cockpit.defer();
getBackend.promise = dfd.promise();
@@ -231,7 +231,7 @@ function getBackend() {
// the detection shell script is supposed to always succeed
console.error("automatic updates getBackend() detection failed:", error);
dfd.resolve(null);
- })
+ });
}
return getBackend.promise;
diff --git a/pkg/packagekit/updates.jsx b/pkg/packagekit/updates.jsx
index 1764bbfe6eea..a45b2bbe9381 100644
--- a/pkg/packagekit/updates.jsx
+++ b/pkg/packagekit/updates.jsx
@@ -41,7 +41,7 @@ const STATE_HEADINGS = {
"updateSuccess": null,
"updateError": _("Applying updates failed"),
"loadError": _("Loading available updates failed"),
-}
+};
const PK_STATUS_STRINGS = {
[PK.Enum.STATUS_DOWNLOAD]: _("Downloading"),
@@ -49,7 +49,7 @@ const PK_STATUS_STRINGS = {
[PK.Enum.STATUS_UPDATE]: _("Updating"),
[PK.Enum.STATUS_CLEANUP]: _("Setting up"),
[PK.Enum.STATUS_SIGCHECK]: _("Verifying"),
-}
+};
const PK_STATUS_LOG_STRINGS = {
[PK.Enum.STATUS_DOWNLOAD]: _("Downloaded"),
@@ -57,7 +57,7 @@ const PK_STATUS_LOG_STRINGS = {
[PK.Enum.STATUS_UPDATE]: _("Updated"),
[PK.Enum.STATUS_CLEANUP]: _("Set up"),
[PK.Enum.STATUS_SIGCHECK]: _("Verified"),
-}
+};
var packageSummaries = {};
@@ -74,7 +74,7 @@ function parseCVEs(text) {
function deduplicate(list) {
var d = { };
- list.forEach(i => { if (i) d[i] = true });
+ list.forEach(i => { if (i) d[i] = true; });
var result = Object.keys(d);
result.sort();
return result;
@@ -85,7 +85,7 @@ function deduplicate(list) {
function insertCommas(list) {
if (list.length <= 1)
return list;
- return list.reduce((prev, cur) => [prev, ", ", cur])
+ return list.reduce((prev, cur) => [prev, ", ", cur]);
}
// Fedora changelogs are a wild mix of enumerations or not, headings, etc.
@@ -688,7 +688,7 @@ class OsUpdates extends React.Component {
// only update the state once to avoid flicker
Finished: () => {
if (history.length > 0)
- this.setState({history: history})
+ this.setState({history: history});
}
})
.catch(ex => console.warn("Failed to load old transactions:", ex));
@@ -872,7 +872,7 @@ class OsUpdates extends React.Component {
return this.state.errorMessages.map(m => {m} );
case "applying":
- return
+ return ;
case "updateSuccess":
return ;
@@ -936,7 +936,7 @@ class OsUpdates extends React.Component {
}
handleRestart() {
- this.setState({state: "restart"})
+ this.setState({state: "restart"});
// give the user a chance to actually read the message
window.setTimeout(() => {
cockpit.spawn(["shutdown", "--reboot", "now"], { superuser: true, err: "message" })
diff --git a/pkg/playground/react-demo-onoff.jsx b/pkg/playground/react-demo-onoff.jsx
index d6a29370e4df..a873ca07a9e8 100644
--- a/pkg/playground/react-demo-onoff.jsx
+++ b/pkg/playground/react-demo-onoff.jsx
@@ -26,7 +26,7 @@ var OnOffDemo = React.createClass({
return {
onOffA: true,
onOffB: false
- }
+ };
},
onChangeA: function(val) {
this.setState({onOffA: val});
diff --git a/pkg/playground/test.js b/pkg/playground/test.js
index 1ace8b7faea4..5ed88b8bbb28 100644
--- a/pkg/playground/test.js
+++ b/pkg/playground/test.js
@@ -5,7 +5,7 @@
var cockpit = require("cockpit");
$(function() {
- $("#hammer").on("click", function () { $(this).hide(); });
+ $("#hammer").on("click", function () { $(this).hide() });
$(".cockpit-internal-reauthorize .btn").on("click", function() {
$(".cockpit-internal-reauthorize span").text("checking...");
diff --git a/pkg/realmd/operation.js b/pkg/realmd/operation.js
index 4e74cb9bfdc2..be92991a383b 100644
--- a/pkg/realmd/operation.js
+++ b/pkg/realmd/operation.js
@@ -454,7 +454,7 @@
$(".realms-op-error").show();
}
} else if (mode == 'leave') {
- call = cleanup_ws_credentials().then(function() { realm.Deconfigure(options); });
+ call = cleanup_ws_credentials().then(function() { realm.Deconfigure(options) });
}
if (!call) {
@@ -564,7 +564,7 @@
if (!joined || !joined.length)
text = _("Join Domain");
else
- text = joined.map(function(x) { return x.Name; }).join(", ");
+ text = joined.map(function(x) { return x.Name }).join(", ");
link.text(text);
}
diff --git a/pkg/selinux/setroubleshoot-view.jsx b/pkg/selinux/setroubleshoot-view.jsx
index 27cc0ab3da3f..e2f55e5f2b96 100644
--- a/pkg/selinux/setroubleshoot-view.jsx
+++ b/pkg/selinux/setroubleshoot-view.jsx
@@ -33,7 +33,7 @@ var SELinuxEventDetails = React.createClass({
var expanded;
// all details are collapsed by default
if (this.props.details)
- expanded = this.props.details.pluginAnalysis.map(function() { return false; });
+ expanded = this.props.details.pluginAnalysis.map(function() { return false });
return {
solutionExpanded: expanded, // show details for solution
diff --git a/pkg/shell/base_index.js b/pkg/shell/base_index.js
index 4d5bf0933dec..22d5acc7e24c 100644
--- a/pkg/shell/base_index.js
+++ b/pkg/shell/base_index.js
@@ -969,10 +969,10 @@
function follow(arg) {
/* A promise of some sort */
if (arguments.length == 1 && typeof arg.then == "function") {
- arg.then(function() { console.log.apply(console, arguments); },
- function() { console.error.apply(console, arguments); });
+ arg.then(function() { console.log.apply(console, arguments) },
+ function() { console.error.apply(console, arguments) });
if (typeof arg.stream == "function")
- arg.stream(function() { console.log.apply(console,arguments); });
+ arg.stream(function() { console.log.apply(console,arguments) });
}
}
@@ -982,8 +982,8 @@
Object.defineProperties(window, {
cockpit: { value: cockpit },
zz: {
- get: function() { return zz_value; },
- set: function(val) { zz_value = val; follow(val); }
+ get: function() { return zz_value },
+ set: function(val) { zz_value = val; follow(val) }
}
});
diff --git a/pkg/storaged/client.js b/pkg/storaged/client.js
index 34b2d9ec945a..db4dff3f4197 100644
--- a/pkg/storaged/client.js
+++ b/pkg/storaged/client.js
@@ -293,7 +293,7 @@
client.vgroups_lvols[lvol.VolumeGroup].push(lvol);
}
for (path in client.vgroups_lvols) {
- client.vgroups_lvols[path].sort(function (a, b) { return a.Name.localeCompare(b.Name); });
+ client.vgroups_lvols[path].sort(function (a, b) { return a.Name.localeCompare(b.Name) });
}
client.lvols_block = { };
@@ -312,7 +312,7 @@
client.lvols_pool_members[lvol.ThinPool].push(lvol);
}
for (path in client.lvols_pool_members) {
- client.lvols_pool_members[path].sort(function (a, b) { return a.Name.localeCompare(b.Name); });
+ client.lvols_pool_members[path].sort(function (a, b) { return a.Name.localeCompare(b.Name) });
}
client.blocks_cleartext = { };
@@ -332,7 +332,7 @@
client.blocks_partitions[part.Table].push(part);
}
for (path in client.blocks_partitions) {
- client.blocks_partitions[path].sort(function (a, b) { return a.Offset - b.Offset; });
+ client.blocks_partitions[path].sort(function (a, b) { return a.Offset - b.Offset });
}
client.path_jobs = { };
@@ -438,7 +438,7 @@
}
function enable_pk_features() {
- return PK.detect().then(function (available) { client.features.packagekit = available; });
+ return PK.detect().then(function (available) { client.features.packagekit = available });
}
function enable_features() {
@@ -623,12 +623,12 @@
}
function stop_and_unmount_entry(users, entry) {
- var units = users.map(function (u) { return u.unit; });
+ var units = users.map(function (u) { return u.unit });
return spawn_nfs_mounts([ "stop-and-unmount", JSON.stringify(units), JSON.stringify(entry) ]);
}
function stop_and_remove_entry(users, entry) {
- var units = users.map(function (u) { return u.unit; });
+ var units = users.map(function (u) { return u.unit });
return spawn_nfs_mounts([ "stop-and-remove", JSON.stringify(units), JSON.stringify(entry) ]);
}
@@ -793,12 +793,12 @@
}
function find_by_block(block) {
- function check(encoded) { return self.by_dev[utils.decode_filename(encoded)]; }
+ function check(encoded) { return self.by_dev[utils.decode_filename(encoded)] }
return check(block.Device) || some(block.Symlinks, check);
}
function find_by_backing_block(block) {
- function check(encoded) { return self.by_backing_dev[utils.decode_filename(encoded)]; }
+ function check(encoded) { return self.by_backing_dev[utils.decode_filename(encoded)] }
return check(block.Device) || some(block.Symlinks, check);
}
@@ -878,7 +878,7 @@
}
function find_by_block(block) {
- function check(encoded) { return self.info[utils.decode_filename(encoded)]; }
+ function check(encoded) { return self.info[utils.decode_filename(encoded)] }
return check(block.Device) || some(block.Symlinks, check);
}
diff --git a/pkg/storaged/content-views.jsx b/pkg/storaged/content-views.jsx
index 002d9e031da4..06c360d6b7f5 100644
--- a/pkg/storaged/content-views.jsx
+++ b/pkg/storaged/content-views.jsx
@@ -595,7 +595,7 @@ function append_logical_volume(client, rows, level, lvol) {
desc = {
size: lvol.Size,
text: lvol.Active ? _("Unsupported volume") : _("Inactive volume")
- }
+ };
tabs = create_tabs(client, lvol, false);
append_row(client, rows, level, lvol.Name, lvol.Name, desc, tabs, false);
}
diff --git a/pkg/storaged/crypto-tab.jsx b/pkg/storaged/crypto-tab.jsx
index 1de6f6852f67..2d080988c778 100644
--- a/pkg/storaged/crypto-tab.jsx
+++ b/pkg/storaged/crypto-tab.jsx
@@ -50,7 +50,7 @@ var CryptoTab = React.createClass({
block.GetSecretConfiguration({}).done(
function (items) {
- old_config = array_find(items, function (c) { return c[0] == "crypttab"; });
+ old_config = array_find(items, function (c) { return c[0] == "crypttab" });
new_config = [ "crypttab", old_config ? Object.assign({ }, old_config[1]) : { } ];
// UDisks insists on always having a "passphrase-contents" field when
@@ -80,7 +80,7 @@ var CryptoTab = React.createClass({
config["passphrase-contents"] = {
t: 'ay',
v: encode_filename(vals.passphrase)
- }
+ };
delete config["passphrase-path"];
return commit();
}
@@ -91,11 +91,11 @@ var CryptoTab = React.createClass({
var old_config, old_options;
- old_config = array_find(block.Configuration, function (c) { return c[0] == "crypttab"; });
+ old_config = array_find(block.Configuration, function (c) { return c[0] == "crypttab" });
if (old_config) {
old_options = (decode_filename(old_config[1].options.v)
.split(",")
- .filter(function (s) { return s.indexOf("x-parent") !== 0; })
+ .filter(function (s) { return s.indexOf("x-parent") !== 0 })
.join(","));
}
@@ -109,7 +109,7 @@ var CryptoTab = React.createClass({
config["options"] = {
t: 'ay',
v: encode_filename(crypto_options_dialog_options(vals))
- }
+ };
return commit();
}
}
diff --git a/pkg/storaged/details.jsx b/pkg/storaged/details.jsx
index a856cbe77a7a..be30ceb8916f 100644
--- a/pkg/storaged/details.jsx
+++ b/pkg/storaged/details.jsx
@@ -73,7 +73,7 @@ export class StdDetailsLayout extends React.Component {
class Details extends React.Component {
constructor() {
super();
- this.on_client_changed = () => { this.setState({}); };
+ this.on_client_changed = () => { this.setState({}) };
}
componentDidMount() {
diff --git a/pkg/storaged/dialog.js b/pkg/storaged/dialog.js
index 35241ea6163c..7986c63ff54e 100644
--- a/pkg/storaged/dialog.js
+++ b/pkg/storaged/dialog.js
@@ -66,7 +66,7 @@
if (def.Action && def.Action.Danger)
def.Action.DangerButton = true;
- function empty(obj) { return !obj || obj.length === 0; }
+ function empty(obj) { return !obj || obj.length === 0 }
def.HasBody = def.Body || def.ReactBody || !empty(def.Fields) || !empty(def.Alerts) || !empty(def.Blocking);
diff --git a/pkg/storaged/dialogx.jsx b/pkg/storaged/dialogx.jsx
index 16f6e668ce86..89ad8b3fe19f 100644
--- a/pkg/storaged/dialogx.jsx
+++ b/pkg/storaged/dialogx.jsx
@@ -154,7 +154,7 @@ const Validated = ({ errors, error_key, children }) => {
{ error ? {error} : null }
);
-}
+};
const Row = ({ tag, title, errors, children }) => {
return (
@@ -167,7 +167,7 @@ const Row = ({ tag, title, errors, children }) => {
|
);
-}
+};
function is_visible(field, values) {
return !field.options || field.options.visible == undefined || field.options.visible(values);
@@ -184,7 +184,7 @@ const Body = ({body, fields, values, errors, onChange}) => {
if (is_visible(f, values))
return (
- { f.render(values[f.tag], val => { values[f.tag] = val; onChange(); }) }
+ { f.render(values[f.tag], val => { values[f.tag] = val; onChange() }) }
);
})
@@ -194,13 +194,13 @@ const Body = ({body, fields, values, errors, onChange}) => {
}
);
-}
+};
export const dialog_open = (def) => {
let fields = def.Fields || [ ];
let values = { };
- fields.forEach(f => { values[f.tag] = f.initial_value; });
+ fields.forEach(f => { values[f.tag] = f.initial_value });
// We reconstruct the body everytime the values change so that it
// will be re-rendered. This could be done with some state in the
@@ -209,7 +209,7 @@ export const dialog_open = (def) => {
const update = (errors) => {
dlg.setProps(props(errors));
- }
+ };
const props = (errors) => {
return {
@@ -221,7 +221,7 @@ export const dialog_open = (def) => {
errors={errors}
onChange={() => update(null)} />
};
- }
+ };
const validate = () => {
return Promise.all(fields.map(f => {
@@ -234,7 +234,7 @@ export const dialog_open = (def) => {
fields.forEach((f, i) => { if (results[i]) errors[f.tag] = results[i]; });
return (Object.keys(errors).length > 0) ? errors : null;
});
- }
+ };
let actions = [ ];
if (def.Action) {
@@ -259,7 +259,7 @@ export const dialog_open = (def) => {
{ actions: actions,
cancel_caption: def.Action ? _("Cancel") : _("Close")
});
-}
+};
/* GENERIC FIELD TYPES
*/
@@ -275,8 +275,8 @@ export const TextInput = (tag, title, options) => {
change(event.target.value)} />
- }
-}
+ };
+};
export const PassInput = (tag, title, options) => {
return {
@@ -289,8 +289,8 @@ export const PassInput = (tag, title, options) => {
change(event.target.value)} />
- }
-}
+ };
+};
export const SelectOne = (tag, title, options, choices) => {
return {
@@ -308,8 +308,8 @@ export const SelectOne = (tag, title, options, choices) => {
);
}
- }
-}
+ };
+};
export const CheckBox = (tag, title, options) => {
return {
@@ -328,8 +328,8 @@ export const CheckBox = (tag, title, options) => {
);
}
- }
-}
+ };
+};
/* A text input that is guarded by a check box.
*
@@ -358,5 +358,5 @@ export const TextInputChecked = (tag, title, options) => {
);
}
- }
-}
+ };
+};
diff --git a/pkg/storaged/drives-panel.jsx b/pkg/storaged/drives-panel.jsx
index 55195150de1a..219f0ff571f2 100644
--- a/pkg/storaged/drives-panel.jsx
+++ b/pkg/storaged/drives-panel.jsx
@@ -29,7 +29,7 @@ const C_ = cockpit.gettext;
export class DrivesPanel extends React.Component {
constructor () {
super();
- this.on_io_samples = () => { this.setState({}); }
+ this.on_io_samples = () => { this.setState({}) };
}
componentDidMount() {
diff --git a/pkg/storaged/format-dialog.jsx b/pkg/storaged/format-dialog.jsx
index e071e65e54fa..d56c1e84739e 100644
--- a/pkg/storaged/format-dialog.jsx
+++ b/pkg/storaged/format-dialog.jsx
@@ -55,7 +55,7 @@ function extract_option(split, opt) {
function mounting_dialog_fields(is_custom, mount_dir, mount_options, visible) {
if (!visible)
- visible = function () { return true; };
+ visible = function () { return true };
var split_options = parse_options(mount_options == "defaults" ? "" : mount_options);
var opt_auto = !extract_option(split_options, "noauto");
diff --git a/pkg/storaged/fsys-panel.jsx b/pkg/storaged/fsys-panel.jsx
index 938aa6521e62..84b497cbde1e 100644
--- a/pkg/storaged/fsys-panel.jsx
+++ b/pkg/storaged/fsys-panel.jsx
@@ -28,7 +28,7 @@ const _ = cockpit.gettext;
export class FilesystemsPanel extends React.Component {
constructor () {
super();
- this.on_fsys_samples = () => { this.setState({}); }
+ this.on_fsys_samples = () => { this.setState({}) };
}
componentDidMount() {
diff --git a/pkg/storaged/fsys-tab.jsx b/pkg/storaged/fsys-tab.jsx
index 8022f339ad92..b84bf64410d0 100644
--- a/pkg/storaged/fsys-tab.jsx
+++ b/pkg/storaged/fsys-tab.jsx
@@ -83,12 +83,12 @@ var FilesystemTab = React.createClass({
var old_config, old_dir, old_opts;
- old_config = utils.array_find(block.Configuration, function (c) { return c[0] == "fstab"; });
+ old_config = utils.array_find(block.Configuration, function (c) { return c[0] == "fstab" });
if (old_config) {
old_dir = utils.decode_filename(old_config[1].dir.v);
old_opts = (utils.decode_filename(old_config[1].opts.v)
.split(",")
- .filter(function (s) { return s.indexOf("x-parent") !== 0; })
+ .filter(function (s) { return s.indexOf("x-parent") !== 0 })
.join(","));
}
diff --git a/pkg/storaged/iscsi-panel.jsx b/pkg/storaged/iscsi-panel.jsx
index 6941c4d94785..1bf27b3f6a38 100644
--- a/pkg/storaged/iscsi-panel.jsx
+++ b/pkg/storaged/iscsi-panel.jsx
@@ -265,7 +265,7 @@ export class IscsiPanel extends React.Component {
if (!event || event.button !== 0)
return;
this.setState({ armed: !this.state.armed });
- }
+ };
var sessions = Object.keys(client.iscsi_sessions).sort(cmp_session)
.map(make_session);
@@ -286,7 +286,7 @@ export class IscsiPanel extends React.Component {
var iscsi_feature = {
is_enabled: () => client.features.iscsi
- }
+ };
return (
+ return ;
}
}
diff --git a/pkg/storaged/lvol-tabs.jsx b/pkg/storaged/lvol-tabs.jsx
index 0757d6d187d2..d25e81b9115a 100644
--- a/pkg/storaged/lvol-tabs.jsx
+++ b/pkg/storaged/lvol-tabs.jsx
@@ -76,7 +76,7 @@ function lvol_and_fsys_resize(client, lvol, size, offline) {
if (fsys) {
// When doing an offline resize, we need to first repair the filesystem.
if (offline) {
- return fsys.Repair({ }).then(function () { return fsys.Resize(size - crypto_overhead, { }); });
+ return fsys.Repair({ }).then(function () { return fsys.Resize(size - crypto_overhead, { }) });
} else {
return fsys.Resize(size - crypto_overhead, { });
}
diff --git a/pkg/storaged/nfs-panel.jsx b/pkg/storaged/nfs-panel.jsx
index 3f3291e85dad..475ac8ea651d 100644
--- a/pkg/storaged/nfs-panel.jsx
+++ b/pkg/storaged/nfs-panel.jsx
@@ -84,7 +84,7 @@ export class NFSPanel extends React.Component {
client.features.nfs = true;
client.nfs.start();
}
- }
+ };
return (
{
feature.enable();
self.setState({ just_installed: "just-installed" });
- window.setTimeout(() => { self.setState({ just_installed: "just-installed faded" }); },
+ window.setTimeout(() => { self.setState({ just_installed: "just-installed faded" }) },
4000);
});
}
diff --git a/pkg/storaged/overview.jsx b/pkg/storaged/overview.jsx
index 7166d3bf475c..5707a5bfe56f 100644
--- a/pkg/storaged/overview.jsx
+++ b/pkg/storaged/overview.jsx
@@ -65,7 +65,7 @@ export class OverviewSidePanelRow extends React.Component {
if (!event || event.button !== 0)
return;
return this.props.go();
- }
+ };
return (
{ this.setState({}); };
+ this.on_client_changed = () => { this.setState({}) };
}
componentDidMount() {
diff --git a/pkg/storaged/plot.jsx b/pkg/storaged/plot.jsx
index f76352f8a074..bb3638dd045c 100644
--- a/pkg/storaged/plot.jsx
+++ b/pkg/storaged/plot.jsx
@@ -29,7 +29,7 @@ const _ = cockpit.gettext;
class ZoomControls extends React.Component {
constructor() {
super();
- this.classes = { }
+ this.classes = { };
this.plots = [ ];
}
@@ -113,8 +113,8 @@ class ZoomControls extends React.Component {
class StoragePlot extends React.Component {
constructor() {
super();
- this.state = { unit: "" }
- this.on_resize = () => { this.setState({}); };
+ this.state = { unit: "" };
+ this.on_resize = () => { this.setState({}) };
}
componentDidMount() {
@@ -247,13 +247,13 @@ export class StoragePlots extends React.Component {
this.controls = element;
this.controls.reset(this.plots);
}
- }
+ };
const new_plot = (p) => {
this.plots.push(p);
if (this.controls)
this.controls.reset(this.plots);
- }
+ };
return (
diff --git a/pkg/storaged/storage-controls.jsx b/pkg/storaged/storage-controls.jsx
index a1cad6c4f7b5..c9f9e570ba33 100644
--- a/pkg/storaged/storage-controls.jsx
+++ b/pkg/storaged/storage-controls.jsx
@@ -64,7 +64,7 @@ var StorageControl = React.createClass({
var markup = {
__html: cockpit.format(_("The user $0 is not permitted to manage storage"),
permission.user ? permission.user.name : '')
- }
+ };
excuse = ;
}
@@ -184,10 +184,8 @@ class StorageOnOff extends React.Component {
function onChange(val) {
var promise = self.props.onChange(val);
if (promise) {
- promise.always(function() {
- self.setState({ promise: null })
- });
- promise.fail(function(error) {
+ promise.always(() => { self.setState({ promise: null }) });
+ promise.fail((error) => {
$('#error-popup-title').text(_("Error"));
$('#error-popup-message').text(error.toString());
$('#error-popup').modal('show');
diff --git a/pkg/storaged/utils.js b/pkg/storaged/utils.js
index 8f137b93db96..cf028e4dfcdc 100644
--- a/pkg/storaged/utils.js
+++ b/pkg/storaged/utils.js
@@ -37,7 +37,7 @@
utils.compare_versions = function compare_versions(a, b) {
function to_ints(str) {
- return str.split(".").map(function (s) { return s ? parseInt(s, 10) : 0; });
+ return str.split(".").map(function (s) { return s ? parseInt(s, 10) : 0 });
}
var a_ints = to_ints(a);
@@ -672,9 +672,9 @@
handle_vg(p);
}
- return cockpit.all([ unmount(usage.raw.filter(function(use) { return use.usage == "mounted"; })),
- mdraid_remove(usage.raw.filter(function(use) { return use.usage == "mdraid-member"; })),
- pvol_remove(usage.raw.filter(function(use) { return use.usage == "pvol"; }))
+ return cockpit.all([ unmount(usage.raw.filter(function(use) { return use.usage == "mounted" })),
+ mdraid_remove(usage.raw.filter(function(use) { return use.usage == "mdraid-member" })),
+ pvol_remove(usage.raw.filter(function(use) { return use.usage == "pvol" }))
]);
};
diff --git a/pkg/storaged/vdo-details.jsx b/pkg/storaged/vdo-details.jsx
index faee796c88bb..47b15867ecaf 100644
--- a/pkg/storaged/vdo-details.jsx
+++ b/pkg/storaged/vdo-details.jsx
@@ -180,7 +180,7 @@ export class VDODetails extends React.Component {
.then(function (block) {
return block.Format("empty", { 'tear-down': { t: 'b', v: true } });
});
- })
+ });
}
}
diff --git a/pkg/storaged/vdos-panel.jsx b/pkg/storaged/vdos-panel.jsx
index 6540d49b741b..27feefa2af2e 100644
--- a/pkg/storaged/vdos-panel.jsx
+++ b/pkg/storaged/vdos-panel.jsx
@@ -162,7 +162,7 @@ export class VDOsPanel extends React.Component {
client.features.vdo = true;
client.vdo_overlay.start();
}
- }
+ };
return (
{ this.props.vgroup.Poll(); }, 2000);
+ this.poll_timer = window.setInterval(() => { this.props.vgroup.Poll() }, 2000);
} else if (!needs_polling && this.poll_timer !== null) {
window.clearInterval(this.poll_timer);
this.poll_timer = null;
diff --git a/pkg/storaged/vgroups-panel.jsx b/pkg/storaged/vgroups-panel.jsx
index 4ab5a1f4e08f..428192c22715 100644
--- a/pkg/storaged/vgroups-panel.jsx
+++ b/pkg/storaged/vgroups-panel.jsx
@@ -108,7 +108,7 @@ export class VGroupsPanel extends React.Component {
var lvm2_feature = {
is_enabled: () => client.features.lvm2
- }
+ };
return (
{
document.title = cockpit.gettext(document.title);
- moment.locale(cockpit.language)
+ moment.locale(cockpit.language);
detect().then(info => {
console.debug("hardware info collection data:", JSON.stringify(info));
React.render(, document.getElementById("hwinfo"));
diff --git a/pkg/systemd/init.js b/pkg/systemd/init.js
index fd54e4d5df62..52d8ba8f238c 100644
--- a/pkg/systemd/init.js
+++ b/pkg/systemd/init.js
@@ -264,7 +264,7 @@ $(function() {
function render_now() {
var pattern = $('#services-filter button.active').attr('data-pattern');
- function cmp_path(a, b) { return units_by_path[a].Id.localeCompare(units_by_path[b].Id); }
+ function cmp_path(a, b) { return units_by_path[a].Id.localeCompare(units_by_path[b].Id) }
var sorted_keys = Object.keys(units_by_path).sort(cmp_path);
var enabled = [ ], disabled = [ ], statics = [ ];
var header = {
diff --git a/pkg/users/local.js b/pkg/users/local.js
index f9e3c75c82f8..c67e2db54df9 100755
--- a/pkg/users/local.js
+++ b/pkg/users/local.js
@@ -388,7 +388,7 @@ PageAccountsCreate.prototype = {
$('#accounts-create-create').on('click', $.proxy(this, "create"));
$('#accounts-create-dialog .check-passwords').on('keydown change', $.proxy(this, "validate"));
$('#accounts-create-real-name').on('input', $.proxy(this, "suggest_username"));
- $('#accounts-create-user-name').on('input', function() { self.username_dirty = true; });
+ $('#accounts-create-user-name').on('input', function() { self.username_dirty = true });
},
enter: function() {
@@ -1411,9 +1411,9 @@ function show_unexpected_error(error) {
function dialog_setup(d) {
d.setup();
$('#' + d.id).
- on('show.bs.modal', function () { d.enter(); }).
- on('shown.bs.modal', function () { d.show(); }).
- on('hidden.bs.modal', function () { d.leave(); });
+ on('show.bs.modal', function () { d.enter() }).
+ on('shown.bs.modal', function () { d.show() }).
+ on('hidden.bs.modal', function () { d.leave() });
}
function page_show(p, arg) {
diff --git a/webpack.config.js b/webpack.config.js
index f8c8ae531115..35c3adfe8c3c 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -491,5 +491,6 @@ module.exports = {
undef: true,
unused: "vars",
predef: [ "window", "document", "console" ],
+ lastsemic : true,
},
};