-
Notifications
You must be signed in to change notification settings - Fork 11
/
bundle.js
114 lines (114 loc) · 3.83 KB
/
bundle.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
define([
"../../../platform/commonUI/formats/src/FormatProvider",
"./src/KerbalTimeFormat",
'./src/KerbalTelemetryServerAdapter.js',
'./src/KerbalTelemetryInitializer.js',
'./src/KerbalTelemetryModelProvider.js',
'./src/KerbalTelemetryProvider.js',
'legacyRegistry'
], function (
FormatProvider,
KerbalTimeFormat,
KerbalTelemetryServerAdapter,
KerbalTelemetryInitializer,
KerbalTelemetryModelProvider,
KerbalTelemetryProvider,
legacyRegistry) {
legacyRegistry.register("example/kerbal", {
"name": "Kerbal Telemetry Adapter",
"extensions": {
"types": [
{
"name": "Kerbal Spacecraft",
"key": "kerbal.spacecraft",
"cssclass": "icon-object"
},
{
"name": "Subsystem",
"key": "kerbal.subsystem",
"cssclass": "icon-object",
"model": {"composition": []}
},
{
"name": "Measurement",
"key": "kerbal.measurement",
"cssclass": "icon-telemetry-panel",
"model": {"telemetry": {}},
"telemetry": {
"source": "kerbal.source",
"domains": [
{
"name": "Kerbal Time",
"key": "timestamp",
"format": "kerbal"
}
]
}
}
],
"roots": [
{
"id": "kerbal:sc",
"priority": "preferred",
"model": {
"type": "kerbal.spacecraft",
"name": "Kerbal Spacecraft",
"composition": []
}
}
],
"services": [
{
"key": "kerbal.adapter",
"implementation": KerbalTelemetryServerAdapter,
"depends": ["$q", "$http", "$interval", "KERBAL_HTTP_API_URL"]
}
],
"constants": [
{
"key": "KERBAL_HTTP_API_URL",
"priority": "fallback",
"value": "/proxyUrl?url=" + encodeURIComponent("http://localhost:8085/telemachus/datalink")
},
{
"key": "DEFAULT_TIME_FORMAT",
"value": "kerbal"
}
],
"runs": [
{
"implementation": KerbalTelemetryInitializer,
"depends": ["kerbal.adapter", "objectService"]
}
],
"components": [
{
"provides": "modelService",
"type": "provider",
"implementation": KerbalTelemetryModelProvider,
"depends": ["kerbal.adapter", "$q"]
},
{
"provides": "telemetryService",
"type": "provider",
"implementation": KerbalTelemetryProvider,
"depends": ["kerbal.adapter", "$q"]
},
{
"provides": "formatService",
"type": "provider",
"implementation": FormatProvider,
"depends": [
"formats[]"
]
}
],
"formats": [
{
"key": "kerbal",
"implementation": KerbalTimeFormat
}
]
}
});
});