returns a formatted status string ready to be displayed
@param status
@returns {*} a string
@private
331502
function _formatStatus(status) {
    let statusColorFn = chalk.grey;
    if (_.endsWith(status, 'IN_PROGRESS')) {
        statusColorFn = chalk.yellow;
    } else if (_.endsWith(status, 'FAILED') || _.startsWith(status, 'DELETE')) {
        statusColorFn = chalk.red;
    } else if (_.endsWith(status, 'COMPLETE')) {
        statusColorFn = chalk.greenBright;
    }

    const sanitizedStatus = _.replace(status, '_', ' ');
    const paddedStatus = _.padEnd(sanitizedStatus, STACK_EVENT_STATUS_DISPLAY_LENGTH);
    return statusColorFn(paddedStatus);
}
1340983
function getStatus(url, callback) {
  var client = new HttpClient(url);
  var executor = new Executor(client);
  var command = new Command(CommandName.GET_SERVER_STATUS);
  executor.execute(command, function(err, responseObj) {
    if (err) return callback(err);
    try {
      checkResponse(responseObj);
    } catch (ex) {
      return callback(ex);
    }
    callback(null, responseObj['value']);
  });
}
937073
def get_status(self):
        """"""

        result = ''
        if self._data_struct is not None:
            result = self._data_struct[KEY_STATUS]
        return result
587931
function convertStatus(statusDictionary) {
  return {
    authorized: stringToBool(statusDictionary.authorized),
    denied: stringToBool(statusDictionary.denied),
    restricted: stringToBool(statusDictionary.restricted),
    prepared: stringToBool(statusDictionary.prepared),
    scanning: stringToBool(statusDictionary.scanning),
    previewing: stringToBool(statusDictionary.previewing),
    showing: stringToBool(statusDictionary.showing),
    lightEnabled: stringToBool(statusDictionary.lightEnabled),
    canOpenSettings: stringToBool(statusDictionary.canOpenSettings),
    canEnableLight: stringToBool(statusDictionary.canEnableLight),
    canChangeCamera: stringToBool(statusDictionary.canChangeCamera),
    currentCamera: parseInt(statusDictionary.currentCamera)
  };
}
71210
function _readsDone(status) {
  /* jshint validthis: true */
  if (!status) {
    status = {code: constants.status.OK, details: 'OK'};
  }
  if (status.code !== constants.status.OK) {
    this.call.cancelWithStatus(status.code, status.details);
  }
  this.finished = true;
  this.read_status = status;
  this._emitStatusIfDone();
}
531917
public Status getStatus() {
        String status = m_resultFields.get(STATUS);
        if (status == null) {
            return Status.OK;
        } else {
            return Status.valueOf(status.toUpperCase());
        }
    }
995262
function getPreviewStatus(statuses, config) {
  const previewContext = config.getIn(['backend', 'preview_context']);
  return statuses.find(({ context }) => {
    return isPreviewContext(context, previewContext);
  });
}
689349
def status(self):
        
        status = _HTTP_STATUS_LINES.get(self._status_code)
        return str(status or ('{} Unknown'.format(self._status_code)))
114505
function getErrorNameFromStatusCode(statusCode) {
    statusCode = parseInt(statusCode, 10);
    var status = http.STATUS_CODES[statusCode];
    if (!status) { return false; }

    var name = '';
    var words = status.split(/\s+/);
    words.forEach(function(w) {
        name += w.charAt(0).toUpperCase() + w.slice(1).toLowerCase();
    });

    name = name.replace(/\W+/g, '');

    if (!/\w+Error$/.test(name)) {
        name += 'Error';
    }
    return name;
}
1056065
function getStatus (res) {
		let status;
		const statusCode = res.statusCode;
		if (statusCode) {
			status = Math.floor(statusCode / 100) * 100;
		}
		switch (status) {
			case 100:
			case 200:
			case 300:
				return 'success';
			default:
				return 'failure';
		}
	}
617398
function gitPorcelainStatus() {
  return git('status --porcelain -b', stdout => {
    const status = gitUtil.extractStatus(stdout);
    let parsedStatus = Object.values(status.index).concat(Object.values(status.workingTree));

    // Flattened
    parsedStatus = parsedStatus.reduce((a, b) => a.concat(b), []);

    return {
      status,
      currentBranch: status.branch.split('...')[0],
      clean: parsedStatus.length === 0
    };
  });
}
632289
function status() {
  var tasks = [],
      cwd = process.cwd();

  findRepos(function(err, repos) {
    if (err) return console.log(err);
    repos.forEach(function(repo) {
      tasks.push(function(done) {
        repo.status(function(err, status) {
          if (err) return done(err);
          if (argv.b) {
            repo.branch(function(err, head) {
              if (err) return done(err);
              done(null, {status: status, head: head});
            });
          }
          else {
            done(null, {status: status});
          }
        });
      });
    });
    async.series(tasks, function(err, results) {
      if (err) return console.log(err);

      var row,
          col,
          res,
          file,
          head = [],
          table,
          symbol;

      head.push('Repo');
      if (argv.b) {
        head.push('Branch');
      }
      head.push('Status');

      table = new Table({
        head: head,
        style: {
          compact: true,
          'padding-left': 1,
          'padding-right': 1,
          head: ['white', 'bold']
        }
      });

      results.forEach(function(res) {
        var row = [];

        row.push(res.status.repo.path.replace(cwd + '/', ''));
        if (argv.b) {
          row.push(res.head.name);
        }
        row.push(res.status.clean ? 'Clean'.green : 'Changed'.red);
        table.push(row);

        if (argv.v) {
          for (var name in res.status.files) {
            row = [];
            row.push('');
            if (argv.b) {
              row.push('');
            }
            switch (res.status.files[name].type) {
              case 'A':
                symbol = '+'.green; break;
              case 'D':
                symbol = '-'.red; break;
              case 'M':
                symbol = '*'.yellow; break;
              default:
                symbol = '~'.grey; break;
            }
            row.push(' ' + symbol + ' ' + name);
            table.push(row);
          }
        }
      });

      console.log(table.toString());
    });
  });
}
520455
function getOnlineStatus(serverUrlOrServerUrlOptions) {
    if (serverUrlOrServerUrlOptions === void 0) { serverUrlOrServerUrlOptions = init.initOptions.serverUrl; }
    var serverUrl;
    if (_.isString(serverUrlOrServerUrlOptions)) {
        serverUrl = serverUrlOrServerUrlOptions;
    }
    else if (serverUrlOrServerUrlOptions) {
        serverUrl = serverUrlOrServerUrlOptions.serverUrl;
    }
    return server.Server.getInstance(serverUrl).serverInfos;
}
1366108
public final String getRangesAsString(final Status status) {
        List<String> ranges = new ArrayList<String>();

        List<Range> rangeList;

        switch (status) {
        case OK:
            rangeList = okThresholdList;
            break;
        case WARNING:
            rangeList = warningThresholdList;
            break;
        case CRITICAL:
        default:
            rangeList = criticalThresholdList;
            break;
        }

        for (Range r : rangeList) {
            ranges.add(r.getRangeString());
        }

        if (ranges.isEmpty()) {
            return null;
        }

        return StringUtils.join(ranges, ",");
    }
1225484
def status(self):
        """"""

        resp = requests.get("http://{0}/get_status.cgi".format(self.address))
        data = resp.text.replace(";", "")
        data = data.replace("var", "")
        data_s = data.split("\n")
        # Last is an empty line 
        data_s.pop()
        data_array = [s.split("=") for s in data_s]
        return dict(data_array)
572869
def as_status(cls, obj):
        """"""
        if obj is None: return None
        return obj if isinstance(obj, cls) else cls.from_string(obj)
1325308
public static function statusLabel($status = null)
    {
        switch ($status) {
            case User::STATUS_ACTIVE:
                $label = 'info';
                $name = ArrayHelper::getValue(User::getStatuses(), $status);
                break;
            case User::STATUS_BANNED:
                $label = 'warning';
                $name = ArrayHelper::getValue(User::getStatuses(), $status);
                break;
            default:
                $label = 'default';
                $name = ArrayHelper::getValue(User::getStatuses(), User::STATUS_REGISTERED);
        }

        return Html::tag('span', $name, ['class' => 'label label-' . $label]);
    }