How to use the meteor/meteor.Meteor.settings function in meteor

To help you get started, we’ve selected a few meteor examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github forbole / big_dipper / imports / ui / proposals / Proposal.jsx View on Github external
componentDidUpdate(prevProps){
        if (this.props.proposal != prevProps.proposal){
            // console.log(this.props.proposal.value);
            this.setState({
                proposal: this.props.proposal,
                deposit: <div>{this.props.proposal.total_deposit?this.props.proposal.total_deposit.map((deposit, i) =&gt; {
                    return <div>{new Coin(deposit.amount).toString()}</div>
                }):''} </div>
            });

            let now = moment();
            const powerReduction = Meteor.settings.public.powerReduction || Meteor.settings.public.stakingFraction;
            let totalVotingPower = this.props.chain.activeVotingPower * powerReduction;
            if (this.props.proposal.voting_start_time != '0001-01-01T00:00:00Z'){
                if (now.diff(moment(this.props.proposal.voting_start_time)) &gt; 0){
                    let endVotingTime = moment(this.props.proposal.voting_end_time);
                    if (now.diff(endVotingTime) &lt; 0){
                        // not reach end voting time yet
                        let totalVotes = 0;
                        for (let i in this.props.proposal.tally){
                            totalVotes += parseInt(this.props.proposal.tally[i]);
                        }

                        this.setState({
                            tally: this.props.proposal.tally,
                            tallyDate: ,
                            voteStarted: true,
                            voteEnded: false,
github zencrepes / zencrepes / imports / ui / data / utils / ingestIssue.js View on Github external
issueObj['points'] = points;
      } else if (pointsExp.test(currentLabel.node.description)) {
        let points = parseInt(currentLabel.node.description.replace('SP:', ''));
        issueObj['points'] = points;
      } else if (
        Meteor.settings.public.labels.effort !== undefined &&
        Meteor.settings.public.labels.effort[currentLabel.node.name] !==
          undefined &&
        Number.isInteger(
          Meteor.settings.public.labels.effort[currentLabel.node.name]
        )
      ) {
        // Interesting edge case, if the label is actually named "constructor"
        // Added this check: Number.isInteger(Meteor.settings.public.labels.effort[currentLabel.node.name])
        issueObj['points'] = parseInt(
          Meteor.settings.public.labels.effort[currentLabel.node.name]
        );
        /*
                if (Meteor.settings.public.labels.effort !== undefined) {
                    const pointsLabel = pointsLabelExp.exec(currentLabel.node.name);
                    const efforts = Meteor.settings.public.labels.effort;
                    if (efforts[pointsLabel.groups.name] !== undefined) {
                        issueObj['points'] = efforts[pointsLabel.groups.name];
                    }
                }
                */
      }
      if (boardExp.test(currentLabel.node.description)) {
        const boardLabel = boardExp.exec(currentLabel.node.description);
        issueObj['boardState'] = {
          name: boardLabel.groups.name,
          priority: boardLabel.groups.priority,
github openpowerquality / opq / view / app / imports / startup / server / health-cron.js View on Github external
function healthCron() {
  // Set up cron job unless in testing mode or it's explicitly disabled in settings file.
  const testMode = Meteor.isTest || Meteor.isAppTest;
  const disabled = Meteor.settings.healthCron && !Meteor.settings.healthCron.enabled;
  if (disabled) {
    console.log('Health cron job disabled in view.config.json.');
  }
  if (!testMode && !disabled) {
    // Default the update interval to 10 seconds if not supplied in configuration file.
    const updateIntervalSeconds = Meteor.settings.systemStats ? Meteor.settings.systemStats.updateIntervalSeconds : 10;
    const services = ['MAUKA', 'MAKAI', 'MONGO', 'HEALTH'];
    SyncedCron.add({
      name: 'Check Health collection for services that are down',
      schedule(parser) {
        return parser.text(`every ${updateIntervalSeconds} seconds`); // Seconds must be between 0-59.
      },
      job() {
        const usersInterested = UserProfiles.find({ 'notification_preferences.notification_types':
            'system service down' }).fetch();
        const healths = Healths.find(
github 4minitz / 4minitz / imports / config / GlobalSettings.js View on Github external
Meteor.settings.public.showResendVerificationEmailLink =
            (Meteor.settings.email && Meteor.settings.email.showResendVerificationEmailLink !== undefined)
                ? Meteor.settings.email.showResendVerificationEmailLink
                : false;

        Meteor.settings.public.showForgotPasswordLink =
            (Meteor.settings.email && Meteor.settings.email.showForgotPasswordLink !== undefined)
                ? Meteor.settings.email.showForgotPasswordLink
                : false;

        Meteor.settings.public.isEnd2EndTest = Meteor.settings.isEnd2EndTest;

        // enforce slash "/" at the end
        if (Meteor.settings.attachments && Meteor.settings.attachments.storagePath) {
            if (! Meteor.settings.attachments.storagePath.match(/\/$/)) {
                Meteor.settings.attachments.storagePath = Meteor.settings.attachments.storagePath + '/';
            }
        }

        LdapSettings.publish();
    }
github bigbluebutton / bigbluebutton / bigbluebutton-html5 / imports / startup / server / redis.js View on Github external
Meteor.startup(() => {
  const REDIS_CONFIG = Meteor.settings.redis;

  RedisPubSubSingleton.updateConfig(REDIS_CONFIG);
  RedisPubSubSingleton.init();
});
github sozialhelden / accessibility-cloud / server / i18n / sync-with-transifex.js View on Github external
Meteor.startup(() => {
  Fiber(() => cacheRegisteredLocales(resourceSlug)).run();
  if (get(Meteor.settings, 'transifex.skipSyncingOnStart')) {
    console.log('Skipping automatic transifex syncing on server start.');
    return;
  }
  Fiber(() => syncPropertyNamesWithTransifex()).run();
});
github forbole / big_dipper / imports / ui / transactions / TransactionsList.jsx View on Github external
constructor(props){
        super(props);

        this.state = {
            limit: Meteor.settings.public.initialPageSize,
            monikerDir: 1,
            votingPowerDir: -1,
            uptimeDir: -1,
            proposerDir: -1,
            priority: 2,
            loadmore: false,
            sidebarOpen: (props.location.pathname.split("/transactions/").length == 2)
        }

        this.onSetSidebarOpen = this.onSetSidebarOpen.bind(this);
    }
github ACGN-stock / acgn-stock / server / startup / intervalCheck.js View on Github external
Meteor.startup(function() {
  Meteor.setInterval(intervalCheck, Meteor.settings.public.intervalTimer);
});
github bigbluebutton / bigbluebutton / bigbluebutton-html5 / imports / api / users / server / methods / validateAuthToken.js View on Github external
export default function validateAuthToken(credentials) {
  const REDIS_CONFIG = Meteor.settings.redis;
  const CHANNEL = REDIS_CONFIG.channels.toBBBApps.meeting;
  const EVENT_NAME = 'validate_auth_token';

  const { meetingId, requesterUserId, requesterToken } = credentials;

  check(meetingId, String);
  check(requesterUserId, String);
  check(requesterToken, String);

  const User = Users.findOne({
    meetingId,
    userId: requesterUserId,
  });

  if (!User) {
    createDummyUser(meetingId, requesterUserId, requesterToken);
github kromitgmbh / titra / imports / ui / pages / editproject.js View on Github external
  disablePublic: () => Meteor.settings.public.disablePublic,
  archived: (_id) => (Projects.findOne({ _id }) ? Projects.findOne({ _id }).archived : false),