Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/compose-web-app/modules/backbone.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ async function BackboneDetail(bbid) {
async function BackboneSites(backbone, panel) {
const siteResult = await fetch(`/api/v1alpha1/backbones/${backbone.id}/sites`);
const sites = await siteResult.json();
var layout;
let layout;

if (sites.length == 0) {
let empty = document.createElement('i');
Expand Down
4 changes: 2 additions & 2 deletions components/compose-web-app/modules/composite-editor/frame.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ async function ExpandComposite(spec, libraryBlocks, blockTypes, superIf, superBl
//
// Pass 2 - Resolve bindings
//
for (var instance of Object.values(composite.instances)) {
for (const instance of Object.values(composite.instances)) {
const bindingSpec = instance.getBindingsSpec();
for (const bspec of bindingSpec) {
let localInterface = instance.findInterface(bspec.interface);
var remoteInterface;
let remoteInterface;
if (bspec.block) {
let remoteInstance = composite.instances[bspec.block];
remoteInterface = remoteInstance.findInterface(bspec.blockInterface);
Expand Down
6 changes: 3 additions & 3 deletions components/compose-web-app/modules/library-composite-old.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ async function ExpandComposite(spec, libraryBlocks, blockTypes, superIf, superBl
//
// Pass 2 - Resolve bindings
//
for (var instance of Object.values(composite.instances)) {
for (const instance of Object.values(composite.instances)) {
const bindingSpec = instance.getBindingsSpec();
for (const bspec of bindingSpec) {
let localInterface = instance.findInterface(bspec.interface);
var remoteInterface;
let remoteInterface;
if (bspec.block) {
let remoteInstance = composite.instances[bspec.block];
remoteInterface = remoteInstance.findInterface(bspec.blockInterface);
Expand Down Expand Up @@ -562,7 +562,7 @@ function UpdateInstanceDiv(entry, newState, onChange, entryList) {
}

if (entryList) {
for (var other of entryList) {
for (const other of entryList) {
if (other != entry && other.selectState == newState) {
UpdateInstanceDiv(other, UNSELECTED, onChange);
}
Expand Down
4 changes: 2 additions & 2 deletions components/compose-web-app/modules/library-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export async function LibraryConfiguration(panel, block) {

async function ConfigPanel(panel, outerPanel, block, name, configmap, toRemoveOnDelete) {
panel.innerHTML = '';
var attribute;
let attribute;

if (name) {
attribute = configmap[name];
Expand All @@ -104,7 +104,7 @@ async function ConfigPanel(panel, outerPanel, block, name, configmap, toRemoveOn
//
// Name Field
//
var nameField;
let nameField;
if (name) {
nameField = document.createElement('div');
nameField.textContent = name;
Expand Down
6 changes: 3 additions & 3 deletions components/compose-web-app/modules/library-interfaces.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export async function LibraryEditInterfaces(panel, block, blockType, interfaceRo

async function InterfacePanel(panel, outerPanel, block, blockType, name, interfaces, interfaceRoles, toRemoveOnDelete) {
panel.innerHTML = '';
var iface;
let iface;

if (name) {
iface = interfaces[name];
Expand All @@ -125,7 +125,7 @@ async function InterfacePanel(panel, outerPanel, block, blockType, name, interfa
//
// Name Field
//
var nameField;
let nameField;
if (name) {
nameField = document.createElement('div');
nameField.textContent = name;
Expand All @@ -151,7 +151,7 @@ async function InterfacePanel(panel, outerPanel, block, blockType, name, interfa
//
// Polarity Field
//
var polarityField;
let polarityField;
if (blockType.allownorth && blockType.allowsouth) {
polarityField = document.createElement('select');
for (const p of ['north', 'south']) {
Expand Down
6 changes: 3 additions & 3 deletions components/compose-web-app/modules/library-simple.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export async function LibraryEditSimple(panel, block, blockType) {
panel.innerHTML = `<h2>Fetch Error: ${result.message}</h2>`;
return;
}
var simpleBody = await result.json();
const simpleBody = await result.json();
const showAffinity = blockType.allocation == 'dependent';

let columns = ['', 'Platforms'];
Expand Down Expand Up @@ -109,8 +109,8 @@ export async function LibraryEditSimple(panel, block, blockType) {

async function TemplatePanel(div, body, template, toDeleteRows, unexpandRow, block, showAffinity, outerPanel, blockType) {
let formFields = [];
var tplist;
var affinityItems;
let tplist;
let affinityItems;

// Set up the description box
let description = document.createElement('input');
Expand Down
10 changes: 5 additions & 5 deletions components/compose-web-app/modules/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export async function PollObject(trackedDiv, delayMs, actions) {
return;
}

var stopPolling = false;
let stopPolling = false;

for (const action of actions) {
console.log(`Poll fetching ${action.path}`);
Expand Down Expand Up @@ -186,7 +186,7 @@ export async function PollTable(trackedDiv, delayMs, actions) {
return;
}

var stopPolling = false;
let stopPolling = false;

for (const action of actions) {
console.log(`Poll fetching ${action.path}`);
Expand Down Expand Up @@ -258,13 +258,13 @@ export async function ConfirmDialog(text, buttonText, asyncAction) {

export function TimeAgo(date, _min) {
const min = _min || 0;
var seconds = Math.floor((new Date() - date) / 1000);
let seconds = Math.floor((new Date() - date) / 1000);
const prefix = seconds < min ? '< ' : '';
if (seconds < min) {
seconds = min;
}

var interval = Math.floor(seconds / 31536000);
let interval = Math.floor(seconds / 31536000);
if (interval > 0) {
return `${prefix}${interval} year${interval > 1 ? 's' : ''}`;
}
Expand Down Expand Up @@ -294,7 +294,7 @@ export function TimeAgo(date, _min) {
}

export function ExpandableRow(layout, columnCount, expandAction, insertPoint) {
var trackedObject = {};
const trackedObject = {};
if (!insertPoint) {
insertPoint = -1;
}
Expand Down
8 changes: 4 additions & 4 deletions components/compose-web-app/modules/van.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ export async function BuildVanTable() {
const section = document.getElementById("sectiondiv");
let panel = document.createElement('div');
section.appendChild(panel);
var exlayout;
var mtlayout;
var externalList = [];
var internalList = [];
let exlayout;
let mtlayout;
const externalList = [];
const internalList = [];
for (const item of listdata) {
if (item.tenantnetwork) {
internalList.push(item);
Expand Down
Loading