From fd33479077207617f6b6e2313e25e3f637b9797a Mon Sep 17 00:00:00 2001 From: dibs Date: Tue, 18 Dec 2012 14:08:20 +0900 Subject: [PATCH] [Title] Dibs web bug fix & add license --- dibs-web/app/controllers/admin_controller.rb | 28 ++++ .../admin_distribution_controller.rb | 28 ++++ .../app/controllers/admin_group_controller.rb | 28 ++++ .../controllers/admin_project_controller.rb | 31 +++- .../controllers/admin_server_controller.rb | 28 ++++ .../app/controllers/admin_user_controller.rb | 30 +++- .../app/controllers/application_controller.rb | 28 ++++ dibs-web/app/controllers/jobs_controller.rb | 28 ++++ .../app/controllers/projects_controller.rb | 28 ++++ .../app/controllers/sessions_controller.rb | 28 ++++ dibs-web/app/controllers/users_controller.rb | 28 ++++ dibs-web/app/controllers/utils.rb | 28 ++++ dibs-web/config/database.yml | 16 +- dibs-web/public/index.html | 28 ++++ .../javascripts/admin-distribution-add.js | 28 ++++ .../javascripts/admin-distribution-modify.js | 28 ++++ .../public/javascripts/admin-distribution.js | 28 ++++ .../public/javascripts/admin-group-add.js | 28 ++++ .../public/javascripts/admin-group-modify.js | 28 ++++ dibs-web/public/javascripts/admin-group.js | 28 ++++ .../public/javascripts/admin-project-add.js | 28 ++++ .../javascripts/admin-project-modify.js | 28 ++++ dibs-web/public/javascripts/admin-project.js | 28 ++++ .../public/javascripts/admin-server-add.js | 28 ++++ .../public/javascripts/admin-server-modify.js | 30 +++- .../public/javascripts/admin-server-remove.js | 46 ++++++ dibs-web/public/javascripts/admin-server.js | 28 ++++ .../public/javascripts/admin-user-modify.js | 28 ++++ dibs-web/public/javascripts/admin-user.js | 28 ++++ dibs-web/public/javascripts/build.js | 38 ++++- dibs-web/public/javascripts/dibs-api.js | 140 ++++++++++++------ dibs-web/public/javascripts/jobs.js | 46 +++++- dibs-web/public/javascripts/log.js | 28 ++++ dibs-web/public/javascripts/main.js | 70 +++++++-- dibs-web/public/javascripts/popup-window.js | 28 ++++ dibs-web/public/javascripts/post-process.js | 28 ++++ dibs-web/public/javascripts/projects.js | 40 +++++ dibs-web/public/javascripts/session.js | 46 +++--- dibs-web/public/javascripts/user.js | 31 +++- dibs-web/public/log.html | 54 ++++--- 40 files changed, 1267 insertions(+), 107 deletions(-) diff --git a/dibs-web/app/controllers/admin_controller.rb b/dibs-web/app/controllers/admin_controller.rb index bc41fc6..b2803d5 100644 --- a/dibs-web/app/controllers/admin_controller.rb +++ b/dibs-web/app/controllers/admin_controller.rb @@ -1,3 +1,31 @@ +=begin + admin_controller.rb + +Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + +Contact: +Sungmin Kim +Taejun Ha +Jiil Hyoun +Donghyuk Yang +DongHee Yang + +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. + +Contributors: +- S-Core Co., Ltd +=end + class AdminController < ApplicationController before_filter :check_login_status, :check_admin_group diff --git a/dibs-web/app/controllers/admin_distribution_controller.rb b/dibs-web/app/controllers/admin_distribution_controller.rb index 956c7d1..5b16d3b 100644 --- a/dibs-web/app/controllers/admin_distribution_controller.rb +++ b/dibs-web/app/controllers/admin_distribution_controller.rb @@ -1,3 +1,31 @@ +=begin + admin_distribution_controller.rb + +Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + +Contact: +Sungmin Kim +Taejun Ha +Jiil Hyoun +Donghyuk Yang +DongHee Yang + +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. + +Contributors: +- S-Core Co., Ltd +=end + class AdminDistributionController < ApplicationController before_filter :check_login_status, :check_admin_group diff --git a/dibs-web/app/controllers/admin_group_controller.rb b/dibs-web/app/controllers/admin_group_controller.rb index 352cf45..5818e1b 100644 --- a/dibs-web/app/controllers/admin_group_controller.rb +++ b/dibs-web/app/controllers/admin_group_controller.rb @@ -1,3 +1,31 @@ +=begin + admin_group_controller.rb + +Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + +Contact: +Sungmin Kim +Taejun Ha +Jiil Hyoun +Donghyuk Yang +DongHee Yang + +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. + +Contributors: +- S-Core Co., Ltd +=end + class AdminGroupController < ApplicationController before_filter :check_login_status, :check_admin_group diff --git a/dibs-web/app/controllers/admin_project_controller.rb b/dibs-web/app/controllers/admin_project_controller.rb index 372a346..f4496f1 100644 --- a/dibs-web/app/controllers/admin_project_controller.rb +++ b/dibs-web/app/controllers/admin_project_controller.rb @@ -1,3 +1,31 @@ +=begin + admin_project_controller.rb + +Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + +Contact: +Sungmin Kim +Taejun Ha +Jiil Hyoun +Donghyuk Yang +DongHee Yang + +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. + +Contributors: +- S-Core Co., Ltd +=end + class AdminProjectController < ApplicationController def queryAllProject project_list = Project.all(:order => "name") @@ -51,7 +79,8 @@ class AdminProjectController < ApplicationController FROM projects , distributions WHERE distributions.name = \"#{dist_name}\" - AND distributions.id = projects.distribution_id ") + AND distributions.id = projects.distribution_id + ORDER BY projects.name") if not project_list.nil? project_list.each do |project| doc.Project { diff --git a/dibs-web/app/controllers/admin_server_controller.rb b/dibs-web/app/controllers/admin_server_controller.rb index ed53560..8efb20d 100644 --- a/dibs-web/app/controllers/admin_server_controller.rb +++ b/dibs-web/app/controllers/admin_server_controller.rb @@ -1,3 +1,31 @@ +=begin + admin_server_controller.rb + +Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + +Contact: +Sungmin Kim +Taejun Ha +Jiil Hyoun +Donghyuk Yang +DongHee Yang + +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. + +Contributors: +- S-Core Co., Ltd +=end + class AdminServerController < ApplicationController def queryAllServer # get full distribution list diff --git a/dibs-web/app/controllers/admin_user_controller.rb b/dibs-web/app/controllers/admin_user_controller.rb index d088373..97698a0 100644 --- a/dibs-web/app/controllers/admin_user_controller.rb +++ b/dibs-web/app/controllers/admin_user_controller.rb @@ -1,9 +1,37 @@ +=begin + admin_user_controller.rb + +Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + +Contact: +Sungmin Kim +Taejun Ha +Jiil Hyoun +Donghyuk Yang +DongHee Yang + +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. + +Contributors: +- S-Core Co., Ltd +=end + class AdminUserController < ApplicationController before_filter :check_login_status, :check_admin_group def queryAllUser - user_list = User.all + user_list = User.all(:order => "name") doc = Builder::XmlMarkup.new( :target => out_string = "", :indent => 2 ) doc.Response { diff --git a/dibs-web/app/controllers/application_controller.rb b/dibs-web/app/controllers/application_controller.rb index bcebb23..1ad4921 100644 --- a/dibs-web/app/controllers/application_controller.rb +++ b/dibs-web/app/controllers/application_controller.rb @@ -1,3 +1,31 @@ +=begin + application_controller.rb + +Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + +Contact: +Sungmin Kim +Taejun Ha +Jiil Hyoun +Donghyuk Yang +DongHee Yang + +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. + +Contributors: +- S-Core Co., Ltd +=end + class ApplicationController < ActionController::Base #protect_from_forgery diff --git a/dibs-web/app/controllers/jobs_controller.rb b/dibs-web/app/controllers/jobs_controller.rb index 71f6ae9..34bad93 100644 --- a/dibs-web/app/controllers/jobs_controller.rb +++ b/dibs-web/app/controllers/jobs_controller.rb @@ -1,3 +1,31 @@ +=begin + jobs_controller.rb + +Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + +Contact: +Sungmin Kim +Taejun Ha +Jiil Hyoun +Donghyuk Yang +DongHee Yang + +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. + +Contributors: +- S-Core Co., Ltd +=end + class JobsController < ApplicationController before_filter :check_login_status diff --git a/dibs-web/app/controllers/projects_controller.rb b/dibs-web/app/controllers/projects_controller.rb index 4467077..feab061 100644 --- a/dibs-web/app/controllers/projects_controller.rb +++ b/dibs-web/app/controllers/projects_controller.rb @@ -1,3 +1,31 @@ +=begin + projects_controller.rb + +Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + +Contact: +Sungmin Kim +Taejun Ha +Jiil Hyoun +Donghyuk Yang +DongHee Yang + +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. + +Contributors: +- S-Core Co., Ltd +=end + require 'json' class ProjectsController < ApplicationController diff --git a/dibs-web/app/controllers/sessions_controller.rb b/dibs-web/app/controllers/sessions_controller.rb index 2dcf20b..9d90123 100644 --- a/dibs-web/app/controllers/sessions_controller.rb +++ b/dibs-web/app/controllers/sessions_controller.rb @@ -1,3 +1,31 @@ +=begin + sessions_controller.rb + +Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + +Contact: +Sungmin Kim +Taejun Ha +Jiil Hyoun +Donghyuk Yang +DongHee Yang + +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. + +Contributors: +- S-Core Co., Ltd +=end + class SessionsController < ApplicationController def new end diff --git a/dibs-web/app/controllers/users_controller.rb b/dibs-web/app/controllers/users_controller.rb index a096e00..0b830a1 100644 --- a/dibs-web/app/controllers/users_controller.rb +++ b/dibs-web/app/controllers/users_controller.rb @@ -1,3 +1,31 @@ +=begin + users_controller.rb + +Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + +Contact: +Sungmin Kim +Taejun Ha +Jiil Hyoun +Donghyuk Yang +DongHee Yang + +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. + +Contributors: +- S-Core Co., Ltd +=end + class UsersController < ApplicationController def new diff --git a/dibs-web/app/controllers/utils.rb b/dibs-web/app/controllers/utils.rb index e768855..d76e9c6 100644 --- a/dibs-web/app/controllers/utils.rb +++ b/dibs-web/app/controllers/utils.rb @@ -1,3 +1,31 @@ +=begin + utils.rb + +Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + +Contact: +Sungmin Kim +Taejun Ha +Jiil Hyoun +Donghyuk Yang +DongHee Yang + +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. + +Contributors: +- S-Core Co., Ltd +=end + # constant BUILD_SERVER_ADDRESS = "127.0.0.1" diff --git a/dibs-web/config/database.yml b/dibs-web/config/database.yml index a5cb84b..319f61e 100644 --- a/dibs-web/config/database.yml +++ b/dibs-web/config/database.yml @@ -35,12 +35,12 @@ timeout: development: - adapter: mysql2 - encoding: utf8 + adapter: + encoding: host: - port: - database: - username: - password: - pool: 5 - timeout: 5000 + port: + database: + username: + password: + pool: + timeout: diff --git a/dibs-web/public/index.html b/dibs-web/public/index.html index 28b4651..5c553e0 100644 --- a/dibs-web/public/index.html +++ b/dibs-web/public/index.html @@ -1,3 +1,31 @@ + + diff --git a/dibs-web/public/javascripts/admin-distribution-add.js b/dibs-web/public/javascripts/admin-distribution-add.js index e4d7623..f648638 100644 --- a/dibs-web/public/javascripts/admin-distribution-add.js +++ b/dibs-web/public/javascripts/admin-distribution-add.js @@ -1,3 +1,31 @@ +/* + admin-distribution-add.js + +Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + +Contact: +Sungmin Kim +Taejun Ha +Jiil Hyoun +Donghyuk Yang +DongHee Yang + +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. + +Contributors: +- S-Core Co., Ltd +*/ + function adminDistributionAdd() { var changeInfoList = []; var changeInfoItem; diff --git a/dibs-web/public/javascripts/admin-distribution-modify.js b/dibs-web/public/javascripts/admin-distribution-modify.js index 5928d88..5c5c293 100644 --- a/dibs-web/public/javascripts/admin-distribution-modify.js +++ b/dibs-web/public/javascripts/admin-distribution-modify.js @@ -1,3 +1,31 @@ +/* + admin-distribution-modify.js + +Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + +Contact: +Sungmin Kim +Taejun Ha +Jiil Hyoun +Donghyuk Yang +DongHee Yang + +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. + +Contributors: +- S-Core Co., Ltd +*/ + function adminDistributionModifyPopupInit() { var distName = $("#adminDistributionSelect option:selected").val(); var packageServerUrl = document.getElementById("adminDistribution:packageServerUrl").innerHTML; diff --git a/dibs-web/public/javascripts/admin-distribution.js b/dibs-web/public/javascripts/admin-distribution.js index 1d550f1..5668a4d 100644 --- a/dibs-web/public/javascripts/admin-distribution.js +++ b/dibs-web/public/javascripts/admin-distribution.js @@ -1,3 +1,31 @@ +/* + admin-distribution.js + +Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + +Contact: +Sungmin Kim +Taejun Ha +Jiil Hyoun +Donghyuk Yang +DongHee Yang + +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. + +Contributors: +- S-Core Co., Ltd +*/ + function adminDistributionInit() { queryAllDistribution( function (xml) { var oldDistName = $("#adminDistributionSelect option:selected").val(); diff --git a/dibs-web/public/javascripts/admin-group-add.js b/dibs-web/public/javascripts/admin-group-add.js index ec47eef..60c7a16 100644 --- a/dibs-web/public/javascripts/admin-group-add.js +++ b/dibs-web/public/javascripts/admin-group-add.js @@ -1,3 +1,31 @@ +/* + admin-group-add.js + +Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + +Contact: +Sungmin Kim +Taejun Ha +Jiil Hyoun +Donghyuk Yang +DongHee Yang + +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. + +Contributors: +- S-Core Co., Ltd +*/ + function adminGroupAddInit() { document.getElementById('adminGroupAddPopup-Name').value = ""; document.getElementById('adminGroupAddPopup-Description').value = ""; diff --git a/dibs-web/public/javascripts/admin-group-modify.js b/dibs-web/public/javascripts/admin-group-modify.js index 6b9246e..17ed56e 100644 --- a/dibs-web/public/javascripts/admin-group-modify.js +++ b/dibs-web/public/javascripts/admin-group-modify.js @@ -1,3 +1,31 @@ +/* + admin-group-modify.js + +Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + +Contact: +Sungmin Kim +Taejun Ha +Jiil Hyoun +Donghyuk Yang +DongHee Yang + +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. + +Contributors: +- S-Core Co., Ltd +*/ + function adminGroupModifyInit() { var index = localStorage.groupTableIndex; var groupName = document.getElementById("groupTableName:"+index).innerHTML; diff --git a/dibs-web/public/javascripts/admin-group.js b/dibs-web/public/javascripts/admin-group.js index 549e686..6f2104b 100644 --- a/dibs-web/public/javascripts/admin-group.js +++ b/dibs-web/public/javascripts/admin-group.js @@ -1,3 +1,31 @@ +/* + admin-group.js + +Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + +Contact: +Sungmin Kim +Taejun Ha +Jiil Hyoun +Donghyuk Yang +DongHee Yang + +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. + +Contributors: +- S-Core Co., Ltd +*/ + function adminGroupInit() { adminGroupInitTable(); diff --git a/dibs-web/public/javascripts/admin-project-add.js b/dibs-web/public/javascripts/admin-project-add.js index 6cfbe48..7251408 100644 --- a/dibs-web/public/javascripts/admin-project-add.js +++ b/dibs-web/public/javascripts/admin-project-add.js @@ -1,3 +1,31 @@ +/* + admin-project-add.js + +Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + +Contact: +Sungmin Kim +Taejun Ha +Jiil Hyoun +Donghyuk Yang +DongHee Yang + +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. + +Contributors: +- S-Core Co., Ltd +*/ + function adminProjectAddGitInit() { document.getElementById("popup:addGitProjectName").value = ""; document.getElementById("popup:addGitProjectPassword").value = ""; diff --git a/dibs-web/public/javascripts/admin-project-modify.js b/dibs-web/public/javascripts/admin-project-modify.js index 0fd80e2..420d093 100644 --- a/dibs-web/public/javascripts/admin-project-modify.js +++ b/dibs-web/public/javascripts/admin-project-modify.js @@ -1,3 +1,31 @@ +/* + admin-project-modify.js + +Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + +Contact: +Sungmin Kim +Taejun Ha +Jiil Hyoun +Donghyuk Yang +DongHee Yang + +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. + +Contributors: +- S-Core Co., Ltd +*/ + function adminProjectModifyBinaryProjectInit() { var projectName = localStorage.projectName; var packageName = document.getElementById('modifyBinaryPackageName:'+projectName).innerHTML; diff --git a/dibs-web/public/javascripts/admin-project.js b/dibs-web/public/javascripts/admin-project.js index 2c14b8a..03e06b7 100644 --- a/dibs-web/public/javascripts/admin-project.js +++ b/dibs-web/public/javascripts/admin-project.js @@ -1,3 +1,31 @@ +/* + admin-project.js + +Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + +Contact: +Sungmin Kim +Taejun Ha +Jiil Hyoun +Donghyuk Yang +DongHee Yang + +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. + +Contributors: +- S-Core Co., Ltd +*/ + function adminProjectInit() { queryAllDistribution( function (xml) { var oldDistName = $("#adminProjectDistributionSelect option:selected").val(); diff --git a/dibs-web/public/javascripts/admin-server-add.js b/dibs-web/public/javascripts/admin-server-add.js index ca5e508..18a47d2 100644 --- a/dibs-web/public/javascripts/admin-server-add.js +++ b/dibs-web/public/javascripts/admin-server-add.js @@ -1,3 +1,31 @@ +/* + admin-server-add.js + +Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + +Contact: +Sungmin Kim +Taejun Ha +Jiil Hyoun +Donghyuk Yang +DongHee Yang + +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. + +Contributors: +- S-Core Co., Ltd +*/ + function adminServerAddSupportedOsInit() { // Remove select option $('#adminServer-AddSupportedOs-OsCategory').empty(); diff --git a/dibs-web/public/javascripts/admin-server-modify.js b/dibs-web/public/javascripts/admin-server-modify.js index 324b797..28e9c97 100644 --- a/dibs-web/public/javascripts/admin-server-modify.js +++ b/dibs-web/public/javascripts/admin-server-modify.js @@ -1,3 +1,31 @@ +/* + admin-server-modify.js + +Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + +Contact: +Sungmin Kim +Taejun Ha +Jiil Hyoun +Donghyuk Yang +DongHee Yang + +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. + +Contributors: +- S-Core Co., Ltd +*/ + function adminServerModifyRemoteBuildServerInit() { var serverAddress = localStorage.remoteBuildServerAddress; var serverDescription = localStorage.remoteBuildServerDescription; @@ -48,7 +76,7 @@ function adminServerModifyRemoteBuildServer() { return; } - changeInfoItem = {"Type":"ModifyServer", "Address":serverAddress, "NewAddress":newServerAddress, "Description":description}; + changeInfoItem = {"Address":serverAddress, "NewAddress":newServerAddress, "Description":description}; changeInfoList.push(changeInfoItem); modifyRemoteBuildServer(changeInfoList, function () { diff --git a/dibs-web/public/javascripts/admin-server-remove.js b/dibs-web/public/javascripts/admin-server-remove.js index 6a4b570..db74a01 100644 --- a/dibs-web/public/javascripts/admin-server-remove.js +++ b/dibs-web/public/javascripts/admin-server-remove.js @@ -1,3 +1,31 @@ +/* + admin-server-remove.js + +Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + +Contact: +Sungmin Kim +Taejun Ha +Jiil Hyoun +Donghyuk Yang +DongHee Yang + +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. + +Contributors: +- S-Core Co., Ltd +*/ + function adminServerRemoveOSCategoryInit() { // Remove select option $('#adminServer-RemoveOSCategory-CategorySelect').empty(); @@ -68,3 +96,21 @@ function adminServerRemoveServerInfo() { }); } +function adminServerRemoveRemoteBuildServer() { + var changeInfoList = []; + var changeInfoItem; + var serverAddress = document.getElementById('adminServer-modifyRemoteBuildServer-OldAddress').value; + + if(serverAddress == ""){ + alert("server address is invalid"); + return; + } + + changeInfoItem = {"Address":serverAddress}; + changeInfoList.push(changeInfoItem); + + removeRemoteBuildServer(changeInfoList, function () { + $.mobile.changePage("#adminServer"); + }); +} + diff --git a/dibs-web/public/javascripts/admin-server.js b/dibs-web/public/javascripts/admin-server.js index 4d595d0..6aae3e9 100644 --- a/dibs-web/public/javascripts/admin-server.js +++ b/dibs-web/public/javascripts/admin-server.js @@ -1,3 +1,31 @@ +/* + admin-server.js + +Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + +Contact: +Sungmin Kim +Taejun Ha +Jiil Hyoun +Donghyuk Yang +DongHee Yang + +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. + +Contributors: +- S-Core Co., Ltd +*/ + function adminServerInit() { $('#adminServer-RemoteBuildServer').collapsible(); diff --git a/dibs-web/public/javascripts/admin-user-modify.js b/dibs-web/public/javascripts/admin-user-modify.js index e950655..fd00e41 100644 --- a/dibs-web/public/javascripts/admin-user-modify.js +++ b/dibs-web/public/javascripts/admin-user-modify.js @@ -1,3 +1,31 @@ +/* + admin-user-modify.js + +Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + +Contact: +Sungmin Kim +Taejun Ha +Jiil Hyoun +Donghyuk Yang +DongHee Yang + +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. + +Contributors: +- S-Core Co., Ltd +*/ + function adminUserModifyPopupInit() { var index = localStorage.userTableIndex; var userName = document.getElementById("userTableName:"+index).innerHTML; diff --git a/dibs-web/public/javascripts/admin-user.js b/dibs-web/public/javascripts/admin-user.js index 9e84e23..73acf00 100644 --- a/dibs-web/public/javascripts/admin-user.js +++ b/dibs-web/public/javascripts/admin-user.js @@ -1,3 +1,31 @@ +/* + admin-user.js + +Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + +Contact: +Sungmin Kim +Taejun Ha +Jiil Hyoun +Donghyuk Yang +DongHee Yang + +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. + +Contributors: +- S-Core Co., Ltd +*/ + function adminUserInit() { var userTable = document.getElementById("adminUserTable"); diff --git a/dibs-web/public/javascripts/build.js b/dibs-web/public/javascripts/build.js index ab67195..ce894bd 100644 --- a/dibs-web/public/javascripts/build.js +++ b/dibs-web/public/javascripts/build.js @@ -1,3 +1,31 @@ +/* + build.js + +Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + +Contact: +Sungmin Kim +Taejun Ha +Jiil Hyoun +Donghyuk Yang +DongHee Yang + +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. + +Contributors: +- S-Core Co., Ltd +*/ + function buildInit() { if( $("#select-distribution").children().length == 0 ) { queryDistribution( function(xml) { @@ -59,7 +87,10 @@ function buildQueryRunningProjectList() { if (project_type == "GIT") { var cell = document.getElementById("buildGitProjectTable"+":"+project_name+':'+project_os); - cell.setAttribute('bgcolor', '#fbff00'); + + if(cell){ + cell.setAttribute('bgcolor', '#fbff00'); + } } }); }); @@ -307,3 +338,8 @@ function buildBatchFilePathSelector() { }, false); } +function buildClear() { + $("#select-distribution").empty(); + + buildInitTable(); +} diff --git a/dibs-web/public/javascripts/dibs-api.js b/dibs-web/public/javascripts/dibs-api.js index dfc97d6..5d77209 100644 --- a/dibs-web/public/javascripts/dibs-api.js +++ b/dibs-web/public/javascripts/dibs-api.js @@ -1,225 +1,261 @@ +/* + dibs-api.js + +Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + +Contact: +Sungmin Kim +Taejun Ha +Jiil Hyoun +Donghyuk Yang +DongHee Yang + +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. + +Contributors: +- S-Core Co., Ltd +*/ + // controller: Users function signUp(infoList, successFunction) { - var url = '/users/signup'; + var url = 'users/signup'; postForServer(url, infoList, successFunction); } function queryUserInfo(successFunction) { - var url = '/users/query'; + var url = 'users/query'; getInfoFromServer(url, successFunction); } function modifyUserInfo(changeInfoList, successFunction) { - var url = '/users/modify'; + var url = 'users/modify'; postForServer(url, changeInfoList, successFunction); } // controller: Sessions function login(infoList, successFunction) { - var url = '/sessions/login'; + var url = 'sessions/login'; postForServer(url, infoList, successFunction); } +function logout() { + var url = 'sessions/logout'; + deleteForServer(url, function() { + expireSession(); + dibsWebClear(); + }); +} + // controller: projects function queryDistribution(successFunction) { - var url = '/projects/queryDistribution'; + var url = 'projects/queryDistribution'; getInfoFromServer(url, successFunction); } // controller : projects function buildProject(changeInfoList, successFunction) { - var url = '/projects/buildProject'; + var url = 'projects/buildProject'; postForServer(url, changeInfoList, successFunction); } function queryProjectsInDistribution(distName, successFunction) { - var url = '/projects/queryProjectsInDistribution/' + distName; + var url = 'projects/queryProjectsInDistribution/' + distName; getInfoFromServer(url, successFunction); } function queryRunningProjectsInfoInDistribution(distName, successFunction) { - var url = '/projects/queryRunningProjectsInfoInDistribution/' + distName; + var url = 'projects/queryRunningProjectsInfoInDistribution/' + distName; getInfoFromServer(url, successFunction); } function queryProjectsInfoInDistribution(distName, successFunction) { - var url = '/projects/queryProjectsInfoInDistribution/' + distName; + var url = 'projects/queryProjectsInfoInDistribution/' + distName; getInfoFromServer(url, successFunction); } // controller : admin_group function queryAllGroup(successFunction) { - var url = '/admin_group/queryAllGroup'; + var url = 'admin_group/queryAllGroup'; getInfoFromServer(url, successFunction); } function queryGroupInfo(groupName, successFunction) { - var url = '/admin_group/queryGroupInfo/' + groupName; + var url = 'admin_group/queryGroupInfo/' + groupName; getInfoFromServer(url, successFunction); } function addGroup(changeInfoList, successFunction) { - var url = '/admin_group/addGroup'; + var url = 'admin_group/addGroup'; postForServer(url, changeInfoList, successFunction); } function removeGroup(changeInfoList, successFunction) { - var url = '/admin_group/removeGroup'; + var url = 'admin_group/removeGroup'; postForServer(url, changeInfoList, successFunction); } function changeGroup(changeInfoList, successFunction) { - var url = '/admin_group/modifyGroup'; + var url = 'admin_group/modifyGroup'; postForServer(url, changeInfoList, successFunction); } // controller : admin_user function queryAllUser(successFunction) { - var url = '/admin_user/queryAllUser'; + var url = 'admin_user/queryAllUser'; getInfoFromServer(url, successFunction); } function changeUser(changeInfoList, successFunction) { - var url = '/admin_user/modifyUser'; + var url = 'admin_user/modifyUser'; postForServer(url, changeInfoList, successFunction); } function removeUser(changeInfoList, successFunction) { - var url = '/admin_user/removeUser'; + var url = 'admin_user/removeUser'; postForServer(url, changeInfoList, successFunction); } // controller : admin_server function queryServerInfo(successFunction) { - var url = '/admin_server/queryServerInfo'; + var url = 'admin_server/queryServerInfo'; getInfoFromServer(url, successFunction); } function queryAllServer(successFunction) { - var url = '/admin_server/queryAllServer'; + var url = 'admin_server/queryAllServer'; getInfoFromServer(url, successFunction); } function addRemoteBuildServer(changeInfoList, successFunction) { - var url = '/admin_server/addRemoteBuildServer'; + var url = 'admin_server/addRemoteBuildServer'; postForServer(url, changeInfoList, successFunction); } function removeRemoteBuildServer(changeInfoList, successFunction) { - var url = '/admin_server/removeRemoteBuildServer'; + var url = 'admin_server/removeRemoteBuildServer'; postForServer(url, changeInfoList, successFunction); } function modifyRemoteBuildServer(changeInfoList, successFunction) { - var url = '/admin_server/modifyRemoteBuildServer'; + var url = 'admin_server/modifyRemoteBuildServer'; postForServer(url, changeInfoList, successFunction); } function addOSCategory(changeInfoList, successFunction) { - var url = '/admin_server/addOsCategory'; + var url = 'admin_server/addOsCategory'; postForServer(url, changeInfoList, successFunction); } function removeOSCategory(changeInfoList, successFunction) { - var url = '/admin_server/removeOsCategory'; + var url = 'admin_server/removeOsCategory'; postForServer(url, changeInfoList, successFunction); } function modifyOSCategory(changeInfoList, successFunction) { - var url = '/admin_server/modifyOsCategory'; + var url = 'admin_server/modifyOsCategory'; postForServer(url, changeInfoList, successFunction); } function addSupportedOS(changeInfoList, successFunction) { - var url = '/admin_server/addSupportedOS'; + var url = 'admin_server/addSupportedOS'; postForServer(url, changeInfoList, successFunction); } function removeSupportedOS(changeInfoList, successFunction) { - var url = '/admin_server/removeSupportedOS'; + var url = 'admin_server/removeSupportedOS'; postForServer(url, changeInfoList, successFunction); } function modifySupportedOS(changeInfoList, successFunction) { - var url = '/admin_server/modifySupportedOS'; + var url = 'admin_server/modifySupportedOS'; postForServer(url, changeInfoList, successFunction); } function addServerInfo(changeInfoList, successFunction) { - var url = '/admin_server/addServerInfo'; + var url = 'admin_server/addServerInfo'; postForServer(url, changeInfoList, successFunction); } function removeServerInfo(changeInfoList, successFunction) { - var url = '/admin_server/removeServerInfo'; + var url = 'admin_server/removeServerInfo'; postForServer(url, changeInfoList, successFunction); } function modifyServerInfo(changeInfoList, successFunction) { - var url = '/admin_server/modifyServerInfo'; + var url = 'admin_server/modifyServerInfo'; postForServer(url, changeInfoList, successFunction); } // controller : admin_project function queryAllProject(successFunction) { - var url = '/admin_project/queryAllProject'; + var url = 'admin_project/queryAllProject'; getInfoFromServer(url, successFunction); } function queryProjectsInDistributionForAdmin(distName, successFunction) { - var url = '/admin_project/queryProjectsInDistributionForAdmin/' + distName; + var url = 'admin_project/queryProjectsInDistributionForAdmin/' + distName; getInfoFromServer(url, successFunction); } function addProject(changeInfoList, successFunction) { - var url = '/admin_project/addProject'; + var url = 'admin_project/addProject'; postForServer(url, changeInfoList, successFunction); } function removeProject(changeInfoList, successFunction) { - var url = '/admin_project/removeProject'; + var url = 'admin_project/removeProject'; postForServer(url, changeInfoList, successFunction); } function modifyProject(changeInfoList, successFunction) { - var url = '/admin_project/modifyProject'; + var url = 'admin_project/modifyProject'; postForServer(url, changeInfoList, successFunction); } // controller : admin_distribution function queryAllDistribution(successFunction) { - var url = '/admin_distribution/queryAllDistribution'; + var url = 'admin_distribution/queryAllDistribution'; getInfoFromServer(url, successFunction); } function queryDistributionInfo(distName, successFunction) { - var url = '/admin_distribution/queryDistributionInfo/' + distName; + var url = 'admin_distribution/queryDistributionInfo/' + distName; getInfoFromServer(url, successFunction); } function addDistribution(changeInfoList, successFunction) { - var url = '/admin_distribution/addDistribution'; + var url = 'admin_distribution/addDistribution'; postForServer(url, changeInfoList, successFunction); } function removeDistribution(changeInfoList, successFunction) { - var url = '/admin_distribution/removeDistribution'; + var url = 'admin_distribution/removeDistribution'; postForServer(url, changeInfoList, successFunction); } function modifyDistribution(changeInfoList, successFunction) { - var url = '/admin_distribution/modifyDistribution'; + var url = 'admin_distribution/modifyDistribution'; postForServer(url, changeInfoList, successFunction); } // controller : admin function queryAllOS(successFunction) { - var url = '/admin/queryAllOS'; + var url = 'admin/queryAllOS'; getInfoFromServer(url, successFunction); } function queryAllOSCategory(successFunction) { - var url = '/admin/queryAllOSCategory'; + var url = 'admin/queryAllOSCategory'; getInfoFromServer(url, successFunction); } @@ -256,3 +292,21 @@ function postForServer(url, changeInfoList, successFunction) { }); } +function deleteForServer(url, successFunction) { + $.ajax({ + url: baseUrl+url, + type: 'DELETE', + async: false, + cache: false, + dataType: 'xml', + timeout: 1000, + success: function(xml) { + expireSession(); + dibsWebClear(); + }, + error: function(jqXHR) { + errorProcess(jqXHR); + } + }); +} + diff --git a/dibs-web/public/javascripts/jobs.js b/dibs-web/public/javascripts/jobs.js index 20753b3..16d248d 100644 --- a/dibs-web/public/javascripts/jobs.js +++ b/dibs-web/public/javascripts/jobs.js @@ -1,3 +1,31 @@ +/* + jobs.js + +Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + +Contact: +Sungmin Kim +Taejun Ha +Jiil Hyoun +Donghyuk Yang +DongHee Yang + +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. + +Contributors: +- S-Core Co., Ltd +*/ + var suggestion_list = new Array(); $(function() { @@ -209,38 +237,38 @@ function clearJobList() { function queryJobListAll(distribution) { var selectedStatus= $('#jobStatusSelect').find("input[type='radio']:checked").val(); clearJobList(); - queryJobList(baseUrl+"/jobs/list", distribution, selectedStatus, "LATEST"); + queryJobList(baseUrl+"jobs/list", distribution, selectedStatus, "LATEST"); } function queryJobListJobId(distribution, jobId) { var distribution = $("#jobSelectDistribution option:selected").val(); var selectedStatus= $('#jobStatusSelect').find("input[type='radio']:checked").val(); clearJobList(); - queryJobList(baseUrl+"/jobs/list", distribution, selectedStatus, eval(parseInt(jobId) + 1)); + queryJobList(baseUrl+"jobs/list", distribution, selectedStatus, eval(parseInt(jobId) + 1)); } function queryJobListUserName(distribution, name) { var distribution = $("#jobSelectDistribution option:selected").val(); var selectedStatus= $('#jobStatusSelect').find("input[type='radio']:checked").val(); clearJobList(); - queryJobList(baseUrl+"/jobs/listSearchUser/"+name, distribution, selectedStatus, "LATEST"); + queryJobList(baseUrl+"jobs/listSearchUser/"+name, distribution, selectedStatus, "LATEST"); } function queryJobListUserGroup(distribution, group) { var selectedStatus= $('#jobStatusSelect').find("input[type='radio']:checked").val(); clearJobList(); - queryJobList(baseUrl+"/jobs/listSearchGroup/"+group, distribution, selectedStatus, "LATEST"); + queryJobList(baseUrl+"jobs/listSearchGroup/"+group, distribution, selectedStatus, "LATEST"); } function queryJobListProject(distribution, project) { var selectedStatus= $('#jobStatusSelect').find("input[type='radio']:checked").val(); clearJobList(); - queryJobList(baseUrl+"/jobs/listSearchProject/"+project, distribution, selectedStatus, "LATEST"); + queryJobList(baseUrl+"jobs/listSearchProject/"+project, distribution, selectedStatus, "LATEST"); } function queryJobListDate(distribution, date) { var selectedStatus= $('#jobStatusSelect').find("input[type='radio']:checked").val(); clearJobList(); - queryJobList(baseUrl+"/jobs/listSearchDate/"+date, distribution, selectedStatus, "LATEST"); + queryJobList(baseUrl+"jobs/listSearchDate/"+date, distribution, selectedStatus, "LATEST"); } function jobQueryDistribution() { @@ -441,3 +469,9 @@ function jobsQueryProjectsList() { }); } } + +function jobsClear() { + $("#jobSelectDistribution").empty(); + clearJobList(); +} + diff --git a/dibs-web/public/javascripts/log.js b/dibs-web/public/javascripts/log.js index 74b1ed4..57282b1 100644 --- a/dibs-web/public/javascripts/log.js +++ b/dibs-web/public/javascripts/log.js @@ -1,3 +1,31 @@ +/* + log.js + +Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + +Contact: +Sungmin Kim +Taejun Ha +Jiil Hyoun +Donghyuk Yang +DongHee Yang + +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. + +Contributors: +- S-Core Co., Ltd +*/ + var request; var stop = 1; diff --git a/dibs-web/public/javascripts/main.js b/dibs-web/public/javascripts/main.js index 80679cb..c37bcbb 100644 --- a/dibs-web/public/javascripts/main.js +++ b/dibs-web/public/javascripts/main.js @@ -1,9 +1,50 @@ +/* + main.js + +Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + +Contact: +Sungmin Kim +Taejun Ha +Jiil Hyoun +Donghyuk Yang +DongHee Yang + +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. + +Contributors: +- S-Core Co., Ltd +*/ + //Initialize function -var baseUrl = "http://172.21.110.234:3300"; var baseUrl = ""; + var init = function () { - // TODO:: Do your initialization job console.log("init() called"); + var myUrl = location.href; + var urlCut = myUrl.indexOf("index.html"); + var sharpCut = myUrl.indexOf("#"); + + if(urlCut > 0) { + baseUrl = myUrl.substring(0, urlCut); + } + else if(sharpCut > 0) { + baseUrl = myUrl.substring(0, sharpCut); + } + else { + baseUrl = window.location.href; + } + console.log("base url:"+baseUrl); }; $(document).ready(init); @@ -163,14 +204,19 @@ function clearFormData(elementId){ } function generateNavigationBar(id) { - var admin = sessionStorage.sessionInfoAdmin; - if(admin == "TRUE") - { - generateNavigationBarAdmin(id); - } - else + if(sessionStorage.sessionInfoEmail) { - generateNavigationBarUser(id); + var admin = sessionStorage.sessionInfoAdmin; + if(admin == "TRUE") + { + generateNavigationBarAdmin(id); + } + else + { + generateNavigationBarUser(id); + } + } else { + $("#"+id+"-navigationBar").empty(); } } @@ -312,3 +358,9 @@ function generateNavigationBarAdmin(id) { $("#"+id+"-navigationBar").empty(); $("#"+id+"-navigationBar").append(naviHtml).listview("refresh"); } + +function dibsWebClear(){ + projectsClear(); + buildClear(); + jobsClear(); +} diff --git a/dibs-web/public/javascripts/popup-window.js b/dibs-web/public/javascripts/popup-window.js index 85146ce..31a41ef 100644 --- a/dibs-web/public/javascripts/popup-window.js +++ b/dibs-web/public/javascripts/popup-window.js @@ -1,3 +1,31 @@ +/* + popup-window.js + +Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + +Contact: +Sungmin Kim +Taejun Ha +Jiil Hyoun +Donghyuk Yang +DongHee Yang + +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. + +Contributors: +- S-Core Co., Ltd +*/ + (function($){ $.fn.popupWindow = function(instanceSettings){ diff --git a/dibs-web/public/javascripts/post-process.js b/dibs-web/public/javascripts/post-process.js index caf09c6..c962b3d 100644 --- a/dibs-web/public/javascripts/post-process.js +++ b/dibs-web/public/javascripts/post-process.js @@ -1,3 +1,31 @@ +/* + post-process.js + +Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + +Contact: +Sungmin Kim +Taejun Ha +Jiil Hyoun +Donghyuk Yang +DongHee Yang + +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. + +Contributors: +- S-Core Co., Ltd +*/ + $('.uploadWindow').popupWindow({ height:200, width:400, diff --git a/dibs-web/public/javascripts/projects.js b/dibs-web/public/javascripts/projects.js index 81be469..6f02e59 100644 --- a/dibs-web/public/javascripts/projects.js +++ b/dibs-web/public/javascripts/projects.js @@ -1,3 +1,31 @@ +/* + projects.js + +Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + +Contact: +Sungmin Kim +Taejun Ha +Jiil Hyoun +Donghyuk Yang +DongHee Yang + +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. + +Contributors: +- S-Core Co., Ltd +*/ + function projectsInit() { if( $("#projects-select-distribution").children().length == 0 ) { queryDistribution( function(xml) { @@ -133,3 +161,15 @@ function projectsAppendProjectList( project, projectList ) { }); }); } + +function projectsClear() { + $("#projects-select-distribution").empty(); + + var projectList = document.getElementById("projects-project-list"); + /* remove all list */ + while(projectList.hasChildNodes()) + { + projectList.removeChild(projectList.firstChild); + } +} + diff --git a/dibs-web/public/javascripts/session.js b/dibs-web/public/javascripts/session.js index dc5ebb8..12582dc 100644 --- a/dibs-web/public/javascripts/session.js +++ b/dibs-web/public/javascripts/session.js @@ -1,3 +1,31 @@ +/* + session.js + +Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + +Contact: +Sungmin Kim +Taejun Ha +Jiil Hyoun +Donghyuk Yang +DongHee Yang + +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. + +Contributors: +- S-Core Co., Ltd +*/ + $(function() { $('#login-password').keypress(function() { if(event.keyCode == '13') { @@ -100,24 +128,6 @@ function sessionLogin() { }); } -function logout(){ - $.ajax({ - url: baseUrl + "/sessions/logout", - type: 'DELETE', - async: false, - cache: false, - dataType: 'xml', - timeout: 1000, - error: function() { - alert('Error loading XML document'); - }, - success: function(xml) { - expireSession(); - } - }); -} - - function signupQueryGroupList() { queryAllGroup( function(xml) { $("#applyGroupRadio").children().remove(); diff --git a/dibs-web/public/javascripts/user.js b/dibs-web/public/javascripts/user.js index 0c1366f..70d8689 100644 --- a/dibs-web/public/javascripts/user.js +++ b/dibs-web/public/javascripts/user.js @@ -1,3 +1,31 @@ +/* + user.js + +Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + +Contact: +Sungmin Kim +Taejun Ha +Jiil Hyoun +Donghyuk Yang +DongHee Yang + +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. + +Contributors: +- S-Core Co., Ltd +*/ + $(function() { $('#user-password-confirmation').keypress(function() { if(event.keyCode == '13') { @@ -13,8 +41,9 @@ function userSignUp() { var name = $('#user-name').val(); var password = $('#user-password').val(); var password_confirm = $('#user-password-confirmation').val(); + var emailCheckReg = /[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?/ - if(email == ""){ + if(email == "" || !emailCheckReg.test(email)){ alert("Email is invalid"); return false; } diff --git a/dibs-web/public/log.html b/dibs-web/public/log.html index f2023ff..4b34fec 100644 --- a/dibs-web/public/log.html +++ b/dibs-web/public/log.html @@ -1,17 +1,27 @@ + + + + + + + + +
+
+ + +
+ + + + var init = function () { + console.log("init() called"); + var myUrl = location.href; + var varCut = myUrl.indexOf("?"); + var varCheck = myUrl.substring(varCut+1); + eval(varCheck); -
- -
-
- - -
-
+ job_id = jobid; + console.log(job_id); + var baseCut = myUrl.indexOf("log.html"); + + baseUrl = myUrl.substring(0, baseCut); + console.log("base url:"+baseUrl); + + requestLog(); + }; + + $(document).ready(init); + -- 2.34.1