-
Notifications
You must be signed in to change notification settings - Fork 972
/
spark_routes.ts
160 lines (128 loc) · 4.58 KB
/
spark_routes.ts
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
/*
* Copyright 2018 ThoughtWorks, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import * as m from "mithril";
export default class {
static adminPipelineConfigPath(pipelineName: string): string {
return `/go/api/admin/pipelines/${pipelineName}`;
}
static pipelinePausePath(pipelineName: string): string {
return `/go/api/pipelines/${pipelineName}/pause`;
}
static pipelineUnpausePath(pipelineName: string): string {
return `/go/api/pipelines/${pipelineName}/unpause`;
}
static pipelineUnlockPath(pipelineName: string): string {
return `/go/api/pipelines/${pipelineName}/unlock`;
}
static pipelineTriggerPath(pipelineName: string): string {
return `/go/api/pipelines/${pipelineName}/schedule`;
}
static pipelineTriggerWithOptionsViewPath(pipelineName: string): string {
return `/go/api/pipelines/${pipelineName}/trigger_options`;
}
static pipelineMaterialSearchPath(pipelineName: string, fingerprint: string, searchText: string): string {
const queryString = m.buildQueryString({
fingerprint,
pipeline_name: pipelineName,
search_text: searchText
});
return `/go/api/internal/material_search?${queryString}`;
}
static pipelineSelectionPath(): string {
return "/go/api/internal/pipeline_selection";
}
static pipelineSelectionPipelinesDataPath(): string {
return "/go/api/internal/pipeline_selection/pipelines_data";
}
static buildCausePath(pipelineName: string, pipelineCounter: string): string {
return `/go/api/internal/build_cause/${pipelineName}/${pipelineCounter}`;
}
static artifactStoresPath(id: string): string {
if (id) {
return `/go/api/admin/artifact_stores/${id}`;
} else {
return "/go/api/admin/artifact_stores";
}
}
static DataSharingSettingsPath(): string {
return "/go/api/data_sharing/settings";
}
static DataSharingUsageDataPath(): string {
return "/go/api/internal/data_sharing/usagedata";
}
static DataSharingUsageDataEncryptedPath(): string {
return "/go/api/internal/data_sharing/usagedata/encrypted";
}
static DataReportingInfoPath(): string {
return "/go/api/internal/data_sharing/reporting/info";
}
static DataReportingStartReportingPath(): string {
return "/go/api/internal/data_sharing/reporting/start";
}
static DataReportingCompleteReportingPath(): string {
return "/go/api/internal/data_sharing/reporting/complete";
}
static ApiConfigReposListPath(): string {
return `/go/api/admin/config_repos`;
}
static ApiConfigRepoPath(id: string): string {
return `/go/api/admin/config_repos/${id}`;
}
static apiConfigReposInternalPath(): string {
return `/go/api/internal/config_repos`;
}
static configRepoTriggerUpdatePath(id: string): string {
return `/go/api/internal/config_repos/${id}/trigger_update`;
}
static configRepoRevisionStatusPath(id: string): string {
return `/go/api/internal/config_repos/${id}/status`;
}
static elasticProfilePath(profileId: string): string {
return `/go/api/elastic/profiles/${profileId}`;
}
static elasticProfileListPath(): string {
return "/go/api/elastic/profiles";
}
static elasticProfileUsagePath(profileId: string): string {
return `/go/api/internal/elastic/profiles/${profileId}/usages`;
}
static agentsPath(uuid?: string): string {
if (uuid) {
return `/go/api/agents/${uuid}`;
} else {
return `/go/api/agents`;
}
}
static drainModeSettingsPath(): string {
return `/go/api/admin/drain_mode/settings`;
}
static drainModeInfoPath(): string {
return `/go/api/admin/drain_mode/info`;
}
static cancelStage(pipelineName: string, stageName: string): string {
return `/go/api/stages/${pipelineName}/${stageName}/cancel`;
}
static authConfigPath(authConfigId?: string): string {
if (authConfigId) {
return `/go/api/admin/security/auth_configs/${authConfigId}`;
} else {
return "/go/api/admin/security/auth_configs";
}
}
static adminInternalVerifyConnectionPath(): string {
return `/go/api/admin/internal/security/auth_configs/verify_connection`;
}
}