Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Template.serverInformationForm.onRendered(() => {
const instance = Template.instance();
instance.data.$form = instance.$('form:first');
instance.data.form = instance.data.$form.data('component');
// Handle the server type
instance.autorun(() => {
// Get the server type component
const typeComponent = instance.$('[data-key=type] :input').data('component');
// Run this computation every time the user change the server type
typeComponent.depend();
// Get the current server type value
const type = typeComponent.value();
// Set the serverType reactive value
getImage(pic) {
return getImage(Template.instance().imageTemplate.get(), pic);
},
});
Template.registerHelper('queriesReady', () => Template.instance().queriesReady());
}
email() {
if (getRouteUserName()) {
return Template.instance().data.student.username;
}
return '';
},
interests() {
} else {
utcOffset = `(UTC ${ utcOffset })`;
}
}
}
return {
user,
status: (onlineUsers[user.username] != null ? onlineUsers[user.username].status : 'offline'),
muted: Array.from(roomMuted).includes(user.username),
utcOffset,
};
});
const usersTotal = users.length;
const { total, loading, usersLimit, loadingMore } = Template.instance();
const hasMore = loadingMore.get() || (usersTotal < total.get() && usersLimit.get() <= usersTotal);
const totalShowing = usersTotal;
return {
_id: this.rid,
total: total.get(),
totalShowing,
loading: loading.get(),
totalOnline,
users,
hasMore,
rid: this.rid,
};
},
hidden() {
const data = Template.instance().results.get();
return (data) ? '' : 'hidden';
},
restoreDate() {
isEdges: function() {
return Template.instance().newLayerType.get() === 'edges' && Template.instance().newLayerDataReady.get()
},
isNodes: function() {
email() {
const visitor = Template.instance().visitor.get();
if (visitor.visitorEmails && visitor.visitorEmails.length > 0) {
return visitor.visitorEmails[0].address;
}
},
checked: function () {
return Template.instance().state.equals("isSelected", true);
},
helpMessages() {
const items = HelpMessages.find({}, { sort: { routeName: 1 } }).fetch();
const startIndex = Template.instance().itemIndex.get();
const endIndex = startIndex + Template.instance().itemCount.get();
return _.slice(items, startIndex, endIndex);
},
count() {