-
Notifications
You must be signed in to change notification settings - Fork 0
/
DummyRadarDataProvider.js
121 lines (117 loc) · 3.43 KB
/
DummyRadarDataProvider.js
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
114
115
116
117
118
119
120
121
export default class DummyRadarDataProvider {
constructor() {
this.data = [
{
"id" : 1,
"radius" : 1,
"angle" : 45,
"label" : "HBase",
"link" : "http://google.de",
"movementId" : 0
},
{
"id" : 2,
"radius" : 0.6,
"angle" : 120,
"label" : "Apache Kafka",
"link" : "",
"movementId" : 1
}
];
}
load() {
return new Promise(function(resolve, reject) {
window.setTimeout(function() {
resolve(this.data);
}.bind(this), 100);
}.bind(this));
}
updateItem(item) {
return new Promise(function(resolve, reject) {
resolve(item);
})
}
addItem(radius, angle) {
return new Promise(function(resolve, reject) {
var label = prompt("Please enter the label of the new blip:", "");
if (label === null || label === "") {
reject();
} else {
this.data.push({"id" : this.data.length + 1, "radius" : radius, "angle" : angle, "label" : label});
resolve(this.data[this.data.length - 1]);
}
}.bind(this));
}
getMetaData() {
return {
"quadrants" : [
{
"id" : 0,
"name" : "Tools",
"color" : {
"blip" : "#86B782",
"text" : "#000000"
}
},
{
"id" : 1,
"name" : "Techniques",
"color" : {
"blip" : "#1EBCCD",
"text" : "#000000"
}
},
{
"id" : 2,
"name" : "Platforms",
"color" : {
"blip" : "#F38A3E",
"text" : "#000000"
}
},
{
"id" : 3,
"name" : "Languages & Frameworks",
"color" : {
"blip" : "#B32059",
"text" : "#000000"
}
},
],
"states" : [
{
"id" : 0,
"name" : "ADOPT",
"backgroundColor" : "#BFC0BF"
},
{
"id" : 1,
"name" : "TRIAL",
"backgroundColor" : "#CBCCCB"
},
{
"id" : 2,
"name" : "ASSESS",
"backgroundColor" : "#D7D8D6"
},
{
"id" : 3,
"name" : "HOLD",
"backgroundColor" : "#E4E5E4"
},
],
"movements" : [
{
"id" : 0,
"description" : "not changed",
"blipIcon" : "circle"
},
{
"id" : 1,
"description" : "changed since last release",
"blipIcon" : "rectangle"
}
]
}
}
}