Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- getGitlabProjects() {
- this.gitlabService.getProjects(this.gitlabUrl,this.gitlabToken).subscribe(projects => {
- this.projects = projects;
- this.btnGetProjectsClicked = true;
- console.log(projects);
- let coreBankingProjectSelect = document.getElementById("coreBankingProject");
- let customerUIProjectSelect = document.getElementById("customerUIProject");
- let adminUIProjectSelect = document.getElementById("adminUIProject");
- let clientUIProjectSelect = document.getElementById("clientUIProject");
- //remove previous options
- coreBankingProjectSelect.innerHTML = '';
- customerUIProjectSelect.innerHTML = '';
- adminUIProjectSelect.innerHTML = '';
- clientUIProjectSelect.innerHTML = '';
- for(let i=0;i<projects.length;i++) {
- let option = document.createElement("option");
- option.text = projects[i].name;
- option.value = projects[i].name;
- //append projects
- coreBankingProjectSelect.appendChild(option);
- customerUIProjectSelect.appendChild(option);
- adminUIProjectSelect.appendChild(option);
- clientUIProjectSelect.appendChild(option);
- }
- // remove readonly
- coreBankingProjectSelect.removeAttribute("readonly");
- customerUIProjectSelect.removeAttribute("readonly");
- adminUIProjectSelect.removeAttribute("readonly");
- clientUIProjectSelect.removeAttribute("readonly");
- // select first option
- // coreBankingProjectSelect.selectedIndex = 0;
- // customerUIProjectSelect.selectedIndex = 0;
- // adminUIProjectSelect.selectedIndex = 0;
- // clientUIProjectSelect.selectedIndex = 0;
- })
Add Comment
Please, Sign In to add comment