aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/coffee/monitoring/mockjax.coffee
blob: 94deb2289b3bd0f0eb89bc4898f00473fececfe2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
define ['third-party/jquery.mockjax'], ->

  jQuery.mockjaxSettings.contentType = 'text/json';
  jQuery.mockjaxSettings.responseTime = 250;

  # GET /api/codingrules/app
  jQuery.mockjax
    url: "#{baseUrl}/api/reports/search"
    responseText: JSON.stringify
      paging:
        pageIndex: 1
        pageSize: 5
        total: 206
        pages: 42
      reports: [
        {
          id: 84
          project: "org.codehaus.sonar:sonar"
          projectName: "SonarQube"
          startDate: "2014-07-19T23:11:33+06:00"
          status: "PENDING"
        }
        {
          id: 83
          project: "org.codehaus.sonar:sonar"
          projectName: "SonarQube"
          startDate: "2014-07-19T23:10:33+06:00"
          endDate: "2014-07-19T23:12:01+06:00"
          status: "DONE"
          extra: "Some additional text or stack trace."
        }
        {
          id: 82
          project: "org.codehaus.sonar:sonar"
          projectName: "SonarQube"
          startDate: "2014-07-19T23:10:33+06:00"
          endDate: "2014-07-19T23:12:01+06:00"
          status: "DONE"
          extra: "Some additional text or stack trace."
        }
        {
          id: 81
          project: "org.codehaus.sonar:sonar"
          projectName: "SonarQube"
          startDate: "2014-07-19T23:10:33+06:00"
          endDate: "2014-07-19T23:12:01+06:00"
          status: "DONE"
          extra: "Some additional text or stack trace."
        }
        {
          id: 80
          project: "org.codehaus.sonar:sonar"
          projectName: "SonarQube"
          startDate: "2014-07-19T23:10:33+06:00"
          endDate: "2014-07-19T23:12:01+06:00"
          status: "DONE"
          extra: "Some additional text or stack trace."
        }
        {
          id: 79
          project: "org.codehaus.sonar:sonar"
          projectName: "SonarQube"
          startDate: "2014-07-19T23:10:33+06:00"
          endDate: "2014-07-19T23:12:01+06:00"
          status: "DONE"
          extra: "Some additional text or stack trace."
        }
        {
          id: 78
          project: "org.codehaus.sonar:sonar"
          projectName: "SonarQube"
          startDate: "2014-07-19T23:10:33+06:00"
          endDate: "2014-07-19T23:12:01+06:00"
          status: "DONE"
          extra: "Some additional text or stack trace."
        }
        {
          id: 77
          project: "org.codehaus.sonar:sonar"
          projectName: "SonarQube"
          startDate: "2014-07-19T23:10:33+06:00"
          endDate: "2014-07-19T23:12:01+06:00"
          status: "DONE"
          extra: "Some additional text or stack trace."
        }
        {
          id: 76
          project: "org.codehaus.sonar:sonar"
          projectName: "SonarQube"
          startDate: "2014-07-19T23:10:33+06:00"
          endDate: "2014-07-19T23:12:01+06:00"
          status: "DONE"
          extra: "Some additional text or stack trace."
        }
        {
          id: 75
          project: "org.codehaus.sonar:sonar"
          projectName: "SonarQube"
          startDate: "2014-07-19T23:10:33+06:00"
          endDate: "2014-07-19T23:12:01+06:00"
          status: "DONE"
          extra: "Some asdditional text or stack trace."
        }
        {
          id: 74
          project: "org.codehaus.sonar:sonar"
          projectName: "SonarQube"
          startDate: "2014-07-19T23:10:33+06:00"
          endDate: "2014-07-19T23:12:01+06:00"
          status: "DONE"
          extra: "Some additional text or stack trace."
        }
      ]