Beispiel #1
0
def distributions():

    limit = request.args.get('limit', 100)
    dists = get_all_distributions(limit=limit)
    channels = get_channels()

    return jsonify({'d': {'dists': dists, 'chans': channels}})
Beispiel #2
0
def distributions():

    limit = request.args.get('limit', 100)
    dists = get_all_distributions(limit=limit)
    channels = get_channels()

    return jsonify({'d': {'dists': dists, 'chans': channels}})
Beispiel #3
0
def init_data():
    """
    Initial data provided to the authoring page
    """

    channels = get_channels()
    dists = get_all_distributions()

    return jsonify({'d': {'dists': dists, 'chans': channels, 'schema': schema, 'env': env.config.ENVIRONMENT}})
Beispiel #4
0
def init_data():
    """
    Initial data provided to the authoring page
    """

    channels = get_channels()
    dists = get_all_distributions()

    return jsonify({
        'd': {
            'dists': dists, 'chans': channels,
            'schema': {"default": get_payload_schema(compact=False), "compact": get_payload_schema(compact=True)},
            'env': env.config.ENVIRONMENT}})
Beispiel #5
0
    def test_simple(self):
        """
        Simple distribution test
        """
        self.insert_distro()
        response = self.client.get(url_for('api.authoring.distributions'))
        chans = get_channels()
        dists = get_all_distributions()
        expected = json.loads(json.dumps({
            'd': {
                'dists': dists,
                'chans': chans
            }
        }))

        assert_equal(expected, response.json)
Beispiel #6
0
def init_data():
    """
    Initial data provided to the authoring page
    """

    channels = get_channels()
    dists = get_all_distributions()

    return jsonify({
        'd': {
            'dists': dists,
            'chans': channels,
            'schema': {
                "default": get_payload_schema(compact=False),
                "compact": get_payload_schema(compact=True)
            },
            'env': env.config.ENVIRONMENT
        }
    })