Skip to content
Snippets Groups Projects
Select Git revision
  • f1960e999fc72c370f45ad158320dfd0e5a4f871
  • master default protected
  • 1.31
  • 4.27.0
  • 4.26.0
  • 4.25.5
  • 4.25.4
  • 4.25.3
  • 4.25.2
  • 4.25.1
  • 4.25.0
  • 4.24.3
  • 4.24.2
  • 4.24.1
  • 4.24.0
  • 4.23.6
  • 4.23.5
  • 4.23.4
  • 4.23.3
  • 4.23.2
  • 4.23.1
  • 4.23.0
  • 4.22.3
23 results

datatable.pcss

Blame
  • issue-210.js 2.43 KiB
    const json = 
        `[
                    {
                        "id": 1000,
                        "name": "order 1",
                        "load1": "value load row 1:1",
                        "load2": "value load row 1:2",
                        "load3": "value load row 1:3"
                    },
                    {
                        "id": 1001,
                        "name": "order 2",
                        "load1": "value load row 2:1",
                        "load2": "value load row 2:2",
                        "load3": "value load row 2:3"
                    }
                   
                ]`;
    
    
    // check if json is valid
    JSON.parse(json)
    
    const json400Error=`[
                    {
                        "sys": {
                            "type": "Error",
                            "message": "Invalid request"
                        }
                    }
                ]`
    
    // check if json is valid
    JSON.parse(json400Error)
    
    
    const json200Error=`[
                    {
                        "sys": {
                            "type": "Error",
                            "message": "Invalid request"
                        }
                    }
                ]`
    
    // check if json is valid
    JSON.parse(json200Error)
    
    
    const html = `
    <label for="load1">field load 1</label><input id="load1" data-monster-attributes="value path:data.load1">
    <label for="load2">field load 2</label><input id="load2" data-monster-attributes="value path:data.load2">
    <label for="load3">field load 3</label><input id="load3" data-monster-attributes="value path:data.load3">
    `;
    
    
    
    const requestDelay = 100
    
    export default [
        {
            url: '/issue-210.json',
            method: 'get',
            rawResponse: async (req, res) => {
                res.setHeader('Content-Type', 'application/json')
                res.statusCode = 200
    
                setTimeout(function() {
                    res.end(json)
                }, requestDelay);