-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebview.js
38 lines (28 loc) · 940 Bytes
/
webview.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
const vscode = acquireVsCodeApi();
function clone() {
const experimentName = document.getElementById("experimentName").value;
const organization = document.getElementById("organization").value;
const branch = document.getElementById("branch").value;
vscode.postMessage({
command: 'clone',
experimentName: experimentName,
organization: organization,
branch: branch
});
}
function addBranch(){
vscode.postMessage({
command: 'addBranch'
});
}
function addOrganization(){
vscode.postMessage({
command: 'addOrganization'
});
}
const submitButton = document.getElementById('submit');
submitButton.addEventListener('click', clone);
const addBranchButton = document.getElementById('addBranch');
addBranchButton.addEventListener('click', addBranch);
const addOrganizationButton = document.getElementById('addOrganization');
addOrganizationButton.addEventListener('click', addOrganization);