From: DushyantSinghThakur Date: Thu, 6 Sep 2018 07:16:04 +0000 (+0530) Subject: Epic-231:versioning, and backup the configuration X-Git-Tag: 1.4.1~55 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=43d4b00848ebd0567b020fe219f07d4f7049ff0b;p=sdnc%2Foam.git Epic-231:versioning, and backup the configuration Merging the sdnc jira stories- 255,256 Change-Id: Iacb9274dae93f534f1331c4eb7d0669896d379d4 Issue-ID: SDNC-256 Signed-off-by: DushyantSinghThakur Former-commit-id: 94d8b3d82b82dedfd5949da2e5d1ed348ab066e2 --- diff --git a/configbackuprestore/pom.xml b/configbackuprestore/pom.xml index c925197c..8f492edc 100644 --- a/configbackuprestore/pom.xml +++ b/configbackuprestore/pom.xml @@ -1,6 +1,9 @@ - + + 4.0.0 + org.onap.ccsdk.parent configbackuprestore 1.0-SNAPSHOT @@ -8,10 +11,10 @@ pom - org.springframework.boot - spring-boot-starter-parent - 1.5.4.RELEASE - + org.springframework.boot + spring-boot-starter-parent + 1.5.4.RELEASE + UTF-8 @@ -26,58 +29,45 @@ + + getBackupVnfDetailService + vnfconfigreportsservice + vnfconfigbackupservice + + + + + org.jacoco + jacoco-maven-plugin + 0.7.5.201505241946 + - - getBackupVnfDetailService - vnfconfigreportsservice - + + pre-unit-test + + prepare-agent + + + ${project.build.directory}/coverage-reports/jacoco-ut.exec + surefireArgLine + + + + + post-unit-test + test + + report + + + ${project.build.directory}/coverage-reports/jacoco-ut.exec + ${project.reporting.outputDirectory}/jacoco-ut + + + + + + - - - - org.jacoco - jacoco-maven-plugin - 0.7.5.201505241946 - - - - pre-unit-test - - prepare-agent - - - - ${project.build.directory}/coverage-reports/jacoco-ut.exec - - surefireArgLine - - - - - post-unit-test - test - - report - - - - ${project.build.directory}/coverage-reports/jacoco-ut.exec - - ${project.reporting.outputDirectory}/jacoco-ut - - - - - - diff --git a/configbackuprestore/vnfconfigbackupservice/pom.xml b/configbackuprestore/vnfconfigbackupservice/pom.xml new file mode 100644 index 00000000..bf6fdf0e --- /dev/null +++ b/configbackuprestore/vnfconfigbackupservice/pom.xml @@ -0,0 +1,137 @@ + + + + 4.0.0 + + + org.onap.ccsdk.parent + configbackuprestore + 1.0-SNAPSHOT + + + com.onap.sdnc.vnfbackupservice + vnfconfigbackupservice + 1.0-SNAPSHOT + vnfconfigbackupservice + http://maven.apache.org + + + + + org.jmockit + jmockit + 1.19 + test + + + + org.jmockit + jmockit-coverage + 1.19 + test + + + + junit + junit + 4.9 + test + + + + javax.servlet + jstl + provided + + + + org.mariadb.jdbc + mariadb-java-client + 1.1.9 + + + + + commons-codec + commons-codec + 1.9 + + + + org.springframework.boot + spring-boot-starter-web + 1.5.4.RELEASE + + + + org.springframework + spring-context + 4.3.9.RELEASE + + + + org.springframework.boot + spring-boot-starter-tomcat + provided + + + + org.apache.tomcat.embed + tomcat-embed-jasper + provided + + + + org.springframework.boot + spring-boot-devtools + true + + + + org.springframework.boot + spring-boot-starter-test + test + 1.5.3.RELEASE + + + + org.springframework.boot + spring-boot-starter-data-jpa + + + + + org.springframework.boot + spring-boot-starter-log4j2 + + + + org.json + json + 20180130 + + + + + com.fasterxml + jackson-xml-databind + 0.6.2 + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.21.0 + + -XX:+StartAttachListener + + + + + diff --git a/configbackuprestore/vnfconfigbackupservice/read.md b/configbackuprestore/vnfconfigbackupservice/read.md new file mode 100644 index 00000000..1ac32802 --- /dev/null +++ b/configbackuprestore/vnfconfigbackupservice/read.md @@ -0,0 +1,13 @@ +vnfconfigbackupservice + +--------------------- + +Need to change in application.properties: + - Update properties file based on the Database. + e.g-spring.datasource.url=jdbc:mariadb://localhost:3306/DBNAME + - Need to change Rest-conf values: + eg.sdnc.rest.vnf.api.host=10.53.172.121 + sdnc.rest.vnf.api.port=8282 + sdnc.rest.vnf.api.basepath=/restconf + sdnc.rest.vnf.api.username=xxxx + sdnc.rest.vnf.api.password=xxxx \ No newline at end of file diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/java/com/onap/sdnc/vnfbackupservice/config/ApplicationConfiguration.java b/configbackuprestore/vnfconfigbackupservice/src/main/java/com/onap/sdnc/vnfbackupservice/config/ApplicationConfiguration.java new file mode 100644 index 00000000..03d65a68 --- /dev/null +++ b/configbackuprestore/vnfconfigbackupservice/src/main/java/com/onap/sdnc/vnfbackupservice/config/ApplicationConfiguration.java @@ -0,0 +1,49 @@ +/* +* ============LICENSE_START======================================================= +* ONAP : SDNC-FEATURES +* ================================================================================ +* Copyright 2018 TechMahindra +*================================================================================= +* 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. +* ============LICENSE_END========================================================= +*/ +package com.onap.sdnc.vnfbackupservice.config; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.EnableAutoConfiguration; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.domain.EntityScan; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.data.jpa.repository.config.EnableJpaRepositories; +import org.springframework.web.client.RestTemplate; + +@SpringBootApplication +@EnableJpaRepositories("com.onap.sdnc.*") +@EntityScan("com.onap.sdnc.*") +@ComponentScan({"com.onap.sdnc.*"}) +@EnableAutoConfiguration +public class ApplicationConfiguration { + private static final Logger logger = LogManager.getLogger(ApplicationConfiguration.class); + public static void main(String[] args) { + + SpringApplication.run(ApplicationConfiguration.class, args); + logger.info("SDNC REPORTS API Has Started.."); + } + @Bean + public RestTemplate template() { + return new RestTemplate(); + } +} diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/java/com/onap/sdnc/vnfbackupservice/config/ServletInitializer.java b/configbackuprestore/vnfconfigbackupservice/src/main/java/com/onap/sdnc/vnfbackupservice/config/ServletInitializer.java new file mode 100644 index 00000000..5267262f --- /dev/null +++ b/configbackuprestore/vnfconfigbackupservice/src/main/java/com/onap/sdnc/vnfbackupservice/config/ServletInitializer.java @@ -0,0 +1,32 @@ +/* +* ============LICENSE_START======================================================= +* ONAP : SDNC-FEATURES +* ================================================================================ +* Copyright 2018 TechMahindra +*================================================================================= +* 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. +* ============LICENSE_END========================================================= +*/ +package com.onap.sdnc.vnfbackupservice.config; + +import org.springframework.boot.builder.SpringApplicationBuilder; +import org.springframework.boot.web.support.SpringBootServletInitializer; + +public class ServletInitializer extends SpringBootServletInitializer { + + @Override + protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { + return application.sources(ApplicationConfiguration.class); + } + +} diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/java/com/onap/sdnc/vnfbackupservice/controller/VnfBackupServiceController.java b/configbackuprestore/vnfconfigbackupservice/src/main/java/com/onap/sdnc/vnfbackupservice/controller/VnfBackupServiceController.java new file mode 100644 index 00000000..a04aac7f --- /dev/null +++ b/configbackuprestore/vnfconfigbackupservice/src/main/java/com/onap/sdnc/vnfbackupservice/controller/VnfBackupServiceController.java @@ -0,0 +1,74 @@ +/* +* ============LICENSE_START======================================================= +* ONAP : SDNC-FEATURES +* ================================================================================ +* Copyright 2018 TechMahindra +*================================================================================= +* 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. +* ============LICENSE_END========================================================= +*/ +package com.onap.sdnc.vnfbackupservice.controller; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.servlet.ModelAndView; + +import com.onap.sdnc.vnfbackupservice.model.VnfServiceResponse; +import com.onap.sdnc.vnfbackupservice.scheduler.VnfConfigBackupScheduler; +import com.onap.sdnc.vnfbackupservice.service.VnfbackupService; + +@RestController +public class VnfBackupServiceController { + + @Autowired + VnfbackupService vnfbackupService; + + @Autowired + VnfConfigBackupScheduler vnfConfigBackupScheduler; + + @RequestMapping("/") + ModelAndView home(ModelAndView modelAndView) { + modelAndView.setViewName("index"); + return modelAndView; + } + + @RequestMapping(value="/getAllVnfIds", method=RequestMethod.GET,produces="application/json") + public VnfServiceResponse getAllVnfIds() { + return vnfbackupService.getAllVnfDetails(); + } + + @RequestMapping(value="/backupVnfconfigById/{vnfId}", method=RequestMethod.GET) + public String getAllVnfIds(@PathVariable("vnfId") String vnfId) { + return vnfbackupService.backupVnfconfig(vnfId); + } + + @RequestMapping(value="/vnf-list/{vnf-Id}", method=RequestMethod.PUT) + public String putOneVnfconfig(@RequestBody String configfile, @PathVariable("vnf-Id") String vnfId) { + String vnfconfigupdated = vnfbackupService.putVnfconfig(configfile,vnfId); + return vnfconfigupdated; + } + + @RequestMapping(value="/backup", method=RequestMethod.GET, produces="application/text") + public String backupVnfConfigs() { + return "current time: " + vnfConfigBackupScheduler.initiateBackupService() ; + } + + @RequestMapping(value="/backuptime", method=RequestMethod.GET, produces="application/text") + public String lastUpdatedBackuptime() { + return vnfbackupService.updatedBackuptime(); + } +} diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/java/com/onap/sdnc/vnfbackupservice/dao/VnfBackupServiceRepo.java b/configbackuprestore/vnfconfigbackupservice/src/main/java/com/onap/sdnc/vnfbackupservice/dao/VnfBackupServiceRepo.java new file mode 100644 index 00000000..7a132338 --- /dev/null +++ b/configbackuprestore/vnfconfigbackupservice/src/main/java/com/onap/sdnc/vnfbackupservice/dao/VnfBackupServiceRepo.java @@ -0,0 +1,68 @@ +/* +* ============LICENSE_START======================================================= +* ONAP : SDNC-FEATURES +* ================================================================================ +* Copyright 2018 TechMahindra +*================================================================================= +* 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. +* ============LICENSE_END========================================================= +*/ +package com.onap.sdnc.vnfbackupservice.dao; + +import java.sql.Timestamp; +import java.util.List; + +import javax.transaction.Transactional; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Modifying; +import org.springframework.data.jpa.repository.Query; +import org.springframework.data.repository.query.Param; +import org.springframework.stereotype.Repository; + + +import com.onap.sdnc.vnfbackupservice.model.VnfConfigDetailsDB; + +@Repository +public interface VnfBackupServiceRepo extends JpaRepository { + + @Query(value = "Select * from vnfconfigdetails where vnfid = :vnfid", nativeQuery = true) + List getVnfDetails(@Param("vnfid") String vnfid); + + @Query(value = "Select * from vnfconfigdetails where vnfid = :vnfid ORDER BY vnfversion DESC LIMIT 1", nativeQuery = true) + VnfConfigDetailsDB getVnfDetail(@Param("vnfid") String vnfid); + + @Modifying + @Query(value = "insert into vnfconfigdetails (configinfo,creationdate,lastupdated,status,vnfid,vnfname,vnfversion) VALUES (:configinfo,:creationdate,:lastupdated,:status,:vnfid,:vnfname,:vnfversion)", nativeQuery = true) + @Transactional + void saveVnfDetails(@Param("configinfo") String configinfo, @Param("creationdate") Timestamp creationDate, + @Param("lastupdated") Timestamp lastupdated, @Param("status") int status, @Param("vnfid") String vnfid, + @Param("vnfname") String vnfname,@Param("vnfversion") String vnfversion); + + @Query(value = "Select configinfo && vnfversion from vnfconfigdetails where vnfid = :vnfid", nativeQuery = true) + List getVnfDetailhavingAllVersion(@Param("vnfid") String vnfid); + + @Query(value = "Select backuptime from vnfschedulertime where id=1", nativeQuery = true) + String getvnfschedulertime(); + + @Modifying + @Query(value = "insert into vnfschedulertime(id, backuptime) VALUES (:id, :backuptime)", nativeQuery = true) + @Transactional + void insertSchedulerTime(@Param("id") int id, @Param("backuptime") String backuptime); + + @Modifying + @Query(value = "UPDATE vnfschedulertime SET backuptime =:formatDateTime WHERE id = 1", nativeQuery = true) + @Transactional + void updateSchedulerTime(@Param("formatDateTime") String formatDateTime); + +} diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/java/com/onap/sdnc/vnfbackupservice/model/VnfConfigDetailsDB.java b/configbackuprestore/vnfconfigbackupservice/src/main/java/com/onap/sdnc/vnfbackupservice/model/VnfConfigDetailsDB.java new file mode 100644 index 00000000..5ac86b3d --- /dev/null +++ b/configbackuprestore/vnfconfigbackupservice/src/main/java/com/onap/sdnc/vnfbackupservice/model/VnfConfigDetailsDB.java @@ -0,0 +1,137 @@ +/* +* ============LICENSE_START======================================================= +* ONAP : SDNC-FEATURES +* ================================================================================ +* Copyright 2018 TechMahindra +*================================================================================= +* 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. +* ============LICENSE_END========================================================= +*/ +package com.onap.sdnc.vnfbackupservice.model; + +import java.io.Serializable; +import java.sql.Timestamp; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Lob; +import javax.persistence.Table; +import org.springframework.data.annotation.CreatedDate; +import org.springframework.data.annotation.LastModifiedDate; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; + +@Entity +@Table(name = "vnfconfigdetails", schema = "testreports") +@JsonIgnoreProperties(value = {"createdAt", "updatedAt"}, + allowGetters = true) +public class VnfConfigDetailsDB implements Serializable{ + + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private int id; + + @Column(name = "vnfid") + private String vnfid; + + @Column(name = "vnfversion") + private String vnfversion; + + @Column(name = "vnfname") + private String vnfname; + + @Column(name = "configinfo") + @Lob + private String configinfo; + + @Column(nullable = false, updatable = false,columnDefinition="DATETIME") + @CreatedDate + private Timestamp creationdate; + + @Column(nullable = false,columnDefinition="DATETIME") + @LastModifiedDate + private Timestamp lastupdated; + + @Column(name = "status") + private int status; + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public String getVnfid() { + return vnfid; + } + + public void setVnfid(String vnfid) { + this.vnfid = vnfid; + } + + public String getVnfversion() { + return vnfversion; + } + + public void setVnfversion(String vnfversion) { + this.vnfversion = vnfversion; + } + + public String getVnfname() { + return vnfname; + } + + public void setVnfname(String vnfname) { + this.vnfname = vnfname; + } + + public String getConfiginfo() { + return configinfo; + } + + public void setConfiginfo(String configinfo) { + this.configinfo = configinfo; + } + + public Timestamp getCreationdate() { + return creationdate; + } + + public void setCreationdate(Timestamp creationdate) { + this.creationdate = creationdate; + } + + public int getStatus() { + return status; + } + + public void setStatus(int status) { + this.status = status; + } + + public Timestamp getLastupdated() { + return lastupdated; + } + + public void setLastupdated(Timestamp lastupdated) { + this.lastupdated = lastupdated; + } + +} diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/java/com/onap/sdnc/vnfbackupservice/model/VnfConfigSchedulerTimeStamp.java b/configbackuprestore/vnfconfigbackupservice/src/main/java/com/onap/sdnc/vnfbackupservice/model/VnfConfigSchedulerTimeStamp.java new file mode 100644 index 00000000..a5293265 --- /dev/null +++ b/configbackuprestore/vnfconfigbackupservice/src/main/java/com/onap/sdnc/vnfbackupservice/model/VnfConfigSchedulerTimeStamp.java @@ -0,0 +1,55 @@ +/* +* ============LICENSE_START======================================================= +* ONAP : SDNC-FEATURES +* ================================================================================ +* Copyright 2018 TechMahindra +*================================================================================= +* 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. +* ============LICENSE_END========================================================= +*/ +package com.onap.sdnc.vnfbackupservice.model; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.Table; + +@Entity +@Table(name = "vnfschedulertime", schema = "testreports") +public class VnfConfigSchedulerTimeStamp { + + @Id + @GeneratedValue + private int id; + + @Column(name = "backuptime") + private String backuptime; + + public String getBackuptime() { + return backuptime; + } + + public void setBackuptime(String backuptime) { + this.backuptime = backuptime; + } + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + +} diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/java/com/onap/sdnc/vnfbackupservice/model/VnfDisplayParams.java b/configbackuprestore/vnfconfigbackupservice/src/main/java/com/onap/sdnc/vnfbackupservice/model/VnfDisplayParams.java new file mode 100644 index 00000000..9f0753bf --- /dev/null +++ b/configbackuprestore/vnfconfigbackupservice/src/main/java/com/onap/sdnc/vnfbackupservice/model/VnfDisplayParams.java @@ -0,0 +1,39 @@ +/* +* ============LICENSE_START======================================================= +* ONAP : SDNC-FEATURES +* ================================================================================ +* Copyright 2018 TechMahindra +*================================================================================= +* 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. +* ============LICENSE_END========================================================= +*/ +package com.onap.sdnc.vnfbackupservice.model; + +public class VnfDisplayParams { + + private String vnfName; + private String vnfId; + + public String getVnfName() { + return vnfName; + } + public void setVnfName(String vnfName) { + this.vnfName = vnfName; + } + public String getVnfId() { + return vnfId; + } + public void setVnfId(String vnfId) { + this.vnfId = vnfId; + } +} diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/java/com/onap/sdnc/vnfbackupservice/model/VnfServiceResponse.java b/configbackuprestore/vnfconfigbackupservice/src/main/java/com/onap/sdnc/vnfbackupservice/model/VnfServiceResponse.java new file mode 100644 index 00000000..e9c311fb --- /dev/null +++ b/configbackuprestore/vnfconfigbackupservice/src/main/java/com/onap/sdnc/vnfbackupservice/model/VnfServiceResponse.java @@ -0,0 +1,36 @@ +/* +* ============LICENSE_START======================================================= +* ONAP : SDNC-FEATURES +* ================================================================================ +* Copyright 2018 TechMahindra +*================================================================================= +* 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. +* ============LICENSE_END========================================================= +*/ +package com.onap.sdnc.vnfbackupservice.model; + +import java.util.ArrayList; +import java.util.List; + +public class VnfServiceResponse { + + private List vnfDisplayList = new ArrayList(); + + public List getVnfDisplayList() { + return vnfDisplayList; + } + + public void setVnfDisplayList(List vnfDisplayList) { + this.vnfDisplayList = vnfDisplayList; + } +} diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/java/com/onap/sdnc/vnfbackupservice/scheduler/VnfConfigBackupScheduler.java b/configbackuprestore/vnfconfigbackupservice/src/main/java/com/onap/sdnc/vnfbackupservice/scheduler/VnfConfigBackupScheduler.java new file mode 100644 index 00000000..13363300 --- /dev/null +++ b/configbackuprestore/vnfconfigbackupservice/src/main/java/com/onap/sdnc/vnfbackupservice/scheduler/VnfConfigBackupScheduler.java @@ -0,0 +1,82 @@ +/* +* ============LICENSE_START======================================================= +* ONAP : SDNC-FEATURES +* ================================================================================ +* Copyright 2018 TechMahindra +*================================================================================= +* 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. +* ============LICENSE_END========================================================= +*/ +package com.onap.sdnc.vnfbackupservice.scheduler; + +import java.util.List; + +import org.apache.log4j.Logger; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.scheduling.annotation.EnableScheduling; +import org.springframework.scheduling.annotation.Scheduled; +import org.springframework.stereotype.Component; + +import com.onap.sdnc.vnfbackupservice.dao.VnfBackupServiceRepo; +import com.onap.sdnc.vnfbackupservice.model.VnfDisplayParams; +import com.onap.sdnc.vnfbackupservice.model.VnfServiceResponse; +import com.onap.sdnc.vnfbackupservice.service.VnfbackupService; +import com.onap.sdnc.vnfbackupservice.service.VnfbackupServiceImpl; + +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; + +@Component +@EnableScheduling +public class VnfConfigBackupScheduler { + + @Autowired + VnfbackupService vnfConfigBackService; + + @Autowired + VnfBackupServiceRepo vnfBackupServiceDao; + + private static final Logger logger = Logger.getLogger(VnfbackupServiceImpl.class); + + @Scheduled(cron = "0 0 * * * *") + public String initiateBackupService() { + + String lastupdatedtime = null; + VnfServiceResponse s = vnfConfigBackService.getAllVnfDetails(); + List displayParams = s.getVnfDisplayList(); + for (VnfDisplayParams params : displayParams) { + lastupdatedtime = invokeDetails(params.getVnfId()); + } + return lastupdatedtime; + } + + public String invokeDetails(String vnfId) { + String formatDateTime = null; + try { + LocalDateTime now = LocalDateTime.now(); + DateTimeFormatter format = DateTimeFormatter.ofPattern("dd-MM-yyyy HH:mm:ss"); + formatDateTime = now.format(format); + String dbschedulertime = vnfBackupServiceDao.getvnfschedulertime(); + if (dbschedulertime == null) { + int id = 1; + vnfBackupServiceDao.insertSchedulerTime(id, formatDateTime); + } + vnfBackupServiceDao.updateSchedulerTime(formatDateTime); + } catch (Exception e) { + logger.error(":::::::::exception is at vackupVnfconfig():::: " + e); + } + vnfConfigBackService.backupVnfconfig(vnfId); + return formatDateTime; + } + +} diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/java/com/onap/sdnc/vnfbackupservice/scheduler/VnfRestClient.java b/configbackuprestore/vnfconfigbackupservice/src/main/java/com/onap/sdnc/vnfbackupservice/scheduler/VnfRestClient.java new file mode 100644 index 00000000..2af4e084 --- /dev/null +++ b/configbackuprestore/vnfconfigbackupservice/src/main/java/com/onap/sdnc/vnfbackupservice/scheduler/VnfRestClient.java @@ -0,0 +1,58 @@ +/* +* ============LICENSE_START======================================================= +* ONAP : SDNC-FEATURES +* ================================================================================ +* Copyright 2018 TechMahindra +*================================================================================= +* 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. +* ============LICENSE_END========================================================= +*/ +package com.onap.sdnc.vnfbackupservice.scheduler; + + +import java.util.Arrays; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpEntity; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpMethod; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.stereotype.Service; +import org.springframework.web.client.RestTemplate; + + +@Service +public class VnfRestClient { + + @Autowired + private RestTemplate restTemplate; + + public String vnfRestClient(String url, String userName, String password) { + restTemplate = new RestTemplate(); + HttpHeaders headers = new HttpHeaders(); + HttpEntity entity = new HttpEntity(generateHeaders(headers, userName, password)); + ResponseEntity response = restTemplate.exchange(url, HttpMethod.GET, entity, String.class); + String result = response.getBody(); + return result; + } + + public HttpHeaders generateHeaders(HttpHeaders headers, String userName, String password) { + headers.setAccept(Arrays.asList(new MediaType[] { MediaType.APPLICATION_JSON })); + headers.setContentType(MediaType.APPLICATION_JSON); + String base64Username = userName + ":" + password; + byte[] message = base64Username.getBytes(); + headers.set("Authorization", "Basic " + java.util.Base64.getEncoder().encodeToString(message)); + return headers; + } +} diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/java/com/onap/sdnc/vnfbackupservice/service/VnfbackupService.java b/configbackuprestore/vnfconfigbackupservice/src/main/java/com/onap/sdnc/vnfbackupservice/service/VnfbackupService.java new file mode 100644 index 00000000..d7cb1f51 --- /dev/null +++ b/configbackuprestore/vnfconfigbackupservice/src/main/java/com/onap/sdnc/vnfbackupservice/service/VnfbackupService.java @@ -0,0 +1,31 @@ +/* +* ============LICENSE_START======================================================= +* ONAP : SDNC-FEATURES +* ================================================================================ +* Copyright 2018 TechMahindra +*================================================================================= +* 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. +* ============LICENSE_END========================================================= +*/ +package com.onap.sdnc.vnfbackupservice.service; + +import com.onap.sdnc.vnfbackupservice.model.VnfServiceResponse; + +public interface VnfbackupService { + + public VnfServiceResponse getAllVnfDetails(); + public String backupVnfconfig(String vnfId); + public String putVnfconfig(String configfile, String vnfId); + public String updatedBackuptime(); + +} diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/java/com/onap/sdnc/vnfbackupservice/service/VnfbackupServiceImpl.java b/configbackuprestore/vnfconfigbackupservice/src/main/java/com/onap/sdnc/vnfbackupservice/service/VnfbackupServiceImpl.java new file mode 100644 index 00000000..c3c86df7 --- /dev/null +++ b/configbackuprestore/vnfconfigbackupservice/src/main/java/com/onap/sdnc/vnfbackupservice/service/VnfbackupServiceImpl.java @@ -0,0 +1,234 @@ +/* +* ============LICENSE_START======================================================= +* ONAP : SDNC-FEATURES +* ================================================================================ +* Copyright 2018 TechMahindra +*================================================================================= +* 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. +* ============LICENSE_END========================================================= +*/ +package com.onap.sdnc.vnfbackupservice.service; + +import java.io.IOException; +import java.sql.Timestamp; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +import org.apache.log4j.Logger; +import org.json.JSONArray; +import org.json.JSONException; +import org.json.JSONObject; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.http.HttpEntity; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpMethod; +import org.springframework.http.ResponseEntity; +import org.springframework.stereotype.Service; +import org.springframework.web.client.RestTemplate; + +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.onap.sdnc.vnfbackupservice.dao.VnfBackupServiceRepo; +import com.onap.sdnc.vnfbackupservice.model.VnfConfigDetailsDB; +import com.onap.sdnc.vnfbackupservice.model.VnfDisplayParams; +import com.onap.sdnc.vnfbackupservice.model.VnfServiceResponse; + +import com.onap.sdnc.vnfbackupservice.scheduler.VnfConfigBackupScheduler; +import com.onap.sdnc.vnfbackupservice.scheduler.VnfRestClient; + +@Service +public class VnfbackupServiceImpl implements VnfbackupService { + + @Autowired + private RestTemplate restTemplate; + + @Autowired + VnfBackupServiceRepo vnfBackupServiceDao; + + @Autowired + VnfConfigBackupScheduler vnfConfigBackupScheduler; + + @Value("${sdnc.rest.vnf.api.host}") + private String host; + + @Value("${sdnc.rest.vnf.api.port}") + private String port; + + @Value("${sdnc.rest.vnf.api.basepath}") + private String basePath; + + @Value("${sdnc.rest.vnf.api.username}") + private String username; + + @Value("${sdnc.rest.vnf.api.password}") + private String password; + + @Autowired + VnfRestClient vnfRestClientlocal; + + private static final Logger logger = Logger.getLogger(VnfbackupServiceImpl.class); + + @Override + public VnfServiceResponse getAllVnfDetails() { + VnfServiceResponse vnfServiceResponse = new VnfServiceResponse(); + String finalURL = "http://" + host + ":" + port + basePath + "/config/VNF-API:vnfs"; + String response = vnfRestClientlocal.vnfRestClient(finalURL, username, password); + List displayParams = parseVnfConfigDetails(response); + vnfServiceResponse.setVnfDisplayList(displayParams); + return vnfServiceResponse; + } + + public List parseVnfConfigDetails(String jsonInput) { + List displayParams = new ArrayList(); + + try { + JSONObject vnf = new JSONObject(jsonInput); + JSONArray vnfList = vnf.getJSONObject("vnfs").getJSONArray("vnf-list"); + + for (int i = 0; i < vnfList.length(); i++) { + VnfDisplayParams vnfDisplayParams = new VnfDisplayParams(); + String responseStatus = vnfList.getJSONObject(i).getJSONObject("service-status").get("response-code") + .toString(); + if ("200".equalsIgnoreCase(responseStatus)) { + String vnfId = vnfList.getJSONObject(i).get("vnf-id").toString(); + String vnfName = vnfList.getJSONObject(i).getJSONObject("service-data") + .getJSONObject("vnf-request-information").get("vnf-name").toString(); + vnfDisplayParams.setVnfId(vnfId); + vnfDisplayParams.setVnfName(vnfName); + displayParams.add(vnfDisplayParams); + } + } + } catch (JSONException e) { + logger.error("Exception is at parseVnfConfigDetails() : " + e); + } + return displayParams; + } + + @Override + public String backupVnfconfig(String vnfId) { + long millis = System.currentTimeMillis(); + Timestamp date = new java.sql.Timestamp(millis); + String finalURL = "http://" + host + ":" + port + basePath + "/config/VNF-API:vnfs/vnf-list/" + vnfId; + logger.debug("connecting to restconf device:::" + finalURL); + String response = vnfRestClientlocal.vnfRestClient(finalURL, username, password); + String configInfo = response; + Timestamp creationDate = date; + Timestamp lastupdated = date; + int status = 1; + String vnfid = vnfId; + String vnfname = ""; + VnfConfigDetailsDB getVnfDetails = null; + String vnfversion = "Version-1"; + try { + getVnfDetails = vnfBackupServiceDao.getVnfDetail(vnfId); + } catch (Exception e) { + logger.error("exception is at getVnfdetails() : " + e); + } + if (getVnfDetails == null) { + JSONObject vnf; + try { + vnf = new JSONObject(response); + vnfname = vnf.getJSONArray("vnf-list").getJSONObject(0).getJSONObject("service-data") + .getJSONObject("vnf-request-information").get("vnf-name").toString(); + + } catch (JSONException e) { + logger.error("exception is at getVnfdetails() : " + e); + } + vnfBackupServiceDao.saveVnfDetails(configInfo, creationDate, lastupdated, status, vnfid, vnfname, + vnfversion); + } else { + try { + String[] vnfvesionsplit = getVnfDetails.getVnfversion().split("-"); + int tmpVnfversion = Integer.parseInt(vnfvesionsplit[1]) + 1; + vnfversion = vnfvesionsplit[0] + "-" + String.valueOf(tmpVnfversion); + + ObjectMapper om = new ObjectMapper(); + try { + Map m1 = (Map) (om.readValue(getVnfDetails.getConfiginfo(), + Map.class)); + Map m2 = (Map) (om.readValue(response, Map.class)); + + JSONObject vnf; + vnf = new JSONObject(response); + vnfname = vnf.getJSONArray("vnf-list").getJSONObject(0).getJSONObject("service-data") + .getJSONObject("vnf-request-information").get("vnf-name").toString(); + + if (!m1.equals(m2)) { + vnfBackupServiceDao.saveVnfDetails(configInfo, creationDate, lastupdated, status, vnfid, + vnfname, vnfversion); + } + } catch (Exception e) { + logger.error("exception is at getVnfdetails() : " + e); + } + } catch (Exception e) { + logger.error("exception is at getVnfdetails() : " + e); + } + } + return "success"; + } + + @Override + public String putVnfconfig(String configfile, String vnfId) { + + String indented = null; + + if (configfile != null) { + restTemplate = new RestTemplate(); + String finalURL = "http://" + host + ":" + port + basePath + "/config/VNF-API:vnfs/vnf-list/" + vnfId; + + HttpHeaders headers = new HttpHeaders(); + + logger.info("connecting to restconf device:::" + finalURL); + String response = vnfRestClientlocal.vnfRestClient(finalURL, username, password); + logger.info(response); + ObjectMapper mapper = new ObjectMapper(); + try { + Object json = mapper.readValue(response, Object.class); + indented = mapper.writerWithDefaultPrettyPrinter().writeValueAsString(json); + logger.info(indented); + } catch (JsonParseException e) { + logger.error("exception occer" + e); + } catch (JsonMappingException e) { + logger.error("exception occer" + e); + } catch (IOException e) { + logger.error("exception occer" + e); + } + + if (!(configfile.equals(indented))) { + HttpEntity requestEntity = new HttpEntity(configfile, + vnfRestClientlocal.generateHeaders(headers, username, password)); + + ResponseEntity uri = restTemplate.exchange(finalURL, HttpMethod.PUT, requestEntity, + String.class); + logger.info(uri.getStatusCode()); + if (uri.getStatusCodeValue() == 200) { + vnfConfigBackupScheduler.initiateBackupService(); + } + return "ok"; + } else { + throw new RuntimeException("Both configurations are same"); + } + } + return "ok"; + } + + @Override + public String updatedBackuptime() { + String sdtime = vnfBackupServiceDao.getvnfschedulertime(); + return sdtime; + } + +} diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/resource/application.properties b/configbackuprestore/vnfconfigbackupservice/src/main/resource/application.properties new file mode 100644 index 00000000..4c2287b2 --- /dev/null +++ b/configbackuprestore/vnfconfigbackupservice/src/main/resource/application.properties @@ -0,0 +1,72 @@ +server.port = 9003 +#server.error.whitelabel.enabled=false +spring.mvc.view.prefix = /WEB-INF/views/ +spring.mvc.view.suffix = .jsp +# +#spring.datasource.url=jdbc:mariadb://localhost:3306/testreports?useSSL=false +##spring.datasource.url=jdbc:mysql://localhost:3306/mysql?useSSL=false +##spring.datasource.driver-class-name=com.mysql.jdbc.Driver +#spring.datasource.driver-class-name=org.mariadb.jdbc.Driver +#spring.datasource.name=mysql +#spring.jpa.database=testreports +#spring.jpa.database-platform=org.hibernate.dialect.MySQL5InnoDBDialect +##org.hibernate.dialect.MySQLDialect +# +# +#spring.datasource.username=root +#spring.datasource.password=12345 +#spring.jpa.generate-ddl=true +#spring.datasource.tomcat.max-wait=20000 +#spring.datasource.tomcat.max-active=50 +#spring.datasource.tomcat.max-idle=20 +#spring.datasource.tomcat.min-idle=15 +# +spring.jpa.hibernate.ddl-auto=update +# +#spring.jpa.properties.hibernate.dialect =org.hibernate.dialect.MySQL5InnoDBDialect +## org.hibernate.dialect.MySQLDialect +# +#spring.jpa.properties.hibernate.id.new_generator_mappings = false +#spring.jpa.properties.hibernate.format_sql = true +# +#logging.level.org.hibernate.SQL=DEBUG +#logging.level.org.hibernate.type.descriptor.sql.BasicBinder=TRACE +sdnc.rest.vnf.api.host=10.53.172.121 +sdnc.rest.vnf.api.port=8282 +sdnc.rest.vnf.api.basepath=/restconf +sdnc.rest.vnf.api.username=admin +sdnc.rest.vnf.api.password=Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U + +spring.jackson.serialization.fail-on-empty-beans=false + +server.tomcat.uri-encoding=utf-8 + +#server.error.whitelabel.enabled=false +#spring.mvc.view.prefix = /WEB-INF/views/ +#spring.mvc.view.suffix = .jsp + +logging.level.org.springframework=TRACE +logging.level.com=TRACE + +# =============================== +# Set here configurations for the database connection +spring.datasource.url=jdbc:mariadb://localhost:3306/configtest +spring.datasource.username=root +spring.datasource.password=root +spring.datasource.driver-class-name=org.mariadb.jdbc.Driver +# Keep the connection alive if idle for a long time (needed in production) +spring.datasource.testWhileIdle=true +spring.datasource.validationQuery=SELECT 1 +# =============================== +# = JPA / HIBERNATE +# =============================== +# Show or not log for each sql query +spring.jpa.show-sql=true +# Hibernate ddl auto (create, create-drop, update): with "create-drop" the database +# schema will be automatically created afresh for every start of application +#spring.jpa.hibernate.ddl-auto=validate +# Naming strategy +spring.jpa.hibernate.naming.implicit-strategy=org.hibernate.boot.model.naming.ImplicitNamingStrategyLegacyHbmImpl +spring.jpa.hibernate.naming.physical-strategy=org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy +# Allows Hibernate to generate SQL optimized for a particular DBMS +spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/resource/log4j2.xml b/configbackuprestore/vnfconfigbackupservice/src/main/resource/log4j2.xml new file mode 100644 index 00000000..e443b529 --- /dev/null +++ b/configbackuprestore/vnfconfigbackupservice/src/main/resource/log4j2.xml @@ -0,0 +1,38 @@ + + + + + %d{yyyy-MM-dd HH:mm:ss.SSS} %5p ${hostName} --- [%15.15t] %-40.40c{1.} : %m%n%ex + + + + + + + + + + ${LOG_PATTERN} + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/WEB-INF/lib/jsp-api-2.0.jar b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/WEB-INF/lib/jsp-api-2.0.jar new file mode 100644 index 00000000..3d0c81fe Binary files /dev/null and b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/WEB-INF/lib/jsp-api-2.0.jar differ diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/WEB-INF/lib/jstl-1.2.jar b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/WEB-INF/lib/jstl-1.2.jar new file mode 100644 index 00000000..0fd275e9 Binary files /dev/null and b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/WEB-INF/lib/jstl-1.2.jar differ diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/WEB-INF/views/index.jsp b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/WEB-INF/views/index.jsp new file mode 100644 index 00000000..b6a3e552 --- /dev/null +++ b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/WEB-INF/views/index.jsp @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+
+ +
+
+ +
+
+ + \ No newline at end of file diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/js/app.js b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/js/app.js new file mode 100644 index 00000000..109baec5 --- /dev/null +++ b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/js/app.js @@ -0,0 +1,68 @@ +/* +* ============LICENSE_START======================================================= +* ONAP : SDNC-FEATURES +* ================================================================================ +* Copyright 2018 TechMahindra +*================================================================================= +* 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. +* ============LICENSE_END========================================================= +*/ + +// app.js This is first entry point for the application +// ============================================================================= +var myApp = angular.module('myApp', ['ngRoute', 'ngSanitize', 'ngCsv', 'angularUtils.directives.dirPagination', 'angular-growl','ng-ip-address','ds.objectDiff']); + +myApp.config(['growlProvider',function(growlProvider) { + growlProvider.globalDisableCloseButton(false); +}]); + + +// configuring our routes +// ============================================================================= +myApp.config(['$routeProvider', function($routeProvider) { + + //Called when user select pre validation test from the UI + $routeProvider. + when('/testReportsById', { + templateUrl: 'static/views/form-viewReportById.html', + controller: 'ReportController' + }). + when('/', { + templateUrl: 'static/views/form-viewReport.html', + controller: 'ReportController' + }). + //Called when user select view test report from the UI + when('/testReports', { + templateUrl: 'static/views/form-viewReport.html', + controller: 'ReportController' + }). + when('/deviceConfig', { + templateUrl: 'static/views/form-backupConfig.html', + controller: 'BackupConfigCtrl' + }). + when('/applyConfig', { + templateUrl: 'static/views/form-applyConfig.jsp', + controller: 'ApplyConfigCtrl' + }). + when('/compareConfig', { + templateUrl: 'static/views/form-compareConfig.html', + controller: 'CompareConfigCtrl' + }). + otherwise({ + redirectTo: 'static/views/form-viewReport.html' + }); +}]); + + +myApp.constant('CERTIFICATION_API_BASE', 'http://myapp.production.com/'); +myApp.constant('VNF_API_BASE', 'http://myapp.production.com/'); \ No newline at end of file diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/js/sdnc-controller/sdnc-applyConfig-controller.js b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/js/sdnc-controller/sdnc-applyConfig-controller.js new file mode 100644 index 00000000..faff3633 --- /dev/null +++ b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/js/sdnc-controller/sdnc-applyConfig-controller.js @@ -0,0 +1,93 @@ +myApp.controller('ApplyConfigCtrl', ['$scope','$window', '$http', 'growl', 'deviceConfigService', 'ObjectDiff', function($scope, $http,$window, growl, deviceConfigService, ObjectDiff) { + + $scope.showResult = false; + + //THIS FUNCTION WILL BE CALLED ON PAGE LOAD + $scope.getAllVNFFromRc = function() { + + deviceConfigService.getAllVNFFromRc().then(function(data) { + if (data != null) { + console.log(data); + $scope.objvnfList = data; + console.log("CompareConfigCtrl:getAllVNFFromRc called" + $scope.objvnfList); + } else { + $scope.warningMessage = "No VNF is eligible for configuration!!!"; + growl.error($scope.warningMessage, { + title: 'Warning!', + globalDisableCloseButton: false, + ttl: 7000, + disableCountDown: true + }); + } + }); + }; + $scope.getAllVNFFromRc(); + + + + $scope.selectVnf = function(selectedValueVnf) { + + var vnfId = selectedValueVnf; + + $scope.fileContent = ''; + $scope.fileSize = 0; + $scope.fileName = ''; + + $scope.submit = function () { + var file = document.getElementById("myFileInput").files[0]; + $scope.result1={}; + + if (file) { + var aReader = new FileReader(); + aReader.readAsText(file, "UTF-8"); + aReader.onload = function (evt) { + // $scope.fileContent = aReader.result; + $scope.fileName = document.getElementById("myFileInput").files[0].name; + $scope.fileSize = document.getElementById("myFileInput").files[0].size; + var id= vnfId; + result1=JSON.parse(aReader.result); + /*var item = JSON.parse(result1);*/ + $scope.fileContent = aReader.result.search(id); + $scope.successMessagebool = false; + if( $scope.fileContent == -1){ + $scope.errorMessage = "VNF Id is different!!! Select different file and try again"; + growl.error($scope.errorMessage, { + title: 'Error!', + globalDisableCloseButton: false, + ttl: 7000, + disableCountDown: true + }); + } + else{ + + $scope.apply(); + + } + } + aReader.onerror = function (evt) { + $scope.fileContent = "error"; + } + } + $scope.successMessagebool1 = false; + $scope.apply = function() { + if (file) { + deviceConfigService.runApplyconfig(vnfId,result1); + $scope.successMessage = "File uploaded successfully"; + growl.success($scope.successMessage, { + title: 'Success!', + globalDisableCloseButton: false, + ttl: 7000, + disableCountDown: true + }); + $scope.successMessagebool1 = true; + + + } }; + + } + + } + + +}]); + diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/js/sdnc-controller/sdnc-backupConfig-controller.js b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/js/sdnc-controller/sdnc-backupConfig-controller.js new file mode 100644 index 00000000..3ea9c755 --- /dev/null +++ b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/js/sdnc-controller/sdnc-backupConfig-controller.js @@ -0,0 +1,314 @@ +/* + * ============LICENSE_START======================================================= + * ONAP : SDNC-FEATURES + * ================================================================================ + * Copyright 2018 TechMahindra + *================================================================================= + * 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. + * ============LICENSE_END========================================================= + */ +myApp.controller('BackupConfigCtrl', ['$scope', '$http','$window', 'growl', 'deviceConfigService', 'ObjectDiff', '$timeout' , function($scope, $http, $window, growl, deviceConfigService, ObjectDiff, $timeout) { + + $scope.showResult = false; + $scope.showCompare = false; + + //THIS FUNCTION WILL BE CALLED ON PAGE LOAD + $scope.getAllVNF = function() { + + deviceConfigService.getAllVNF().then(function(data) { + if (data != null) { + console.log(data); + $scope.objvnfList = data; + console.log("CompareConfigCtrl:getAllVNF called" + $scope.objvnfList); + } else { + $scope.warningMessage = "No VNF is eligible for configuration!!!"; + growl.error($scope.warningMessage, { + title: 'Warning!', + globalDisableCloseButton: false, + ttl: 7000, + disableCountDown: true + }); + } + }); + }; + $scope.getAllVNF(); + + $scope.selectVnf = function(selectedValueVnf) { + + if (selectedValueVnf != null && selectedValueVnf != "") { + console.log("selectedvnf Value", selectedValueVnf); + //selectedItem = selectedValueVnf.split("%"); +// var vnfName = selectedItem[0]; +// var vnfType = selectedItem[1]; + var vnfId = selectedValueVnf; + $scope.getVersionList(vnfId); + } else { + $scope.ShowResult = false; + $scope.showCompare = false; + $scope.showResult = false; + $scope.errorMessage = "Please select a VNF!!!"; + growl.error($scope.errorMessage, { + title: 'Error!', + globalDisableCloseButton: false, + ttl: 7000, + disableCountDown: true + }); + } + + } + + //THIS FUNCTION WILL BE CALLED ON SELECTION OF VNF + $scope.getVersionList = function(vnfId) { + + $scope.ShowResult = false; + + //service call to fetch the version list + deviceConfigService.getVersions(vnfId).then(function(result) { + console.log("--CompareConfigCtrl::getVersionList called from controler--", JSON.stringify(result)); + var status = result.status; + var result = result.data; + if (status == 200) { + if (result.length >= 1) { + //in case of success, build the model object to store the service output here + $scope.createVersionModel(result); + } else { + $scope.ShowResult = false; + $scope.warningMessage = "No configruation found for the selected VNF !!"; + growl.warning($scope.warningMessage, { + title: 'Warning!', + globalDisableCloseButton: false, + ttl: 7000, + disableCountDown: true + }); + } + } else { + $scope.ShowResult = false; + $scope.warningMessage = "No configruation found for the selected VNF !!"; + growl.warning($scope.warningMessage, { + title: 'Warning!', + globalDisableCloseButton: false, + ttl: 7000, + disableCountDown: true + }); + } + }, + function(response) { + $scope.errorMessage = "Something went wrong, Please try again !!"; + growl.error($scope.errorMessage, { + title: 'Error!', + globalDisableCloseButton: false, + ttl: 7000, + disableCountDown: true + }); + console.log("--CompareConfigCtrl::getVersionList::Error--", response); + }); + } + + //Function to build the UI model to be shown + $scope.createVersionModel = function(result) { + + $scope.objVersionModel = result; + $scope.objVersion = []; + + console.log("--CompareConfigCtrl::createVersionModel::--", JSON.stringify($scope.objVersionModel)); + if ($scope.objVersionModel.length >= 1) { + $scope.ShowResult = true; + $scope.showCompare = true; + for (var i = 0; i < $scope.objVersionModel.length; i++) { + var objVersionDetail = {}; + objVersionDetail.vnfname = $scope.objVersionModel[i].vnfname; + objVersionDetail.vnfid = $scope.objVersionModel[i].vnfid; + objVersionDetail.versionNo = $scope.objVersionModel[i].vnfversion; + objVersionDetail.createdAt = $scope.objVersionModel[i].creationdate; + objVersionDetail.configinfo = $scope.objVersionModel[i].configinfo; + objVersionDetail.selected = false; + + $scope.objVersion.push(objVersionDetail); + } + } + console.log("--CompareConfigCtrl::createVersionModel::final VersionModel--" + JSON.stringify($scope.objVersion)); + + } + + $scope.CompareConfig = function(objVersion) { + var count = 0; + angular.forEach(objVersion, function(item) { + if (item.selected == true) + count++; + }); + if (count > 2) { + $scope.errorMessage = "Only two config files can be selected for the comparison!!!"; + growl.error($scope.errorMessage, { + title: 'Error!', + globalDisableCloseButton: false, + ttl: 7000, + disableCountDown: true + }); + } else if (count === 1){ + $scope.errorMessage = "At least two config files can be selected for the comparison!!!"; + growl.error($scope.errorMessage, { + title: 'Error!', + globalDisableCloseButton: false, + ttl: 7000, + disableCountDown: true + }); + }else + $scope.createCompareModelNew(objVersion); + }; + + $scope.createCompareModelNew = function(objVersion) { + + $scope.objCompareModel1 = {}; + $scope.objCompareModel2 = {}; + + $scope.versionsSelected = []; + angular.forEach(objVersion, function(item) { + angular.forEach($scope.objVersionModel, function(val, index) { + if (item.versionNo == val['versionNo'] && item.selected == false) { + $scope.objVersionModel.splice(index, 1); + } + if (item.selected) { + if ($scope.versionsSelected.indexOf(item) == -1) + $scope.versionsSelected.push(item); + } + }) + }); + console.log("--CompareConfigCtrl::createCompareModel::$scope.objVersionModel", JSON.stringify($scope.objVersionModel)); + angular.forEach($scope.objVersionModel, function(item) { + var versionObj = {}; + var versionDetails = {}; + versionDetails.versionNo = item['vnfversion']; + /*versionDetails.vnfName = item['vnfname']; + versionDetails.vnfid = item['vnfid'];*/ + versionDetails.timeStamp = item.creationdate; + versionObj.versionDetails = versionDetails; + + //fetch all the other topology/network,opertaion status for the vnf + // versionObj.topologyInfo = $scope.fetchConfigDetails(item); + versionObj.topologyInfo = $scope.fetchTopologyInfo(item); + + versionObj.networkTopologyInfo = $scope.fetchNetworkTopologyInfo(item); + versionObj.operationStatus = $scope.operationStatus(item); + versionObj.vnfTopologyIdentifier = $scope.vnfTopologyIdentifier(item); + + if ((versionObj.versionDetails.versionNo == $scope.versionsSelected[0].versionNo)) { + $scope.objCompareModel1 = versionObj; + } else + $scope.objCompareModel2 = versionObj; + + }); + $scope.showResult = true; + console.log("CompareConfigCtrl::createCompareModel::objCompareModel1", JSON.stringify($scope.objCompareModel1)); + console.log("CompareConfigCtrl::createCompareModel::objCompareModel2", JSON.stringify($scope.objCompareModel2)); + } + + + + $scope.fetchTopologyInfo = function(item) { + var topologyInfo = {}; + item = JSON.parse(item.configinfo); + if (angular.isDefined(item['preload-data']) && angular.isDefined(item['preload-data']['vnf-topology-information'])) { + var vnfTopologyInfo = item['preload-data']['vnf-topology-information']; + if (angular.isDefined(vnfTopologyInfo['vnf-parameters'] && vnfTopologyInfo['vnf-parameters'] != null)) { + var vnfParameters = vnfTopologyInfo['vnf-parameters']; + for (var i = 0; i < vnfParameters.length; i++) { + + var key = vnfParameters[i]['vnf-parameter-name']; + var value = vnfParameters[i]['vnf-parameter-value']; + console.log("CompareConfigCtrl::fetchTopologyInfo::key", key); + console.log("CompareConfigCtrl::fetchTopologyInfo::value", value); + topologyInfo[key] = value; + + } + console.log("CompareConfigCtrl::fetchTopologyInfo::", JSON.stringify(topologyInfo)); + return topologyInfo; + } + } + } + + $scope.fetchNetworkTopologyInfo = function(item) { + var networkTopology = {}; + item = JSON.parse(item.configinfo); + if (angular.isDefined(item['preload-data']) && angular.isDefined(item['preload-data']['network-topology-information'])) { + var netwrokTopologyInfo = item['preload-data']['network-topology-information']; + if (angular.isDefined(netwrokTopologyInfo) && netwrokTopologyInfo != null) { + for (var i = 0; i < netwrokTopologyInfo.length; i++) { + + var key = netwrokTopologyInfo[i]['vnf-parameter-name']; + var value = netwrokTopologyInfo[i]['vnf-parameter-value']; + console.log("CompareConfigCtrl::fetchTopologyInfo::key", key); + console.log("CompareConfigCtrl::fetchTopologyInfo::value", value); + networkTopology[key] = value; + } + } + } + console.log("CompareConfigCtrl::fetchNetworkTopologyInfo::", JSON.stringify(networkTopology)); + return networkTopology; + } + + $scope.operationStatus = function(item) { + var operationStatus = {}; + item = JSON.parse(item.configinfo); + if (angular.isDefined(item['preload-data']) && angular.isDefined(item['preload-data']['oper-status'])) { + var operStatus = item['preload-data']['oper-status']; + if (angular.isDefined(operStatus) && operStatus != null) { + + var value = operStatus['order-status']; + operationStatus['order-status'] = value; + + } + } + console.log("CompareConfigCtrl::operationStatus::", JSON.stringify(operationStatus)); + return operationStatus; + } + + $scope.vnfTopologyIdentifier = function(item) { + var topologyIdnetifier = {}; + item = JSON.parse(item.configinfo); + if (angular.isDefined(item['preload-data']) && angular.isDefined(item['preload-data']['vnf-topology-information']['vnf-topology-identifier'])) { + var topologyInfoidentifier = item['preload-data']['vnf-topology-information']['vnf-topology-identifier']; + if (angular.isDefined(topologyInfoidentifier)) { + angular.forEach(topologyInfoidentifier, function(value, key) { + + console.log("CompareConfigCtrl::fetchTopologyInfo::key", key); + console.log("CompareConfigCtrl::fetchTopologyInfo::value", value); + topologyIdnetifier[key] = value; + }); + } + } + + console.log("CompareConfigCtrl::vnfTopologyIdentifier::", JSON.stringify(topologyIdnetifier)); + return topologyIdnetifier; + } + + $scope.invokeBackup = function(){ + deviceConfigService.invokeBackup().then(function(data) { + console.log("response -- data -- "+data) + $window.location.reload(); + }); + } + + $scope.getLastModifiedTime=function(){ +// $timeout(function(result){ +// console.log("response-data-"+ result); +// $scope.lastModifiedTime="Testcode Dushyant" +// } +// ,5000); + + deviceConfigService.getlastupdated().then(function(result) { + $scope.lastModifiedTime= result.data; + console.log("response -- getlastupdated -- "+JSON.stringify(result)) + }); + } + $scope.getLastModifiedTime() +}]); \ No newline at end of file diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/js/sdnc-controller/sdnc-compareConfig-controller.js b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/js/sdnc-controller/sdnc-compareConfig-controller.js new file mode 100644 index 00000000..91584b00 --- /dev/null +++ b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/js/sdnc-controller/sdnc-compareConfig-controller.js @@ -0,0 +1,690 @@ +/* + * ============LICENSE_START======================================================= + * ONAP : SDNC-FEATURES + * ================================================================================ + * Copyright 2018 TechMahindra + *================================================================================= + * 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. + * ============LICENSE_END========================================================= + */ +myApp.controller('CompareConfigCtrl', ['$scope','$filter', '$http','$window', 'growl', 'deviceConfigService', 'ObjectDiff', function($scope,$filter, $http,$window, growl, deviceConfigService, ObjectDiff) { + + $scope.showResult = false; + $scope.showCompare = false; + $scope.showView=false; + $scope.pagination = false; + $scope.gap = 2; + $scope.filteredItems = []; + $scope.groupedItems = []; + $scope.itemsPerPage = 5; + $scope.pagedItems = []; + $scope.currentPage = 0; + //THIS FUNCTION WILL BE CALLED ON PAGE LOAD + $scope.getAllVNF = function() { + + deviceConfigService.getAllVNF().then(function(data) { + if (data != null) { + console.log(data); + $scope.objvnfList = data; + console.log("CompareConfigCtrl:getAllVNF called" + $scope.objvnfList); + } else { + $scope.warningMessage = "No VNF is eligible for configuration!!!"; + growl.error($scope.warningMessage, { + title: 'Warning!', + globalDisableCloseButton: false, + ttl: 7000, + disableCountDown: true + }); + } + }); + }; + $scope.getAllVNF(); + + $scope.selectVnf = function(selectedValueVnf) { + + if (selectedValueVnf != null && selectedValueVnf != "") { + console.log("selectedvnf Value", selectedValueVnf); + //selectedItem = selectedValueVnf.split("%"); +// var vnfName = selectedItem[0]; +// var vnfType = selectedItem[1]; + var vnfId = selectedValueVnf; + $scope.getVersionList(vnfId); + } else { + $scope.ShowResult = false; + $scope.showCompare = false; + $scope.showResult = false; + $scope.errorMessage = "Please select a VNF!!!"; + growl.error($scope.errorMessage, { + title: 'Error!', + globalDisableCloseButton: false, + ttl: 7000, + disableCountDown: true + }); + } + + } + + //THIS FUNCTION WILL BE CALLED ON SELECTION OF VNF + $scope.getVersionList = function(vnfId) { + + $scope.ShowResult = false; + + //service call to fetch the version list + deviceConfigService.getVersions(vnfId).then(function(result) { + console.log("-----CompareConfigCtrl::getVersionList called from controler--", JSON.stringify(result)); + var status = result.status; + var result = result.data; + if (status == 200) { + if (result.length >= 1) { + //in case of success, build the model object to store the service output here + $scope.createVersionModel(result); + + } else { + $scope.ShowResult = false; + $scope.warningMessage = "No configruation found for the selected VNF !!"; + growl.warning($scope.warningMessage, { + title: 'Warning!', + globalDisableCloseButton: false, + ttl: 7000, + disableCountDown: true + }); + } + } else { + $scope.ShowResult = false; + $scope.warningMessage = "No configruation found for the selected VNF !!"; + growl.warning($scope.warningMessage, { + title: 'Warning!', + globalDisableCloseButton: false, + ttl: 7000, + disableCountDown: true + }); + } + }, + function(response) { + $scope.errorMessage = "Something went wrong, Please try again !!"; + growl.error($scope.errorMessage, { + title: 'Error!', + globalDisableCloseButton: false, + ttl: 7000, + disableCountDown: true + }); + console.log("--CompareConfigCtrl::getVersionList::Error--", response); + }); + } + + //Function to build the UI model to be shown + $scope.createVersionModel = function(result) { + + $scope.objVersionModel = result; + $scope.objVersion = []; + + console.log("-----CompareConfigCtrl::createVersionModel::--", JSON.stringify($scope.objVersionModel)); + if ($scope.objVersionModel.length >= 1) { + $scope.ShowResult = true; + $scope.showCompare = true; + $scope.showView =true; + for (var i = 0; i < $scope.objVersionModel.length; i++) { + var objVersionDetail = {}; + objVersionDetail.vnfname = $scope.objVersionModel[i].vnfname; + objVersionDetail.vnfid = $scope.objVersionModel[i].vnfid; + objVersionDetail.vnfversion = $scope.objVersionModel[i].vnfversion; + objVersionDetail.createdAt = $scope.objVersionModel[i].creationdate; + objVersionDetail.updatedAt = $scope.objVersionModel[i].lastupdated; + objVersionDetail.configinfo = $scope.objVersionModel[i].configinfo; + objVersionDetail.selected = false; + $scope.objVersion.push(objVersionDetail); + + } + } + console.log("-----CompareConfigCtrl::createVersionModel::final VersionModel--" + JSON.stringify($scope.objVersion)); + + // init + $scope.sort = { + sortingOrder : 'vnfversion', + reverse : true + }; + + var searchMatch = function(haystack, needle) { + if (!needle) { + return true; + } + return haystack.toLowerCase().indexOf( + needle.toLowerCase()) !== -1; + }; + + // init the filtered items + $scope.search = function() { + $scope.filteredItems = $filter('filter')( + $scope.objVersion, + function(item) { + for ( var attr in item) { + if (searchMatch(item[attr], + $scope.query)) + return true; + } + return false; + }); + // take care of the sorting order + if ($scope.sort.sortingOrder !== '') { + $scope.filteredItems = $filter( + 'orderBy')( + $scope.filteredItems, + $scope.sort.sortingOrder, + $scope.sort.reverse); + } + $scope.currentPage = 0; + // now group by pages + $scope.groupToPages(); + }; + + // calculate page in place + $scope.groupToPages = function() { + $scope.pagedItems = []; + + for (var i = 0; i < $scope.filteredItems.length; i++) { + if (i % $scope.itemsPerPage === 0) { + $scope.pagedItems[Math.floor(i + / $scope.itemsPerPage)] = [ $scope.filteredItems[i] ]; + } else { + $scope.pagedItems[Math.floor(i + / $scope.itemsPerPage)] + .push($scope.filteredItems[i]); + } + } + }; + + $scope.range = function(size, start, end) { + var ret = []; + //console.log(size, start, end); + + if (size < end) { + end = size; + start = size - $scope.gap; + } + for (var i = start; i < end; i++) { + ret.push(i); + } + //console.log(ret); + return ret; + }; + + $scope.prevPage = function() { + if ($scope.currentPage > 0) { + $scope.currentPage--; + } + }; + + $scope.nextPage = function() { + if ($scope.currentPage < $scope.pagedItems.length - 1) { + $scope.currentPage++; + } + }; + + $scope.setPage = function() { + $scope.currentPage = this.n; + }; + + // functions have been describe process the data + // for display + $scope.search(); + + } + + + + //For apply version + + $scope.ApplyConfig = function(objVersion){ + var count = 0; + angular.forEach(objVersion, function(item) { + if (item.selected == true) + count++; + }); + if (count < 1) { + $scope.errorMessage = "Select a config file to apply !!!"; + growl.error($scope.errorMessage, { + title: 'Error!', + globalDisableCloseButton: false, + ttl: 7000, + disableCountDown: true + }); + }else if (count > 1) { + $scope.errorMessage = "Only one config file can be applyed at a time !!!"; + growl.error($scope.errorMessage, { + title: 'Error!', + globalDisableCloseButton: false, + ttl: 7000, + disableCountDown: true + }); + }else + $scope.applyModelNew(objVersion); + }; + + + $scope.applyModelNew = function(objVersion){ + + $scope.objCompareModel1 = {}; + + $scope.versionsSelected = []; + angular.forEach(objVersion, function(item) { + angular.forEach($scope.objVersionModel, function(val, index) { + /* if (item.vnfversion == val['vnfversion'] && item.selected == false) { + $scope.objVersionModel.splice(index, 1); + }*/ + if (item.selected) { + if ($scope.versionsSelected.indexOf(item) == -1) + $scope.versionsSelected.push(item); + } + }) + }); + console.log("--CompareConfigCtrl::createCompareModel::$scope.objVersionModel", JSON.stringify($scope.objVersionModel)); + + angular.forEach($scope.versionsSelected, function(item) { + var versionObj = {}; + var versionDetails = {}; + versionDetails.vnfversion = item['vnfversion']; + versionDetails.vnfName = item['vnfname']; + var vnfid = item['vnfid']; + // var config = JSON.parse(item['configinfo']); + var config = item['configinfo']; + var config1=JSON.parse(config); + console.log("CompareConfigCtrl::createCompareModel::objCompareModel1", config1); + deviceConfigService.runApplyconfig(vnfid,config1); + $scope.successMessage = "File uploaded successfully"; + growl.success($scope.successMessage, { + title: 'Success!', + globalDisableCloseButton: false, + ttl: 7000, + disableCountDown: true + }); + }); + } + +//View Configuration + + $scope.ViewConfig = function(objVersion){ + var elmnt1 = document.getElementById("view"); + + elmnt1.style.display = "block"; + var count = 0; + angular.forEach(objVersion, function(item) { + if (item.selected == true) + count++; + }); + if (count < 1) { + $scope.showResult = false; + $scope.errorMessage = "Select a config file to view !!!"; + growl.error($scope.errorMessage, { + title: 'Error!', + globalDisableCloseButton: false, + ttl: 7000, + disableCountDown: true + }); + }else if (count > 1) { + $scope.showResult = false; + $scope.errorMessage = "Only one config file can be viewed at a time !!!"; + growl.error($scope.errorMessage, { + title: 'Error!', + globalDisableCloseButton: false, + ttl: 7000, + disableCountDown: true + }); + }else + $scope.ViewCompareModelNew(objVersion); + }; + + $scope.ViewCompareModelNew = function(objVersion) { + $scope.objCompareModel1 = {}; + + $scope.versionsSelected = []; + angular.forEach(objVersion, function(item) { + angular.forEach($scope.objVersionModel, function(val, index) { + /*if (item.vnfversion == val['vnfversion'] && item.selected == false) { + $scope.objVersionModel.splice(index, 1); + }*/ + if (item.selected) { + if ($scope.versionsSelected.indexOf(item) == -1) + $scope.versionsSelected.push(item); + } + }) + }); + console.log("--CompareConfigCtrl::createCompareModel::$scope.objVersionModel", JSON.stringify($scope.objVersionModel)); + + angular.forEach($scope.versionsSelected, function(item) { + var versionObj = {}; + var versionDetails = {}; + versionDetails.vnfversion = item['vnfversion']; + versionDetails.vnfName = item['vnfname']; + var vnfid = item['vnfid']; + + + versionDetails.timeStamp = item.createdAt; + versionObj.versionDetails = versionDetails; + + //fetch all the other topology/network,opertaion status for the vnf + // versionObj.topologyInfo = $scope.fetchConfigDetails(item); + versionObj.topologyInfo = $scope.fetchTopologyInfo(item); + versionObj.vnfIdInfo = $scope.fetchVnfId(item); + versionObj.serviceStatusInfo= $scope.fetchServiceStatus(item); + versionObj.vnfTopologyIdentifier = $scope.vnfTopologyIdentifier(item); + versionObj.operationStatus = $scope.operationStatus(item); + versionObj.vnfRequestInfo=$scope.fetchVnfRequestInfo(item); + versionObj.serviceInfo= $scope.fetchServiceInfo(item); + versionObj.requestHeader= $scope.serviceRequestHeader(item); + versionObj.requestInfo=$scope.fetchRequestInfo(item); + + if ((versionObj.versionDetails.vnfversion == $scope.versionsSelected[0].vnfversion)) { + $scope.objCompareModel1 = versionObj; + } else + {console.log("CompareConfigCtrl::createCompareModel::objCompareModel1"); + + } + document.getElementById("compare").style.display = "none"; + } ); + $scope.showView=true; + $scope.showResult = true; + var elmnt1 = document.getElementById("view"); + elmnt1.scrollIntoView(); + console.log("CompareConfigCtrl::createCompareModel::objCompareModel1", JSON.stringify($scope.objCompareModel1)); + } + + + //compare + + + $scope.CompareConfig = function(objVersion) { + var elmnt = document.getElementById("compare"); + elmnt.style.display = "block"; + var count = 0; + angular.forEach(objVersion, function(item) { + if (item.selected == true) + count++; + }); + if (count > 4) { + $scope.showResult = false; + $scope.errorMessage = "Four or lessthan four and gretterthan two config files can be selected for the comparison!!!"; + growl.error($scope.errorMessage, { + title: 'Error!', + globalDisableCloseButton: false, + ttl: 7000, + disableCountDown: true + }); + } else if (count < 2){ + $scope.showResult = false; + $scope.errorMessage = "At least two config files can be selected for the comparison!!!"; + growl.error($scope.errorMessage, { + title: 'Error!', + globalDisableCloseButton: false, + ttl: 7000, + disableCountDown: true + }); + }else + $scope.createCompareModelNew(objVersion); + }; + + $scope.createCompareModelNew = function(objVersion) { + + $scope.objCompareModel1 = {}; + $scope.objCompareModel2 = {}; + + $scope.versionsSelected = []; + angular.forEach(objVersion, function(item) { + angular.forEach($scope.objVersionModel, function(val, index) { + /*if ((item.vnfversion == val['vnfversion']) && item.selected == false) { + // $scope.objVersionModel.splice(index, 1); + }*/ + if (item.selected) { + if ($scope.versionsSelected.indexOf(item) == -1) + $scope.versionsSelected.push(item); + } + }) + }); + console.log("--CompareConfigCtrl::createCompareModel::$scope.objVersionModel", JSON.stringify($scope.objVersionModel)); + console.log("--CompareConfigCtrl::createCompareModel::$scope.objVersionModel", JSON.stringify($scope.versionsSelected)); + + angular.forEach($scope.versionsSelected, function(item) { + var versionObj = {}; + var versionDetails = {}; + versionDetails.vnfversion = item.vnfversion; + /*versionDetails.vnfName = item['vnfname']; + versionDetails.vnfid = item['vnfid'];*/ + versionDetails.timeStamp = item.createdAt; + versionObj.versionDetails = versionDetails; + + //fetch all the other topology/network,opertaion status for the vnf + // versionObj.topologyInfo = $scope.fetchConfigDetails(item); + versionObj.topologyInfo = $scope.fetchTopologyInfo(item); + versionObj.vnfIdInfo = $scope.fetchVnfId(item); + versionObj.serviceStatusInfo= $scope.fetchServiceStatus(item); + versionObj.vnfTopologyIdentifier = $scope.vnfTopologyIdentifier(item); + versionObj.operationStatus = $scope.operationStatus(item); + versionObj.vnfRequestInfo=$scope.fetchVnfRequestInfo(item); + versionObj.serviceInfo= $scope.fetchServiceInfo(item); + versionObj.requestHeader= $scope.serviceRequestHeader(item); + versionObj.requestInfo=$scope.fetchRequestInfo(item); + + if ((versionObj.versionDetails.vnfversion == $scope.versionsSelected[0].vnfversion)) { + $scope.objCompareModel1 = versionObj; + } else if ((versionObj.versionDetails.vnfversion == $scope.versionsSelected[1].vnfversion)) + {$scope.objCompareModel2 = versionObj; + } + document.getElementById("view").style.display = "none"; + } ); + $scope.showResult = true; + var elmnt = document.getElementById("compare"); + elmnt.scrollIntoView(); + console.log("CompareConfigCtrl::createCompareModel::objCompareModel1", JSON.stringify($scope.objCompareModel1)); + console.log("CompareConfigCtrl::createCompareModel::objCompareModel2", JSON.stringify($scope.objCompareModel2)); + + } + + //1'st comparison for vnf topology info vnf-parameters + $scope.fetchTopologyInfo = function(item) { + var topologyInfo = {}; + item = JSON.parse(item.configinfo); + var item= item['vnf-list'][0]; + if (angular.isDefined(item['service-data']) && angular.isDefined(item['service-data']['vnf-topology-information'])) { + var vnfTopologyInfo = item['service-data']['vnf-topology-information']; + if (angular.isDefined(vnfTopologyInfo['vnf-parameters'] && vnfTopologyInfo['vnf-parameters'] != null)) { + var vnfParameters = vnfTopologyInfo['vnf-parameters']; + for (var i = 0; i < vnfParameters.length; i++) { + + var key = vnfParameters[i]['vnf-parameter-name']; + var value = vnfParameters[i]['vnf-parameter-value']; + console.log("CompareConfigCtrl::fetchTopologyInfo::key", key); + console.log("CompareConfigCtrl::fetchTopologyInfo::value", value); + topologyInfo[key] = value; + + } + console.log("CompareConfigCtrl::fetchTopologyInfo::", JSON.stringify(topologyInfo)); + return topologyInfo; + } + } + } + + + + //2nd comparison for vnf id + + $scope.fetchVnfId = function(item){ + var vnfIdInfo = {}; + item = JSON.parse(item.configinfo); + var item= item['vnf-list'][0]; + if (angular.isDefined(item['vnf-id'])) { + var key=item['vnf-id']; + vnfIdInfo['vnf-id']=key; + } + console.log("CompareConfigCtrl::fetchVnfId::", JSON.stringify( vnfIdInfo)); + return vnfIdInfo; + } + + + //3rd comparison for service status + + $scope.fetchServiceStatus = function(item) { + var serviceStatusInfo = {}; + + item = JSON.parse(item.configinfo); + var item= item['vnf-list'][0]; + + if (angular.isDefined(item['service-status'])) { + var serviceStatus = item['service-status']; + if (angular.isDefined(serviceStatus)) { + angular.forEach(serviceStatus, function(value, key) { + + console.log("CompareConfigCtrl::fetchServiceStatus::key", key); + console.log("CompareConfigCtrl::fetchServiceStatus::value", value); + serviceStatusInfo[key] = value; + }); + } + } + + console.log("CompareConfigCtrl::fetchServiceStatus::", JSON.stringify(serviceStatusInfo)); + return serviceStatusInfo; + } + + // 4th comparison for vnf topology identifire + + $scope.vnfTopologyIdentifier = function(item) { + var topologyIdnetifier = {}; + item = JSON.parse(item.configinfo); + var item= item['vnf-list'][0]; + if (angular.isDefined(item['service-data']) && angular.isDefined(item['service-data']['vnf-topology-information']['vnf-topology-identifier'])) { + var topologyInfoidentifier = item['service-data']['vnf-topology-information']['vnf-topology-identifier']; + if (angular.isDefined(topologyInfoidentifier)) { + angular.forEach(topologyInfoidentifier, function(value, key) { + + console.log("CompareConfigCtrl::fetchTopologyInfo::key", key); + console.log("CompareConfigCtrl::fetchTopologyInfo::value", value); + topologyIdnetifier[key] = value; + }); + } + } + + console.log("CompareConfigCtrl::vnfTopologyIdentifier::", JSON.stringify(topologyIdnetifier)); + return topologyIdnetifier; + } + + // 5th comparison for vnf request information + + $scope.fetchVnfRequestInfo = function(item) { + var vnfRequestInfo = {}; + item = JSON.parse(item.configinfo); + var item= item['vnf-list'][0]; + if (angular.isDefined(item['service-data']) && angular.isDefined(item['service-data']['vnf-request-information'])) { + var vnfRequest = item['service-data']['vnf-request-information']; + if (angular.isDefined(vnfRequest) && vnfRequest != null) { + + angular.forEach(vnfRequest, function(value, key) { + + console.log("CompareConfigCtrl::fetchVnfRequestInfo::key", key); + console.log("CompareConfigCtrl::fetchVnfRequestInfo::value", value); + vnfRequestInfo[key] = value; + }); + } + } +console.log("CompareConfigCtrl::fetchVnfRequestInfo::", JSON.stringify(vnfRequestInfo)); + return vnfRequestInfo; + } + + // 6th comparison for service info + + + $scope.fetchServiceInfo = function(item) { + var serviceInfo = {}; + item = JSON.parse(item.configinfo); + var item= item['vnf-list'][0]; + if (angular.isDefined(item['service-data']) && angular.isDefined(item['service-data']['service-information'])) { + var service= item['service-data']['service-information']; + if (angular.isDefined(service) && service != null) { + + angular.forEach(service, function(value, key) { + + console.log("CompareConfigCtrl::fetchServiceInfo::key", key); + console.log("CompareConfigCtrl::fetchServiceInfo::value", value); + serviceInfo[key] = value; + }); + } + } + console.log("CompareConfigCtrl::fetchServiceInfo::", JSON.stringify(serviceInfo)); + return serviceInfo; + } + + // 7th comparison for sdnc request header + + $scope.serviceRequestHeader = function(item) { + var requestHeader = {}; + item = JSON.parse(item.configinfo); + var item= item['vnf-list'][0]; + if (angular.isDefined(item['service-data']) && angular.isDefined(item['service-data']['sdnc-request-header'])) { + var requestHeaderInfo = item['service-data']['sdnc-request-header']; + if (angular.isDefined(requestHeaderInfo) && requestHeaderInfo != null) { + + angular.forEach(requestHeaderInfo, function(value, key) { + + console.log("CompareConfigCtrl::serviceRequestHeader::key", key); + console.log("CompareConfigCtrl::serviceRequestHeader::value", value); + requestHeader[key] = value; + }); + + } + } + console.log("CompareConfigCtrl::serviceRequestHeader::", JSON.stringify(requestHeader)); + return requestHeader; + } + + // 8th comparison for oper status + $scope.operationStatus = function(item) { + var operationStatus = {}; + item = JSON.parse(item.configinfo); + var item= item['vnf-list'][0]; + if (angular.isDefined(item['service-data']) && angular.isDefined(item['service-data']['oper-status'])) { + var operStatus = item['service-data']['oper-status']; + if (angular.isDefined(operStatus) && operStatus != null) { + + angular.forEach(operStatus, function(value, key) { + + console.log("CompareConfigCtrl::operationStatus::key", key); + console.log("CompareConfigCtrl::operationStatus::value", value); + operationStatus[key] = value; + }); + + } + } + console.log("CompareConfigCtrl::operationStatus::", JSON.stringify(operationStatus)); + return operationStatus; + } + // 9th comparison for request info + + $scope.fetchRequestInfo = function(item) { + var requestInfo = {}; + item = JSON.parse(item.configinfo); + var item= item['vnf-list'][0]; + if (angular.isDefined(item['service-data']) && angular.isDefined(item['service-data']['request-information'])) { + var request = item['service-data']['request-information']; + if (angular.isDefined(request) && request != null) { + + angular.forEach(request, function(value, key) { + + console.log("CompareConfigCtrl::fetchRequestInfo::key", key); + console.log("CompareConfigCtrl::fetchRequestInfo::value", value); + requestInfo[key] = value; + }); + + } + } + console.log("CompareConfigCtrl::fetchRequestInfo::", JSON.stringify(requestInfo)); + return requestInfo; + } + +}]); \ No newline at end of file diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/js/sdnc-controller/sdnc-validationTest-controller.js b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/js/sdnc-controller/sdnc-validationTest-controller.js new file mode 100644 index 00000000..0e80836f --- /dev/null +++ b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/js/sdnc-controller/sdnc-validationTest-controller.js @@ -0,0 +1,222 @@ +/* +* ============LICENSE_START======================================================= +* ONAP : SDNC-FEATURES +* ================================================================================ +* Copyright 2018 TechMahindra +*================================================================================= +* 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. +* ============LICENSE_END========================================================= +*/ + + +myApp.controller('TestController', ['$scope', '$http', 'growl', 'viewReportService', 'validationTestService','CERTIFICATION_API_BASE', function($scope, $http, growl, viewReportService, validationTestService,CERTIFICATION_API_BASE) { + + $scope.showTestReport = false; + + //Input data for validation test dropdown + var validationTestList = [{ + "typeId": 1, + "validationType": "Network Layer", + "Selected": false + }, + { + "typeId": 2, + "validationType": "Protocol Layer", + "Selected": false + } + ]; + + $scope.validationTestList = validationTestList; + + + $scope.getselectval = function() { + $scope.selectedvalues = 'Name: ' + $scope.selitem.validationType + ' Id: ' + $scope.selitem.typeId; + } + + $scope.showError = false; + $scope.errorMessage = ""; + $scope.showSuccess = false; + $scope.successMessage = ""; + $scope.showWarning = false; + $scope.warningMessage = ""; + $scope.showInfo = false; + $scope.infoMessage = ""; + $scope.ShowResult = false; + $scope.allowTestSelection = false; + $scope.hostNamePattern = /([a-z0-9](.[a-z0-9-]*[a-z0-9]))/; + + //Called when user clicks on runtest button + $scope.runTest = function() { + + $scope.showError = false; + $scope.vnfSelected = []; + $scope.testSelected = []; + + var message = ""; + for (var i = 0; i < $scope.validationTestList.length; i++) { + if ($scope.validationTestList[i].Selected) { + var typeId = $scope.validationTestList[i].typeId; + var validationType = $scope.validationTestList[i].validationType; + message += "typeId: " + typeId + " validationType: " + validationType + "\n"; + console.log("--TestController::Runtest--", message); + var testDetails = {}; + testDetails.typeId = typeId; + testDetails.validationType = validationType; + $scope.testSelected.push(testDetails); + } + } + console.log("--TestController::Runtest--", JSON.stringify($scope.testSelected)); + + var vnfDetails = {}; + if ($scope.IPAddress != null && $scope.HostName != null && $scope.testSelected.length >= 1) { + vnfDetails.IpAddress = $scope.IPAddress; + vnfDetails.HostName = $scope.HostName; + $scope.vnfSelected.push(vnfDetails); + console.log("--TestController::Runtest--", JSON.stringify($scope.vnfSelected)); + + //Call the validation test service with vnfselected and testType as the parameter + + validationTestService.runPretest($scope.vnfSelected, $scope.testSelected).then(function(response) { + console.log("--TestController::runTest--", JSON.stringify(response)); + + //in case of success, build the model object to store the service output here + if (response.status === 200) { + if (response.preTestResponse != null && response.preTestResponse.length >= 1) { + $scope.ShowResult = true; + $scope.createTestModel(response.preTestResponse); + $scope.showMessage(response.preTestResponse); + + } else { + console.log(response); + $scope.showError = true; + $scope.errorMessage = "Something went wrong!!!"; + growl.error($scope.errorMessage, { + title: 'Error!', + globalDisableCloseButton:false + }); + } + } else { + console.log(response); + $scope.showError = true; + $scope.errorMessage = "Something went wrong!!! Please try again later"; + growl.error($scope.errorMessage, { + title: 'Error!', + globalDisableCloseButton:false + }); + } + }, + function(response) { + console.log("--TestController--", response); + }); + } else { + $scope.showError = true; + $scope.errorMessage = "Please provide the inputs for VNF and test to be performed!!"; + growl.error($scope.errorMessage, { + title: 'Error!', + globalDisableCloseButton:false + }); + } + + }; + +$scope.showMessage=function(data){ + + var iterate = true; + if(angular.isDefined(data) && data.length>=1){ + + iterate=true; + angular.forEach(data, function(value, key){ + + if(iterate=true){ + if(value.status == "unreachable"){ + console.log("--TestController::showMessage--",value.status); + $scope.showError = true; + $scope.errorMessage = "PreTest validation Failed, Please check logs for further details!!!"; + growl.error($scope.errorMessage, { + title: 'Error!', + globalDisableCloseButton:false + }); + iterate=false; + } + } + else + { + $scope.showSuccess = true; + $scope.successMessage = "Pre test validation completed!!"; + growl.success($scope.successMessage, { + title: 'Success!', + globalDisableCloseButton:false + }); + } + + }); + + } + } + + //Function to build the UI model to be shown + $scope.createTestModel = function(result) { + + $scope.showError = false; + $scope.showWarning = false; + $scope.objPreTestModel = result; + $scope.objPreTest = []; + + + if ($scope.objPreTestModel.length >= 1) { + for (var i = 0; i < $scope.objPreTestModel.length; i++) { + var objTestReport = {}; + objTestReport.ipaddress = $scope.objPreTestModel[i].ipaddress; + objTestReport.status = $scope.objPreTestModel[i].status; + objTestReport.testtype = $scope.objPreTestModel[i].testtype; + objTestReport.statistics = $scope.objPreTestModel[i].statistics; + objTestReport.avgTime = $scope.objPreTestModel[i].avgTime; + + + if ($scope.objPreTestModel[i].testtype === "Network Layer") { + if (objTestReport.statistics != null) { + //fetching the statistics to show in progress bar + + var statistics = objTestReport.statistics; + statistics = statistics.split("%"); + objTestReport.statistics = statistics[0]; + if (objTestReport.statistics == 0) { + objTestReport.statisticPer = parseInt(objTestReport.statistics) + 50; + } else + objTestReport.statisticPer = objTestReport.statistics; + } + + //fetching the avg time to show in progress bar + + if (objTestReport.avgTime != null) { + var avgTime = objTestReport.avgTime; + avgTime = avgTime.split("="); + var Testtime = avgTime[1]; + objTestReport.avgTime = Testtime.slice(0, -2).trim(); + console.log("--TestController::createTestModel--", objTestReport.avgTime); + if (objTestReport.avgTime < 50) { + objTestReport.avgTimePer = parseInt(objTestReport.avgTime) + 10; + } else + objTestReport.avgTimePer = objTestReport.avgTime; + + } + } + $scope.objPreTest.push(objTestReport); + console.log("--TestController::createTestModel--", JSON.stringify($scope.objPreTest)); + } + } + console.log("--TestController::createTestModel::final PreTestModel--" + JSON.stringify($scope.objPreTest)); + + } + +}]); \ No newline at end of file diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/js/sdnc-controller/sdnc-viewreport-controller.js b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/js/sdnc-controller/sdnc-viewreport-controller.js new file mode 100644 index 00000000..951ac5d5 --- /dev/null +++ b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/js/sdnc-controller/sdnc-viewreport-controller.js @@ -0,0 +1,519 @@ +/* + * ============LICENSE_START======================================================= + * ONAP : SDNC-FEATURES + * ================================================================================ + * Copyright 2018 TechMahindra + *================================================================================= + * 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. + * ============LICENSE_END========================================================= + */ + +myApp.controller( + 'ReportController', + [ + '$scope', + '$http', + '$filter', + 'viewReportService', + 'growl', + function($scope, $http, $filter, viewReportService, + growl) { + $scope.isDisabled = true; + $scope.pagination = false; + $scope.selectedDevice; + $scope.ShowResult = false; + $scope.dateValidation = false; + $scope.NoSearchResult = false; + $scope.showError = false; + $scope.errorMessage = ""; + $scope.showSuccess = false; + $scope.successMessage = ""; + $scope.showWarning = false; + $scope.warningMessage = ""; + $scope.showExecutionDetails = true; + $scope.showData = false; + + $scope.gap = 2; + $scope.filteredItems = []; + $scope.groupedItems = []; + $scope.itemsPerPage = 5; + $scope.pagedItems = []; + $scope.currentPage = 0; + + // THIS FUNCTION WILL BE CALLED ON PAGE LOAD + $scope.getAllVNF = function() { + + viewReportService + .getAllVNF() + .then( + function(data) { + if (data != null) { + console.log(data); + $scope.objvnfList = data; + console + .log("ViewConfigCtrl:getAllVNF called" + + $scope.objvnfList); + } else { + $scope.warningMessage = "No VNF is eligible for configuration!!!"; + growl + .error( + $scope.warningMessage, + { + title : 'Warning!', + globalDisableCloseButton : false, + ttl : 7000, + disableCountDown : true + }); + } + }); + }; + $scope.getAllVNF(); + + $scope.selectVnf = function(selectedValueVnf) { + + if (selectedValueVnf != null + && selectedValueVnf != "") { + console.log("selectedvnf Value", + selectedValueVnf); + var vnfId = selectedValueVnf; + $scope.ShowResult = true; + + } else { + $scope.ShowResult = false; + $scope.showCompare = false; + $scope.showResult = false; + $scope.errorMessage = "Please select a VNF!!!"; + growl.error($scope.errorMessage, { + title : 'Error!', + globalDisableCloseButton : false, + ttl : 7000, + disableCountDown : true + }); + } + } + + // THIS FUNCTION WILL BE CALLED WHEN USER CLICK + // SUBMIT FROM UI + $scope.getReportsById = function(selectedValueVnf, + startdate, enddate) { + + $scope.ShowResult = true; + if (new Date(startdate) > new Date(enddate)) { + $scope.dateValidation = true; + $scope.showError = true; + $scope.errorMessage = "Start date cannot be greated than End date"; + growl.error($scope.errorMessage, { + title : 'Error!', + globalDisableCloseButton : false, + ttl : 7000, + disableCountDown : true + }); + return false; + } + var date = new Date(startdate); + if (angular.isDefined(startdate)) { + $scope.startDate = startdate; + } + if (angular.isDefined(enddate)) { + $scope.endDate = enddate; + } + + $scope.startdate1 = $filter('date')( + $scope.startDate, 'dd-MM-yyyy'); + $scope.enddate1 = $filter('date')( + $scope.endDate, 'dd-MM-yyyy'); + if (startdate != null && enddate != null) { + + // service call to fetch the reports start + // date,end date,test name + viewReportService + .getDataById(selectedValueVnf, + $scope.startdate1, + $scope.enddate1) + .then( + function(result) { + console + .log( + "-----------------------------------ReportController::getdata called from controler--", + JSON + .stringify(result.data)); + if (result.status == 200) { + if (result.data != null + && result.data.length >= 1) { + + // in case of + // success, + // build the + // model object + // to store the + // service + // output here + $scope + .createTestReportModel(result.data);// result.data.data + } else { + $scope.ShowResult = false; + $scope.showWarning = true; + $scope.warningMessage = "No result found for specified Date !!"; + growl + .warning( + $scope.warningMessage, + { + title : 'Warning!', + globalDisableCloseButton : false, + ttl : 7000, + disableCountDown : true + }); + } + } else { + $scope.ShowResult = false; + $scope.showWarning = true; + $scope.warningMessage = "No result found for specified Date !!"; + growl + .warning( + $scope.warningMessage, + { + title : 'Warning!', + globalDisableCloseButton : false, + ttl : 7000, + disableCountDown : true + }); + } + }, + function(response) { + $scope.ShowError = true; + $scope.errorMessage = "Something went wrong, Please try again !!"; + growl + .error( + $scope.errorMessage, + { + title : 'Error!', + globalDisableCloseButton : false, + ttl : 7000, + disableCountDown : true + }); + console + .log( + "--ReportController::getdata::Error--", + response); + }); + } + } + + // FUNCTION WILL BE CALLED WHEN USER CLICK DOWNLOAD + // FROM UI + $scope.exportToExcel = function(tableId) { // ex: + // '#my-table' + var exportHref = Excel.tableToExcel(tableId, + 'export'); + $timeout(function() { + location.href = exportHref; + }, 100); // trigger download + + console + .log("--ReportController::exportToexcel--"); + } + + $scope.createTestReportModel = function(result) { + + $scope.showError = false; + $scope.showWarning = false; + $scope.objTestReportModel = result; + $scope.objTestModel = []; + + if ($scope.objTestReportModel.length >= 1) { + for (var i = 0; i < $scope.objTestReportModel.length; i++) { + var objTestReport = {}; + objTestReport.vnfname = $scope.objTestReportModel[i].vnfname; + objTestReport.vnfid = $scope.objTestReportModel[i].vnfid; + objTestReport.versionNo = $scope.objTestReportModel[i].vnfversion; + objTestReport.createdAt = $scope.objTestReportModel[i].creationdate; + objTestReport.updatedAt = $scope.objTestReportModel[i].lastupdated; + objTestReport.status = $scope.objTestReportModel[i].status; + objTestReport.Id = $scope.objTestReportModel[i].id; + // objTestReport.configinfo = + // $scope.objVersionModel[i].configinfo; + $scope.objTestModel.push(objTestReport); + console + .log( + "--ReportController::CreateTestReportModel--", + JSON + .stringify($scope.objTestModel)); + + } + $scope.showresult = true; + $scope.pagination = true; + } + console + .log("--ReportController::createTestReportModel::final TestReportModel--" + + JSON + .stringify($scope.objTestModel)); + $scope.csvOrder = [ 'testname', 'timeStamp', + 'status', 'statistics', 'avgTime', + 'result' ]; + + } + + // THIS FUNCTION WILL BE CALLED WHEN USER CLICK + // SUBMIT FROM UI + $scope.getReports = function(startdate, enddate) { + + $scope.ShowResult = false; + if (new Date(startdate) > new Date(enddate)) { + $scope.dateValidation = true; + $scope.showError = true; + $scope.errorMessage = "Start date cannot be greated than End date"; + growl.error($scope.errorMessage, { + title : 'Error!', + globalDisableCloseButton : false, + ttl : 7000, + disableCountDown : true + }); + return false; + } + var date = new Date(startdate); + /* + * if (angular.isDefined(deviceName)) { + * $scope.DeviceName = deviceName; } + */ + if (angular.isDefined(startdate)) { + $scope.startDate = startdate; + } + if (angular.isDefined(enddate)) { + $scope.endDate = enddate; + } + + $scope.startdate1 = $filter('date')( + $scope.startDate, 'dd-MM-yyyy'); + $scope.enddate1 = $filter('date')( + $scope.endDate, 'dd-MM-yyyy'); + if (startdate != null && enddate != null) { + + // service call to fetch the reports start + // date,end date,test name + viewReportService + .getData($scope.startdate1, + $scope.enddate1) + .then( + function(result) { + console + .log( + "-----------------------------------ReportController::getdata called from controler--", + JSON + .stringify(result.data)); + if (result.status == 200) { + if (result.data != null + && result.data.length >= 1) { + + // in case of + // success, + // build the + // model object + // to store the + // service + // output here + $scope + .createTestReportModel(result.data);// result.data.data + } else { + $scope.ShowResult = false; + $scope.showWarning = true; + $scope.warningMessage = "No result found for specified Date !!"; + growl + .warning( + $scope.warningMessage, + { + title : 'Warning!', + globalDisableCloseButton : false, + ttl : 7000, + disableCountDown : true + }); + } + } else { + $scope.ShowResult = false; + $scope.showWarning = true; + $scope.warningMessage = "No result found for specified Date !!"; + growl + .warning( + $scope.warningMessage, + { + title : 'Warning!', + globalDisableCloseButton : false, + ttl : 7000, + disableCountDown : true + }); + } + }, + function(response) { + $scope.ShowError = true; + $scope.errorMessage = "Something went wrong, Please try again !!"; + growl + .error( + $scope.errorMessage, + { + title : 'Error!', + globalDisableCloseButton : false, + ttl : 7000, + disableCountDown : true + }); + console + .log( + "--ReportController::getdata::Error--", + response); + }); + } + } + + // FUNCTION WILL BE CALLED WHEN USER CLICK DOWNLOAD + // FROM UI + $scope.exportToExcel = function(tableId) { // ex: + // '#my-table' + var exportHref = Excel.tableToExcel(tableId, + 'export'); + $timeout(function() { + location.href = exportHref; + }, 100); // trigger download + + console + .log("--ReportController::exportToexcel--"); + } + + $scope.createTestReportModel = function(result) { + + $scope.showError = false; + $scope.showWarning = false; + $scope.objTestReportModel = result; + $scope.objTestModel = []; + + if ($scope.objTestReportModel.length >= 1) { + for (var i = 0; i < $scope.objTestReportModel.length; i++) { + var objTestReport = {}; + objTestReport.vnfname = $scope.objTestReportModel[i].vnfname; + objTestReport.vnfid = $scope.objTestReportModel[i].vnfid; + objTestReport.versionNo = $scope.objTestReportModel[i].vnfversion; + objTestReport.createdAt = $scope.objTestReportModel[i].creationdate; + objTestReport.updatedAt = $scope.objTestReportModel[i].lastupdated; + objTestReport.status = $scope.objTestReportModel[i].status; + objTestReport.Id = $scope.objTestReportModel[i].id; + // objTestReport.configinfo = + // $scope.objVersionModel[i].configinfo; + $scope.objTestModel.push(objTestReport); + console + .log( + "--ReportController::CreateTestReportModel--", + JSON + .stringify($scope.objTestModel)); + + } + $scope.showresult = true; + $scope.pagination = true; + } + console + .log("--ReportController::createTestReportModel::final TestReportModel--" + + JSON + .stringify($scope.objTestModel)); + $scope.csvOrder = [ 'testname', 'timeStamp', + 'status', 'statistics', 'avgTime', + 'result' ]; + + // init + $scope.sort = { + sortingOrder : 'createdAt', + reverse : false + }; + + var searchMatch = function(haystack, needle) { + if (!needle) { + return true; + } + return haystack.toLowerCase().indexOf( + needle.toLowerCase()) !== -1; + }; + + // init the filtered items + $scope.search = function() { + $scope.filteredItems = $filter('filter')( + $scope.objTestModel, + function(item) { + for ( var attr in item) { + if (searchMatch(item[attr], + $scope.query)) + return true; + } + return false; + }); + // take care of the sorting order + if ($scope.sort.sortingOrder !== '') { + $scope.filteredItems = $filter( + 'orderBy')( + $scope.filteredItems, + $scope.sort.sortingOrder, + $scope.sort.reverse); + } + $scope.currentPage = 0; + // now group by pages + $scope.groupToPages(); + }; + + // calculate page in place + $scope.groupToPages = function() { + $scope.pagedItems = []; + + for (var i = 0; i < $scope.filteredItems.length; i++) { + if (i % $scope.itemsPerPage === 0) { + $scope.pagedItems[Math.floor(i + / $scope.itemsPerPage)] = [ $scope.filteredItems[i] ]; + } else { + $scope.pagedItems[Math.floor(i + / $scope.itemsPerPage)] + .push($scope.filteredItems[i]); + } + } + }; + + $scope.range = function(size, start, end) { + var ret = []; + console.log(size, start, end); + + if (size < end) { + end = size; + start = size - $scope.gap; + } + for (var i = start; i < end; i++) { + ret.push(i); + } + console.log(ret); + return ret; + }; + + $scope.prevPage = function() { + if ($scope.currentPage > 0) { + $scope.currentPage--; + } + }; + + $scope.nextPage = function() { + if ($scope.currentPage < $scope.pagedItems.length - 1) { + $scope.currentPage++; + } + }; + + $scope.setPage = function() { + $scope.currentPage = this.n; + }; + + // functions have been describe process the data + // for display + $scope.search(); + + } + + } ]); \ No newline at end of file diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/js/sdnc-services/sdnc-compareConfig-service.js b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/js/sdnc-services/sdnc-compareConfig-service.js new file mode 100644 index 00000000..7b5c688e --- /dev/null +++ b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/js/sdnc-services/sdnc-compareConfig-service.js @@ -0,0 +1,166 @@ +/* + * ============LICENSE_START======================================================= + * ONAP : SDNC-FEATURES + * ================================================================================ + * Copyright 2018 TechMahindra + *================================================================================= + * 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. + * ============LICENSE_END========================================================= + */ +myApp.service('deviceConfigService', ['$http','VNF_API_BASE', function($http, VNF_API_BASE) { + + + this.getAllVNFFromRc = function() { + var rctestlist = {}; + return $http.get('/getAllBackupVnfIds') + .then(function(response) { + console.log("---validationTestService::getAllVNF From Restconf::TestResponse---" + JSON.stringify(response)); + vnflist = response.data; + return vnflist; + }, + function(response) { + console.log("validationTestService::getAllVNF From Restconf::Status Code", response.status); + return response; + }); + + }; + + + this.getAllVNF = function() { + var testlist = {}; + return $http.get('/getAllBackupVnfIds') + .then(function(response) { + console.log("---validationTestService::getAllVNF::TestResponse---" + JSON.stringify(response)); + vnflist = response.data; + return vnflist; + }, + function(response) { + console.log("validationTestService::getAllVNF::Status Code", response.status); + return response; + }); + + }; + + this.getVersions = function(vnfId) { + + var data = {}; +// data.selectedVnfName = vnfName; +// data.selectedVnfType = vnfType; + data.vnfId = vnfId; + var config = { + params: data, + headers: { + 'Accept': 'application/json' + } + }; + + console.log("deviceConfigService::getVersions::config", JSON.stringify(config)); + + var baseUrl = VNF_API_BASE; + // var baseApi='runtest'; + // var apiUrl= baseUrl + baseApi; + + // Call the pre validation service + var request = { + method: 'GET', + url: '/configDetailsById/'+vnfId, + //url: 'sdnc-stubs/getAllConfigForVNF.json', + //data: data, + + headers: { + 'Content-Type': 'application/json', + } + }; + + return $http(request) + .then(function(response) { + console.log("---deviceConfigService::getVersions::Response---" + JSON.stringify(response)); + return response; + }, + function(response) { + console.log("--deviceConfigService::getVersions::Status Code--", response.status); + return response; + }); + + + } + + this.invokeBackup = function() { + var testlist = {}; + return $http.get('/backup') + .then(function(response) { + console.log("---validationTestService::getAllVNF::TestResponse---" + response); + vnflist = response; + return vnflist; + }, + function(response) { + console.log("validationTestService::getAllVNF::Status Code", response); + return response; + }); + + }; + + this.getlastupdated = function() { + var testlist = {}; + return $http.get('/backuptime') + .then(function(response) { + console.log("---validationTestService::getBackuptime::---" + response); + return response; + }) + + }; + + this.runApplyconfig = function(vnfid, newConfig) { + + + + var url='/vnf-list/'+vnfid; + + + + var config = { + headers : { + 'Content-Type': 'application/json' + } + } + + $http.put(url, newConfig, config) + .success(function(newConfig) { + console.log("---validationTestService::getAllVNF::TestResponse---" ,response); + + return newConfig; + }, + function(newConfig) { + console.log("validationTestService::getAllVNF::Status Code", response); + return newConfig; + }); + /*.then(function (response) { + if (response.data) + { $scope.successMessage1 = "Put Data Method Executed Successfully!"; + return response; + } + var status= response.status; + if (status == 200){ + $window.alert("applyed successfully "); + } + var successMessage1 = "Put Data Method Executed Successfully!"; + }, + function (response) { + var successMessage1 = "Service not Exists"; + }); + + */ + }; + + +}]); \ No newline at end of file diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/js/sdnc-services/sdnc-validationTest-service.js b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/js/sdnc-services/sdnc-validationTest-service.js new file mode 100644 index 00000000..36c916c5 --- /dev/null +++ b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/js/sdnc-services/sdnc-validationTest-service.js @@ -0,0 +1,66 @@ +/* +* ============LICENSE_START======================================================= +* ONAP : SDNC-FEATURES +* ================================================================================ +* Copyright 2018 TechMahindra +*================================================================================= +* 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. +* ============LICENSE_END========================================================= +*/ +myApp.service('validationTestService', ['$http','CERTIFICATION_API_BASE', function($http,CERTIFICATION_API_BASE) { + + this.runPretest = function(vnfList, validationTestType) { + + + var data = {}; + data.vnfList = vnfList; + data.validationTestType = validationTestType; + + var config = { + params: data, + headers: { + 'Accept': 'application/json' + } + }; + + console.log("validationTestService::runPretest::config", JSON.stringify(config)); + + var baseUrl = CERTIFICATION_API_BASE; + var baseApi='runtest'; + var apiUrl= baseUrl + baseApi; + + // Call the pre validation service + var request = { + method: 'POST', + url: apiUrl, + data: data, + headers: { + 'Content-Type': undefined + } + }; + + // // SEND VNF FOR VALIDATION + return $http(request) + .then(function(response) { + console.log("---validationTestService::runPretest::Response---" + JSON.stringify(response)); + return response.data; + }, + function(response) { + console.log("--validationTestService::Status Code--", response.status); + return response; + }); + + + } + +}]); \ No newline at end of file diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/js/sdnc-services/sdnc-viewReport-service.js b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/js/sdnc-services/sdnc-viewReport-service.js new file mode 100644 index 00000000..82ab83aa --- /dev/null +++ b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/js/sdnc-services/sdnc-viewReport-service.js @@ -0,0 +1,101 @@ +/* +* ============LICENSE_START======================================================= +* ONAP : SDNC-FEATURES +* ================================================================================ +* Copyright 2018 TechMahindra +*================================================================================= +* 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. +* ============LICENSE_END========================================================= +*/ + +myApp.service('viewReportService', ['$http', function($http) { + +this.getAllVNF = function() { + var testlist = {}; + return $http.get('/getAllBackupVnfIds') + .then(function(response) { + console.log("---validationTestService::getAllVNF::TestResponse---" + JSON.stringify(response)); + vnflist = response.data; + return vnflist; + }, + function(response) { + console.log("validationTestService::getAllVNF::Status Code", response.status); + return response; + }); + + }; + + this.getData = function(startDate, endDate) { + + var data = {}; + if (startDate != null && endDate != null) { + + data.startdate = startDate; + data.enddate = endDate; + + } + var request = { + method: 'GET', + url: '/getVnfDetBetDates/'+startDate+'/'+endDate+'/', + + headers: { + 'Content-Type': 'application/json', + } + }; + + return $http(request) + .then(function(response) { + console.log("---deviceConfigService::getVersions::Response---" + JSON.stringify(response)); + return response; + }, + function(response) { + console.log("--deviceConfigService::getVersions::Status Code--", response.status); + return response; + }); + + } + + + this.getDataById = function(selectedValueVnf,startDate, endDate) { + + var data = {}; + if (startDate != null && endDate != null) { + + data.startdate = startDate; + data.enddate = endDate; + + } + var request = { + method: 'GET', + url: '/getVnfDetByVnfidBetDates/'+selectedValueVnf+'/'+startDate+'/'+endDate+'/', + + headers: { + 'Content-Type': 'application/json', + } + }; + + return $http(request) + .then(function(response) { + console.log("---deviceConfigService::getVersions::Response---" + JSON.stringify(response)); + return response; + }, + function(response) { + console.log("--deviceConfigService::getVersions::Status Code--", response.status); + return response; + }); + + } + + + +}]); \ No newline at end of file diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-growl-v2/build/angular-growl.css b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-growl-v2/build/angular-growl.css new file mode 100644 index 00000000..3fcd12db --- /dev/null +++ b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-growl-v2/build/angular-growl.css @@ -0,0 +1,88 @@ +/** + * angular-growl-v2 - v0.7.5 - 2015-06-17 + * http://janstevens.github.io/angular-growl-2 + * Copyright (c) 2015 Marco Rinck,Jan Stevens; Licensed MIT + */ +/* + * growl-container styles + */ +/* + * growl-item styles + */ +.growl-container > .growl-item { + padding: 10px; + padding-right: 35px; + margin-bottom: 10px; + cursor: pointer; +} + +.growl-container > button { + border: none; + outline:none; +} +.growl-container > .growl-item.ng-enter, +.growl-container > .growl-item.ng-leave { + -webkit-transition:0.5s linear all; + -moz-transition:0.5s linear all; + -o-transition:0.5s linear all; + transition:0.5s linear all; +} + +.growl-container > .growl-item.ng-enter, +.growl-container > .growl-item.ng-leave.ng-leave-active { + opacity:0; +} +.growl-container > .growl-item.ng-leave, +.growl-container > .growl-item.ng-enter.ng-enter-active { + opacity:1; +} + +.growl-container > div.growl-item { + background-position: 12px center; + background-repeat: no-repeat; +} + +/* + * growl-title styles + */ +.growl-title { + font-size: 16px; +} +.growl-item.icon > .growl-title { + margin: 0 0 0 40px; +} + +/* + * growl-message styles + */ +.growl-item.icon > .growl-message { + margin: 0 0 0 40px; +} + +/* + * growl background images + */ +.growl-container > .alert-info.icon { + /* for the white images + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUh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fm+mD7RwAAAABJRU5ErkJggg=="); +} +.growl-container > .alert-error.icon { + /* for the white images + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHOSURBVEhLrZa/SgNBEMZzh0WKCClSCKaIYOED+AAKeQQLG8HWztLCImBrYadgIdY+gIKNYkBFSwu7CAoqCgkkoGBI/E28PdbLZmeDLgzZzcx83/zZ2SSXC1j9fr+I1Hq93g2yxH4iwM1vkoBWAdxCmpzTxfkN2RcyZNaHFIkSo10+8kgxkXIURV5HGxTmFuc75B2RfQkpxHG8aAgaAFa0tAHqYFfQ7Iwe2yhODk8+J4C7yAoRTWI3w/4klGRgR4lO7Rpn9+gvMyWp+uxFh8+H+ARlgN1nJuJuQAYvNkEnwGFck18Er4q3egEc/oO+mhLdKgRyhdNFiacC0rlOCbhNVz4H9FnAYgDBvU3QIioZlJFLJtsoHYRDfiZoUyIxqCtRpVlANq0EU4dApjrtgezPFad5S19Wgjkc0hNVnuF4HjVA6C7QrSIbylB+oZe3aHgBsqlNqKYH48jXyJKMuAbiyVJ8KzaB3eRc0pg9VwQ4niFryI68qiOi3AbjwdsfnAtk0bCjTLJKr6mrD9g8iq/S/B81hguOMlQTnVyG40wAcjnmgsCNESDrjme7wfftP4P7SP4N3CJZdvzoNyGq2c/HWOXJGsvVg+RA/k2MC/wN6I2YA2Pt8GkAAAAASUVORK5CYII="); + */ + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAA7DAAAOwwHHb6hkAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852z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dZ6/riDJlKmt7brZ6dw5dOn5nsxPIyOvN2dnb2SVv17PMpGIlP/oKEgyVdnR0dXkds8c603OB8mNPJ/zggAAACtjY08Di4sP+I++XKXiSq3WD4TReMfscPhP9FfB17epKXvQ53sWXF+vKmluXhJzzAf8HQAC8i1VVpW6ogAAAABJRU5ErkJggg=="); +} +.growl-container > .alert-success.icon { + /* for the white images + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADsSURBVEhLY2AYBfQMgf///3P8+/evAIgvA/FsIF+BavYDDWMBGroaSMMBiE8VC7AZDrIFaMFnii3AZTjUgsUUWUDA8OdAH6iQbQEhw4HyGsPEcKBXBIC4ARhex4G4BsjmweU1soIFaGg/WtoFZRIZdEvIMhxkCCjXIVsATV6gFGACs4Rsw0EGgIIH3QJYJgHSARQZDrWAB+jawzgs+Q2UO49D7jnRSRGoEFRILcdmEMWGI0cm0JJ2QpYA1RDvcmzJEWhABhD/pqrL0S0CWuABKgnRki9lLseS7g2AlqwHWQSKH4oKLrILpRGhEQCw2LiRUIa4lwAAAABJRU5ErkJggg=="); + */ + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAA7DAAAOwwHHb6hkAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAIC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AAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAASZJREFUeNrs1bFKA0EQgOF/LyksrkgXi8wbpLTIFEICgnkACxGsbCzdzs5CxCZwvoGFhYUgNmJlJ2wgD6DIlSm0T382d3IkBnOX3S4DW9wsfMssszcmyzJCRkTgCH6A8Ymp1S3gFDgBxsBV0yPeBO6AgzzVBVrGI35fwouYRQFxgCcTEP8CdqOA+MAlLjUB8Y9abVoFBzBqtQWcAfvAM3DjEjfzgRcv+SJfPeAScGq14wMvDtiby3WBiVrdWRcHaIhKG+jP5WPgSFTeRSWtixcVjIC3P/Zi4AGY1MV/uyj/Sd0Chys200r4Qpuq1Wvg3BcO0Ch/TMfTV1H5BoZLZkUlfOlDU6vD/P7jdfCFCkqVpKLyAmwDHeAROHaJ+6w80TZD/7/4GQBAp3eJ4awpVwAAAABJRU5ErkJggg=="); +} +.growl-container > .alert-warning.icon { + /* for the white images + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGYSURBVEhL5ZSvTsNQFMbXZGICMYGYmJhAQIJAICYQPAACiSDB8AiICQQJT4CqQEwgJvYASAQCiZiYmJhAIBATCARJy+9rTsldd8sKu1M0+dLb057v6/lbq/2rK0mS/TRNj9cWNAKPYIJII7gIxCcQ51cvqID+GIEX8ASG4B1bK5gIZFeQfoJdEXOfgX4QAQg7kH2A65yQ87lyxb27sggkAzAuFhbbg1K2kgCkB1bVwyIR9m2L7PRPIhDUIXgGtyKw575yz3lTNs6X4JXnjV+LKM/m3MydnTbtOKIjtz6VhCBq4vSm3ncdrD2lk0VgUXSVKjVDJXJzijW1RQdsU7F77He8u68koNZTz8Oz5yGa6J3H3lZ0xYgXBK2QymlWWA+RWnYhskLBv2vmE+hBMCtbA7KX5drWyRT/2JsqZ2IvfB9Y4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3RLwISa2C4TRDu+KdOw6sNHujJGdVYHfRqvBNihCoeqj0PwPgrIcZF9jdhgCt1JBYbsPpChOgAOh+z6BiDMhZdmImRwCWeC9cM5/aBwSukkJ9CsgDex36PKbkSYd7hFRMhJY7/AtW069+b+KuwEAfk2f1A5JePkAAAAASUVORK5CYII="); +} diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-growl-v2/build/angular-growl.js b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-growl-v2/build/angular-growl.js new file mode 100644 index 00000000..2bc3e956 --- /dev/null +++ b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-growl-v2/build/angular-growl.js @@ -0,0 +1,419 @@ +/** + * angular-growl-v2 - v0.7.5 - 2015-06-17 + * http://janstevens.github.io/angular-growl-2 + * Copyright (c) 2015 Marco Rinck,Jan Stevens; Licensed MIT + */ +angular.module('angular-growl', []); +angular.module('angular-growl').directive('growl', [function () { + 'use strict'; + return { + restrict: 'A', + templateUrl: 'templates/growl/growl.html', + replace: false, + scope: { + reference: '@', + inline: '=', + limitMessages: '=' + }, + controller: [ + '$scope', + '$timeout', + 'growl', + 'growlMessages', + function ($scope, $timeout, growl, growlMessages) { + $scope.referenceId = $scope.reference || 0; + growlMessages.initDirective($scope.referenceId, $scope.limitMessages); + $scope.growlMessages = growlMessages; + $scope.inlineMessage = angular.isDefined($scope.inline) ? $scope.inline : growl.inlineMessages(); + $scope.$watch('limitMessages', function (limitMessages) { + var directive = growlMessages.directives[$scope.referenceId]; + if (!angular.isUndefined(limitMessages) && !angular.isUndefined(directive)) { + directive.limitMessages = limitMessages; + } + }); + $scope.stopTimeoutClose = function (message) { + if (!message.clickToClose) { + angular.forEach(message.promises, function (promise) { + $timeout.cancel(promise); + }); + if (message.close) { + growlMessages.deleteMessage(message); + } else { + message.close = true; + } + } + }; + $scope.alertClasses = function (message) { + return { + 'alert-success': message.severity === 'success', + 'alert-error': message.severity === 'error', + 'alert-danger': message.severity === 'error', + 'alert-info': message.severity === 'info', + 'alert-warning': message.severity === 'warning', + 'icon': message.disableIcons === false, + 'alert-dismissable': !message.disableCloseButton + }; + }; + $scope.showCountDown = function (message) { + return !message.disableCountDown && message.ttl > 0; + }; + $scope.wrapperClasses = function () { + var classes = {}; + classes['growl-fixed'] = !$scope.inlineMessage; + classes[growl.position()] = true; + return classes; + }; + $scope.computeTitle = function (message) { + var ret = { + 'success': 'Success', + 'error': 'Error', + 'info': 'Information', + 'warn': 'Warning' + }; + return ret[message.severity]; + }; + } + ] + }; + }]); +angular.module('angular-growl').run([ + '$templateCache', + function ($templateCache) { + 'use strict'; + if ($templateCache.get('templates/growl/growl.html') === undefined) { + $templateCache.put('templates/growl/growl.html', '
' + '
' + '' + '' + '

' + '
' + '
' + '
'); + } + } +]); +angular.module('angular-growl').provider('growl', function () { + 'use strict'; + var _ttl = { + success: null, + error: null, + warning: null, + info: null + }, _messagesKey = 'messages', _messageTextKey = 'text', _messageTitleKey = 'title', _messageSeverityKey = 'severity', _onlyUniqueMessages = true, _messageVariableKey = 'variables', _referenceId = 0, _inline = false, _position = 'top-right', _disableCloseButton = false, _disableIcons = false, _reverseOrder = false, _disableCountDown = false, _translateMessages = true; + this.globalTimeToLive = function (ttl) { + if (typeof ttl === 'object') { + for (var k in ttl) { + if (ttl.hasOwnProperty(k)) { + _ttl[k] = ttl[k]; + } + } + } else { + for (var severity in _ttl) { + if (_ttl.hasOwnProperty(severity)) { + _ttl[severity] = ttl; + } + } + } + return this; + }; + this.globalTranslateMessages = function (translateMessages) { + _translateMessages = translateMessages; + return this; + }; + this.globalDisableCloseButton = function (disableCloseButton) { + _disableCloseButton = disableCloseButton; + return this; + }; + this.globalDisableIcons = function (disableIcons) { + _disableIcons = disableIcons; + return this; + }; + this.globalReversedOrder = function (reverseOrder) { + _reverseOrder = reverseOrder; + return this; + }; + this.globalDisableCountDown = function (countDown) { + _disableCountDown = countDown; + return this; + }; + this.messageVariableKey = function (messageVariableKey) { + _messageVariableKey = messageVariableKey; + return this; + }; + this.globalInlineMessages = function (inline) { + _inline = inline; + return this; + }; + this.globalPosition = function (position) { + _position = position; + return this; + }; + this.messagesKey = function (messagesKey) { + _messagesKey = messagesKey; + return this; + }; + this.messageTextKey = function (messageTextKey) { + _messageTextKey = messageTextKey; + return this; + }; + this.messageTitleKey = function (messageTitleKey) { + _messageTitleKey = messageTitleKey; + return this; + }; + this.messageSeverityKey = function (messageSeverityKey) { + _messageSeverityKey = messageSeverityKey; + return this; + }; + this.onlyUniqueMessages = function (onlyUniqueMessages) { + _onlyUniqueMessages = onlyUniqueMessages; + return this; + }; + this.serverMessagesInterceptor = [ + '$q', + 'growl', + function ($q, growl) { + function checkResponse(response) { + if (response !== undefined && response.data && response.data[_messagesKey] && response.data[_messagesKey].length > 0) { + growl.addServerMessages(response.data[_messagesKey]); + } + } + return { + 'response': function (response) { + checkResponse(response); + return response; + }, + 'responseError': function (rejection) { + checkResponse(rejection); + return $q.reject(rejection); + } + }; + } + ]; + this.$get = [ + '$rootScope', + '$interpolate', + '$sce', + '$filter', + '$timeout', + 'growlMessages', + function ($rootScope, $interpolate, $sce, $filter, $timeout, growlMessages) { + var translate; + growlMessages.onlyUnique = _onlyUniqueMessages; + growlMessages.reverseOrder = _reverseOrder; + try { + translate = $filter('translate'); + } catch (e) { + } + function broadcastMessage(message) { + if (translate && message.translateMessage) { + message.text = translate(message.text, message.variables) || message.text; + message.title = translate(message.title) || message.title; + } else { + var polation = $interpolate(message.text); + message.text = polation(message.variables); + } + var addedMessage = growlMessages.addMessage(message); + $rootScope.$broadcast('growlMessage', message); + $timeout(function () { + }, 0); + return addedMessage; + } + function sendMessage(text, config, severity) { + var _config = config || {}, message; + message = { + text: text, + title: _config.title, + severity: severity, + ttl: _config.ttl || _ttl[severity], + variables: _config.variables || {}, + disableCloseButton: _config.disableCloseButton === undefined ? _disableCloseButton : _config.disableCloseButton, + disableIcons: _config.disableIcons === undefined ? _disableIcons : _config.disableIcons, + disableCountDown: _config.disableCountDown === undefined ? _disableCountDown : _config.disableCountDown, + position: _config.position || _position, + referenceId: _config.referenceId || _referenceId, + translateMessage: _config.translateMessage === undefined ? _translateMessages : _config.translateMessage, + destroy: function () { + growlMessages.deleteMessage(message); + }, + setText: function (newText) { + message.text = $sce.trustAsHtml(String(newText)); + }, + onclose: _config.onclose, + onopen: _config.onopen + }; + return broadcastMessage(message); + } + function warning(text, config) { + return sendMessage(text, config, 'warning'); + } + function error(text, config) { + return sendMessage(text, config, 'error'); + } + function info(text, config) { + return sendMessage(text, config, 'info'); + } + function success(text, config) { + return sendMessage(text, config, 'success'); + } + function general(text, config, severity) { + severity = (severity || 'error').toLowerCase(); + return sendMessage(text, config, severity); + } + function addServerMessages(messages) { + if (!messages || !messages.length) { + return; + } + var i, message, severity, length; + length = messages.length; + for (i = 0; i < length; i++) { + message = messages[i]; + if (message[_messageTextKey]) { + severity = (message[_messageSeverityKey] || 'error').toLowerCase(); + var config = {}; + config.variables = message[_messageVariableKey] || {}; + config.title = message[_messageTitleKey]; + sendMessage(message[_messageTextKey], config, severity); + } + } + } + function onlyUnique() { + return _onlyUniqueMessages; + } + function reverseOrder() { + return _reverseOrder; + } + function inlineMessages() { + return _inline; + } + function position() { + return _position; + } + return { + warning: warning, + error: error, + info: info, + success: success, + general: general, + addServerMessages: addServerMessages, + onlyUnique: onlyUnique, + reverseOrder: reverseOrder, + inlineMessages: inlineMessages, + position: position + }; + } + ]; +}); +angular.module('angular-growl').service('growlMessages', [ + '$sce', + '$timeout', + function ($sce, $timeout) { + 'use strict'; + var self = this; + this.directives = {}; + var preloadDirectives = {}; + function preLoad(referenceId) { + var directive; + if (preloadDirectives[referenceId]) { + directive = preloadDirectives[referenceId]; + } else { + directive = preloadDirectives[referenceId] = { messages: [] }; + } + return directive; + } + function directiveForRefId(referenceId) { + var refId = referenceId || 0; + return self.directives[refId] || preloadDirectives[refId]; + } + this.initDirective = function (referenceId, limitMessages) { + if (preloadDirectives[referenceId]) { + this.directives[referenceId] = preloadDirectives[referenceId]; + this.directives[referenceId].limitMessages = limitMessages; + } else { + this.directives[referenceId] = { + messages: [], + limitMessages: limitMessages + }; + } + return this.directives[referenceId]; + }; + this.getAllMessages = function (referenceId) { + referenceId = referenceId || 0; + var messages; + if (directiveForRefId(referenceId)) { + messages = directiveForRefId(referenceId).messages; + } else { + messages = []; + } + return messages; + }; + this.destroyAllMessages = function (referenceId) { + var messages = this.getAllMessages(referenceId); + for (var i = messages.length - 1; i >= 0; i--) { + messages[i].destroy(); + } + var directive = directiveForRefId(referenceId); + if (directive) { + directive.messages = []; + } + }; + this.addMessage = function (message) { + var directive, messages, found, msgText; + if (this.directives[message.referenceId]) { + directive = this.directives[message.referenceId]; + } else { + directive = preLoad(message.referenceId); + } + messages = directive.messages; + if (this.onlyUnique) { + angular.forEach(messages, function (msg) { + msgText = $sce.getTrustedHtml(msg.text); + if (message.text === msgText && message.severity === msg.severity && message.title === msg.title) { + found = true; + } + }); + if (found) { + return; + } + } + message.text = $sce.trustAsHtml(String(message.text)); + if (message.ttl && message.ttl !== -1) { + message.countdown = message.ttl / 1000; + message.promises = []; + message.close = false; + message.countdownFunction = function () { + if (message.countdown > 1) { + message.countdown--; + message.promises.push($timeout(message.countdownFunction, 1000)); + } else { + message.countdown--; + } + }; + } + if (angular.isDefined(directive.limitMessages)) { + var diff = messages.length - (directive.limitMessages - 1); + if (diff > 0) { + messages.splice(directive.limitMessages - 1, diff); + } + } + if (this.reverseOrder) { + messages.unshift(message); + } else { + messages.push(message); + } + if (typeof message.onopen === 'function') { + message.onopen(); + } + if (message.ttl && message.ttl !== -1) { + var self = this; + message.promises.push($timeout(angular.bind(this, function () { + self.deleteMessage(message); + }), message.ttl)); + message.promises.push($timeout(message.countdownFunction, 1000)); + } + return message; + }; + this.deleteMessage = function (message) { + var messages = this.getAllMessages(message.referenceId), index = messages.indexOf(message); + if (index > -1) { + messages[index].close = true; + messages.splice(index, 1); + } + if (typeof message.onclose === 'function') { + message.onclose(); + } + }; + } +]); \ No newline at end of file diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-growl-v2/build/angular-growl.min.css b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-growl-v2/build/angular-growl.min.css new file mode 100644 index 00000000..0de520b3 --- /dev/null +++ b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-growl-v2/build/angular-growl.min.css @@ -0,0 +1,7 @@ +/** + * angular-growl-v2 - v0.7.5 - 2015-06-17 + * http://janstevens.github.io/angular-growl-2 + * Copyright (c) 2015 Marco Rinck,Jan Stevens; Licensed MIT + */ + +.growl-container.growl-fixed{position:fixed;float:right;width:90%;max-width:400px;z-index:9999}.growl-container.growl-fixed.top-right{top:10px;right:15px}.growl-container.growl-fixed.bottom-right{bottom:10px;right:15px}.growl-container.growl-fixed.middle-right{top:49%;right:15px}.growl-container.growl-fixed.top-left{top:10px;left:15px}.growl-container.growl-fixed.bottom-left{bottom:10px;left:15px}.growl-container.growl-fixed.middle-left{top:49%;left:15px}.growl-container.growl-fixed.top-center{top:10px;left:50%;margin-left:-200px}.growl-container.growl-fixed.bottom-center{bottom:10px;left:50%;margin-left:-200px}.growl-container.growl-fixed.middle-center{top:49%;left:50%;margin-left:-200px}.growl-container>.growl-item{padding:10px;padding-right:35px;margin-bottom:10px;cursor:pointer}.growl-container>button{border:0;outline:0}.growl-container>.growl-item.ng-enter,.growl-container>.growl-item.ng-leave{-webkit-transition:.5s linear all;-moz-transition:.5s linear all;-o-transition:.5s linear all;transition:.5s linear all}.growl-container>.growl-item.ng-enter,.growl-container>.growl-item.ng-leave.ng-leave-active{opacity:0}.growl-container>.growl-item.ng-leave,.growl-container>.growl-item.ng-enter.ng-enter-active{opacity:1}.growl-container>div.growl-item{background-position:12px center;background-repeat:no-repeat}.growl-title{font-size:16px}.growl-item.icon>.growl-title{margin:0 0 0 40px}.growl-item.icon>.growl-message{margin:0 0 0 40px}.growl-container>.alert-info.icon{background-image:url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IyfDCruoriXvrz9+KYCuUVlC+CsbK8tvBgYGBn5ujjdP3nyUe/LmAxuyGnEBnj8+ZtoqOb42D2HmYjjDTE02+vGbD1u+fP+JUkHcffGWG4krgM2HzgZqmej1Atb6YOLGQ6anbz/ecfXhCyFi4kRGROCXs76KV0GA/V6iazQGBgaG6oXb1u+5eDvg1+8/eC0wV5e7PyMnVImkKhO5jnj7+WvD+8/fzX/++cPLysz8jZeT/d6fv/94D1+95/T9129GBgYGhhhH4wjk+ploC/CBiRsP2Zy982T95QfPRTRlxT8sK4sRRLeA4f///wgOmaBh6c45tmVT/nWs3luGbMH///+pYwGsFVI+b8sedAsAAwBDyFfm+mD7RwAAAABJRU5ErkJggg==")}.growl-container>.alert-error.icon{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAA7DAAAOwwHHb6hkAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/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FKaurqfp0pK3spx/F2T2z0nCFgaHPzBJZNokqZVSZpWJsJhFbW9LYcCJVepOFV5eUSmVFJShYJi9/eJFMMork5MFMsAAP5sbNTs7+7KxBzJMIxj4/FD6TIUhYR8viIAKMpdkwAAKNTqmJBjRCqFM52dkzdnZiR1PT2XNPX1vwvNTgIAIJHJWCGjIpMp2tLffxcAwOJyLWtqa0fFHEtR9AAgx/E9wShyA0CQhBgAVatZfgYx+M9CCSKeAcgwbFfIOB4M4scG4HgoA0DV6gUh4xTDSPjzJE1XiQGUOt3XAwCOvxAypkOhLECKZXUF1MbnDMDscPjxioq4WLvgZWAQBRDEywwAAAA3GjcEj4llG9NjNhYrE7Ilq6vDFqfTmwVQarVzQpsSkUhXZhyNakUAbzLVz7uUxwqSvJ973mkFvd7eldFReZKmjZvz8zqhqsc0mieZOb+bfhwamv21sHDlX75/vcUSuDw+fjrdTbOiVRkM99IlfhJJURS0DQ23D/WitCxOp7fUav1y1ObimpqQqb39lcFm+yLDMO4om/LW1mWLy7WcFwAAoK6svKbU69ncyMpaWs5dGBjotQ8PNxtstve5+zCNJkkYjbeO7KZ8mZ3OnQq7/WFW5SYSwFBUNwDA9+lpMrq1dZ6/riDJlKmt7brZ6dw5dOn5nsxPIyOvN2dnb2SVv17PMpGIlP/oKEgyVdnR0dXkds8c603OB8mNPJ/zggAAACtjY08Di4sP+I++XKXiSq3WD4TReMfscPhP9FfB17epKXvQ53sWXF+vKmluXhJzzAf8HQAC8i1VVpW6ogAAAABJRU5ErkJggg==")}.growl-container>.alert-success.icon{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAA7DAAAOwwHHb6hkAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXX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jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAASZJREFUeNrs1bFKA0EQgOF/LyksrkgXi8wbpLTIFEICgnkACxGsbCzdzs5CxCZwvoGFhYUgNmJlJ2wgD6DIlSm0T382d3IkBnOX3S4DW9wsfMssszcmyzJCRkTgCH6A8Ymp1S3gFDgBxsBV0yPeBO6AgzzVBVrGI35fwouYRQFxgCcTEP8CdqOA+MAlLjUB8Y9abVoFBzBqtQWcAfvAM3DjEjfzgRcv+SJfPeAScGq14wMvDtiby3WBiVrdWRcHaIhKG+jP5WPgSFTeRSWtixcVjIC3P/Zi4AGY1MV/uyj/Sd0Chys200r4Qpuq1Wvg3BcO0Ch/TMfTV1H5BoZLZkUlfOlDU6vD/P7jdfCFCkqVpKLyAmwDHeAROHaJ+6w80TZD/7/4GQBAp3eJ4awpVwAAAABJRU5ErkJggg==")}.growl-container>.alert-warning.icon{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAA7DAAAOwwHHb6hkAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEV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iUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAAdhJREFUeNrUlr9LI0EUxz9RixRXWObQwsKAdhJksAjYWlpaeBgYAyciKCh3BzrCgMRf4Fml8Abs9OD+geu0k1GInQcpziLCFXtgkWKLQCx8QtjLHqtG0AfDsu/tzJvv9/vezKaazSYvaV28JjNajRqtJl8SwR6wY7RKdzyB0WoKyAODwGLSeamEi6eBKlCTMQFkrfN/OoXgM5ABisAC0ABKSSZ2J9j9AHAEbFvnv59Wburjub6/gBnP9f08rdzUnougBFwDGw8O6/w34EREfzpFRqs8MAXMWefDSHgOGDFaTT9JZKNVD3AOXFjni/J+IOEV63xgtFoF5kXw+mMRFETYFaGlIb4C8E6+2QQC4NOjKDJa9Qr3S9b525ZQvfUpSYvAshRDYgQl4Jd1/jjiD2ThoEXwM+AHUE6UwGg1BsxKvUetISNqX4C8dHt8ghYhD63zl20WugDOok7rfA3YAvaE3lgEy0A/sBZD3RLwISa2C4TRDu+KdOw6sNHujJGdVYHfRqvBNihCoeqj0PwPgrIcZF9jdhgCt1JBYbsPpChOgAOh+z6BiDMhZdmImRwCWeC9cM5/aBwSukkJ9CsgDex36PKbkSYd7hFRMhJY7/AtW069+b+KuwEAfk2f1A5JePkAAAAASUVORK5CYII=")} \ No newline at end of file diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-growl-v2/build/angular-growl.min.js b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-growl-v2/build/angular-growl.min.js new file mode 100644 index 00000000..f2cad7ff --- /dev/null +++ b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-growl-v2/build/angular-growl.min.js @@ -0,0 +1,6 @@ +/** + * angular-growl-v2 - v0.7.5 - 2015-06-17 + * http://janstevens.github.io/angular-growl-2 + * Copyright (c) 2015 Marco Rinck,Jan Stevens; Licensed MIT + */ +angular.module("angular-growl",[]),angular.module("angular-growl").directive("growl",[function(){"use strict";return{restrict:"A",templateUrl:"templates/growl/growl.html",replace:!1,scope:{reference:"@",inline:"=",limitMessages:"="},controller:["$scope","$timeout","growl","growlMessages",function(a,b,c,d){a.referenceId=a.reference||0,d.initDirective(a.referenceId,a.limitMessages),a.growlMessages=d,a.inlineMessage=angular.isDefined(a.inline)?a.inline:c.inlineMessages(),a.$watch("limitMessages",function(b){var c=d.directives[a.referenceId];angular.isUndefined(b)||angular.isUndefined(c)||(c.limitMessages=b)}),a.stopTimeoutClose=function(a){a.clickToClose||(angular.forEach(a.promises,function(a){b.cancel(a)}),a.close?d.deleteMessage(a):a.close=!0)},a.alertClasses=function(a){return{"alert-success":"success"===a.severity,"alert-error":"error"===a.severity,"alert-danger":"error"===a.severity,"alert-info":"info"===a.severity,"alert-warning":"warning"===a.severity,icon:a.disableIcons===!1,"alert-dismissable":!a.disableCloseButton}},a.showCountDown=function(a){return!a.disableCountDown&&a.ttl>0},a.wrapperClasses=function(){var b={};return b["growl-fixed"]=!a.inlineMessage,b[c.position()]=!0,b},a.computeTitle=function(a){var b={success:"Success",error:"Error",info:"Information",warn:"Warning"};return b[a.severity]}}]}}]),angular.module("angular-growl").run(["$templateCache",function(a){"use strict";void 0===a.get("templates/growl/growl.html")&&a.put("templates/growl/growl.html",'

')}]),angular.module("angular-growl").provider("growl",function(){"use strict";var a={success:null,error:null,warning:null,info:null},b="messages",c="text",d="title",e="severity",f=!0,g="variables",h=0,i=!1,j="top-right",k=!1,l=!1,m=!1,n=!1,o=!0;this.globalTimeToLive=function(b){if("object"==typeof b)for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);else for(var d in a)a.hasOwnProperty(d)&&(a[d]=b);return this},this.globalTranslateMessages=function(a){return o=a,this},this.globalDisableCloseButton=function(a){return k=a,this},this.globalDisableIcons=function(a){return l=a,this},this.globalReversedOrder=function(a){return m=a,this},this.globalDisableCountDown=function(a){return n=a,this},this.messageVariableKey=function(a){return g=a,this},this.globalInlineMessages=function(a){return i=a,this},this.globalPosition=function(a){return j=a,this},this.messagesKey=function(a){return b=a,this},this.messageTextKey=function(a){return c=a,this},this.messageTitleKey=function(a){return d=a,this},this.messageSeverityKey=function(a){return e=a,this},this.onlyUniqueMessages=function(a){return f=a,this},this.serverMessagesInterceptor=["$q","growl",function(a,c){function d(a){void 0!==a&&a.data&&a.data[b]&&a.data[b].length>0&&c.addServerMessages(a.data[b])}return{response:function(a){return d(a),a},responseError:function(b){return d(b),a.reject(b)}}}],this.$get=["$rootScope","$interpolate","$sce","$filter","$timeout","growlMessages",function(b,p,q,r,s,t){function u(a){if(G&&a.translateMessage)a.text=G(a.text,a.variables)||a.text,a.title=G(a.title)||a.title;else{var c=p(a.text);a.text=c(a.variables)}var d=t.addMessage(a);return b.$broadcast("growlMessage",a),s(function(){},0),d}function v(b,c,d){var e,f=c||{};return e={text:b,title:f.title,severity:d,ttl:f.ttl||a[d],variables:f.variables||{},disableCloseButton:void 0===f.disableCloseButton?k:f.disableCloseButton,disableIcons:void 0===f.disableIcons?l:f.disableIcons,disableCountDown:void 0===f.disableCountDown?n:f.disableCountDown,position:f.position||j,referenceId:f.referenceId||h,translateMessage:void 0===f.translateMessage?o:f.translateMessage,destroy:function(){t.deleteMessage(e)},setText:function(a){e.text=q.trustAsHtml(String(a))},onclose:f.onclose,onopen:f.onopen},u(e)}function w(a,b){return v(a,b,"warning")}function x(a,b){return v(a,b,"error")}function y(a,b){return v(a,b,"info")}function z(a,b){return v(a,b,"success")}function A(a,b,c){return c=(c||"error").toLowerCase(),v(a,b,c)}function B(a){if(a&&a.length){var b,f,h,i;for(i=a.length,b=0;i>b;b++)if(f=a[b],f[c]){h=(f[e]||"error").toLowerCase();var j={};j.variables=f[g]||{},j.title=f[d],v(f[c],j,h)}}}function C(){return f}function D(){return m}function E(){return i}function F(){return j}var G;t.onlyUnique=f,t.reverseOrder=m;try{G=r("translate")}catch(H){}return{warning:w,error:x,info:y,success:z,general:A,addServerMessages:B,onlyUnique:C,reverseOrder:D,inlineMessages:E,position:F}}]}),angular.module("angular-growl").service("growlMessages",["$sce","$timeout",function(a,b){"use strict";function c(a){var b;return b=f[a]?f[a]:f[a]={messages:[]}}function d(a){var b=a||0;return e.directives[b]||f[b]}var e=this;this.directives={};var f={};this.initDirective=function(a,b){return f[a]?(this.directives[a]=f[a],this.directives[a].limitMessages=b):this.directives[a]={messages:[],limitMessages:b},this.directives[a]},this.getAllMessages=function(a){a=a||0;var b;return b=d(a)?d(a).messages:[]},this.destroyAllMessages=function(a){for(var b=this.getAllMessages(a),c=b.length-1;c>=0;c--)b[c].destroy();var e=d(a);e&&(e.messages=[])},this.addMessage=function(d){var e,f,g,h;if(e=this.directives[d.referenceId]?this.directives[d.referenceId]:c(d.referenceId),f=e.messages,!this.onlyUnique||(angular.forEach(f,function(b){h=a.getTrustedHtml(b.text),d.text===h&&d.severity===b.severity&&d.title===b.title&&(g=!0)}),!g)){if(d.text=a.trustAsHtml(String(d.text)),d.ttl&&-1!==d.ttl&&(d.countdown=d.ttl/1e3,d.promises=[],d.close=!1,d.countdownFunction=function(){d.countdown>1?(d.countdown--,d.promises.push(b(d.countdownFunction,1e3))):d.countdown--}),angular.isDefined(e.limitMessages)){var i=f.length-(e.limitMessages-1);i>0&&f.splice(e.limitMessages-1,i)}if(this.reverseOrder?f.unshift(d):f.push(d),"function"==typeof d.onopen&&d.onopen(),d.ttl&&-1!==d.ttl){var j=this;d.promises.push(b(angular.bind(this,function(){j.deleteMessage(d)}),d.ttl)),d.promises.push(b(d.countdownFunction,1e3))}return d}},this.deleteMessage=function(a){var b=this.getAllMessages(a.referenceId),c=b.indexOf(a);c>-1&&(b[c].close=!0,b.splice(c,1)),"function"==typeof a.onclose&&a.onclose()}}]); \ No newline at end of file diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-growl.min.css b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-growl.min.css new file mode 100644 index 00000000..4b326d1e --- /dev/null +++ b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-growl.min.css @@ -0,0 +1,7 @@ +/** + * angular-growl - v0.4.0 - 2013-11-19 + * https://github.com/marcorinck/angular-growl + * Copyright (c) 2013 Marco Rinck; Licensed MIT + */ + +.growl{position:fixed;top:10px;right:10px;float:right;width:250px}.growl-item.ng-enter,.growl-item.ng-leave{-webkit-transition:.5s linear all;-moz-transition:.5s linear all;-o-transition:.5s linear all;transition:.5s linear all}.growl-item.ng-enter,.growl-item.ng-leave.ng-leave-active{opacity:0}.growl-item.ng-leave,.growl-item.ng-enter.ng-enter-active{opacity:1} diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-growl.min.js b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-growl.min.js new file mode 100644 index 00000000..e07b22bc --- /dev/null +++ b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-growl.min.js @@ -0,0 +1,6 @@ +/** + * angular-growl - v0.4.0 - 2013-11-19 + * https://github.com/marcorinck/angular-growl + * Copyright (c) 2013 Marco Rinck; Licensed MIT + */ +angular.module("angular-growl",[]),angular.module("angular-growl").directive("growl",["$rootScope",function(a){"use strict";return{restrict:"A",template:'
',replace:!1,scope:!0,controller:["$scope","$timeout","growl",function(b,c,d){function e(a){b.messages.push(a),a.ttl&&-1!==a.ttl&&c(function(){b.deleteMessage(a)},a.ttl)}var f=d.onlyUnique();b.messages=[],a.$on("growlMessage",function(a,c){var d;f?(angular.forEach(b.messages,function(a){c.text===a.text&&c.severity===a.severity&&(d=!0)}),d||e(c)):e(c)}),b.deleteMessage=function(a){var c=b.messages.indexOf(a);c>-1&&b.messages.splice(c,1)},b.computeClasses=function(a){return{"alert-success":"success"===a.severity,"alert-error":"error"===a.severity,"alert-danger":"error"===a.severity,"alert-info":"info"===a.severity,"alert-warning":"warn"===a.severity}}}]}}]),angular.module("angular-growl").provider("growl",function(){"use strict";var a=null,b=!1,c="messages",d="text",e="severity",f=!0;this.globalTimeToLive=function(b){a=b},this.globalEnableHtml=function(a){b=a},this.messagesKey=function(a){c=a},this.messageTextKey=function(a){d=a},this.messageSeverityKey=function(a){e=a},this.onlyUniqueMessages=function(a){f=a},this.serverMessagesInterceptor=["$q","growl",function(a,b){function d(a){a.data[c]&&a.data[c].length>0&&b.addServerMessages(a.data[c])}function e(a){return d(a),a}function f(b){return d(b),a.reject(b)}return function(a){return a.then(e,f)}}],this.$get=["$rootScope","$filter",function(c,g){function h(a){p&&(a.text=p(a.text)),c.$broadcast("growlMessage",a)}function i(c,d,e){var f,g=d||{};f={text:c,severity:e,ttl:g.ttl||a,enableHtml:g.enableHtml||b},h(f)}function j(a,b){i(a,b,"warn")}function k(a,b){i(a,b,"error")}function l(a,b){i(a,b,"info")}function m(a,b){i(a,b,"success")}function n(a){var b,c,f,g;for(g=a.length,b=0;g>b;b++)if(c=a[b],c[d]&&c[e]){switch(c[e]){case"warn":f="warn";break;case"success":f="success";break;case"info":f="info";break;case"error":f="error"}i(c[d],void 0,f)}}function o(){return f}var p;try{p=g("translate")}catch(q){}return{addWarnMessage:j,addErrorMessage:k,addInfoMessage:l,addSuccessMessage:m,addServerMessages:n,onlyUnique:o}}]}); diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-object-diff/.editorconfig b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-object-diff/.editorconfig new file mode 100644 index 00000000..85653605 --- /dev/null +++ b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-object-diff/.editorconfig @@ -0,0 +1,18 @@ +# This file is for unifying the coding style for different editors and IDEs +# editorconfig.org + +root = true + +[*] +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +# Tabs in JS unless otherwise specified +[**.js] +indent_style = space +indent_size = 2 + +[*.md] +trim_trailing_whitespace = false \ No newline at end of file diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-object-diff/.gitattributes b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-object-diff/.gitattributes new file mode 100644 index 00000000..bdb0cabc --- /dev/null +++ b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-object-diff/.gitattributes @@ -0,0 +1,17 @@ +# Auto detect text files and perform LF normalization +* text=auto + +# Custom for Visual Studio +*.cs diff=csharp + +# Standard to msysgit +*.doc diff=astextplain +*.DOC diff=astextplain +*.docx diff=astextplain +*.DOCX diff=astextplain +*.dot diff=astextplain +*.DOT diff=astextplain +*.pdf diff=astextplain +*.PDF diff=astextplain +*.rtf diff=astextplain +*.RTF diff=astextplain diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-object-diff/.jscsrc b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-object-diff/.jscsrc new file mode 100644 index 00000000..e91fa415 --- /dev/null +++ b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-object-diff/.jscsrc @@ -0,0 +1,52 @@ +{ + "requireCurlyBraces": [ + "try", + "catch", + "do" + ], + "requireCamelCaseOrUpperCaseIdentifiers": "ignoreProperties", + "requireCapitalizedConstructors": true, + "validateIndentation": 2, + "validateQuoteMarks": "'", + + "disallowQuotedKeysInObjects": true, + "disallowSpaceAfterObjectKeys": true, + + "requireSpaceBeforeBinaryOperators": [ + "=", "+=", "-=", "*=", "/=", "%=", "<<=", ">>=", ">>>=", + "&=", "|=", "^=", "+=", + + "+", "-", "*", "/", "%", "<<", ">>", ">>>", "&", + "|", "^", "&&", "||", "===", "==", ">=", + "<=", "<", ">", "!=", "!==" + ], + "requireSpaceAfterBinaryOperators": true, + "requireSpacesInConditionalExpression": true, + "requireSpaceBeforeBlockStatements": true, + "requireSpacesInForStatement": true, + "requireLineFeedAtFileEnd": true, + "requireSpacesInFunctionExpression": { + "beforeOpeningCurlyBrace": true + }, + "requireDotNotation": true, + "disallowSpacesInsideArrayBrackets": "all", + "disallowSpacesInsideParentheses": true, + + + "validateJSDoc": { + "checkParamNames": true, + "requireParamTypes": true + }, + + "disallowMultipleLineBreaks": true, + "disallowNewlineBeforeBlockStatements": true, + "disallowKeywords": [ "with" ], + + "excludeFiles": [ + "bower_components/**", + "node_modules/**", + "dist/**", + "test/coverage/**", + "examples/smoothscroll.min.js" + ] +} diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-object-diff/.jshintignore b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-object-diff/.jshintignore new file mode 100644 index 00000000..997cf2dc --- /dev/null +++ b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-object-diff/.jshintignore @@ -0,0 +1,6 @@ +bower_components/ +node_modules/ +dist/ +tmp/ +examples/ + diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-object-diff/.jshintrc b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-object-diff/.jshintrc new file mode 100644 index 00000000..c569ff2f --- /dev/null +++ b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-object-diff/.jshintrc @@ -0,0 +1,19 @@ +{ + "strict" : true, // true: Requires all functions run in ES5 Strict Mode + "undef" : true, // true: Require all non-global variables to be declared (prevents global leaks) + "unused" : true, // true: Require all defined variables be used + "noempty" : true, // Prohibit use of empty blocks + "trailing" : true, // Prohibit trailing whitespaces. + "white" : false, // Check against strict whitespace and indentation rules. + "indent" : 2, // {int} Number of spaces to use for indentation + "newcap" : true, // true: Require capitalization of all constructor functions e.g. `new F()` + "quotmark" : "single", // Quotation mark consistency + "-W058" : true, // Missing '()' invoking a constructor + "browser" : true, // Standard browser globals e.g. `window`, `document`. + "predef" : [ // Custom globals. + "angular", + "G_vmlCanvasManager", + "require", + "console" + ] +} diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-object-diff/.npmignore b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-object-diff/.npmignore new file mode 100644 index 00000000..aeb776de --- /dev/null +++ b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-object-diff/.npmignore @@ -0,0 +1,4 @@ +.idea/ +node_modules/ +test/fixtures/shots/ +bower_components/ diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-object-diff/LICENSE b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-object-diff/LICENSE new file mode 100644 index 00000000..0f2fefcf --- /dev/null +++ b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-object-diff/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 Deepu k Sasidharan + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-object-diff/README.md b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-object-diff/README.md new file mode 100644 index 00000000..bc3190d1 --- /dev/null +++ b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-object-diff/README.md @@ -0,0 +1,121 @@ +# angular-diff +An Angular JS plugin to compare and show object differences in JSON format. [Demo](http://hipster-labs.github.io/angular-object-diff/) + +![Screenshot](/screenshot.png) +# Installation + +with bower +``` +bower install angular-object-diff --save +``` + +``` + + +``` + +or with npm +``` +npm i angular-object-diff +``` + +# Available methods on `ObjectDiff` service + + +`setOpenChar`: set the opening character for the view, default is `{` + +`setCloseChar`: set the closing character for the view, default is `}` + +`diff`: compare and build all the difference of two objects including prototype properties + +`diffOwnProperties`: compare and build the difference of two objects taking only its own properties into account + +`toJsonView`: format a diff object to a full JSON formatted object view + +`toJsonDiffView`: format a diff object to a JSON formatted view with only changes + +`objToJsonView`: format any javascript object to a JSON formatted view + + +# Available filters + +`toJsonView`: format a diff object to a full JSON formatted object view + +`toJsonDiffView`: format a diff object to a JSON formatted view with only changes + +`objToJsonView`: format any javascript object to a JSON formatted view + + +# Usage + +Declare the dependency +``` +angular.module('myModule', ['ds.objectDiff']); + +``` + +Inject the service + +```javascript +angular.module('myModule') + .controller('MyController', ['$scope', 'ObjectDiff', function($scope, ObjectDiff){ + $scope.yourObjectOne = {//all your object attributes and values here}; + $scope.yourObjectTwo = {//all your object attributes and values here}; + + // This is required only if you want to show a JSON formatted view of your object without using a filter + $scope.yourObjectOneJsonView = ObjectDiff.objToJsonView($scope.yourObjectOne); + $scope.yourObjectTwoJsonView = ObjectDiff.objToJsonView($scope.yourObjectTwo); + + // you can directly diff your objects js now or parse a Json to object and diff + var diff = ObjectDiff.diffOwnProperties($scope.yourObjectOne, $scope.yourObjectTwo); + + // you can directly diff your objects including prototype properties and inherited properties using `diff` method + var diffAll = ObjectDiff.diff($scope.yourObjectOne, $scope.yourObjectTwo); + + // gives a full object view with Diff highlighted + $scope.diffValue = ObjectDiff.toJsonView(diff); + + // gives object view with onlys Diff highlighted + $scope.diffValueChanges = ObjectDiff.toJsonDiffView(diff); + + }]); +``` + +Bind the variables directly in your html using the `ng-bind-html` angular directive. +Use a `
` element for better results
+
+```html
+

+

+

+

+```
+
+The same can be done with filters as well
+
+```javascript
+angular.module('myModule')
+    .controller('MyController', ['$scope', 'ObjectDiff', function($scope, ObjectDiff){
+        $scope.yourObjectOne = {//all your object attributes and values here};
+        $scope.yourObjectTwo = {//all your object attributes and values here};
+
+        // you can directly diff your objects js now or parse a Json to object and diff
+        var diff = ObjectDiff.diffOwnProperties($scope.yourObjectOne, $scope.yourObjectTwo);
+        
+        // you can directly diff your objects including prototype properties and inherited properties using `diff` method
+        var diffAll = ObjectDiff.diff($scope.yourObjectOne, $scope.yourObjectTwo);
+    
+    }]);
+```
+
+Bind the variables directly in your html using the `ng-bind-html` angular directive.
+Use a `
` element for better results
+
+```html
+

+

+

+

+```
+
+Inspired from https://github.com/NV/objectDiff.js
diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-object-diff/angular-object-diff.js b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-object-diff/angular-object-diff.js
new file mode 100644
index 00000000..08b124fc
--- /dev/null
+++ b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-object-diff/angular-object-diff.js
@@ -0,0 +1,344 @@
+(function () {
+    'use strict';
+
+    angular
+        .module('ds.objectDiff', [])
+        .factory('ObjectDiff', objectDiff)
+        .filter('toJsonView', toJsonViewFilter)
+        .filter('toJsonDiffView', toJsonDiffViewFilter)
+        .filter('objToJsonView', objToJsonViewFilter);
+
+    objectDiff.$inject = ['$sce'];
+    toJsonViewFilter.$inject = ['ObjectDiff'];
+    toJsonDiffViewFilter.$inject = ['ObjectDiff'];
+    objToJsonViewFilter.$inject = ['ObjectDiff'];
+
+    /* service implementation */
+    function objectDiff($sce) {
+
+        var openChar = '{',
+            closeChar = '}',
+            service = {
+                setOpenChar: setOpenChar,
+                setCloseChar: setCloseChar,
+                diff: diff,
+                diffOwnProperties: diffOwnProperties,
+                toJsonView: formatToJsonXMLString,
+                objToJsonView: formatObjToJsonXMLString,
+                toJsonDiffView: formatChangesToXMLString
+            };
+
+        return service;
+
+
+        /* service methods */
+
+        /**
+         * @param char
+         */
+        function setOpenChar(char) {
+            openChar = char;
+        }
+
+        /**
+         * @param char
+         */
+        function setCloseChar(char) {
+            closeChar = char;
+        }
+
+        /**
+         * diff between object a and b
+         * @param {Object} a
+         * @param {Object} b
+         * @param shallow
+         * @param isOwn
+         * @return {Object}
+         */
+        function diff(a, b, shallow, isOwn) {
+
+            if (a === b) {
+                return equalObj(a);
+            }
+
+            var diffValue = {};
+            var equal = true;
+
+            for (var key in a) {
+                if ((!isOwn && key in b) || (isOwn && typeof b != 'undefined' && b.hasOwnProperty(key))) {
+                    if (a[key] === b[key]) {
+                        diffValue[key] = equalObj(a[key]);
+                    } else {
+                        if (!shallow && isValidAttr(a[key], b[key])) {
+                            var valueDiff = diff(a[key], b[key], shallow, isOwn);
+                            if (valueDiff.changed == 'equal') {
+                                diffValue[key] = equalObj(a[key]);
+                            } else {
+                                equal = false;
+                                diffValue[key] = valueDiff;
+                            }
+                        } else {
+                            equal = false;
+                            diffValue[key] = {
+                                changed: 'primitive change',
+                                removed: a[key],
+                                added: b[key]
+                            }
+                        }
+                    }
+                } else {
+                    equal = false;
+                    diffValue[key] = {
+                        changed: 'removed',
+                        value: a[key]
+                    }
+                }
+            }
+
+            for (key in b) {
+                if ((!isOwn && !(key in a)) || (isOwn && typeof a != 'undefined' && !a.hasOwnProperty(key))) {
+                    equal = false;
+                    diffValue[key] = {
+                        changed: 'added',
+                        value: b[key]
+                    }
+                }
+            }
+
+            if (equal) {
+                return equalObj(a);
+            } else {
+                return {
+                    changed: 'object change',
+                    value: diffValue
+                }
+            }
+        }
+
+
+        /**
+         * diff between object a and b own properties only
+         * @param {Object} a
+         * @param {Object} b
+         * @return {Object}
+         * @param deep
+         */
+        function diffOwnProperties(a, b, shallow) {
+            return diff(a, b, shallow, true);
+        }
+
+        /**
+         * Convert to a readable xml/html Json structure
+         * @param {Object} changes
+         * @return {string}
+         * @param shallow
+         */
+        function formatToJsonXMLString(changes, shallow) {
+            var properties = [];
+
+            var diff = changes.value;
+            if (changes.changed == 'equal') {
+                return $sce.trustAsHtml(inspect(diff, shallow));
+            }
+
+            for (var key in diff) {
+                properties.push(formatChange(key, diff[key], shallow));
+            }
+
+            return $sce.trustAsHtml('' + openChar + '\n
' + properties.join(',\n') + '\n
' + closeChar + ''); + + } + + /** + * Convert to a readable xml/html Json structure + * @return {string} + * @param obj + * @param shallow + */ + function formatObjToJsonXMLString(obj, shallow) { + return $sce.trustAsHtml(inspect(obj, shallow)); + } + + /** + * Convert to a readable xml/html Json structure + * @param {Object} changes + * @return {string} + * @param shallow + */ + function formatChangesToXMLString(changes, shallow) { + var properties = []; + + if (changes.changed == 'equal') { + return ''; + } + + var diff = changes.value; + + for (var key in diff) { + var changed = diff[key].changed; + if (changed !== 'equal') + properties.push(formatChange(key, diff[key], shallow, true)); + } + + return $sce.trustAsHtml('' + openChar + '\n
' + properties.join(',\n') + '\n
' + closeChar + ''); + + } + + /** + * @param obj + * @returns {{changed: string, value: *}} + */ + function equalObj(obj) { + return { + changed: 'equal', + value: obj + } + } + + /** + * @param a + * @param b + * @returns {*|boolean} + */ + function isValidAttr(a, b) { + var typeA = typeof a; + var typeB = typeof b; + return (a && b && (typeA == 'object' || typeA == 'function') && (typeB == 'object' || typeB == 'function')); + } + + /** + * @param key + * @param diffItem + * @returns {*} + * @param shallow + * @param diffOnly + */ + function formatChange(key, diffItem, shallow, diffOnly) { + var changed = diffItem.changed; + var property; + switch (changed) { + case 'equal': + property = (stringifyObjectKey(escapeHTML(key)) + ': ' + inspect(diffItem.value)); + break; + + case 'removed': + property = ('' + stringifyObjectKey(escapeHTML(key)) + ': ' + inspect(diffItem.value) + ''); + break; + + case 'added': + property = ('' + stringifyObjectKey(escapeHTML(key)) + ': ' + inspect(diffItem.value) + ''); + break; + + case 'primitive change': + var prefix = stringifyObjectKey(escapeHTML(key)) + ': '; + property = ( + '' + prefix + inspect(diffItem.removed) + ',\n' + + '' + prefix + inspect(diffItem.added) + ''); + break; + + case 'object change': + property = shallow ? '' : (stringifyObjectKey(key) + ': ' + ( diffOnly ? formatChangesToXMLString(diffItem) : formatToJsonXMLString(diffItem))); + break; + } + + return property; + } + + /** + * @param {string} key + * @return {string} + */ + function stringifyObjectKey(key) { + return /^[a-z0-9_$]*$/i.test(key) ? + key : + JSON.stringify(key); + } + + /** + * @param {string} string + * @return {string} + */ + function escapeHTML(string) { + return string.replace(/&/g, '&').replace(//g, '>'); + } + + /** + * @param {Object} obj + * @return {string} + * @param shallow + */ + function inspect(obj, shallow) { + + return _inspect('', obj, shallow); + + /** + * @param {string} accumulator + * @param {object} obj + * @see http://jsperf.com/continuation-passing-style/3 + * @return {string} + * @param shallow + */ + function _inspect(accumulator, obj, shallow) { + switch (typeof obj) { + case 'object': + if (!obj) { + accumulator += 'null'; + break; + } + if (shallow) { + accumulator += '[object]'; + break; + } + var keys = Object.keys(obj); + var length = keys.length; + if (length === 0) { + accumulator += '' + openChar + closeChar + ''; + } else { + accumulator += '' + openChar + '\n
'; + for (var i = 0; i < length; i++) { + var key = keys[i]; + accumulator = _inspect(accumulator + stringifyObjectKey(escapeHTML(key)) + ': ', obj[key]); + if (i < length - 1) { + accumulator += ',\n'; + } + } + accumulator += '\n
' + closeChar + '' + } + break; + + case 'string': + accumulator += JSON.stringify(escapeHTML(obj)); + break; + + case 'undefined': + accumulator += 'undefined'; + break; + + default: + accumulator += escapeHTML(String(obj)); + break; + } + return accumulator; + } + } + } + + /* filter implementation */ + function toJsonViewFilter(ObjectDiff) { + return function (value) { + return ObjectDiff.toJsonView(value); + }; + } + + function toJsonDiffViewFilter(ObjectDiff) { + return function (value) { + return ObjectDiff.toJsonDiffView(value); + }; + } + + function objToJsonViewFilter(ObjectDiff) { + return function (value) { + return ObjectDiff.objToJsonView(value); + }; + } +})(); diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-object-diff/angular-object-diff.less b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-object-diff/angular-object-diff.less new file mode 100644 index 00000000..08115548 --- /dev/null +++ b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-object-diff/angular-object-diff.less @@ -0,0 +1,42 @@ +.diff { + display: inline-block; +} +.diff-level { + margin-left: 1.6em; +} +.diff-holder { + color: #666; + margin: 0; +} +.diff-holder span { + color: #AAA; +} +del.diff { + text-decoration: none; + color: #b30000; + background: #fadad7; +} +ins.diff { + background: #eaf2c2; + color: #406619; + text-decoration: none; +} +del.diff-key { + border: 1px solid #f8a4a4; +} +ins.diff-key { + border: 1px solid #a3ce4c; + margin-top: -1px; + position: relative; +} +ins.diff span { + color: #AABF40; +} +del.diff span { + color: #EE8177; +} +.audit-obj { + max-height: 300px; + max-width: 300px; + overflow: auto; +} diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-object-diff/bower.json b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-object-diff/bower.json new file mode 100644 index 00000000..7602502a --- /dev/null +++ b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-object-diff/bower.json @@ -0,0 +1,50 @@ +{ + "name": "angular-object-diff", + "version": "1.0.3", + "main": [ + "./dist/angular-object-diff.js", + "./dist/angular-object-diff.css" + ], + "authors": [ + "Deepu K Sasidharan " + ], + "repository": { + "type": "git", + "url": "git://github.com/hipster-labs/angular-object-diff.git" + }, + "description": "An Angular JS plugin to compare and show object differences.", + "moduleType": [ + "globals" + ], + "keywords": [ + "angular", + "angular.js", + "object", + "diff", + "json", + "json-diff", + "object-diff", + "compare" + ], + "license": "MIT", + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "test", + "tests" + ], + "dependencies": { + "angular": "1.x" + }, + "devDependencies": { + "angular-bootstrap": "~0.11.0", + "font-awesome": "~4.1.0", + "rainbow": "~1.1.9", + "angular-mocks": "~1.3.10" + }, + "resolutions": { + "angular": "1.x", + "angular-mocks": "1.3.10" + } +} diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-object-diff/demo.js b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-object-diff/demo.js new file mode 100644 index 00000000..3613fcca --- /dev/null +++ b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-object-diff/demo.js @@ -0,0 +1,68 @@ +// Angular JS code +(function () { + 'use-strict'; + + angular.module('demoApp', ['ds.objectDiff']) + .config([ + '$interpolateProvider', + function ($interpolateProvider) { + return $interpolateProvider.startSymbol('{(').endSymbol(')}'); + } + ]) + .controller('DemoController', DemoController); + + DemoController.$inject = ['$scope', 'ObjectDiff']; + + function DemoController($scope, ObjectDiff) { + $scope.objectOne = "{\n" + + " a: {\n" + + " b: 1,\n" + + " c: [1, 2]\n" + + " },\n" + + " \"2b\": {\n" + + " foo: 'bar'\n" + + " }\n" + + " }"; + $scope.objectTwo = "{\n" + + " a: { \n" + + " b: 2,\n" + + " c: [1, 2, 3]\n" + + " },\n" + + " x: 1\n" + + " }"; + + + function makeDiff() { + var objectOne, objectTwo, diff; + try { + $scope.errorA = false; + objectOne = eval('(' + $scope.objectOne + ')'); //JSON.parse($scope.objectOne); + } catch (err) { + $scope.errorA = true; + } + try { + $scope.errorB = false; + objectTwo = eval('(' + $scope.objectTwo + ')'); //JSON.parse($scope.objectTwo); + } catch (err) { + $scope.errorB = true; + } + + // you can directly diff your objects if they are not string + diff = ObjectDiff.diffOwnProperties(objectOne, objectTwo); + + $scope.diffValue = ObjectDiff.toJsonView(diff); + $scope.diffValueChanges = ObjectDiff.toJsonDiffView(diff); + + $scope.yourObjectOne = objectOne; + $scope.yourObjectTwo = objectTwo; + } + + $scope.$watch('objectOne', function (newValue, oldValue) { + makeDiff(); + }); + $scope.$watch('objectTwo', function (newValue, oldValue) { + makeDiff(); + }); + } + +})(); diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-object-diff/gulpfile.js b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-object-diff/gulpfile.js new file mode 100644 index 00000000..78fdc574 --- /dev/null +++ b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-object-diff/gulpfile.js @@ -0,0 +1,169 @@ +(function () { + 'use strict'; + + var gulp = require('gulp'); + var less = require('gulp-less'); + var sourcemaps = require('gulp-sourcemaps'); + var uglify = require('gulp-uglify'); + var csso = require('gulp-csso'); + var jshint = require('gulp-jshint'); + var stylish = require('jshint-stylish'); + var jscs = require('gulp-jscs'); + var mocha = require('gulp-spawn-mocha'); + var mochaPhantomJS = require('gulp-mocha-phantomjs'); + var tar = require('gulp-tar'); + var gzip = require('gulp-gzip'); + var bumper = require('gulp-bump'); + var git = require('gulp-git'); + var shell = require('gulp-shell'); + var rename = require('gulp-rename'); + var fs = require('fs'); + var sequence = require('gulp-sequence'); + + gulp.task('less', function () { + return gulp.src('./*.less') + .pipe(sourcemaps.init()) + .pipe(less()) + .pipe(csso()) + .pipe(sourcemaps.write('./')) + .pipe(gulp.dest('./dist')); + }); + + gulp.task('lint', function () { + return gulp.src('**/*.js') + .pipe(jshint()) + .pipe(jshint.reporter(stylish)); + }); + + /* gulp.task('style', function() { + return gulp.src('**/ + /*.js') + .pipe(jscs()); + });*/ + + gulp.task('unit', function () { + return gulp + .src('test/index.html') + .pipe(mochaPhantomJS()); + }); + + gulp.task('bump-patch', bump('patch')); + gulp.task('bump-minor', bump('minor')); + gulp.task('bump-major', bump('major')); + + gulp.task('bower', function () { + return gulp.src('./angular-object-diff.js') + .pipe(gulp.dest('./dist')); + }); + + gulp.task('js', ['lint' /*, 'style'*/ , 'bower'], function () { + return gulp.src('./angular-object-diff.js') + .pipe(rename('angular-object-diff.min.js')) + .pipe(sourcemaps.init()) + .pipe(uglify()) + .pipe(sourcemaps.write('./')) + .pipe(gulp.dest('./dist')); + }); + + gulp.task('build', function () { + return gulp.src(['dist/*', '!./dist/*.tar.gz']) + .pipe(tar('angular-object-diff.js.tar')) + .pipe(gzip({ + gzipOptions: { + level: 9 + } + })) + .pipe(gulp.dest('dist/')); + }); + + gulp.task('update', function (cb) { + fs.readFile('./examples/index.template.html', 'utf8', function (err, file) { + if (err) return cb(err); + file = file.replace('', version()); + fs.writeFile('./examples/index.html', file, cb); + }); + }); + + gulp.task('git-commit', function () { + var v = 'update to version ' + version(); + gulp.src(['./dist/*', './examples/*', './test/*', './package.json', './bower.json', './angular-object-diff.js', './angular-object-diff.less']) + .pipe(git.add()) + .pipe(git.commit(v)); + }); + + gulp.task('git-push', function (cb) { + var v = 'v' + version(); + git.push('origin', 'master', function (err) { + if (err) return cb(err); + git.tag(v, v, function (err) { + if (err) return cb(err); + git.push('origin', 'master', { + args: '--tags' + }, function(err){ + if (err) return cb(err); + git.checkout('gh-pages', function (err) { + if (err) return cb(err); + git.reset('master', { + args: '--hard' + }, function (err) { + if (err) return cb(err); + git.push('origin', 'gh-pages', function (err) { + if (err) return cb(err); + git.checkout('master', cb); + }); + }); + }); + }); + }); + }); + }); + + gulp.task('git-demo', function (cb) { + var v = 'v' + version(); + git.checkout('gh-pages', function (err) { + if (err) return cb(err); + git.reset('master', { + args: '--hard' + }, function (err) { + if (err) return cb(err); + git.push('origin', 'gh-pages', function (err) { + if (err) return cb(err); + git.checkout('master', cb); + }); + }); + }); + }); + + gulp.task('npm', shell.task([ + 'npm publish' + ])); + + gulp.task('watch', function () { + gulp.watch('./*.js', ['js']); + gulp.watch('./*.less', ['less']); + return true; + }); + + function bump(level) { + return function () { + return gulp.src(['./package.json', './bower.json']) + .pipe(bumper({ + type: level + })) + .pipe(gulp.dest('./')); + }; + } + + function version() { + return JSON.parse(fs.readFileSync('package.json', 'utf8')).version; + } + + gulp.task('default', sequence('check', ['less', 'js'], 'build')); + gulp.task('test', sequence('unit' /*, 'integration'*/ )); + gulp.task('check', sequence(['lint' /*, 'style'*/ ], 'test')); + gulp.task('publish', sequence(['git-commit', 'git-push', 'npm'])); + gulp.task('deploy-patch', sequence('default', 'bump-patch', /*'update',*/ 'publish')); + gulp.task('deploy-minor', sequence('default', 'bump-minor', /*'update',*/ 'publish')); + gulp.task('deploy-major', sequence('default', 'bump-major', /*'update',*/ 'publish')); + +})(); diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-object-diff/index.html b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-object-diff/index.html new file mode 100644 index 00000000..986a8b23 --- /dev/null +++ b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-object-diff/index.html @@ -0,0 +1,95 @@ + + + + + + + + + + + + + Angular Object Diff Demo + + + + + + + + + + + + +
+ + +
+
+
+ + +
+
+ + +
+
+ +

+                
+
+
+
+ +

+                
+
+ +

+                
+
+ +

+                
+
+
+ +
+ + + + + + + + + diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-object-diff/package.json b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-object-diff/package.json new file mode 100644 index 00000000..ea694e00 --- /dev/null +++ b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-object-diff/package.json @@ -0,0 +1,84 @@ +{ + "_from": "angular-object-diff", + "_id": "angular-object-diff@1.0.3", + "_inBundle": false, + "_integrity": "sha1-zUu3X+n/Extw08NCzUxhBFFtXF8=", + "_location": "/angular-object-diff", + "_phantomChildren": {}, + "_requested": { + "type": "tag", + "registry": true, + "raw": "angular-object-diff", + "name": "angular-object-diff", + "escapedName": "angular-object-diff", + "rawSpec": "", + "saveSpec": null, + "fetchSpec": "latest" + }, + "_requiredBy": [ + "#USER", + "/" + ], + "_resolved": "https://registry.npmjs.org/angular-object-diff/-/angular-object-diff-1.0.3.tgz", + "_shasum": "cd4bb75fe9ff131b70d3c342cd4c6104516d5c5f", + "_spec": "angular-object-diff", + "_where": "D:\\SDNC_UI\\app\\node_modules", + "author": { + "name": "Deepu K Sasidharan", + "email": "d4udts@gmail.com" + }, + "bugs": { + "url": "https://github.com/hipster-labs/angular-object-diff/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "An Angular JS plugin to compare and show object differences.", + "devDependencies": { + "chai": "^1.10.0", + "chai-string": "^1.1.1", + "cp": "^0.2.0", + "gm": "^1.17.0", + "gulp": "^3.8.6", + "gulp-bump": "^0.1.11", + "gulp-csso": "^0.2.9", + "gulp-git": "^0.5.6", + "gulp-gzip": "0.0.8", + "gulp-jscs": "^1.4.0", + "gulp-jshint": "^1.9.2", + "gulp-less": "^1.3.1", + "gulp-mocha-phantomjs": "^0.6.1", + "gulp-rename": "^1.2.0", + "gulp-sequence": "^0.3.1", + "gulp-shell": "^0.2.11", + "gulp-sourcemaps": "^1.0.0", + "gulp-spawn-mocha": "^2.0.1", + "gulp-tar": "^0.5.0", + "gulp-uglify": "^0.3.1", + "imgur-node-api": "^0.1.0", + "jshint-stylish": "^1.0.0", + "less": "^1.7.3", + "mkdirp": "^0.5.0", + "mocha": "^2.1.0", + "mocha-phantomjs": "^3.5.3", + "sinon": "^1.12.2", + "sinon-chai": "^2.7.0", + "testatic": "^0.1.0", + "tmp-sync": "github:jtblin/node-tmp-sync", + "webshot": "^0.15.3" + }, + "directories": { + "example": "examples" + }, + "homepage": "https://github.com/hipster-labs/angular-object-diff#readme", + "license": "MIT", + "main": "angular-object-diff.js", + "name": "angular-object-diff", + "repository": { + "type": "git", + "url": "git://github.com/hipster-labs/angular-object-diff.git" + }, + "scripts": { + "test": "gulp check" + }, + "version": "1.0.3" +} diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-object-diff/screenshot.png b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-object-diff/screenshot.png new file mode 100644 index 00000000..938110db Binary files /dev/null and b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-object-diff/screenshot.png differ diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-route.min.js b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-route.min.js new file mode 100644 index 00000000..a30b8ab9 --- /dev/null +++ b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-route.min.js @@ -0,0 +1,15 @@ +/* + AngularJS v1.3.14 + (c) 2010-2014 Google, Inc. http://angularjs.org + License: MIT +*/ +(function(q,d,C){'use strict';function v(r,k,h){return{restrict:"ECA",terminal:!0,priority:400,transclude:"element",link:function(a,f,b,c,y){function z(){l&&(h.cancel(l),l=null);m&&(m.$destroy(),m=null);n&&(l=h.leave(n),l.then(function(){l=null}),n=null)}function x(){var b=r.current&&r.current.locals;if(d.isDefined(b&&b.$template)){var b=a.$new(),c=r.current;n=y(b,function(b){h.enter(b,null,n||f).then(function(){!d.isDefined(t)||t&&!a.$eval(t)||k()});z()});m=c.scope=b;m.$emit("$viewContentLoaded"); +m.$eval(w)}else z()}var m,n,l,t=b.autoscroll,w=b.onload||"";a.$on("$routeChangeSuccess",x);x()}}}function A(d,k,h){return{restrict:"ECA",priority:-400,link:function(a,f){var b=h.current,c=b.locals;f.html(c.$template);var y=d(f.contents());b.controller&&(c.$scope=a,c=k(b.controller,c),b.controllerAs&&(a[b.controllerAs]=c),f.data("$ngControllerController",c),f.children().data("$ngControllerController",c));y(a)}}}q=d.module("ngRoute",["ng"]).provider("$route",function(){function r(a,f){return d.extend(Object.create(a), +f)}function k(a,d){var b=d.caseInsensitiveMatch,c={originalPath:a,regexp:a},h=c.keys=[];a=a.replace(/([().])/g,"\\$1").replace(/(\/)?:(\w+)([\?\*])?/g,function(a,d,b,c){a="?"===c?c:null;c="*"===c?c:null;h.push({name:b,optional:!!a});d=d||"";return""+(a?"":d)+"(?:"+(a?d:"")+(c&&"(.+?)"||"([^/]+)")+(a||"")+")"+(a||"")}).replace(/([\/$\*])/g,"\\$1");c.regexp=new RegExp("^"+a+"$",b?"i":"");return c}var h={};this.when=function(a,f){var b=d.copy(f);d.isUndefined(b.reloadOnSearch)&&(b.reloadOnSearch=!0); +d.isUndefined(b.caseInsensitiveMatch)&&(b.caseInsensitiveMatch=this.caseInsensitiveMatch);h[a]=d.extend(b,a&&k(a,b));if(a){var c="/"==a[a.length-1]?a.substr(0,a.length-1):a+"/";h[c]=d.extend({redirectTo:a},k(c,b))}return this};this.caseInsensitiveMatch=!1;this.otherwise=function(a){"string"===typeof a&&(a={redirectTo:a});this.when(null,a);return this};this.$get=["$rootScope","$location","$routeParams","$q","$injector","$templateRequest","$sce",function(a,f,b,c,k,q,x){function m(b){var e=s.current; +(v=(p=l())&&e&&p.$$route===e.$$route&&d.equals(p.pathParams,e.pathParams)&&!p.reloadOnSearch&&!w)||!e&&!p||a.$broadcast("$routeChangeStart",p,e).defaultPrevented&&b&&b.preventDefault()}function n(){var u=s.current,e=p;if(v)u.params=e.params,d.copy(u.params,b),a.$broadcast("$routeUpdate",u);else if(e||u)w=!1,(s.current=e)&&e.redirectTo&&(d.isString(e.redirectTo)?f.path(t(e.redirectTo,e.params)).search(e.params).replace():f.url(e.redirectTo(e.pathParams,f.path(),f.search())).replace()),c.when(e).then(function(){if(e){var a= +d.extend({},e.resolve),b,g;d.forEach(a,function(b,e){a[e]=d.isString(b)?k.get(b):k.invoke(b,null,null,e)});d.isDefined(b=e.template)?d.isFunction(b)&&(b=b(e.params)):d.isDefined(g=e.templateUrl)&&(d.isFunction(g)&&(g=g(e.params)),g=x.getTrustedResourceUrl(g),d.isDefined(g)&&(e.loadedTemplateUrl=g,b=q(g)));d.isDefined(b)&&(a.$template=b);return c.all(a)}}).then(function(c){e==s.current&&(e&&(e.locals=c,d.copy(e.params,b)),a.$broadcast("$routeChangeSuccess",e,u))},function(b){e==s.current&&a.$broadcast("$routeChangeError", +e,u,b)})}function l(){var a,b;d.forEach(h,function(c,h){var g;if(g=!b){var k=f.path();g=c.keys;var m={};if(c.regexp)if(k=c.regexp.exec(k)){for(var l=1,n=k.length;l=c;d--)e.end&&e.end(f[d]);f.length=c}}"string"!==typeof a&&(a=null===a||"undefined"===typeof a?"":""+a);var b,k,f=[],m=a,l;for(f.last=function(){return f[f.length-1]};a;){l="";k=!0;if(f.last()&&w[f.last()])a=a.replace(new RegExp("([\\W\\w]*)<\\s*\\/\\s*"+f.last()+"[^>]*>","i"),function(a,b){b=b.replace(H,"$1").replace(I,"$1");e.chars&&e.chars(q(b));return""}),c("",f.last());else{if(0===a.indexOf("\x3c!--"))b=a.indexOf("--",4),0<=b&&a.lastIndexOf("--\x3e",b)===b&&(e.comment&& +e.comment(a.substring(4,b)),a=a.substring(b+3),k=!1);else if(x.test(a)){if(b=a.match(x))a=a.replace(b[0],""),k=!1}else if(J.test(a)){if(b=a.match(y))a=a.substring(b[0].length),b[0].replace(y,c),k=!1}else K.test(a)&&((b=a.match(z))?(b[4]&&(a=a.substring(b[0].length),b[0].replace(z,d)),k=!1):(l+="<",a=a.substring(1)));k&&(b=a.indexOf("<"),l+=0>b?a:a.substring(0,b),a=0>b?"":a.substring(b),e.chars&&e.chars(q(l)))}if(a==m)throw L("badparse",a);m=a}c()}function q(a){if(!a)return"";A.innerHTML=a.replace(//g,">")}function r(a,e){var d=!1,c=h.bind(a,a.push);return{start:function(a,k,f){a=h.lowercase(a);!d&&w[a]&&(d=a);d||!0!==C[a]||(c("<"),c(a),h.forEach(k,function(d,f){var k=h.lowercase(f),g="img"===a&&"src"===k||"background"=== +k;!0!==O[k]||!0===D[k]&&!e(d,g)||(c(" "),c(f),c('="'),c(B(d)),c('"'))}),c(f?"/>":">"))},end:function(a){a=h.lowercase(a);d||!0!==C[a]||(c(""));a==d&&(d=!1)},chars:function(a){d||c(B(a))}}}var L=h.$$minErr("$sanitize"),z=/^<((?:[a-zA-Z])[\w:-]*)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*(>?)/,y=/^<\/\s*([\w:-]+)[^>]*>/,G=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,K=/^]*?)>/i, +I=/"\u201d\u2019]/,d=/^mailto:/;return function(c,b){function k(a){a&&g.push(E(a))}function f(a,c){g.push("');k(c);g.push("")}if(!c)return c;for(var m,l=c,g=[],n,p;m=l.match(e);)n=m[0],m[2]||m[4]||(n=(m[3]?"http://":"mailto:")+n),p=m.index,k(l.substr(0,p)),f(n,m[0].replace(d,"")),l=l.substring(p+m[0].length);k(l);return a(g.join(""))}}])})(window,window.angular); +//# sourceMappingURL=angular-sanitize.min.js.map \ No newline at end of file diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-utils-pagination/dirPagination.js b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-utils-pagination/dirPagination.js new file mode 100644 index 00000000..a1a72652 --- /dev/null +++ b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular-utils-pagination/dirPagination.js @@ -0,0 +1,639 @@ +/** + * dirPagination - AngularJS module for paginating (almost) anything. + * + * + * Credits + * ======= + * + * Daniel Tabuenca: https://groups.google.com/d/msg/angular/an9QpzqIYiM/r8v-3W1X5vcJ + * for the idea on how to dynamically invoke the ng-repeat directive. + * + * I borrowed a couple of lines and a few attribute names from the AngularUI Bootstrap project: + * https://github.com/angular-ui/bootstrap/blob/master/src/pagination/pagination.js + * + * Copyright 2014 Michael Bromley + */ + +(function() { + + /** + * Config + */ + var moduleName = 'angularUtils.directives.dirPagination'; + var DEFAULT_ID = '__default'; + + /** + * Module + */ + angular.module(moduleName, []) + .directive('dirPaginate', ['$compile', '$parse', 'paginationService', dirPaginateDirective]) + .directive('dirPaginateNoCompile', noCompileDirective) + .directive('dirPaginationControls', ['paginationService', 'paginationTemplate', dirPaginationControlsDirective]) + .filter('itemsPerPage', ['paginationService', itemsPerPageFilter]) + .service('paginationService', paginationService) + .provider('paginationTemplate', paginationTemplateProvider) + .run(['$templateCache',dirPaginationControlsTemplateInstaller]); + + function dirPaginateDirective($compile, $parse, paginationService) { + + return { + terminal: true, + multiElement: true, + priority: 100, + compile: dirPaginationCompileFn + }; + + function dirPaginationCompileFn(tElement, tAttrs){ + + var expression = tAttrs.dirPaginate; + // regex taken directly from https://github.com/angular/angular.js/blob/v1.4.x/src/ng/directive/ngRepeat.js#L339 + var match = expression.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/); + + var filterPattern = /\|\s*itemsPerPage\s*:\s*(.*\(\s*\w*\)|([^\)]*?(?=\s+as\s+))|[^\)]*)/; + if (match[2].match(filterPattern) === null) { + throw 'pagination directive: the \'itemsPerPage\' filter must be set.'; + } + var itemsPerPageFilterRemoved = match[2].replace(filterPattern, ''); + var collectionGetter = $parse(itemsPerPageFilterRemoved); + + addNoCompileAttributes(tElement); + + // If any value is specified for paginationId, we register the un-evaluated expression at this stage for the benefit of any + // dir-pagination-controls directives that may be looking for this ID. + var rawId = tAttrs.paginationId || DEFAULT_ID; + paginationService.registerInstance(rawId); + + return function dirPaginationLinkFn(scope, element, attrs){ + + // Now that we have access to the `scope` we can interpolate any expression given in the paginationId attribute and + // potentially register a new ID if it evaluates to a different value than the rawId. + var paginationId = $parse(attrs.paginationId)(scope) || attrs.paginationId || DEFAULT_ID; + + // (TODO: this seems sound, but I'm reverting as many bug reports followed it's introduction in 0.11.0. + // Needs more investigation.) + // In case rawId != paginationId we deregister using rawId for the sake of general cleanliness + // before registering using paginationId + // paginationService.deregisterInstance(rawId); + paginationService.registerInstance(paginationId); + + var repeatExpression = getRepeatExpression(expression, paginationId); + addNgRepeatToElement(element, attrs, repeatExpression); + + removeTemporaryAttributes(element); + var compiled = $compile(element); + + var currentPageGetter = makeCurrentPageGetterFn(scope, attrs, paginationId); + paginationService.setCurrentPageParser(paginationId, currentPageGetter, scope); + + if (typeof attrs.totalItems !== 'undefined') { + paginationService.setAsyncModeTrue(paginationId); + scope.$watch(function() { + return $parse(attrs.totalItems)(scope); + }, function (result) { + if (0 <= result) { + paginationService.setCollectionLength(paginationId, result); + } + }); + } else { + paginationService.setAsyncModeFalse(paginationId); + scope.$watchCollection(function() { + return collectionGetter(scope); + }, function(collection) { + if (collection) { + var collectionLength = (collection instanceof Array) ? collection.length : Object.keys(collection).length; + paginationService.setCollectionLength(paginationId, collectionLength); + } + }); + } + + // Delegate to the link function returned by the new compilation of the ng-repeat + compiled(scope); + + // (TODO: Reverting this due to many bug reports in v 0.11.0. Needs investigation as the + // principle is sound) + // When the scope is destroyed, we make sure to remove the reference to it in paginationService + // so that it can be properly garbage collected + // scope.$on('$destroy', function destroyDirPagination() { + // paginationService.deregisterInstance(paginationId); + // }); + }; + } + + /** + * If a pagination id has been specified, we need to check that it is present as the second argument passed to + * the itemsPerPage filter. If it is not there, we add it and return the modified expression. + * + * @param expression + * @param paginationId + * @returns {*} + */ + function getRepeatExpression(expression, paginationId) { + var repeatExpression, + idDefinedInFilter = !!expression.match(/(\|\s*itemsPerPage\s*:[^|]*:[^|]*)/); + + if (paginationId !== DEFAULT_ID && !idDefinedInFilter) { + repeatExpression = expression.replace(/(\|\s*itemsPerPage\s*:\s*[^|\s]*)/, "$1 : '" + paginationId + "'"); + } else { + repeatExpression = expression; + } + + return repeatExpression; + } + + /** + * Adds the ng-repeat directive to the element. In the case of multi-element (-start, -end) it adds the + * appropriate multi-element ng-repeat to the first and last element in the range. + * @param element + * @param attrs + * @param repeatExpression + */ + function addNgRepeatToElement(element, attrs, repeatExpression) { + if (element[0].hasAttribute('dir-paginate-start') || element[0].hasAttribute('data-dir-paginate-start')) { + // using multiElement mode (dir-paginate-start, dir-paginate-end) + attrs.$set('ngRepeatStart', repeatExpression); + element.eq(element.length - 1).attr('ng-repeat-end', true); + } else { + attrs.$set('ngRepeat', repeatExpression); + } + } + + /** + * Adds the dir-paginate-no-compile directive to each element in the tElement range. + * @param tElement + */ + function addNoCompileAttributes(tElement) { + angular.forEach(tElement, function(el) { + if (el.nodeType === 1) { + angular.element(el).attr('dir-paginate-no-compile', true); + } + }); + } + + /** + * Removes the variations on dir-paginate (data-, -start, -end) and the dir-paginate-no-compile directives. + * @param element + */ + function removeTemporaryAttributes(element) { + angular.forEach(element, function(el) { + if (el.nodeType === 1) { + angular.element(el).removeAttr('dir-paginate-no-compile'); + } + }); + element.eq(0).removeAttr('dir-paginate-start').removeAttr('dir-paginate').removeAttr('data-dir-paginate-start').removeAttr('data-dir-paginate'); + element.eq(element.length - 1).removeAttr('dir-paginate-end').removeAttr('data-dir-paginate-end'); + } + + /** + * Creates a getter function for the current-page attribute, using the expression provided or a default value if + * no current-page expression was specified. + * + * @param scope + * @param attrs + * @param paginationId + * @returns {*} + */ + function makeCurrentPageGetterFn(scope, attrs, paginationId) { + var currentPageGetter; + if (attrs.currentPage) { + currentPageGetter = $parse(attrs.currentPage); + } else { + // If the current-page attribute was not set, we'll make our own. + // Replace any non-alphanumeric characters which might confuse + // the $parse service and give unexpected results. + // See https://github.com/michaelbromley/angularUtils/issues/233 + var defaultCurrentPage = (paginationId + '__currentPage').replace(/\W/g, '_'); + scope[defaultCurrentPage] = 1; + currentPageGetter = $parse(defaultCurrentPage); + } + return currentPageGetter; + } + } + + /** + * This is a helper directive that allows correct compilation when in multi-element mode (ie dir-paginate-start, dir-paginate-end). + * It is dynamically added to all elements in the dir-paginate compile function, and it prevents further compilation of + * any inner directives. It is then removed in the link function, and all inner directives are then manually compiled. + */ + function noCompileDirective() { + return { + priority: 5000, + terminal: true + }; + } + + function dirPaginationControlsTemplateInstaller($templateCache) { + $templateCache.put('angularUtils.directives.dirPagination.template', ''); + } + + function dirPaginationControlsDirective(paginationService, paginationTemplate) { + + var numberRegex = /^\d+$/; + + var DDO = { + restrict: 'AE', + scope: { + maxSize: '=?', + onPageChange: '&?', + paginationId: '=?', + autoHide: '=?' + }, + link: dirPaginationControlsLinkFn + }; + + // We need to check the paginationTemplate service to see whether a template path or + // string has been specified, and add the `template` or `templateUrl` property to + // the DDO as appropriate. The order of priority to decide which template to use is + // (highest priority first): + // 1. paginationTemplate.getString() + // 2. attrs.templateUrl + // 3. paginationTemplate.getPath() + var templateString = paginationTemplate.getString(); + if (templateString !== undefined) { + DDO.template = templateString; + } else { + DDO.templateUrl = function(elem, attrs) { + return attrs.templateUrl || paginationTemplate.getPath(); + }; + } + return DDO; + + function dirPaginationControlsLinkFn(scope, element, attrs) { + + // rawId is the un-interpolated value of the pagination-id attribute. This is only important when the corresponding dir-paginate directive has + // not yet been linked (e.g. if it is inside an ng-if block), and in that case it prevents this controls directive from assuming that there is + // no corresponding dir-paginate directive and wrongly throwing an exception. + var rawId = attrs.paginationId || DEFAULT_ID; + var paginationId = scope.paginationId || attrs.paginationId || DEFAULT_ID; + + if (!paginationService.isRegistered(paginationId) && !paginationService.isRegistered(rawId)) { + var idMessage = (paginationId !== DEFAULT_ID) ? ' (id: ' + paginationId + ') ' : ' '; + if (window.console) { + console.warn('Pagination directive: the pagination controls' + idMessage + 'cannot be used without the corresponding pagination directive, which was not found at link time.'); + } + } + + if (!scope.maxSize) { scope.maxSize = 9; } + scope.autoHide = scope.autoHide === undefined ? true : scope.autoHide; + scope.directionLinks = angular.isDefined(attrs.directionLinks) ? scope.$parent.$eval(attrs.directionLinks) : true; + scope.boundaryLinks = angular.isDefined(attrs.boundaryLinks) ? scope.$parent.$eval(attrs.boundaryLinks) : false; + + var paginationRange = Math.max(scope.maxSize, 5); + scope.pages = []; + scope.pagination = { + last: 1, + current: 1 + }; + scope.range = { + lower: 1, + upper: 1, + total: 1 + }; + + scope.$watch('maxSize', function(val) { + if (val) { + paginationRange = Math.max(scope.maxSize, 5); + generatePagination(); + } + }); + + scope.$watch(function() { + if (paginationService.isRegistered(paginationId)) { + return (paginationService.getCollectionLength(paginationId) + 1) * paginationService.getItemsPerPage(paginationId); + } + }, function(length) { + if (0 < length) { + generatePagination(); + } + }); + + scope.$watch(function() { + if (paginationService.isRegistered(paginationId)) { + return (paginationService.getItemsPerPage(paginationId)); + } + }, function(current, previous) { + if (current != previous && typeof previous !== 'undefined') { + goToPage(scope.pagination.current); + } + }); + + scope.$watch(function() { + if (paginationService.isRegistered(paginationId)) { + return paginationService.getCurrentPage(paginationId); + } + }, function(currentPage, previousPage) { + if (currentPage != previousPage) { + goToPage(currentPage); + } + }); + + scope.setCurrent = function(num) { + if (paginationService.isRegistered(paginationId) && isValidPageNumber(num)) { + num = parseInt(num, 10); + paginationService.setCurrentPage(paginationId, num); + } + }; + + /** + * Custom "track by" function which allows for duplicate "..." entries on long lists, + * yet fixes the problem of wrongly-highlighted links which happens when using + * "track by $index" - see https://github.com/michaelbromley/angularUtils/issues/153 + * @param id + * @param index + * @returns {string} + */ + scope.tracker = function(id, index) { + return id + '_' + index; + }; + + function goToPage(num) { + if (paginationService.isRegistered(paginationId) && isValidPageNumber(num)) { + var oldPageNumber = scope.pagination.current; + + scope.pages = generatePagesArray(num, paginationService.getCollectionLength(paginationId), paginationService.getItemsPerPage(paginationId), paginationRange); + scope.pagination.current = num; + updateRangeValues(); + + // if a callback has been set, then call it with the page number as the first argument + // and the previous page number as a second argument + if (scope.onPageChange) { + scope.onPageChange({ + newPageNumber : num, + oldPageNumber : oldPageNumber + }); + } + } + } + + function generatePagination() { + if (paginationService.isRegistered(paginationId)) { + var page = parseInt(paginationService.getCurrentPage(paginationId)) || 1; + scope.pages = generatePagesArray(page, paginationService.getCollectionLength(paginationId), paginationService.getItemsPerPage(paginationId), paginationRange); + scope.pagination.current = page; + scope.pagination.last = scope.pages[scope.pages.length - 1]; + if (scope.pagination.last < scope.pagination.current) { + scope.setCurrent(scope.pagination.last); + } else { + updateRangeValues(); + } + } + } + + /** + * This function updates the values (lower, upper, total) of the `scope.range` object, which can be used in the pagination + * template to display the current page range, e.g. "showing 21 - 40 of 144 results"; + */ + function updateRangeValues() { + if (paginationService.isRegistered(paginationId)) { + var currentPage = paginationService.getCurrentPage(paginationId), + itemsPerPage = paginationService.getItemsPerPage(paginationId), + totalItems = paginationService.getCollectionLength(paginationId); + + scope.range.lower = (currentPage - 1) * itemsPerPage + 1; + scope.range.upper = Math.min(currentPage * itemsPerPage, totalItems); + scope.range.total = totalItems; + } + } + function isValidPageNumber(num) { + return (numberRegex.test(num) && (0 < num && num <= scope.pagination.last)); + } + } + + /** + * Generate an array of page numbers (or the '...' string) which is used in an ng-repeat to generate the + * links used in pagination + * + * @param currentPage + * @param rowsPerPage + * @param paginationRange + * @param collectionLength + * @returns {Array} + */ + function generatePagesArray(currentPage, collectionLength, rowsPerPage, paginationRange) { + var pages = []; + var totalPages = Math.ceil(collectionLength / rowsPerPage); + var halfWay = Math.ceil(paginationRange / 2); + var position; + + if (currentPage <= halfWay) { + position = 'start'; + } else if (totalPages - halfWay < currentPage) { + position = 'end'; + } else { + position = 'middle'; + } + + var ellipsesNeeded = paginationRange < totalPages; + var i = 1; + while (i <= totalPages && i <= paginationRange) { + var pageNumber = calculatePageNumber(i, currentPage, paginationRange, totalPages); + + var openingEllipsesNeeded = (i === 2 && (position === 'middle' || position === 'end')); + var closingEllipsesNeeded = (i === paginationRange - 1 && (position === 'middle' || position === 'start')); + if (ellipsesNeeded && (openingEllipsesNeeded || closingEllipsesNeeded)) { + pages.push('...'); + } else { + pages.push(pageNumber); + } + i ++; + } + return pages; + } + + /** + * Given the position in the sequence of pagination links [i], figure out what page number corresponds to that position. + * + * @param i + * @param currentPage + * @param paginationRange + * @param totalPages + * @returns {*} + */ + function calculatePageNumber(i, currentPage, paginationRange, totalPages) { + var halfWay = Math.ceil(paginationRange/2); + if (i === paginationRange) { + return totalPages; + } else if (i === 1) { + return i; + } else if (paginationRange < totalPages) { + if (totalPages - halfWay < currentPage) { + return totalPages - paginationRange + i; + } else if (halfWay < currentPage) { + return currentPage - halfWay + i; + } else { + return i; + } + } else { + return i; + } + } + } + + /** + * This filter slices the collection into pages based on the current page number and number of items per page. + * @param paginationService + * @returns {Function} + */ + function itemsPerPageFilter(paginationService) { + + return function(collection, itemsPerPage, paginationId) { + if (typeof (paginationId) === 'undefined') { + paginationId = DEFAULT_ID; + } + if (!paginationService.isRegistered(paginationId)) { + throw 'pagination directive: the itemsPerPage id argument (id: ' + paginationId + ') does not match a registered pagination-id.'; + } + var end; + var start; + if (angular.isObject(collection)) { + itemsPerPage = parseInt(itemsPerPage) || 9999999999; + if (paginationService.isAsyncMode(paginationId)) { + start = 0; + } else { + start = (paginationService.getCurrentPage(paginationId) - 1) * itemsPerPage; + } + end = start + itemsPerPage; + paginationService.setItemsPerPage(paginationId, itemsPerPage); + + if (collection instanceof Array) { + // the array just needs to be sliced + return collection.slice(start, end); + } else { + // in the case of an object, we need to get an array of keys, slice that, then map back to + // the original object. + var slicedObject = {}; + angular.forEach(keys(collection).slice(start, end), function(key) { + slicedObject[key] = collection[key]; + }); + return slicedObject; + } + } else { + return collection; + } + }; + } + + /** + * Shim for the Object.keys() method which does not exist in IE < 9 + * @param obj + * @returns {Array} + */ + function keys(obj) { + if (!Object.keys) { + var objKeys = []; + for (var i in obj) { + if (obj.hasOwnProperty(i)) { + objKeys.push(i); + } + } + return objKeys; + } else { + return Object.keys(obj); + } + } + + /** + * This service allows the various parts of the module to communicate and stay in sync. + */ + function paginationService() { + + var instances = {}; + var lastRegisteredInstance; + + this.registerInstance = function(instanceId) { + if (typeof instances[instanceId] === 'undefined') { + instances[instanceId] = { + asyncMode: false + }; + lastRegisteredInstance = instanceId; + } + }; + + this.deregisterInstance = function(instanceId) { + delete instances[instanceId]; + }; + + this.isRegistered = function(instanceId) { + return (typeof instances[instanceId] !== 'undefined'); + }; + + this.getLastInstanceId = function() { + return lastRegisteredInstance; + }; + + this.setCurrentPageParser = function(instanceId, val, scope) { + instances[instanceId].currentPageParser = val; + instances[instanceId].context = scope; + }; + this.setCurrentPage = function(instanceId, val) { + instances[instanceId].currentPageParser.assign(instances[instanceId].context, val); + }; + this.getCurrentPage = function(instanceId) { + var parser = instances[instanceId].currentPageParser; + return parser ? parser(instances[instanceId].context) : 1; + }; + + this.setItemsPerPage = function(instanceId, val) { + instances[instanceId].itemsPerPage = val; + }; + this.getItemsPerPage = function(instanceId) { + return instances[instanceId].itemsPerPage; + }; + + this.setCollectionLength = function(instanceId, val) { + instances[instanceId].collectionLength = val; + }; + this.getCollectionLength = function(instanceId) { + return instances[instanceId].collectionLength; + }; + + this.setAsyncModeTrue = function(instanceId) { + instances[instanceId].asyncMode = true; + }; + + this.setAsyncModeFalse = function(instanceId) { + instances[instanceId].asyncMode = false; + }; + + this.isAsyncMode = function(instanceId) { + return instances[instanceId].asyncMode; + }; + } + + /** + * This provider allows global configuration of the template path used by the dir-pagination-controls directive. + */ + function paginationTemplateProvider() { + + var templatePath = 'angularUtils.directives.dirPagination.template'; + var templateString; + + /** + * Set a templateUrl to be used by all instances of + * @param {String} path + */ + this.setPath = function(path) { + templatePath = path; + }; + + /** + * Set a string of HTML to be used as a template by all instances + * of . If both a path *and* a string have been set, + * the string takes precedence. + * @param {String} str + */ + this.setString = function(str) { + templateString = str; + }; + + this.$get = function() { + return { + getPath: function() { + return templatePath; + }, + getString: function() { + return templateString; + } + }; + }; + } +})(); diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular.min.js b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular.min.js new file mode 100644 index 00000000..7f3704c9 --- /dev/null +++ b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angular.min.js @@ -0,0 +1,250 @@ +/* + AngularJS v1.3.14 + (c) 2010-2014 Google, Inc. http://angularjs.org + License: MIT +*/ +(function(P,X,u){'use strict';function M(b){return function(){var a=arguments[0],c;c="["+(b?b+":":"")+a+"] http://errors.angularjs.org/1.3.14/"+(b?b+"/":"")+a;for(a=1;a").append(b).html();try{return b[0].nodeType===qb?R(c):c.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(a,b){return"<"+R(b)})}catch(d){return R(c)}}function qc(b){try{return decodeURIComponent(b)}catch(a){}}function rc(b){var a= +{},c,d;s((b||"").split("&"),function(b){b&&(c=b.replace(/\+/g,"%20").split("="),d=qc(c[0]),y(d)&&(b=y(c[1])?qc(c[1]):!0,sc.call(a,d)?E(a[d])?a[d].push(b):a[d]=[a[d],b]:a[d]=b))});return a}function Qb(b){var a=[];s(b,function(b,d){E(b)?s(b,function(b){a.push(Fa(d,!0)+(!0===b?"":"="+Fa(b,!0)))}):a.push(Fa(d,!0)+(!0===b?"":"="+Fa(b,!0)))});return a.length?a.join("&"):""}function rb(b){return Fa(b,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function Fa(b,a){return encodeURIComponent(b).replace(/%40/gi, +"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,a?"%20":"+")}function Id(b,a){var c,d,e=sb.length;b=C(b);for(d=0;d/,">"));}a=a||[];a.unshift(["$provide",function(a){a.value("$rootElement",b)}]);c.debugInfoEnabled&&a.push(["$compileProvider",function(a){a.debugInfoEnabled(!0)}]);a.unshift("ng");d=ab(a,c.strictDi);d.invoke(["$rootScope","$rootElement","$compile","$injector",function(a,b,c,d){a.$apply(function(){b.data("$injector", +d);c(b)(a)})}]);return d},e=/^NG_ENABLE_DEBUG_INFO!/,f=/^NG_DEFER_BOOTSTRAP!/;P&&e.test(P.name)&&(c.debugInfoEnabled=!0,P.name=P.name.replace(e,""));if(P&&!f.test(P.name))return d();P.name=P.name.replace(f,"");aa.resumeBootstrap=function(b){s(b,function(b){a.push(b)});return d()};G(aa.resumeDeferredBootstrap)&&aa.resumeDeferredBootstrap()}function Kd(){P.name="NG_ENABLE_DEBUG_INFO!"+P.name;P.location.reload()}function Ld(b){b=aa.element(b).injector();if(!b)throw Ka("test");return b.get("$$testability")} +function uc(b,a){a=a||"_";return b.replace(Md,function(b,d){return(d?a:"")+b.toLowerCase()})}function Nd(){var b;vc||((ra=P.jQuery)&&ra.fn.on?(C=ra,w(ra.fn,{scope:La.scope,isolateScope:La.isolateScope,controller:La.controller,injector:La.injector,inheritedData:La.inheritedData}),b=ra.cleanData,ra.cleanData=function(a){var c;if(Rb)Rb=!1;else for(var d=0,e;null!=(e=a[d]);d++)(c=ra._data(e,"events"))&&c.$destroy&&ra(e).triggerHandler("$destroy");b(a)}):C=Q,aa.element=C,vc=!0)}function Sb(b,a,c){if(!b)throw Ka("areq", +a||"?",c||"required");return b}function tb(b,a,c){c&&E(b)&&(b=b[b.length-1]);Sb(G(b),a,"not a function, got "+(b&&"object"===typeof b?b.constructor.name||"Object":typeof b));return b}function Ma(b,a){if("hasOwnProperty"===b)throw Ka("badname",a);}function wc(b,a,c){if(!a)return b;a=a.split(".");for(var d,e=b,f=a.length,g=0;g")+d[2];for(d=d[0];d--;)c=c.lastChild;f=Ya(f,c.childNodes);c=e.firstChild;c.textContent=""}else f.push(a.createTextNode(b));e.textContent="";e.innerHTML="";s(f,function(a){e.appendChild(a)}); +return e}function Q(b){if(b instanceof Q)return b;var a;x(b)&&(b=T(b),a=!0);if(!(this instanceof Q)){if(a&&"<"!=b.charAt(0))throw Ub("nosel");return new Q(b)}if(a){a=X;var c;b=(c=gf.exec(b))?[a.createElement(c[1])]:(c=Gc(b,a))?c.childNodes:[]}Hc(this,b)}function Vb(b){return b.cloneNode(!0)}function xb(b,a){a||yb(b);if(b.querySelectorAll)for(var c=b.querySelectorAll("*"),d=0,e=c.length;d 4096 bytes)!"));else{if(p.cookie!==y)for(y=p.cookie,d=y.split("; "),wa={},f=0;fk&&this.remove(q.key),b},get:function(a){if(k").parent()[0])});var f=ba(a,b,a,c,d,e);F.$$addScopeClass(a);var g=null;return function(b, +c,d){Sb(b,"scope");d=d||{};var e=d.parentBoundTranscludeFn,h=d.transcludeControllers;d=d.futureParentElement;e&&e.$$boundTransclude&&(e=e.$$boundTransclude);g||(g=(d=d&&d[0])?"foreignobject"!==ta(d)&&d.toString().match(/SVG/)?"svg":"html":"html");d="html"!==g?C(Xb(g,C("
").append(a).html())):c?La.clone.call(a):a;if(h)for(var l in h)d.data("$"+l+"Controller",h[l].instance);F.$$addScopeInfo(d,b);c&&c(d,b);f&&f(b,d,d,e);return d}}function ba(a,b,c,d,e,f){function g(a,c,d,e){var f,l,k,q,p,r,D;if(n)for(D= +Array(c.length),q=0;qL.priority)break;if(U=L.scope)L.templateUrl||(J(U)?(Oa("new/isolated scope",I||N,L,w),I=L):Oa("new/isolated scope",I,L,w)),N=N||L;ca=L.name;!L.templateUrl&&L.controller&&(U=L.controller,H=H||{},Oa("'"+ca+"' controller",H[ca],L,w),H[ca]=L);if(U=L.transclude)ha=!0,L.$$tlb||(Oa("transclusion",wa,L,w),wa=L),"element"==U?(B=!0,v=L.priority,U=w,w=e.$$element=C(X.createComment(" "+ca+": "+e[ca]+" ")),d=w[0],V(g,Za.call(U, +0),d),R=F(U,f,v,l&&l.name,{nonTlbTranscludeDirective:wa})):(U=C(Vb(d)).contents(),w.empty(),R=F(U,f));if(L.template)if(fb=!0,Oa("template",ja,L,w),ja=L,U=G(L.template)?L.template(w,e):L.template,U=Tc(U),L.replace){l=L;U=Tb.test(U)?Uc(Xb(L.templateNamespace,T(U))):[];d=U[0];if(1!=U.length||d.nodeType!==na)throw ia("tplrt",ca,"");V(g,w,d);Aa={$attr:{}};U=W(d,[],Aa);var of=a.splice(Q+1,a.length-(Q+1));I&&z(U);a=a.concat(U).concat(of);Rc(e,Aa);Aa=a.length}else w.html(U);if(L.templateUrl)fb=!0,Oa("template", +ja,L,w),ja=L,L.replace&&(l=L),A=M(a.splice(Q,a.length-Q),w,e,g,ha&&R,k,p,{controllerDirectives:H,newIsolateScopeDirective:I,templateDirective:ja,nonTlbTranscludeDirective:wa}),Aa=a.length;else if(L.compile)try{P=L.compile(w,e,R),G(P)?r(null,P,Pa,$):P&&r(P.pre,P.post,Pa,$)}catch(aa){c(aa,ua(w))}L.terminal&&(A.terminal=!0,v=Math.max(v,L.priority))}A.scope=N&&!0===N.scope;A.transcludeOnThisElement=ha;A.elementTranscludeOnThisElement=B;A.templateOnThisElement=fb;A.transclude=R;n.hasElementTranscludeDirective= +B;return A}function z(a){for(var b=0,c=a.length;bq.priority)&&-1!=q.restrict.indexOf(f)&&(l&&(q=Pb(q,{$$start:l,$$end:k})),b.push(q),h=q)}catch(D){c(D)}}return h}function fb(b){if(d.hasOwnProperty(b))for(var c=a.get(b+"Directive"),e=0,f=c.length;e"+b+"";return c.childNodes[0].childNodes;default:return b}}function Q(a,b){if("srcdoc"== +b)return H.HTML;var c=ta(a);if("xlinkHref"==b||"form"==c&&"action"==b||"img"!=c&&("src"==b||"ngSrc"==b))return H.RESOURCE_URL}function Aa(a,c,d,e,f){var h=Q(a,e);f=g[e]||f;var k=b(d,!0,h,f);if(k){if("multiple"===e&&"select"===ta(a))throw ia("selmulti",ua(a));c.push({priority:100,compile:function(){return{pre:function(a,c,g){c=g.$$observers||(g.$$observers={});if(l.test(e))throw ia("nodomevents");var n=g[e];n!==d&&(k=n&&b(n,!0,h,f),d=n);k&&(g[e]=k(a),(c[e]||(c[e]=[])).$$inter=!0,(g.$$observers&&g.$$observers[e].$$scope|| +a).$watch(k,function(a,b){"class"===e&&a!=b?g.$updateClass(a,b):g.$set(e,a)}))}}}})}}function V(a,b,c){var d=b[0],e=b.length,f=d.parentNode,g,h;if(a)for(g=0,h=a.length;g=a)return b;for(;a--;)8===b[a].nodeType&&pf.call(b,a,1);return b}function Fe(){var b={},a=!1,c=/^(\S+)(\s+as\s+(\w+))?$/;this.register=function(a,c){Ma(a,"controller");J(a)?w(b,a):b[a]=c};this.allowGlobals=function(){a= +!0};this.$get=["$injector","$window",function(d,e){function f(a,b,c,d){if(!a||!J(a.$scope))throw M("$controller")("noscp",d,b);a.$scope[b]=c}return function(g,h,l,k){var m,p,q;l=!0===l;k&&x(k)&&(q=k);if(x(g)){k=g.match(c);if(!k)throw qf("ctrlfmt",g);p=k[1];q=q||k[3];g=b.hasOwnProperty(p)?b[p]:wc(h.$scope,p,!0)||(a?wc(e,p,!0):u);tb(g,p,!0)}if(l)return l=(E(g)?g[g.length-1]:g).prototype,m=Object.create(l||null),q&&f(h,q,m,p||g.name),w(function(){d.invoke(g,m,h,p);return m},{instance:m,identifier:q}); +m=d.instantiate(g,h,p);q&&f(h,q,m,p||g.name);return m}}]}function Ge(){this.$get=["$window",function(b){return C(b.document)}]}function He(){this.$get=["$log",function(b){return function(a,c){b.error.apply(b,arguments)}}]}function Zb(b,a){if(x(b)){var c=b.replace(rf,"").trim();if(c){var d=a("Content-Type");(d=d&&0===d.indexOf(Wc))||(d=(d=c.match(sf))&&tf[d[0]].test(c));d&&(b=pc(c))}}return b}function Xc(b){var a=fa(),c,d,e;if(!b)return a;s(b.split("\n"),function(b){e=b.indexOf(":");c=R(T(b.substr(0, +e)));d=T(b.substr(e+1));c&&(a[c]=a[c]?a[c]+", "+d:d)});return a}function Yc(b){var a=J(b)?b:u;return function(c){a||(a=Xc(b));return c?(c=a[R(c)],void 0===c&&(c=null),c):a}}function Zc(b,a,c,d){if(G(d))return d(b,a,c);s(d,function(d){b=d(b,a,c)});return b}function Ke(){var b=this.defaults={transformResponse:[Zb],transformRequest:[function(a){return J(a)&&"[object File]"!==Da.call(a)&&"[object Blob]"!==Da.call(a)&&"[object FormData]"!==Da.call(a)?$a(a):a}],headers:{common:{Accept:"application/json, text/plain, */*"}, +post:qa($b),put:qa($b),patch:qa($b)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN"},a=!1;this.useApplyAsync=function(b){return y(b)?(a=!!b,this):a};var c=this.interceptors=[];this.$get=["$httpBackend","$browser","$cacheFactory","$rootScope","$q","$injector",function(d,e,f,g,h,l){function k(a){function c(a){var b=w({},a);b.data=a.data?Zc(a.data,a.headers,a.status,e.transformResponse):a.data;a=a.status;return 200<=a&&300>a?b:h.reject(b)}function d(a){var b,c={};s(a,function(a,d){G(a)?(b= +a(),null!=b&&(c[d]=b)):c[d]=a});return c}if(!aa.isObject(a))throw M("$http")("badreq",a);var e=w({method:"get",transformRequest:b.transformRequest,transformResponse:b.transformResponse},a);e.headers=function(a){var c=b.headers,e=w({},a.headers),f,g,c=w({},c.common,c[R(a.method)]);a:for(f in c){a=R(f);for(g in e)if(R(g)===a)continue a;e[f]=c[f]}return d(e)}(a);e.method=vb(e.method);var f=[function(a){var d=a.headers,e=Zc(a.data,Yc(d),u,a.transformRequest);z(e)&&s(d,function(a,b){"content-type"===R(b)&& +delete d[b]});z(a.withCredentials)&&!z(b.withCredentials)&&(a.withCredentials=b.withCredentials);return m(a,e).then(c,c)},u],g=h.when(e);for(s(t,function(a){(a.request||a.requestError)&&f.unshift(a.request,a.requestError);(a.response||a.responseError)&&f.push(a.response,a.responseError)});f.length;){a=f.shift();var l=f.shift(),g=g.then(a,l)}g.success=function(a){g.then(function(b){a(b.data,b.status,b.headers,e)});return g};g.error=function(a){g.then(null,function(b){a(b.data,b.status,b.headers,e)}); +return g};return g}function m(c,f){function l(b,c,d,e){function f(){n(c,b,d,e)}N&&(200<=b&&300>b?N.put(I,[b,c,Xc(d),e]):N.remove(I));a?g.$applyAsync(f):(f(),g.$$phase||g.$apply())}function n(a,b,d,e){b=Math.max(b,0);(200<=b&&300>b?v.resolve:v.reject)({data:a,status:b,headers:Yc(d),config:c,statusText:e})}function m(a){n(a.data,a.status,qa(a.headers()),a.statusText)}function t(){var a=k.pendingRequests.indexOf(c);-1!==a&&k.pendingRequests.splice(a,1)}var v=h.defer(),A=v.promise,N,F,s=c.headers,I=p(c.url, +c.params);k.pendingRequests.push(c);A.then(t,t);!c.cache&&!b.cache||!1===c.cache||"GET"!==c.method&&"JSONP"!==c.method||(N=J(c.cache)?c.cache:J(b.cache)?b.cache:q);N&&(F=N.get(I),y(F)?F&&G(F.then)?F.then(m,m):E(F)?n(F[1],F[0],qa(F[2]),F[3]):n(F,200,{},"OK"):N.put(I,A));z(F)&&((F=$c(c.url)?e.cookies()[c.xsrfCookieName||b.xsrfCookieName]:u)&&(s[c.xsrfHeaderName||b.xsrfHeaderName]=F),d(c.method,I,f,l,s,c.timeout,c.withCredentials,c.responseType));return A}function p(a,b){if(!b)return a;var c=[];Ed(b, +function(a,b){null===a||z(a)||(E(a)||(a=[a]),s(a,function(a){J(a)&&(a=pa(a)?a.toISOString():$a(a));c.push(Fa(b)+"="+Fa(a))}))});0=l&&(r.resolve(q),p(S.$$intervalId),delete f[S.$$intervalId]);t||b.$apply()},h);f[S.$$intervalId]=r;return S}var f={};e.cancel=function(b){return b&&b.$$intervalId in f?(f[b.$$intervalId].reject("canceled"),a.clearInterval(b.$$intervalId),delete f[b.$$intervalId],!0):!1};return e}]} +function Rd(){this.$get=function(){return{id:"en-us",NUMBER_FORMATS:{DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{minInt:1,minFrac:0,maxFrac:3,posPre:"",posSuf:"",negPre:"-",negSuf:"",gSize:3,lgSize:3},{minInt:1,minFrac:2,maxFrac:2,posPre:"\u00a4",posSuf:"",negPre:"(\u00a4",negSuf:")",gSize:3,lgSize:3}],CURRENCY_SYM:"$"},DATETIME_FORMATS:{MONTH:"January February March April May June July August September October November December".split(" "),SHORTMONTH:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "), +DAY:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),SHORTDAY:"Sun Mon Tue Wed Thu Fri Sat".split(" "),AMPMS:["AM","PM"],medium:"MMM d, y h:mm:ss a","short":"M/d/yy h:mm a",fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",mediumDate:"MMM d, y",shortDate:"M/d/yy",mediumTime:"h:mm:ss a",shortTime:"h:mm a"},pluralCat:function(b){return 1===b?"one":"other"}}}}function bc(b){b=b.split("/");for(var a=b.length;a--;)b[a]=rb(b[a]);return b.join("/")}function ad(b,a){var c=Ba(b);a.$$protocol= +c.protocol;a.$$host=c.hostname;a.$$port=$(c.port)||wf[c.protocol]||null}function bd(b,a){var c="/"!==b.charAt(0);c&&(b="/"+b);var d=Ba(b);a.$$path=decodeURIComponent(c&&"/"===d.pathname.charAt(0)?d.pathname.substring(1):d.pathname);a.$$search=rc(d.search);a.$$hash=decodeURIComponent(d.hash);a.$$path&&"/"!=a.$$path.charAt(0)&&(a.$$path="/"+a.$$path)}function za(b,a){if(0===a.indexOf(b))return a.substr(b.length)}function Ha(b){var a=b.indexOf("#");return-1==a?b:b.substr(0,a)}function Gb(b){return b.replace(/(#.+)|#$/, +"$1")}function cc(b){return b.substr(0,Ha(b).lastIndexOf("/")+1)}function dc(b,a){this.$$html5=!0;a=a||"";var c=cc(b);ad(b,this);this.$$parse=function(a){var b=za(c,a);if(!x(b))throw Hb("ipthprfx",a,c);bd(b,this);this.$$path||(this.$$path="/");this.$$compose()};this.$$compose=function(){var a=Qb(this.$$search),b=this.$$hash?"#"+rb(this.$$hash):"";this.$$url=bc(this.$$path)+(a?"?"+a:"")+b;this.$$absUrl=c+this.$$url.substr(1)};this.$$parseLinkUrl=function(d,e){if(e&&"#"===e[0])return this.hash(e.slice(1)), +!0;var f,g;(f=za(b,d))!==u?(g=f,g=(f=za(a,f))!==u?c+(za("/",f)||f):b+g):(f=za(c,d))!==u?g=c+f:c==d+"/"&&(g=c);g&&this.$$parse(g);return!!g}}function ec(b,a){var c=cc(b);ad(b,this);this.$$parse=function(d){d=za(b,d)||za(c,d);var e;"#"===d.charAt(0)?(e=za(a,d),z(e)&&(e=d)):e=this.$$html5?d:"";bd(e,this);d=this.$$path;var f=/^\/[A-Z]:(\/.*)/;0===e.indexOf(b)&&(e=e.replace(b,""));f.exec(e)||(d=(e=f.exec(d))?e[1]:d);this.$$path=d;this.$$compose()};this.$$compose=function(){var c=Qb(this.$$search),e=this.$$hash? +"#"+rb(this.$$hash):"";this.$$url=bc(this.$$path)+(c?"?"+c:"")+e;this.$$absUrl=b+(this.$$url?a+this.$$url:"")};this.$$parseLinkUrl=function(a,c){return Ha(b)==Ha(a)?(this.$$parse(a),!0):!1}}function cd(b,a){this.$$html5=!0;ec.apply(this,arguments);var c=cc(b);this.$$parseLinkUrl=function(d,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g;b==Ha(d)?f=d:(g=za(c,d))?f=b+a+g:c===d+"/"&&(f=c);f&&this.$$parse(f);return!!f};this.$$compose=function(){var c=Qb(this.$$search),e=this.$$hash?"#"+rb(this.$$hash): +"";this.$$url=bc(this.$$path)+(c?"?"+c:"")+e;this.$$absUrl=b+a+this.$$url}}function Ib(b){return function(){return this[b]}}function dd(b,a){return function(c){if(z(c))return this[b];this[b]=a(c);this.$$compose();return this}}function Me(){var b="",a={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(a){return y(a)?(b=a,this):b};this.html5Mode=function(b){return Wa(b)?(a.enabled=b,this):J(b)?(Wa(b.enabled)&&(a.enabled=b.enabled),Wa(b.requireBase)&&(a.requireBase=b.requireBase),Wa(b.rewriteLinks)&& +(a.rewriteLinks=b.rewriteLinks),this):a};this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",function(c,d,e,f,g){function h(a,b,c){var e=k.url(),f=k.$$state;try{d.url(a,b,c),k.$$state=d.state()}catch(g){throw k.url(e),k.$$state=f,g;}}function l(a,b){c.$broadcast("$locationChangeSuccess",k.absUrl(),a,k.$$state,b)}var k,m;m=d.baseHref();var p=d.url(),q;if(a.enabled){if(!m&&a.requireBase)throw Hb("nobase");q=p.substring(0,p.indexOf("/",p.indexOf("//")+2))+(m||"/");m=e.history?dc:cd}else q= +Ha(p),m=ec;k=new m(q,"#"+b);k.$$parseLinkUrl(p,p);k.$$state=d.state();var t=/^\s*(javascript|mailto):/i;f.on("click",function(b){if(a.rewriteLinks&&!b.ctrlKey&&!b.metaKey&&!b.shiftKey&&2!=b.which&&2!=b.button){for(var e=C(b.target);"a"!==ta(e[0]);)if(e[0]===f[0]||!(e=e.parent())[0])return;var h=e.prop("href"),l=e.attr("href")||e.attr("xlink:href");J(h)&&"[object SVGAnimatedString]"===h.toString()&&(h=Ba(h.animVal).href);t.test(h)||!h||e.attr("target")||b.isDefaultPrevented()||!k.$$parseLinkUrl(h, +l)||(b.preventDefault(),k.absUrl()!=d.url()&&(c.$apply(),g.angular["ff-684208-preventDefault"]=!0))}});Gb(k.absUrl())!=Gb(p)&&d.url(k.absUrl(),!0);var r=!0;d.onUrlChange(function(a,b){c.$evalAsync(function(){var d=k.absUrl(),e=k.$$state,f;k.$$parse(a);k.$$state=b;f=c.$broadcast("$locationChangeStart",a,d,b,e).defaultPrevented;k.absUrl()===a&&(f?(k.$$parse(d),k.$$state=e,h(d,!1,e)):(r=!1,l(d,e)))});c.$$phase||c.$digest()});c.$watch(function(){var a=Gb(d.url()),b=Gb(k.absUrl()),f=d.state(),g=k.$$replace, +q=a!==b||k.$$html5&&e.history&&f!==k.$$state;if(r||q)r=!1,c.$evalAsync(function(){var b=k.absUrl(),d=c.$broadcast("$locationChangeStart",b,a,k.$$state,f).defaultPrevented;k.absUrl()===b&&(d?(k.$$parse(a),k.$$state=f):(q&&h(b,g,f===k.$$state?null:k.$$state),l(a,f)))});k.$$replace=!1});return k}]}function Ne(){var b=!0,a=this;this.debugEnabled=function(a){return y(a)?(b=a,this):b};this.$get=["$window",function(c){function d(a){a instanceof Error&&(a.stack?a=a.message&&-1===a.stack.indexOf(a.message)? +"Error: "+a.message+"\n"+a.stack:a.stack:a.sourceURL&&(a=a.message+"\n"+a.sourceURL+":"+a.line));return a}function e(a){var b=c.console||{},e=b[a]||b.log||B;a=!1;try{a=!!e.apply}catch(l){}return a?function(){var a=[];s(arguments,function(b){a.push(d(b))});return e.apply(b,a)}:function(a,b){e(a,null==b?"":b)}}return{log:e("log"),info:e("info"),warn:e("warn"),error:e("error"),debug:function(){var c=e("debug");return function(){b&&c.apply(a,arguments)}}()}}]}function sa(b,a){if("__defineGetter__"=== +b||"__defineSetter__"===b||"__lookupGetter__"===b||"__lookupSetter__"===b||"__proto__"===b)throw ka("isecfld",a);return b}function la(b,a){if(b){if(b.constructor===b)throw ka("isecfn",a);if(b.window===b)throw ka("isecwindow",a);if(b.children&&(b.nodeName||b.prop&&b.attr&&b.find))throw ka("isecdom",a);if(b===Object)throw ka("isecobj",a);}return b}function fc(b){return b.constant}function hb(b,a,c,d,e){la(b,e);la(a,e);c=c.split(".");for(var f,g=0;1h?ed(g[0],g[1],g[2],g[3],g[4],c,d):function(a,b){var e=0,f;do f=ed(g[e++],g[e++],g[e++],g[e++],g[e++],c,d)(a,b),b=u,a=f;while(e=this.promise.$$state.status&&d&&d.length&&b(function(){for(var b,e,f=0,g=d.length;fa)for(b in k++,f)e.hasOwnProperty(b)||(t--,delete f[b])}else f!==e&&(f=e,k++);return k}}c.$stateful=!0;var d=this,e,f,h,l=1s&&(y=4-s,W[y]||(W[y]=[]),W[y].push({msg:G(e.exp)?"fn: "+(e.exp.name||e.exp.toString()):e.exp,newVal:g,oldVal:l}));else if(e===c){t=!1;break a}}catch(C){f(C)}if(!(m=I.$$childHead||I!==this&&I.$$nextSibling))for(;I!==this&&!(m=I.$$nextSibling);)I=I.$parent}while(I=m);if((t||S.length)&&!s--)throw r.$$phase=null,a("infdig",b,W);}while(t||S.length); +for(r.$$phase=null;u.length;)try{u.shift()()}catch(B){f(B)}},$destroy:function(){if(!this.$$destroyed){var a=this.$parent;this.$broadcast("$destroy");this.$$destroyed=!0;if(this!==r){for(var b in this.$$listenerCount)m(this,this.$$listenerCount[b],b);a.$$childHead==this&&(a.$$childHead=this.$$nextSibling);a.$$childTail==this&&(a.$$childTail=this.$$prevSibling);this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling);this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling); +this.$destroy=this.$digest=this.$apply=this.$evalAsync=this.$applyAsync=B;this.$on=this.$watch=this.$watchGroup=function(){return B};this.$$listeners={};this.$parent=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=this.$root=this.$$watchers=null}}},$eval:function(a,b){return g(a)(this,b)},$evalAsync:function(a,b){r.$$phase||S.length||h.defer(function(){S.length&&r.$digest()});S.push({scope:this,expression:a,locals:b})},$$postDigest:function(a){u.push(a)},$apply:function(a){try{return k("$apply"), +this.$eval(a)}catch(b){f(b)}finally{r.$$phase=null;try{r.$digest()}catch(c){throw f(c),c;}}},$applyAsync:function(a){function b(){c.$eval(a)}var c=this;a&&n.push(b);t()},$on:function(a,b){var c=this.$$listeners[a];c||(this.$$listeners[a]=c=[]);c.push(b);var d=this;do d.$$listenerCount[a]||(d.$$listenerCount[a]=0),d.$$listenerCount[a]++;while(d=d.$parent);var e=this;return function(){var d=c.indexOf(b);-1!==d&&(c[d]=null,m(e,1,a))}},$emit:function(a,b){var c=[],d,e=this,g=!1,h={name:a,targetScope:e, +stopPropagation:function(){g=!0},preventDefault:function(){h.defaultPrevented=!0},defaultPrevented:!1},l=Ya([h],arguments,1),k,m;do{d=e.$$listeners[a]||c;h.currentScope=e;k=0;for(m=d.length;kRa)throw Ca("iequirks");var d=qa(ma);d.isEnabled=function(){return b};d.trustAs=c.trustAs;d.getTrusted=c.getTrusted;d.valueOf=c.valueOf;b||(d.trustAs=d.getTrusted=function(a,b){return b},d.valueOf=oa);d.parseAs=function(b,c){var e=a(c);return e.literal&&e.constant?e:a(c,function(a){return d.getTrusted(b,a)})};var e=d.parseAs,f=d.getTrusted,g=d.trustAs;s(ma,function(a,b){var c=R(b);d[db("parse_as_"+c)]=function(b){return e(a, +b)};d[db("get_trusted_"+c)]=function(b){return f(a,b)};d[db("trust_as_"+c)]=function(b){return g(a,b)}});return d}]}function Ue(){this.$get=["$window","$document",function(b,a){var c={},d=$((/android (\d+)/.exec(R((b.navigator||{}).userAgent))||[])[1]),e=/Boxee/i.test((b.navigator||{}).userAgent),f=a[0]||{},g,h=/^(Moz|webkit|ms)(?=[A-Z])/,l=f.body&&f.body.style,k=!1,m=!1;if(l){for(var p in l)if(k=h.exec(p)){g=k[0];g=g.substr(0,1).toUpperCase()+g.substr(1);break}g||(g="WebkitOpacity"in l&&"webkit"); +k=!!("transition"in l||g+"Transition"in l);m=!!("animation"in l||g+"Animation"in l);!d||k&&m||(k=x(f.body.style.webkitTransition),m=x(f.body.style.webkitAnimation))}return{history:!(!b.history||!b.history.pushState||4>d||e),hasEvent:function(a){if("input"===a&&11>=Ra)return!1;if(z(c[a])){var b=f.createElement("div");c[a]="on"+a in b}return c[a]},csp:bb(),vendorPrefix:g,transitions:k,animations:m,android:d}}]}function We(){this.$get=["$templateCache","$http","$q",function(b,a,c){function d(e,f){d.totalPendingRequests++; +var g=a.defaults&&a.defaults.transformResponse;E(g)?g=g.filter(function(a){return a!==Zb}):g===Zb&&(g=null);return a.get(e,{cache:b,transformResponse:g}).finally(function(){d.totalPendingRequests--}).then(function(a){return a.data},function(a){if(!f)throw ia("tpload",e);return c.reject(a)})}d.totalPendingRequests=0;return d}]}function Xe(){this.$get=["$rootScope","$browser","$location",function(b,a,c){return{findBindings:function(a,b,c){a=a.getElementsByClassName("ng-binding");var g=[];s(a,function(a){var d= +aa.element(a).data("$binding");d&&s(d,function(d){c?(new RegExp("(^|\\s)"+gd(b)+"(\\s|\\||$)")).test(d)&&g.push(a):-1!=d.indexOf(b)&&g.push(a)})});return g},findModels:function(a,b,c){for(var g=["ng-","data-ng-","ng\\:"],h=0;hb;b=Math.abs(b);var g=b+"",h="",l=[],k=!1;if(-1!==g.indexOf("e")){var m=g.match(/([\d\.]+)e(-?)(\d+)/);m&&"-"==m[2]&&m[3]>e+1?b=0:(h=g,k=!0)}if(k)0b&&(h=b.toFixed(e),b=parseFloat(h));else{g=(g.split(od)[1]||"").length;z(e)&&(e=Math.min(Math.max(a.minFrac,g),a.maxFrac));b=+(Math.round(+(b.toString()+"e"+e)).toString()+"e"+-e);var g=(""+b).split(od),k=g[0],g=g[1]||"",p=0,q=a.lgSize,t=a.gSize;if(k.length>=q+t)for(p=k.length-q,m=0;mb&&(d="-",b=-b);for(b=""+b;b.length-c)e+=c;0===e&&-12==c&&(e=12);return Jb(e,a,d)}}function Kb(b,a){return function(c,d){var e=c["get"+b](),f=vb(a?"SHORT"+b:b);return d[f][e]}} +function pd(b){var a=(new Date(b,0,1)).getDay();return new Date(b,0,(4>=a?5:12)-a)}function qd(b){return function(a){var c=pd(a.getFullYear());a=+new Date(a.getFullYear(),a.getMonth(),a.getDate()+(4-a.getDay()))-+c;a=1+Math.round(a/6048E5);return Jb(a,b)}}function kd(b){function a(a){var b;if(b=a.match(c)){a=new Date(0);var f=0,g=0,h=b[8]?a.setUTCFullYear:a.setFullYear,l=b[8]?a.setUTCHours:a.setHours;b[9]&&(f=$(b[9]+b[10]),g=$(b[9]+b[11]));h.call(a,$(b[1]),$(b[2])-1,$(b[3]));f=$(b[4]||0)-f;g=$(b[5]|| +0)-g;h=$(b[6]||0);b=Math.round(1E3*parseFloat("0."+(b[7]||0)));l.call(a,f,g,h,b)}return a}var c=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(c,e,f){var g="",h=[],l,k;e=e||"mediumDate";e=b.DATETIME_FORMATS[e]||e;x(c)&&(c=Jf.test(c)?$(c):a(c));V(c)&&(c=new Date(c));if(!pa(c))return c;for(;e;)(k=Kf.exec(e))?(h=Ya(h,k,1),e=h.pop()):(h.push(e),e=null);f&&"UTC"===f&&(c=new Date(c.getTime()),c.setMinutes(c.getMinutes()+c.getTimezoneOffset())); +s(h,function(a){l=Lf[a];g+=l?l(c,b.DATETIME_FORMATS):a.replace(/(^'|'$)/g,"").replace(/''/g,"'")});return g}}function Ef(){return function(b,a){z(a)&&(a=2);return $a(b,a)}}function Ff(){return function(b,a){V(b)&&(b=b.toString());return E(b)||x(b)?(a=Infinity===Math.abs(Number(a))?Number(a):$(a))?0b||37<=b&&40>=b||m(a,this,this.value)});if(e.hasEvent("paste"))a.on("paste cut",m)}a.on("change",l);d.$render=function(){a.val(d.$isEmpty(d.$viewValue)?"":d.$viewValue)}} +function Nb(b,a){return function(c,d){var e,f;if(pa(c))return c;if(x(c)){'"'==c.charAt(0)&&'"'==c.charAt(c.length-1)&&(c=c.substring(1,c.length-1));if(Mf.test(c))return new Date(c);b.lastIndex=0;if(e=b.exec(c))return e.shift(),f=d?{yyyy:d.getFullYear(),MM:d.getMonth()+1,dd:d.getDate(),HH:d.getHours(),mm:d.getMinutes(),ss:d.getSeconds(),sss:d.getMilliseconds()/1E3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},s(e,function(b,c){c=s};g.$observe("min",function(a){s=q(a);h.$validate()})}if(y(g.max)||g.ngMax){var K;h.$validators.max=function(a){return!p(a)||z(K)||c(a)<=K};g.$observe("max",function(a){K=q(a);h.$validate()})}}}function td(b,a,c,d){(d.$$hasNativeValidators=J(a[0].validity))&&d.$parsers.push(function(b){var c=a.prop("validity")||{}; +return c.badInput&&!c.typeMismatch?u:b})}function ud(b,a,c,d,e){if(y(d)){b=b(d);if(!b.constant)throw M("ngModel")("constexpr",c,d);return b(a)}return e}function jc(b,a){b="ngClass"+b;return["$animate",function(c){function d(a,b){var c=[],d=0;a:for(;d(?:<\/\1>|)$/,Tb=/<|&#?\w+;/,ef=/<([\w:]+)/,ff=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, +ga={option:[1,'"],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};ga.optgroup=ga.option;ga.tbody=ga.tfoot=ga.colgroup=ga.caption=ga.thead;ga.th=ga.td;var La=Q.prototype={ready:function(b){function a(){c||(c=!0,b())}var c=!1;"complete"===X.readyState?setTimeout(a):(this.on("DOMContentLoaded",a),Q(P).on("load",a))}, +toString:function(){var b=[];s(this,function(a){b.push(""+a)});return"["+b.join(", ")+"]"},eq:function(b){return 0<=b?C(this[b]):C(this[this.length+b])},length:0,push:Of,sort:[].sort,splice:[].splice},Fb={};s("multiple selected checked disabled readOnly required open".split(" "),function(b){Fb[R(b)]=b});var Nc={};s("input select option textarea button form details".split(" "),function(b){Nc[b]=!0});var Oc={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern"}; +s({data:Wb,removeData:yb},function(b,a){Q[a]=b});s({data:Wb,inheritedData:Eb,scope:function(b){return C.data(b,"$scope")||Eb(b.parentNode||b,["$isolateScope","$scope"])},isolateScope:function(b){return C.data(b,"$isolateScope")||C.data(b,"$isolateScopeNoTemplate")},controller:Jc,injector:function(b){return Eb(b,"$injector")},removeAttr:function(b,a){b.removeAttribute(a)},hasClass:Bb,css:function(b,a,c){a=db(a);if(y(c))b.style[a]=c;else return b.style[a]},attr:function(b,a,c){var d=R(a);if(Fb[d])if(y(c))c? +(b[a]=!0,b.setAttribute(a,d)):(b[a]=!1,b.removeAttribute(d));else return b[a]||(b.attributes.getNamedItem(a)||B).specified?d:u;else if(y(c))b.setAttribute(a,c);else if(b.getAttribute)return b=b.getAttribute(a,2),null===b?u:b},prop:function(b,a,c){if(y(c))b[a]=c;else return b[a]},text:function(){function b(a,b){if(z(b)){var d=a.nodeType;return d===na||d===qb?a.textContent:""}a.textContent=b}b.$dv="";return b}(),val:function(b,a){if(z(a)){if(b.multiple&&"select"===ta(b)){var c=[];s(b.options,function(a){a.selected&& +c.push(a.value||a.text)});return 0===c.length?null:c}return b.value}b.value=a},html:function(b,a){if(z(a))return b.innerHTML;xb(b,!0);b.innerHTML=a},empty:Kc},function(b,a){Q.prototype[a]=function(a,d){var e,f,g=this.length;if(b!==Kc&&(2==b.length&&b!==Bb&&b!==Jc?a:d)===u){if(J(a)){for(e=0;e":function(a,c,d,e){return d(a,c)>e(a,c)},"<=":function(a,c,d,e){return d(a,c)<=e(a,c)},">=":function(a, +c,d,e){return d(a,c)>=e(a,c)},"&&":function(a,c,d,e){return d(a,c)&&e(a,c)},"||":function(a,c,d,e){return d(a,c)||e(a,c)},"!":function(a,c,d){return!d(a,c)},"=":!0,"|":!0}),Yf={n:"\n",f:"\f",r:"\r",t:"\t",v:"\v","'":"'",'"':'"'},hc=function(a){this.options=a};hc.prototype={constructor:hc,lex:function(a){this.text=a;this.index=0;for(this.tokens=[];this.index=a&&"string"===typeof a},isWhitespace:function(a){return" "===a||"\r"===a||"\t"===a||"\n"===a||"\v"===a||"\u00a0"===a},isIdent:function(a){return"a"<=a&&"z">=a||"A"<=a&&"Z">=a||"_"===a||"$"===a},isExpOperator:function(a){return"-"===a||"+"===a||this.isNumber(a)},throwError:function(a,c,d){d=d||this.index;c=y(c)?"s "+c+"-"+this.index+" ["+this.text.substring(c,d)+"]":" "+d;throw ka("lexerr",a,c,this.text); +},readNumber:function(){for(var a="",c=this.index;this.indexa){a=this.tokens[a];var g=a.text;if(g===c||g===d||g===e||g=== +f||!(c||d||e||f))return a}return!1},expect:function(a,c,d,e){return(a=this.peek(a,c,d,e))?(this.tokens.shift(),a):!1},consume:function(a){if(0===this.tokens.length)throw ka("ueoe",this.text);var c=this.expect(a);c||this.throwError("is unexpected, expecting ["+a+"]",this.peek());return c},unaryFn:function(a,c){var d=nb[a];return w(function(a,f){return d(a,f,c)},{constant:c.constant,inputs:[c]})},binaryFn:function(a,c,d,e){var f=nb[c];return w(function(c,e){return f(c,e,a,d)},{constant:a.constant&& +d.constant,inputs:!e&&[a,d]})},identifier:function(){for(var a=this.consume().text;this.peek(".")&&this.peekAhead(1).identifier&&!this.peekAhead(2,"(");)a+=this.consume().text+this.consume().text;return yf(a,this.options,this.text)},constant:function(){var a=this.consume().value;return w(function(){return a},{constant:!0,literal:!0})},statements:function(){for(var a=[];;)if(0","<=",">=");)a=this.binaryFn(a,c.text, +this.additive());return a},additive:function(){for(var a=this.multiplicative(),c;c=this.expect("+","-");)a=this.binaryFn(a,c.text,this.multiplicative());return a},multiplicative:function(){for(var a=this.unary(),c;c=this.expect("*","/","%");)a=this.binaryFn(a,c.text,this.unary());return a},unary:function(){var a;return this.expect("+")?this.primary():(a=this.expect("-"))?this.binaryFn(ib.ZERO,a.text,this.unary()):(a=this.expect("!"))?this.unaryFn(a.text,this.unary()):this.primary()},fieldAccess:function(a){var c= +this.identifier();return w(function(d,e,f){d=f||a(d,e);return null==d?u:c(d)},{assign:function(d,e,f){var g=a(d,f);g||a.assign(d,g={},f);return c.assign(g,e)}})},objectIndex:function(a){var c=this.text,d=this.expression();this.consume("]");return w(function(e,f){var g=a(e,f),h=d(e,f);sa(h,c);return g?la(g[h],c):u},{assign:function(e,f,g){var h=sa(d(e,g),c),l=la(a(e,g),c);l||a.assign(e,l={},g);return l[h]=f}})},functionCall:function(a,c){var d=[];if(")"!==this.peekToken().text){do d.push(this.expression()); +while(this.expect(","))}this.consume(")");var e=this.text,f=d.length?[]:null;return function(g,h){var l=c?c(g,h):y(c)?u:g,k=a(g,h,l)||B;if(f)for(var m=d.length;m--;)f[m]=la(d[m](g,h),e);la(l,e);if(k){if(k.constructor===k)throw ka("isecfn",e);if(k===Vf||k===Wf||k===Xf)throw ka("isecff",e);}l=k.apply?k.apply(l,f):k(f[0],f[1],f[2],f[3],f[4]);f&&(f.length=0);return la(l,e)}},arrayDeclaration:function(){var a=[];if("]"!==this.peekToken().text){do{if(this.peek("]"))break;a.push(this.expression())}while(this.expect(",")) +}this.consume("]");return w(function(c,d){for(var e=[],f=0,g=a.length;fa.getHours()?c.AMPMS[0]:c.AMPMS[1]},Z:function(a){a=-1*a.getTimezoneOffset();return a=(0<=a?"+":"")+(Jb(Math[0=h};d.$observe("min",function(a){y(a)&&!V(a)&&(a=parseFloat(a,10));h=V(a)&&!isNaN(a)?a:u;e.$validate()})}if(y(d.max)|| +d.ngMax){var l;e.$validators.max=function(a){return e.$isEmpty(a)||z(l)||a<=l};d.$observe("max",function(a){y(a)&&!V(a)&&(a=parseFloat(a,10));l=V(a)&&!isNaN(a)?a:u;e.$validate()})}},url:function(a,c,d,e,f,g){jb(a,c,d,e,f,g);ic(e);e.$$parserName="url";e.$validators.url=function(a,c){var d=a||c;return e.$isEmpty(d)||Zf.test(d)}},email:function(a,c,d,e,f,g){jb(a,c,d,e,f,g);ic(e);e.$$parserName="email";e.$validators.email=function(a,c){var d=a||c;return e.$isEmpty(d)||$f.test(d)}},radio:function(a,c, +d,e){z(d.name)&&c.attr("name",++ob);c.on("click",function(a){c[0].checked&&e.$setViewValue(d.value,a&&a.type)});e.$render=function(){c[0].checked=d.value==e.$viewValue};d.$observe("value",e.$render)},checkbox:function(a,c,d,e,f,g,h,l){var k=ud(l,a,"ngTrueValue",d.ngTrueValue,!0),m=ud(l,a,"ngFalseValue",d.ngFalseValue,!1);c.on("click",function(a){e.$setViewValue(c[0].checked,a&&a.type)});e.$render=function(){c[0].checked=e.$viewValue};e.$isEmpty=function(a){return!1===a};e.$formatters.push(function(a){return ea(a, +k)});e.$parsers.push(function(a){return a?k:m})},hidden:B,button:B,submit:B,reset:B,file:B},yc=["$browser","$sniffer","$filter","$parse",function(a,c,d,e){return{restrict:"E",require:["?ngModel"],link:{pre:function(f,g,h,l){l[0]&&(Dd[R(h.type)]||Dd.text)(f,g,h,l[0],c,a,d,e)}}}}],bg=/^(true|false|\d+)$/,ye=function(){return{restrict:"A",priority:100,compile:function(a,c){return bg.test(c.ngValue)?function(a,c,f){f.$set("value",a.$eval(f.ngValue))}:function(a,c,f){a.$watch(f.ngValue,function(a){f.$set("value", +a)})}}}},Zd=["$compile",function(a){return{restrict:"AC",compile:function(c){a.$$addBindingClass(c);return function(c,e,f){a.$$addBindingInfo(e,f.ngBind);e=e[0];c.$watch(f.ngBind,function(a){e.textContent=a===u?"":a})}}}}],ae=["$interpolate","$compile",function(a,c){return{compile:function(d){c.$$addBindingClass(d);return function(d,f,g){d=a(f.attr(g.$attr.ngBindTemplate));c.$$addBindingInfo(f,d.expressions);f=f[0];g.$observe("ngBindTemplate",function(a){f.textContent=a===u?"":a})}}}}],$d=["$sce", +"$parse","$compile",function(a,c,d){return{restrict:"A",compile:function(e,f){var g=c(f.ngBindHtml),h=c(f.ngBindHtml,function(a){return(a||"").toString()});d.$$addBindingClass(e);return function(c,e,f){d.$$addBindingInfo(e,f.ngBindHtml);c.$watch(h,function(){e.html(a.getTrustedHtml(g(c))||"")})}}}}],xe=da({restrict:"A",require:"ngModel",link:function(a,c,d,e){e.$viewChangeListeners.push(function(){a.$eval(d.ngChange)})}}),be=jc("",!0),de=jc("Odd",0),ce=jc("Even",1),ee=Ja({compile:function(a,c){c.$set("ngCloak", +u);a.removeClass("ng-cloak")}}),fe=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],Dc={},cg={blur:!0,focus:!0};s("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(a){var c=ya("ng-"+a);Dc[c]=["$parse","$rootScope",function(d,e){return{restrict:"A",compile:function(f,g){var h=d(g[c],null,!0);return function(c,d){d.on(a,function(d){var f=function(){h(c,{$event:d})}; +cg[a]&&e.$$phase?c.$evalAsync(f):c.$apply(f)})}}}}]});var ie=["$animate",function(a){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(c,d,e,f,g){var h,l,k;c.$watch(e.ngIf,function(c){c?l||g(function(c,f){l=f;c[c.length++]=X.createComment(" end ngIf: "+e.ngIf+" ");h={clone:c};a.enter(c,d.parent(),d)}):(k&&(k.remove(),k=null),l&&(l.$destroy(),l=null),h&&(k=ub(h.clone),a.leave(k).then(function(){k=null}),h=null))})}}}],je=["$templateRequest","$anchorScroll", +"$animate","$sce",function(a,c,d,e){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:aa.noop,compile:function(f,g){var h=g.ngInclude||g.src,l=g.onload||"",k=g.autoscroll;return function(f,g,q,s,r){var u=0,w,n,D,H=function(){n&&(n.remove(),n=null);w&&(w.$destroy(),w=null);D&&(d.leave(D).then(function(){n=null}),n=D,D=null)};f.$watch(e.parseAsResourceUrl(h),function(e){var h=function(){!y(k)||k&&!f.$eval(k)||c()},n=++u;e?(a(e,!0).then(function(a){if(n===u){var c=f.$new(); +s.template=a;a=r(c,function(a){H();d.enter(a,null,g).then(h)});w=c;D=a;w.$emit("$includeContentLoaded",e);f.$eval(l)}},function(){n===u&&(H(),f.$emit("$includeContentError",e))}),f.$emit("$includeContentRequested",e)):(H(),s.template=null)})}}}}],Ae=["$compile",function(a){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(c,d,e,f){/SVG/.test(d[0].toString())?(d.empty(),a(Gc(f.template,X).childNodes)(c,function(a){d.append(a)},{futureParentElement:d})):(d.html(f.template),a(d.contents())(c))}}}], +ke=Ja({priority:450,compile:function(){return{pre:function(a,c,d){a.$eval(d.ngInit)}}}}),we=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(a,c,d,e){var f=c.attr(d.$attr.ngList)||", ",g="false"!==d.ngTrim,h=g?T(f):f;e.$parsers.push(function(a){if(!z(a)){var c=[];a&&s(a.split(h),function(a){a&&c.push(g?T(a):a)});return c}});e.$formatters.push(function(a){return E(a)?a.join(f):u});e.$isEmpty=function(a){return!a||!a.length}}}},lb="ng-valid",vd="ng-invalid",Sa="ng-pristine", +Mb="ng-dirty",xd="ng-pending",Ob=new M("ngModel"),dg=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function(a,c,d,e,f,g,h,l,k,m){this.$modelValue=this.$viewValue=Number.NaN;this.$$rawModelValue=u;this.$validators={};this.$asyncValidators={};this.$parsers=[];this.$formatters=[];this.$viewChangeListeners=[];this.$untouched=!0;this.$touched=!1;this.$pristine=!0;this.$dirty=!1;this.$valid=!0;this.$invalid=!1;this.$error={};this.$$success= +{};this.$pending=u;this.$name=m(d.name||"",!1)(a);var p=f(d.ngModel),q=p.assign,t=p,r=q,w=null,C,n=this;this.$$setOptions=function(a){if((n.$options=a)&&a.getterSetter){var c=f(d.ngModel+"()"),g=f(d.ngModel+"($$$p)");t=function(a){var d=p(a);G(d)&&(d=c(a));return d};r=function(a,c){G(p(a))?g(a,{$$$p:n.$modelValue}):q(a,n.$modelValue)}}else if(!p.assign)throw Ob("nonassign",d.ngModel,ua(e));};this.$render=B;this.$isEmpty=function(a){return z(a)||""===a||null===a||a!==a};var D=e.inheritedData("$formController")|| +Lb,H=0;sd({ctrl:this,$element:e,set:function(a,c){a[c]=!0},unset:function(a,c){delete a[c]},parentForm:D,$animate:g});this.$setPristine=function(){n.$dirty=!1;n.$pristine=!0;g.removeClass(e,Mb);g.addClass(e,Sa)};this.$setDirty=function(){n.$dirty=!0;n.$pristine=!1;g.removeClass(e,Sa);g.addClass(e,Mb);D.$setDirty()};this.$setUntouched=function(){n.$touched=!1;n.$untouched=!0;g.setClass(e,"ng-untouched","ng-touched")};this.$setTouched=function(){n.$touched=!0;n.$untouched=!1;g.setClass(e,"ng-touched", +"ng-untouched")};this.$rollbackViewValue=function(){h.cancel(w);n.$viewValue=n.$$lastCommittedViewValue;n.$render()};this.$validate=function(){if(!V(n.$modelValue)||!isNaN(n.$modelValue)){var a=n.$$rawModelValue,c=n.$valid,d=n.$modelValue,e=n.$options&&n.$options.allowInvalid;n.$$runValidators(a,n.$$lastCommittedViewValue,function(f){e||c===f||(n.$modelValue=f?a:u,n.$modelValue!==d&&n.$$writeModelToScope())})}};this.$$runValidators=function(a,c,d){function e(){var d=!0;s(n.$validators,function(e, +f){var h=e(a,c);d=d&&h;g(f,h)});return d?!0:(s(n.$asyncValidators,function(a,c){g(c,null)}),!1)}function f(){var d=[],e=!0;s(n.$asyncValidators,function(f,h){var k=f(a,c);if(!k||!G(k.then))throw Ob("$asyncValidators",k);g(h,u);d.push(k.then(function(){g(h,!0)},function(a){e=!1;g(h,!1)}))});d.length?k.all(d).then(function(){h(e)},B):h(!0)}function g(a,c){l===H&&n.$setValidity(a,c)}function h(a){l===H&&d(a)}H++;var l=H;(function(){var a=n.$$parserName||"parse";if(C===u)g(a,null);else return C||(s(n.$validators, +function(a,c){g(c,null)}),s(n.$asyncValidators,function(a,c){g(c,null)})),g(a,C),C;return!0})()?e()?f():h(!1):h(!1)};this.$commitViewValue=function(){var a=n.$viewValue;h.cancel(w);if(n.$$lastCommittedViewValue!==a||""===a&&n.$$hasNativeValidators)n.$$lastCommittedViewValue=a,n.$pristine&&this.$setDirty(),this.$$parseAndValidate()};this.$$parseAndValidate=function(){var c=n.$$lastCommittedViewValue;if(C=z(c)?u:!0)for(var d=0;dA;)d=u.pop(),m(O,d.label,!1),d.element.remove()}for(;P.length> +x;){l=P.pop();for(A=1;Aa&&q.removeOption(c)})}var v;if(!(v=r.match(d)))throw fg("iexp",r,ua(f));var C=c(v[2]||v[1]),B=v[4]||v[6],x=/ as /.test(v[0])&&v[1],z=x?c(x):null,G=v[5],J=c(v[3]||""),A=c(v[2]?v[1]:B),N=c(v[7]),K=v[8]?c(v[8]):null,Q={},P=[[{element:f,label:""}]],R={};w&&(a(w)(e),w.removeClass("ng-scope"),w.remove());f.empty();f.on("change",function(){e.$apply(function(){var a=N(e)||[],c;if(t)c=[],s(f.val(), +function(d){d=K?Q[d]:d;c.push("?"===d?u:""===d?null:h(z?z:A,d,a[d]))});else{var d=K?Q[f.val()]:f.val();c="?"===d?u:""===d?null:h(z?z:A,d,a[d])}g.$setViewValue(c);p()})});g.$render=p;e.$watchCollection(N,l);e.$watchCollection(function(){var a=N(e),c;if(a&&E(a)){c=Array(a.length);for(var d=0,f=a.length;df||e.$isEmpty(c)||c.length<=f}}}}},Bc=function(){return{restrict:"A",require:"?ngModel",link:function(a,c,d,e){if(e){var f=0;d.$observe("minlength",function(a){f=$(a)||0;e.$validate()});e.$validators.minlength=function(a,c){return e.$isEmpty(c)||c.length>=f}}}}};P.angular.bootstrap?console.log("WARNING: Tried to load angular more than once."):(Nd(),Pd(aa),C(X).ready(function(){Jd(X,tc)}))})(window,document);!window.angular.$$csp()&&window.angular.element(document).find("head").prepend(''); +//# sourceMappingURL=angular.min.js.map \ No newline at end of file diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angularjs-datetime-picker/angularjs-datetime-picker.css b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angularjs-datetime-picker/angularjs-datetime-picker.css new file mode 100644 index 00000000..240be45b --- /dev/null +++ b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angularjs-datetime-picker/angularjs-datetime-picker.css @@ -0,0 +1,74 @@ +.angularjs-datetime-picker { + color: #333; + font: normal 14px sans-serif; + border: 1px solid #ddd; + display: inline-block; + background: #fff; +} +.angularjs-datetime-picker > .adp-month { + text-align: center; + line-height: 22px; + padding: 10px; + background: #fcfcfc; + text-transform: uppercase; + font-weight: bold; + border-bottom: 1px solid #ddd; + position: relative; +} +.angularjs-datetime-picker > .adp-month > button { + color: #555; + font: normal 14px sans-serif; + outline: none; + position: absolute; + background: transparent; + border: none; + cursor: pointer; +} +.angularjs-datetime-picker > .adp-month > button:hover { + color: #333; +} +.angularjs-datetime-picker > .adp-month > button.adp-prev { + left: 10px; +} +.angularjs-datetime-picker > .adp-month > button.adp-next { + right: 10px; +} +.angularjs-datetime-picker > .adp-days { + width: 210px; /* 30 x 7 */ + margin: 10px; + text-align: center; +} +.angularjs-datetime-picker > .adp-days > .adp-day-of-week, .angularjs-datetime-picker > .adp-days > .adp-day { + box-sizing: border-box; + -moz-box-sizing: border-box; + border: 1px solid transparent; + width: 30px; + line-height: 28px; + float: left; +} +.angularjs-datetime-picker > .adp-days > .adp-day-of-week { + font-weight: bold; +} +.angularjs-datetime-picker > .adp-days > .adp-day:not(.selectable) { + opacity: 0.15; + cursor: default; +} +.angularjs-datetime-picker > .adp-days > .adp-day.selectable { + cursor: pointer; +} +.angularjs-datetime-picker > .adp-days > .adp-day.selected { + background: #e0e0e0; +} +.angularjs-datetime-picker > .adp-days > .adp-day.selectable:hover { + background: #eee; +} +.angularjs-datetime-picker > .adp-days:after { + content: ''; + display: block; + clear: left; + height: 0; +} + +.angularjs-datetime-picker input[type=range] { + width: 150px; +} diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angularjs-datetime-picker/angularjs-datetime-picker.js b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angularjs-datetime-picker/angularjs-datetime-picker.js new file mode 100644 index 00000000..946f12e8 --- /dev/null +++ b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angularjs-datetime-picker/angularjs-datetime-picker.js @@ -0,0 +1,332 @@ +(function() { + 'use strict'; + + angular.module('angularjs-datetime-picker', []); + + var getTimezoneOffset = function(date) { + (typeof date == 'string') && (date = new Date(date)); + var jan = new Date(date.getFullYear(), 0, 1); + var jul = new Date(date.getFullYear(), 6, 1); + var stdTimezoneOffset = Math.max(jan.getTimezoneOffset(), jul.getTimezoneOffset()); + var isDST = date.getTimezoneOffset() < stdTimezoneOffset; + var offset = isDST ? stdTimezoneOffset - 60 : stdTimezoneOffset; + var diff = offset >=0 ? '-' : '+'; + return diff + + ("0"+ (offset / 60)).slice(-2) + ':' + + ("0"+ (offset % 60)).slice(-2); + }; + + var DatetimePicker = function($compile, $document, $controller){ + var datetimePickerCtrl = $controller('DatetimePickerCtrl'); //directive controller + return { + open: function(options) { + datetimePickerCtrl.openDatetimePicker(options); + }, + close: function() { + datetimePickerCtrl.closeDatetimePicker(); + } + }; + }; + DatetimePicker.$inject = ['$compile', '$document', '$controller']; + angular.module('angularjs-datetime-picker').factory('DatetimePicker', DatetimePicker); + + var DatetimePickerCtrl = function($compile, $document) { + var datetimePickerEl; + var _this = this; + var removeEl = function(el) { + el && el.remove(); + $document[0].body.removeEventListener('click', _this.closeDatetimePicker); + }; + + this.openDatetimePicker = function(options) { + this.closeDatetimePicker(); + var div = angular.element('
'); + options.dateFormat && div.attr('date-format', options.dateFormat); + options.ngModel && div.attr('ng-model', options.ngModel); + options.year && div.attr('year', parseInt(options.year)); + options.month && div.attr('month', parseInt(options.month)); + options.day && div.attr('day', parseInt(options.day)); + options.hour && div.attr('hour', parseInt(options.hour)); + options.minute && div.attr('minute', parseInt(options.minute)); + if (options.dateOnly === '' || options.dateOnly === true) { + div.attr('date-only', 'true'); + } + if (options.closeOnSelect === 'false') { + div.attr('close-on-select', 'false'); + } + + var triggerEl = options.triggerEl; + options.scope = options.scope || angular.element(triggerEl).scope(); + datetimePickerEl = $compile(div)(options.scope)[0]; + datetimePickerEl.triggerEl = options.triggerEl; + + $document[0].body.appendChild(datetimePickerEl); + + //show datetimePicker below triggerEl + var bcr = triggerEl.getBoundingClientRect(); + datetimePickerEl.style.position='absolute'; + datetimePickerEl.style.left= (bcr.left + window.scrollX) + 'px'; + + options.scope.$apply(); + + var datePickerElBcr = datetimePickerEl.getBoundingClientRect(); + + if (bcr.top < 300 || window.innerHeight - bcr.bottom > 300) { + datetimePickerEl.style.top = (bcr.bottom + window.scrollY) + 'px'; + } else { + datetimePickerEl.style.top = (bcr.top - datePickerElBcr.height + window.scrollY) + 'px'; + } + + $document[0].body.addEventListener('click', this.closeDatetimePicker); + }; + + this.closeDatetimePicker = function(evt) { + var target = evt && evt.target; + var popupEl = $document[0].querySelector('div[datetime-picker-popup]'); + if (evt && target) { + if (target.hasAttribute('datetime-picker')) { // element with datetimePicker behaviour + // do nothing + } else if (popupEl && popupEl.contains(target)) { // datetimePicker itself + // do nothing + } else { + removeEl(popupEl); + } + } else { + removeEl(popupEl); + } + } + }; + DatetimePickerCtrl.$inject = ['$compile', '$document']; + angular.module('angularjs-datetime-picker').controller('DatetimePickerCtrl', DatetimePickerCtrl); + + var tmpl = [ + '
' , + '
', + ' ', + ' {{months[mv.month].shortName}} {{mv.year}}', + ' ', + '
', + '
', + '
{{::dayOfWeek.firstLetter}}
', + '
{{::day}}
', + '
{{::day}}
', + '
{{::day}}
', + '
', + '
', + ' Time : {{("0"+inputHour).slice(-2)}} : {{("0"+inputMinute).slice(-2)}}
', + ' ', + ' ', + '
', + '
'].join("\n"); + + var datetimePickerPopup = function($locale, dateFilter){ + var days, months, daysOfWeek, firstDayOfWeek; + + var initVars = function() { + days =[], months=[]; daysOfWeek=[], firstDayOfWeek=0; + for (var i = 1; i <= 31; i++) { + days.push(i); + } + + for (var i = 0; i < 12; i++) { //jshint ignore:line + months.push({ + fullName: $locale.DATETIME_FORMATS.MONTH[i], + shortName: $locale.DATETIME_FORMATS.SHORTMONTH[i] + }); + } + + for (var i = 0; i < 7; i++) { //jshint ignore:line + var day = $locale.DATETIME_FORMATS.DAY[(i + firstDayOfWeek) % 7]; + + daysOfWeek.push({ + fullName: day, + firstLetter: day.substr(0, 2) + }); + } + firstDayOfWeek = $locale.DATETIME_FORMATS.FIRSTDAYOFWEEK || 0; + }; + + var getMonthView = function(year, month) { + if (month>11) { + year++; + } else if (month < 0) { + year--; + } + month = (month + 12) % 12; + var firstDayOfMonth = new Date(year, month, 1), + lastDayOfMonth = new Date(year, month + 1, 0), + lastDayOfPreviousMonth = new Date(year, month, 0), + daysInMonth = lastDayOfMonth.getDate(), + daysInLastMonth = lastDayOfPreviousMonth.getDate(), + dayOfWeek = firstDayOfMonth.getDay(), + leadingDays = (dayOfWeek - firstDayOfWeek + 7) % 7 || 7, // Ensure there are always leading days to give context + trailingDays = days.slice(0, 6 * 7 - (leadingDays + daysInMonth)); + if (trailingDays.length > 7) { + trailingDays = trailingDays.slice(0, trailingDays.length-7); + } + + return { + year: year, + month: month, + days: days.slice(0, daysInMonth), + leadingDays: days.slice(- leadingDays - (31 - daysInLastMonth), daysInLastMonth), + trailingDays: trailingDays + }; + }; + + var linkFunc = function(scope, element, attrs, ctrl) { //jshint ignore:line + initVars(); //initialize days, months, daysOfWeek, and firstDayOfWeek; + var dateFormat = attrs.dateFormat || 'short'; + scope.months = months; + scope.daysOfWeek = daysOfWeek; + scope.inputHour; + scope.inputMinute; + + if (scope.dateOnly === true){ + element[0].querySelector('#adp-time').style.display = 'none'; + } + + scope.$applyAsync( function() { + ctrl.triggerEl = angular.element(element[0].triggerEl); + if (attrs.ngModel) { // need to parse date string + var dateStr = ''+ctrl.triggerEl.scope().$eval(attrs.ngModel); + if (dateStr) { + if (!dateStr.match(/[0-9]{2}:/)) { // if no time is given, add 00:00:00 at the end + dateStr += " 00:00:00"; + } + dateStr = dateStr.replace(/([0-9]{2}-[0-9]{2})-([0-9]{4})/,'$2-$1'); //mm-dd-yyyy to yyyy-mm-dd + dateStr = dateStr.replace(/([\/-][0-9]{2,4})\ ([0-9]{2}\:[0-9]{2}\:)/,'$1T$2'); //reformat for FF + dateStr = dateStr.replace(/EDT|EST|CDT|CST|MDT|PDT|PST|UT|GMT/g,''); //remove timezone + dateStr = dateStr.replace(/\s*\(\)\s*/,''); //remove timezone + dateStr = dateStr.replace(/[\-\+][0-9]{2}:?[0-9]{2}$/,''); //remove timezone + dateStr += getTimezoneOffset(dateStr); + var d = new Date(dateStr); + scope.selectedDate = new Date( + d.getFullYear(), + d.getMonth(), + d.getDate(), + d.getHours(), + d.getMinutes(), + d.getSeconds() + ); + } + } + + if (!scope.selectedDate || isNaN(scope.selectedDate.getTime())) { // no predefined date + var today = new Date(); + var year = scope.year || today.getFullYear(); + var month = scope.month ? (scope.month-1) : today.getMonth(); + var day = scope.day || today.getDate(); + var hour = scope.hour || today.getHours(); + var minute = scope.minute || today.getMinutes(); + scope.selectedDate = new Date(year, month, day, hour, minute, 0); + } + scope.inputHour = scope.selectedDate.getHours(); + scope.inputMinute = scope.selectedDate.getMinutes(); + + // Default to current year and month + scope.mv = getMonthView(scope.selectedDate.getFullYear(), scope.selectedDate.getMonth()); + if (scope.mv.year == scope.selectedDate.getFullYear() && scope.mv.month == scope.selectedDate.getMonth()) { + scope.selectedDay = scope.selectedDate.getDate(); + } else { + scope.selectedDay = null; + } + }); + + scope.addMonth = function (amount) { + scope.mv = getMonthView(scope.mv.year, scope.mv.month + amount); + }; + + scope.setDate = function (evt) { + var target = angular.element(evt.target)[0]; + if (target.className.indexOf('selectable')) { + scope.updateNgModel(parseInt(target.innerHTML)); + if (scope.closeOnSelect !== false) { + ctrl.closeDatetimePicker(); + } + } + }; + + scope.updateNgModel = function(day) { + day = day ? day : scope.selectedDate.getDate(); + scope.selectedDate = new Date( + scope.mv.year, scope.mv.month, day, scope.inputHour, scope.inputMinute, 0 + ); + scope.selectedDay = scope.selectedDate.getDate(); + if (attrs.ngModel) { + //console.log('attrs.ngModel',attrs.ngModel); + var elScope = ctrl.triggerEl.scope(), dateValue; + if (elScope.$eval(attrs.ngModel) && elScope.$eval(attrs.ngModel).constructor.name === 'Date') { + dateValue = new Date(dateFilter(scope.selectedDate, dateFormat)); + } else { + dateValue = dateFilter(scope.selectedDate, dateFormat); + } + elScope.$eval(attrs.ngModel + '= date', {date: dateValue}); + } + }; + + scope.$on('$destroy', ctrl.closeDatetimePicker); + }; + + return { + restrict: 'A', + template: tmpl, + controller: 'DatetimePickerCtrl', + replace: true, + scope: { + year: '=', + month: '=', + day: '=', + hour: '=', + minute: '=', + dateOnly: '=', + closeOnSelect: '=' + }, + link: linkFunc + }; + }; + datetimePickerPopup.$inject = ['$locale', 'dateFilter']; + angular.module('angularjs-datetime-picker').directive('datetimePickerPopup', datetimePickerPopup); + + var datetimePicker = function($parse, DatetimePicker) { + return { + // An ngModel is required to get the controller argument + require: 'ngModel', + link: function(scope, element, attrs, ctrl) { + // Attach validation watcher + scope.$watch(attrs.ngModel, function(value) { + if( !value || value == '' ){ + return; + } + // The value has already been cleaned by the above code + var date = new Date(value); + ctrl.$setValidity('date', !date? false : true); + var now = new Date(); + if( attrs.hasOwnProperty('futureOnly') ){ + ctrl.$setValidity('future-only', date < now? false : true); + } + }); + + element[0].addEventListener('click', function() { + DatetimePicker.open({ + triggerEl: element[0], + dateFormat: attrs.dateFormat, + ngModel: attrs.ngModel, + year: attrs.year, + month: attrs.month, + day: attrs.day, + hour: attrs.hour, + minute: attrs.minute, + dateOnly: attrs.dateOnly, + futureOnly: attrs.futureOnly, + closeOnSelect: attrs.closeOnSelect + }); + }); + } + }; + }; + datetimePicker.$inject=['$parse', 'DatetimePicker']; + angular.module('angularjs-datetime-picker').directive('datetimePicker', datetimePicker); + +})(); diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angularjs-datetime-picker/angularjs-datetime-picker.min.js b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angularjs-datetime-picker/angularjs-datetime-picker.min.js new file mode 100644 index 00000000..bc6c19ac --- /dev/null +++ b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/angularjs-datetime-picker/angularjs-datetime-picker.min.js @@ -0,0 +1 @@ +!function(){"use strict";angular.module("angularjs-datetime-picker",[]);var e=function(e){"string"==typeof e&&(e=new Date(e));var t=new Date(e.getFullYear(),0,1),a=new Date(e.getFullYear(),6,1),n=Math.max(t.getTimezoneOffset(),a.getTimezoneOffset()),l=e.getTimezoneOffset()=0?"-":"+";return i+("0"+r/60).slice(-2)+":"+("0"+r%60).slice(-2)},t=function(e,t,a){var n=a("DatetimePickerCtrl");return{open:function(e){n.openDatetimePicker(e)},close:function(){n.closeDatetimePicker()}}};t.$inject=["$compile","$document","$controller"],angular.module("angularjs-datetime-picker").factory("DatetimePicker",t);var a=function(e,t){var a,n=this,l=function(e){e&&e.remove(),t[0].body.removeEventListener("click",n.closeDatetimePicker)};this.openDatetimePicker=function(n){this.closeDatetimePicker();var l=angular.element("
");n.dateFormat&&l.attr("date-format",n.dateFormat),n.ngModel&&l.attr("ng-model",n.ngModel),n.year&&l.attr("year",parseInt(n.year)),n.month&&l.attr("month",parseInt(n.month)),n.day&&l.attr("day",parseInt(n.day)),n.hour&&l.attr("hour",parseInt(n.hour)),n.minute&&l.attr("minute",parseInt(n.minute)),(""===n.dateOnly||n.dateOnly===!0)&&l.attr("date-only","true"),"false"===n.closeOnSelect&&l.attr("close-on-select","false");var r=n.triggerEl;n.scope=n.scope||angular.element(r).scope(),a=e(l)(n.scope)[0],a.triggerEl=n.triggerEl,t[0].body.appendChild(a);var i=r.getBoundingClientRect();a.style.position="absolute",a.style.left=i.left+window.scrollX+"px",n.scope.$apply();var o=a.getBoundingClientRect();a.style.top=i.top<300||window.innerHeight-i.bottom>300?i.bottom+window.scrollY+"px":i.top-o.height+window.scrollY+"px",t[0].body.addEventListener("click",this.closeDatetimePicker)},this.closeDatetimePicker=function(e){var a=e&&e.target,n=t[0].querySelector("div[datetime-picker-popup]");e&&a?a.hasAttribute("datetime-picker")||n&&n.contains(a)||l(n):l(n)}};a.$inject=["$compile","$document"],angular.module("angularjs-datetime-picker").controller("DatetimePickerCtrl",a);var n=['
','
',' ',' {{months[mv.month].shortName}} {{mv.year}}',' ',"
",'
','
{{::dayOfWeek.firstLetter}}
','
{{::day}}
','
{{::day}}
','
{{::day}}
',"
",'
',' Time : {{("0"+inputHour).slice(-2)}} : {{("0"+inputMinute).slice(-2)}}
',' ',' ',"
","
"].join("\n"),l=function(t,a){var l,r,i,o,c=function(){l=[],r=[],i=[],o=0;for(var e=1;31>=e;e++)l.push(e);for(var e=0;12>e;e++)r.push({fullName:t.DATETIME_FORMATS.MONTH[e],shortName:t.DATETIME_FORMATS.SHORTMONTH[e]});for(var e=0;7>e;e++){var a=t.DATETIME_FORMATS.DAY[(e+o)%7];i.push({fullName:a,firstLetter:a.substr(0,2)})}o=t.DATETIME_FORMATS.FIRSTDAYOFWEEK||0},d=function(e,t){t>11?e++:0>t&&e--,t=(t+12)%12;var a=new Date(e,t,1),n=new Date(e,t+1,0),r=new Date(e,t,0),i=n.getDate(),c=r.getDate(),d=a.getDay(),s=(d-o+7)%7||7,u=l.slice(0,42-(s+i));return u.length>7&&(u=u.slice(0,u.length-7)),{year:e,month:t,days:l.slice(0,i),leadingDays:l.slice(-s-(31-c),c),trailingDays:u}},s=function(t,n,l,o){c();var s=l.dateFormat||"short";t.months=r,t.daysOfWeek=i,t.inputHour,t.inputMinute,t.dateOnly===!0&&(n[0].querySelector("#adp-time").style.display="none"),t.$applyAsync(function(){if(o.triggerEl=angular.element(n[0].triggerEl),l.ngModel){var a=""+o.triggerEl.scope().$eval(l.ngModel);if(a){a.match(/[0-9]{2}:/)||(a+=" 00:00:00"),a=a.replace(/([0-9]{2}-[0-9]{2})-([0-9]{4})/,"$2-$1"),a=a.replace(/([\/-][0-9]{2,4})\ ([0-9]{2}\:[0-9]{2}\:)/,"$1T$2"),a=a.replace(/EDT|EST|CDT|CST|MDT|PDT|PST|UT|GMT/g,""),a=a.replace(/\s*\(\)\s*/,""),a=a.replace(/[\-\+][0-9]{2}:?[0-9]{2}$/,""),a+=e(a);var r=new Date(a);t.selectedDate=new Date(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds())}}if(!t.selectedDate||isNaN(t.selectedDate.getTime())){var i=new Date,c=t.year||i.getFullYear(),s=t.month?t.month-1:i.getMonth(),u=t.day||i.getDate(),m=t.hour||i.getHours(),g=t.minute||i.getMinutes();t.selectedDate=new Date(c,s,u,m,g,0)}t.inputHour=t.selectedDate.getHours(),t.inputMinute=t.selectedDate.getMinutes(),t.mv=d(t.selectedDate.getFullYear(),t.selectedDate.getMonth()),t.selectedDay=t.mv.year==t.selectedDate.getFullYear()&&t.mv.month==t.selectedDate.getMonth()?t.selectedDate.getDate():null}),t.addMonth=function(e){t.mv=d(t.mv.year,t.mv.month+e)},t.setDate=function(e){var a=angular.element(e.target)[0];a.className.indexOf("selectable")&&(t.updateNgModel(parseInt(a.innerHTML)),t.closeOnSelect!==!1&&o.closeDatetimePicker())},t.updateNgModel=function(e){if(e=e?e:t.selectedDate.getDate(),t.selectedDate=new Date(t.mv.year,t.mv.month,e,t.inputHour,t.inputMinute,0),t.selectedDay=t.selectedDate.getDate(),l.ngModel){var n,r=o.triggerEl.scope();n=r.$eval(l.ngModel)&&"Date"===r.$eval(l.ngModel).constructor.name?new Date(a(t.selectedDate,s)):a(t.selectedDate,s),r.$eval(l.ngModel+"= date",{date:n})}},t.$on("$destroy",o.closeDatetimePicker)};return{restrict:"A",template:n,controller:"DatetimePickerCtrl",replace:!0,scope:{year:"=",month:"=",day:"=",hour:"=",minute:"=",dateOnly:"=",closeOnSelect:"="},link:s}};l.$inject=["$locale","dateFilter"],angular.module("angularjs-datetime-picker").directive("datetimePickerPopup",l);var r=function(e,t){return{require:"ngModel",link:function(e,a,n,l){e.$watch(n.ngModel,function(e){if(e&&""!=e){var t=new Date(e);l.$setValidity("date",t?!0:!1);var a=new Date;n.hasOwnProperty("futureOnly")&&l.$setValidity("future-only",a>t?!1:!0)}}),a[0].addEventListener("click",function(){t.open({triggerEl:a[0],dateFormat:n.dateFormat,ngModel:n.ngModel,year:n.year,month:n.month,day:n.day,hour:n.hour,minute:n.minute,dateOnly:n.dateOnly,futureOnly:n.futureOnly,closeOnSelect:n.closeOnSelect})})}}};r.$inject=["$parse","DatetimePicker"],angular.module("angularjs-datetime-picker").directive("datetimePicker",r)}(); \ No newline at end of file diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/bootstrap-3.3.7/package.json b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/bootstrap-3.3.7/package.json new file mode 100644 index 00000000..fe4b31de --- /dev/null +++ b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/bootstrap-3.3.7/package.json @@ -0,0 +1,89 @@ +{ + "name": "bootstrap", + "description": "The most popular front-end framework for developing responsive, mobile first projects on the web.", + "version": "3.3.7", + "keywords": [ + "css", + "less", + "mobile-first", + "responsive", + "front-end", + "framework", + "web" + ], + "homepage": "http://getbootstrap.com", + "author": "Twitter, Inc.", + "scripts": { + "change-version": "node grunt/change-version.js", + "update-shrinkwrap": "npm shrinkwrap --dev && shx mv ./npm-shrinkwrap.json ./grunt/npm-shrinkwrap.json", + "test": "grunt test" + }, + "style": "dist/css/bootstrap.css", + "less": "less/bootstrap.less", + "main": "./dist/js/npm", + "repository": { + "type": "git", + "url": "https://github.com/twbs/bootstrap.git" + }, + "bugs": { + "url": "https://github.com/twbs/bootstrap/issues" + }, + "license": "MIT", + "devDependencies": { + "btoa": "~1.1.2", + "glob": "~7.0.3", + "grunt": "~1.0.1", + "grunt-autoprefixer": "~3.0.4", + "grunt-contrib-clean": "~1.0.0", + "grunt-contrib-compress": "~1.3.0", + "grunt-contrib-concat": "~1.0.0", + "grunt-contrib-connect": "~1.0.0", + "grunt-contrib-copy": "~1.0.0", + "grunt-contrib-csslint": "~1.0.0", + "grunt-contrib-cssmin": "~1.0.0", + "grunt-contrib-htmlmin": "~1.5.0", + "grunt-contrib-jshint": "~1.0.0", + "grunt-contrib-less": "~1.3.0", + "grunt-contrib-pug": "~1.0.0", + "grunt-contrib-qunit": "~0.7.0", + "grunt-contrib-uglify": "~1.0.0", + "grunt-contrib-watch": "~1.0.0", + "grunt-csscomb": "~3.1.0", + "grunt-exec": "~1.0.0", + "grunt-html": "~8.0.1", + "grunt-jekyll": "~0.4.4", + "grunt-jscs": "~3.0.1", + "grunt-saucelabs": "~9.0.0", + "load-grunt-tasks": "~3.5.0", + "markdown-it": "^7.0.0", + "shelljs": "^0.7.0", + "shx": "^0.1.2", + "time-grunt": "^1.3.0" + }, + "engines": { + "node": ">=0.10.1" + }, + "files": [ + "dist", + "fonts", + "grunt", + "js/*.js", + "less/**/*.less", + "Gruntfile.js", + "LICENSE" + ], + "jspm": { + "main": "js/bootstrap", + "shim": { + "js/bootstrap": { + "deps": "jquery", + "exports": "$" + } + }, + "files": [ + "css", + "fonts", + "js" + ] + } +} diff --git a/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/jquery.min.js b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/jquery.min.js new file mode 100644 index 00000000..4d9b3a25 --- /dev/null +++ b/configbackuprestore/vnfconfigbackupservice/src/main/webapp/node_modules/jquery.min.js @@ -0,0 +1,2 @@ +/*! jQuery v3.3.1 | (c) JS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){"use strict";var n=[],r=e.document,i=Object.getPrototypeOf,o=n.slice,a=n.concat,s=n.push,u=n.indexOf,l={},c=l.toString,f=l.hasOwnProperty,p=f.toString,d=p.call(Object),h={},g=function e(t){return"function"==typeof t&&"number"!=typeof t.nodeType},y=function e(t){return null!=t&&t===t.window},v={type:!0,src:!0,noModule:!0};function m(e,t,n){var i,o=(t=t||r).createElement("script");if(o.text=e,n)for(i in v)n[i]&&(o[i]=n[i]);t.head.appendChild(o).parentNode.removeChild(o)}function x(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[c.call(e)]||"object":typeof e}var b="3.3.1",w=function(e,t){return new w.fn.init(e,t)},T=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;w.fn=w.prototype={jquery:"3.3.1",constructor:w,length:0,toArray:function(){return o.call(this)},get:function(e){return null==e?o.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=w.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return w.each(this,e)},map:function(e){return this.pushStack(w.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(o.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n0&&t-1 in e)}var E=function(e){var t,n,r,i,o,a,s,u,l,c,f,p,d,h,g,y,v,m,x,b="sizzle"+1*new Date,w=e.document,T=0,C=0,E=ae(),k=ae(),S=ae(),D=function(e,t){return e===t&&(f=!0),0},N={}.hasOwnProperty,A=[],j=A.pop,q=A.push,L=A.push,H=A.slice,O=function(e,t){for(var n=0,r=e.length;n+~]|"+M+")"+M+"*"),z=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),X=new RegExp(W),U=new RegExp("^"+R+"$"),V={ID:new RegExp("^#("+R+")"),CLASS:new RegExp("^\\.("+R+")"),TAG:new RegExp("^("+R+"|[*])"),ATTR:new RegExp("^"+I),PSEUDO:new RegExp("^"+W),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+P+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},G=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,Q=/^[^{]+\{\s*\[native \w/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,K=/[+~]/,Z=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),ee=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},te=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ne=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},re=function(){p()},ie=me(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{L.apply(A=H.call(w.childNodes),w.childNodes),A[w.childNodes.length].nodeType}catch(e){L={apply:A.length?function(e,t){q.apply(e,H.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function oe(e,t,r,i){var o,s,l,c,f,h,v,m=t&&t.ownerDocument,T=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==T&&9!==T&&11!==T)return r;if(!i&&((t?t.ownerDocument||t:w)!==d&&p(t),t=t||d,g)){if(11!==T&&(f=J.exec(e)))if(o=f[1]){if(9===T){if(!(l=t.getElementById(o)))return r;if(l.id===o)return r.push(l),r}else if(m&&(l=m.getElementById(o))&&x(t,l)&&l.id===o)return r.push(l),r}else{if(f[2])return L.apply(r,t.getElementsByTagName(e)),r;if((o=f[3])&&n.getElementsByClassName&&t.getElementsByClassName)return L.apply(r,t.getElementsByClassName(o)),r}if(n.qsa&&!S[e+" "]&&(!y||!y.test(e))){if(1!==T)m=t,v=e;else if("object"!==t.nodeName.toLowerCase()){(c=t.getAttribute("id"))?c=c.replace(te,ne):t.setAttribute("id",c=b),s=(h=a(e)).length;while(s--)h[s]="#"+c+" "+ve(h[s]);v=h.join(","),m=K.test(e)&&ge(t.parentNode)||t}if(v)try{return L.apply(r,m.querySelectorAll(v)),r}catch(e){}finally{c===b&&t.removeAttribute("id")}}}return u(e.replace(B,"$1"),t,r,i)}function ae(){var e=[];function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}return t}function se(e){return e[b]=!0,e}function ue(e){var t=d.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function le(e,t){var n=e.split("|"),i=n.length;while(i--)r.attrHandle[n[i]]=t}function ce(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function fe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function pe(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function de(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&ie(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function he(e){return se(function(t){return t=+t,se(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function ge(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}n=oe.support={},o=oe.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},p=oe.setDocument=function(e){var t,i,a=e?e.ownerDocument||e:w;return a!==d&&9===a.nodeType&&a.documentElement?(d=a,h=d.documentElement,g=!o(d),w!==d&&(i=d.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",re,!1):i.attachEvent&&i.attachEvent("onunload",re)),n.attributes=ue(function(e){return e.className="i",!e.getAttribute("className")}),n.getElementsByTagName=ue(function(e){return e.appendChild(d.createComment("")),!e.getElementsByTagName("*").length}),n.getElementsByClassName=Q.test(d.getElementsByClassName),n.getById=ue(function(e){return h.appendChild(e).id=b,!d.getElementsByName||!d.getElementsByName(b).length}),n.getById?(r.filter.ID=function(e){var t=e.replace(Z,ee);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&g){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(Z,ee);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&g){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),r.find.TAG=n.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&g)return t.getElementsByClassName(e)},v=[],y=[],(n.qsa=Q.test(d.querySelectorAll))&&(ue(function(e){h.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&y.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||y.push("\\["+M+"*(?:value|"+P+")"),e.querySelectorAll("[id~="+b+"-]").length||y.push("~="),e.querySelectorAll(":checked").length||y.push(":checked"),e.querySelectorAll("a#"+b+"+*").length||y.push(".#.+[+~]")}),ue(function(e){e.innerHTML="";var t=d.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&y.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&y.push(":enabled",":disabled"),h.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&y.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),y.push(",.*:")})),(n.matchesSelector=Q.test(m=h.matches||h.webkitMatchesSelector||h.mozMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&&ue(function(e){n.disconnectedMatch=m.call(e,"*"),m.call(e,"[s!='']:x"),v.push("!=",W)}),y=y.length&&new RegExp(y.join("|")),v=v.length&&new RegExp(v.join("|")),t=Q.test(h.compareDocumentPosition),x=t||Q.test(h.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return f=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e===d||e.ownerDocument===w&&x(w,e)?-1:t===d||t.ownerDocument===w&&x(w,t)?1:c?O(c,e)-O(c,t):0:4&r?-1:1)}:function(e,t){if(e===t)return f=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===d?-1:t===d?1:i?-1:o?1:c?O(c,e)-O(c,t):0;if(i===o)return ce(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?ce(a[r],s[r]):a[r]===w?-1:s[r]===w?1:0},d):d},oe.matches=function(e,t){return oe(e,null,null,t)},oe.matchesSelector=function(e,t){if((e.ownerDocument||e)!==d&&p(e),t=t.replace(z,"='$1']"),n.matchesSelector&&g&&!S[t+" "]&&(!v||!v.test(t))&&(!y||!y.test(t)))try{var r=m.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}return oe(t,d,null,[e]).length>0},oe.contains=function(e,t){return(e.ownerDocument||e)!==d&&p(e),x(e,t)},oe.attr=function(e,t){(e.ownerDocument||e)!==d&&p(e);var i=r.attrHandle[t.toLowerCase()],o=i&&N.call(r.attrHandle,t.toLowerCase())?i(e,t,!g):void 0;return void 0!==o?o:n.attributes||!g?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},oe.escape=function(e){return(e+"").replace(te,ne)},oe.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},oe.uniqueSort=function(e){var t,r=[],i=0,o=0;if(f=!n.detectDuplicates,c=!n.sortStable&&e.slice(0),e.sort(D),f){while(t=e[o++])t===e[o]&&(i=r.push(o));while(i--)e.splice(r[i],1)}return c=null,e},i=oe.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===o||4===o)return e.nodeValue}else while(t=e[r++])n+=i(t);return n},(r=oe.selectors={cacheLength:50,createPseudo:se,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(Z,ee),e[3]=(e[3]||e[4]||e[5]||"").replace(Z,ee),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||oe.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&oe.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return V.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=a(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(Z,ee).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=E[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&E(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=oe.attr(r,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace($," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,p,d,h,g=o!==a?"nextSibling":"previousSibling",y=t.parentNode,v=s&&t.nodeName.toLowerCase(),m=!u&&!s,x=!1;if(y){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===v:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?y.firstChild:y.lastChild],a&&m){x=(d=(l=(c=(f=(p=y)[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]||[])[0]===T&&l[1])&&l[2],p=d&&y.childNodes[d];while(p=++d&&p&&p[g]||(x=d=0)||h.pop())if(1===p.nodeType&&++x&&p===t){c[e]=[T,d,x];break}}else if(m&&(x=d=(l=(c=(f=(p=t)[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]||[])[0]===T&&l[1]),!1===x)while(p=++d&&p&&p[g]||(x=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===v:1===p.nodeType)&&++x&&(m&&((c=(f=p[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]=[T,x]),p===t))break;return(x-=i)===r||x%r==0&&x/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||oe.error("unsupported pseudo: "+e);return i[b]?i(t):i.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?se(function(e,n){var r,o=i(e,t),a=o.length;while(a--)e[r=O(e,o[a])]=!(n[r]=o[a])}):function(e){return i(e,0,n)}):i}},pseudos:{not:se(function(e){var t=[],n=[],r=s(e.replace(B,"$1"));return r[b]?se(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}}),has:se(function(e){return function(t){return oe(e,t).length>0}}),contains:se(function(e){return e=e.replace(Z,ee),function(t){return(t.textContent||t.innerText||i(t)).indexOf(e)>-1}}),lang:se(function(e){return U.test(e||"")||oe.error("unsupported lang: "+e),e=e.replace(Z,ee).toLowerCase(),function(t){var n;do{if(n=g?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===h},focus:function(e){return e===d.activeElement&&(!d.hasFocus||d.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:de(!1),disabled:de(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return Y.test(e.nodeName)},input:function(e){return G.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:he(function(){return[0]}),last:he(function(e,t){return[t-1]}),eq:he(function(e,t,n){return[n<0?n+t:n]}),even:he(function(e,t){for(var n=0;n=0;)e.push(r);return e}),gt:he(function(e,t,n){for(var r=n<0?n+t:n;++r1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function be(e,t,n){for(var r=0,i=t.length;r-1&&(o[l]=!(a[l]=f))}}else v=we(v===a?v.splice(h,v.length):v),i?i(null,a,v,u):L.apply(a,v)})}function Ce(e){for(var t,n,i,o=e.length,a=r.relative[e[0].type],s=a||r.relative[" "],u=a?1:0,c=me(function(e){return e===t},s,!0),f=me(function(e){return O(t,e)>-1},s,!0),p=[function(e,n,r){var i=!a&&(r||n!==l)||((t=n).nodeType?c(e,n,r):f(e,n,r));return t=null,i}];u1&&xe(p),u>1&&ve(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(B,"$1"),n,u0,i=e.length>0,o=function(o,a,s,u,c){var f,h,y,v=0,m="0",x=o&&[],b=[],w=l,C=o||i&&r.find.TAG("*",c),E=T+=null==w?1:Math.random()||.1,k=C.length;for(c&&(l=a===d||a||c);m!==k&&null!=(f=C[m]);m++){if(i&&f){h=0,a||f.ownerDocument===d||(p(f),s=!g);while(y=e[h++])if(y(f,a||d,s)){u.push(f);break}c&&(T=E)}n&&((f=!y&&f)&&v--,o&&x.push(f))}if(v+=m,n&&m!==v){h=0;while(y=t[h++])y(x,b,a,s);if(o){if(v>0)while(m--)x[m]||b[m]||(b[m]=j.call(u));b=we(b)}L.apply(u,b),c&&!o&&b.length>0&&v+t.length>1&&oe.uniqueSort(u)}return c&&(T=E,l=w),x};return n?se(o):o}return s=oe.compile=function(e,t){var n,r=[],i=[],o=S[e+" "];if(!o){t||(t=a(e)),n=t.length;while(n--)(o=Ce(t[n]))[b]?r.push(o):i.push(o);(o=S(e,Ee(i,r))).selector=e}return o},u=oe.select=function(e,t,n,i){var o,u,l,c,f,p="function"==typeof e&&e,d=!i&&a(e=p.selector||e);if(n=n||[],1===d.length){if((u=d[0]=d[0].slice(0)).length>2&&"ID"===(l=u[0]).type&&9===t.nodeType&&g&&r.relative[u[1].type]){if(!(t=(r.find.ID(l.matches[0].replace(Z,ee),t)||[])[0]))return n;p&&(t=t.parentNode),e=e.slice(u.shift().value.length)}o=V.needsContext.test(e)?0:u.length;while(o--){if(l=u[o],r.relative[c=l.type])break;if((f=r.find[c])&&(i=f(l.matches[0].replace(Z,ee),K.test(u[0].type)&&ge(t.parentNode)||t))){if(u.splice(o,1),!(e=i.length&&ve(u)))return L.apply(n,i),n;break}}}return(p||s(e,d))(i,t,!g,n,!t||K.test(e)&&ge(t.parentNode)||t),n},n.sortStable=b.split("").sort(D).join("")===b,n.detectDuplicates=!!f,p(),n.sortDetached=ue(function(e){return 1&e.compareDocumentPosition(d.createElement("fieldset"))}),ue(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||le("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),n.attributes&&ue(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||le("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ue(function(e){return null==e.getAttribute("disabled")})||le(P,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),oe}(e);w.find=E,w.expr=E.selectors,w.expr[":"]=w.expr.pseudos,w.uniqueSort=w.unique=E.uniqueSort,w.text=E.getText,w.isXMLDoc=E.isXML,w.contains=E.contains,w.escapeSelector=E.escape;var k=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&w(e).is(n))break;r.push(e)}return r},S=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},D=w.expr.match.needsContext;function N(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var A=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,t,n){return g(t)?w.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?w.grep(e,function(e){return e===t!==n}):"string"!=typeof t?w.grep(e,function(e){return u.call(t,e)>-1!==n}):w.filter(t,e,n)}w.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?w.find.matchesSelector(r,e)?[r]:[]:w.find.matches(e,w.grep(t,function(e){return 1===e.nodeType}))},w.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(w(e).filter(function(){for(t=0;t1?w.uniqueSort(n):n},filter:function(e){return this.pushStack(j(this,e||[],!1))},not:function(e){return this.pushStack(j(this,e||[],!0))},is:function(e){return!!j(this,"string"==typeof e&&D.test(e)?w(e):e||[],!1).length}});var q,L=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(w.fn.init=function(e,t,n){var i,o;if(!e)return this;if(n=n||q,"string"==typeof e){if(!(i="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:L.exec(e))||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof w?t[0]:t,w.merge(this,w.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:r,!0)),A.test(i[1])&&w.isPlainObject(t))for(i in t)g(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return(o=r.getElementById(i[2]))&&(this[0]=o,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):g(e)?void 0!==n.ready?n.ready(e):e(w):w.makeArray(e,this)}).prototype=w.fn,q=w(r);var H=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};w.fn.extend({has:function(e){var t=w(e,this),n=t.length;return this.filter(function(){for(var e=0;e-1:1===n.nodeType&&w.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?w.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?u.call(w(e),this[0]):u.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(w.uniqueSort(w.merge(this.get(),w(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function P(e,t){while((e=e[t])&&1!==e.nodeType);return e}w.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return k(e,"parentNode")},parentsUntil:function(e,t,n){return k(e,"parentNode",n)},next:function(e){return P(e,"nextSibling")},prev:function(e){return P(e,"previousSibling")},nextAll:function(e){return k(e,"nextSibling")},prevAll:function(e){return k(e,"previousSibling")},nextUntil:function(e,t,n){return k(e,"nextSibling",n)},prevUntil:function(e,t,n){return k(e,"previousSibling",n)},siblings:function(e){return S((e.parentNode||{}).firstChild,e)},children:function(e){return S(e.firstChild)},contents:function(e){return N(e,"iframe")?e.contentDocument:(N(e,"template")&&(e=e.content||e),w.merge([],e.childNodes))}},function(e,t){w.fn[e]=function(n,r){var i=w.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=w.filter(r,i)),this.length>1&&(O[e]||w.uniqueSort(i),H.test(e)&&i.reverse()),this.pushStack(i)}});var M=/[^\x20\t\r\n\f]+/g;function R(e){var t={};return w.each(e.match(M)||[],function(e,n){t[n]=!0}),t}w.Callbacks=function(e){e="string"==typeof e?R(e):w.extend({},e);var t,n,r,i,o=[],a=[],s=-1,u=function(){for(i=i||e.once,r=t=!0;a.length;s=-1){n=a.shift();while(++s-1)o.splice(n,1),n<=s&&s--}),this},has:function(e){return e?w.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=[e,(n=n||[]).slice?n.slice():n],a.push(n),t||u()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l};function I(e){return e}function W(e){throw e}function $(e,t,n,r){var i;try{e&&g(i=e.promise)?i.call(e).done(t).fail(n):e&&g(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}w.extend({Deferred:function(t){var n=[["notify","progress",w.Callbacks("memory"),w.Callbacks("memory"),2],["resolve","done",w.Callbacks("once memory"),w.Callbacks("once memory"),0,"resolved"],["reject","fail",w.Callbacks("once memory"),w.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},"catch":function(e){return i.then(null,e)},pipe:function(){var e=arguments;return w.Deferred(function(t){w.each(n,function(n,r){var i=g(e[r[4]])&&e[r[4]];o[r[1]](function(){var e=i&&i.apply(this,arguments);e&&g(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[r[0]+"With"](this,i?[e]:arguments)})}),e=null}).promise()},then:function(t,r,i){var o=0;function a(t,n,r,i){return function(){var s=this,u=arguments,l=function(){var e,l;if(!(t=o&&(r!==W&&(s=void 0,u=[e]),n.rejectWith(s,u))}};t?c():(w.Deferred.getStackHook&&(c.stackTrace=w.Deferred.getStackHook()),e.setTimeout(c))}}return w.Deferred(function(e){n[0][3].add(a(0,e,g(i)?i:I,e.notifyWith)),n[1][3].add(a(0,e,g(t)?t:I)),n[2][3].add(a(0,e,g(r)?r:W))}).promise()},promise:function(e){return null!=e?w.extend(e,i):i}},o={};return w.each(n,function(e,t){var a=t[2],s=t[5];i[t[1]]=a.add,s&&a.add(function(){r=s},n[3-e][2].disable,n[3-e][3].disable,n[0][2].lock,n[0][3].lock),a.add(t[3].fire),o[t[0]]=function(){return o[t[0]+"With"](this===o?void 0:this,arguments),this},o[t[0]+"With"]=a.fireWith}),i.promise(o),t&&t.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),i=o.call(arguments),a=w.Deferred(),s=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?o.call(arguments):n,--t||a.resolveWith(r,i)}};if(t<=1&&($(e,a.done(s(n)).resolve,a.reject,!t),"pending"===a.state()||g(i[n]&&i[n].then)))return a.then();while(n--)$(i[n],s(n),a.reject);return a.promise()}});var B=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;w.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&B.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},w.readyException=function(t){e.setTimeout(function(){throw t})};var F=w.Deferred();w.fn.ready=function(e){return F.then(e)["catch"](function(e){w.readyException(e)}),this},w.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--w.readyWait:w.isReady)||(w.isReady=!0,!0!==e&&--w.readyWait>0||F.resolveWith(r,[w]))}}),w.ready.then=F.then;function _(){r.removeEventListener("DOMContentLoaded",_),e.removeEventListener("load",_),w.ready()}"complete"===r.readyState||"loading"!==r.readyState&&!r.documentElement.doScroll?e.setTimeout(w.ready):(r.addEventListener("DOMContentLoaded",_),e.addEventListener("load",_));var z=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===x(n)){i=!0;for(s in n)z(e,t,s,n[s],!0,o,a)}else if(void 0!==r&&(i=!0,g(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(w(e),n)})),t))for(;s1,null,!0)},removeData:function(e){return this.each(function(){K.remove(this,e)})}}),w.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=J.get(e,t),n&&(!r||Array.isArray(n)?r=J.access(e,t,w.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=w.queue(e,t),r=n.length,i=n.shift(),o=w._queueHooks(e,t),a=function(){w.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return J.get(e,n)||J.access(e,n,{empty:w.Callbacks("once memory").add(function(){J.remove(e,[t+"queue",n])})})}}),w.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length\x20\t\r\n\f]+)/i,he=/^$|^module$|\/(?:java|ecma)script/i,ge={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};ge.optgroup=ge.option,ge.tbody=ge.tfoot=ge.colgroup=ge.caption=ge.thead,ge.th=ge.td;function ye(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&N(e,t)?w.merge([e],n):n}function ve(e,t){for(var n=0,r=e.length;n-1)i&&i.push(o);else if(l=w.contains(o.ownerDocument,o),a=ye(f.appendChild(o),"script"),l&&ve(a),n){c=0;while(o=a[c++])he.test(o.type||"")&&n.push(o)}return f}!function(){var e=r.createDocumentFragment().appendChild(r.createElement("div")),t=r.createElement("input");t.setAttribute("type","radio"),t.setAttribute("checked","checked"),t.setAttribute("name","t"),e.appendChild(t),h.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,e.innerHTML="",h.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue}();var be=r.documentElement,we=/^key/,Te=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ce=/^([^.]*)(?:\.(.+)|)/;function Ee(){return!0}function ke(){return!1}function Se(){try{return r.activeElement}catch(e){}}function De(e,t,n,r,i,o){var a,s;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(s in t)De(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=ke;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return w().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=w.guid++)),e.each(function(){w.event.add(this,t,i,r,n)})}w.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,y=J.get(e);if(y){n.handler&&(n=(o=n).handler,i=o.selector),i&&w.find.matchesSelector(be,i),n.guid||(n.guid=w.guid++),(u=y.events)||(u=y.events={}),(a=y.handle)||(a=y.handle=function(t){return"undefined"!=typeof w&&w.event.triggered!==t.type?w.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(M)||[""]).length;while(l--)d=g=(s=Ce.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=w.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=w.event.special[d]||{},c=w.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&w.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(e,r,h,a)||e.addEventListener&&e.addEventListener(d,a)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),w.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,y=J.hasData(e)&&J.get(e);if(y&&(u=y.events)){l=(t=(t||"").match(M)||[""]).length;while(l--)if(s=Ce.exec(t[l])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){f=w.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,y.handle)||w.removeEvent(e,d,y.handle),delete u[d])}else for(d in u)w.event.remove(e,d+t[l],n,r,!0);w.isEmptyObject(u)&&J.remove(e,"handle events")}},dispatch:function(e){var t=w.event.fix(e),n,r,i,o,a,s,u=new Array(arguments.length),l=(J.get(this,"events")||{})[t.type]||[],c=w.event.special[t.type]||{};for(u[0]=t,n=1;n=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n-1:w.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u\x20\t\r\n\f]*)[^>]*)\/>/gi,Ae=/\s*$/g;function Le(e,t){return N(e,"table")&&N(11!==t.nodeType?t:t.firstChild,"tr")?w(e).children("tbody")[0]||e:e}function He(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Oe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Pe(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(J.hasData(e)&&(o=J.access(e),a=J.set(t,o),l=o.events)){delete a.handle,a.events={};for(i in l)for(n=0,r=l[i].length;n1&&"string"==typeof y&&!h.checkClone&&je.test(y))return e.each(function(i){var o=e.eq(i);v&&(t[0]=y.call(this,i,o.html())),Re(o,t,n,r)});if(p&&(i=xe(t,e[0].ownerDocument,!1,e,r),o=i.firstChild,1===i.childNodes.length&&(i=o),o||r)){for(u=(s=w.map(ye(i,"script"),He)).length;f")},clone:function(e,t,n){var r,i,o,a,s=e.cloneNode(!0),u=w.contains(e.ownerDocument,e);if(!(h.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||w.isXMLDoc(e)))for(a=ye(s),r=0,i=(o=ye(e)).length;r0&&ve(a,!u&&ye(e,"script")),s},cleanData:function(e){for(var t,n,r,i=w.event.special,o=0;void 0!==(n=e[o]);o++)if(Y(n)){if(t=n[J.expando]){if(t.events)for(r in t.events)i[r]?w.event.remove(n,r):w.removeEvent(n,r,t.handle);n[J.expando]=void 0}n[K.expando]&&(n[K.expando]=void 0)}}}),w.fn.extend({detach:function(e){return Ie(this,e,!0)},remove:function(e){return Ie(this,e)},text:function(e){return z(this,function(e){return void 0===e?w.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return Re(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Le(this,e).appendChild(e)})},prepend:function(){return Re(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Le(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Re(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Re(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(w.cleanData(ye(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return w.clone(this,e,t)})},html:function(e){return z(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ae.test(e)&&!ge[(de.exec(e)||["",""])[1].toLowerCase()]){e=w.htmlPrefilter(e);try{for(;n=0&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))),u}function et(e,t,n){var r=$e(e),i=Fe(e,t,r),o="border-box"===w.css(e,"boxSizing",!1,r),a=o;if(We.test(i)){if(!n)return i;i="auto"}return a=a&&(h.boxSizingReliable()||i===e.style[t]),("auto"===i||!parseFloat(i)&&"inline"===w.css(e,"display",!1,r))&&(i=e["offset"+t[0].toUpperCase()+t.slice(1)],a=!0),(i=parseFloat(i)||0)+Ze(e,t,n||(o?"border":"content"),a,r,i)+"px"}w.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Fe(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=G(t),u=Xe.test(t),l=e.style;if(u||(t=Je(s)),a=w.cssHooks[t]||w.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"==(o=typeof n)&&(i=ie.exec(n))&&i[1]&&(n=ue(e,t,i),o="number"),null!=n&&n===n&&("number"===o&&(n+=i&&i[3]||(w.cssNumber[s]?"":"px")),h.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=G(t);return Xe.test(t)||(t=Je(s)),(a=w.cssHooks[t]||w.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Fe(e,t,r)),"normal"===i&&t in Ve&&(i=Ve[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),w.each(["height","width"],function(e,t){w.cssHooks[t]={get:function(e,n,r){if(n)return!ze.test(w.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?et(e,t,r):se(e,Ue,function(){return et(e,t,r)})},set:function(e,n,r){var i,o=$e(e),a="border-box"===w.css(e,"boxSizing",!1,o),s=r&&Ze(e,t,r,a,o);return a&&h.scrollboxSize()===o.position&&(s-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-Ze(e,t,"border",!1,o)-.5)),s&&(i=ie.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=w.css(e,t)),Ke(e,n,s)}}}),w.cssHooks.marginLeft=_e(h.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Fe(e,"marginLeft"))||e.getBoundingClientRect().left-se(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),w.each({margin:"",padding:"",border:"Width"},function(e,t){w.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+oe[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(w.cssHooks[e+t].set=Ke)}),w.fn.extend({css:function(e,t){return z(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=$e(e),i=t.length;a1)}});function tt(e,t,n,r,i){return new tt.prototype.init(e,t,n,r,i)}w.Tween=tt,tt.prototype={constructor:tt,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||w.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(w.cssNumber[n]?"":"px")},cur:function(){var e=tt.propHooks[this.prop];return e&&e.get?e.get(this):tt.propHooks._default.get(this)},run:function(e){var t,n=tt.propHooks[this.prop];return this.options.duration?this.pos=t=w.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):tt.propHooks._default.set(this),this}},tt.prototype.init.prototype=tt.prototype,tt.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=w.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){w.fx.step[e.prop]?w.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[w.cssProps[e.prop]]&&!w.cssHooks[e.prop]?e.elem[e.prop]=e.now:w.style(e.elem,e.prop,e.now+e.unit)}}},tt.propHooks.scrollTop=tt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},w.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},w.fx=tt.prototype.init,w.fx.step={};var nt,rt,it=/^(?:toggle|show|hide)$/,ot=/queueHooks$/;function at(){rt&&(!1===r.hidden&&e.requestAnimationFrame?e.requestAnimationFrame(at):e.setTimeout(at,w.fx.interval),w.fx.tick())}function st(){return e.setTimeout(function(){nt=void 0}),nt=Date.now()}function ut(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=oe[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function lt(e,t,n){for(var r,i=(pt.tweeners[t]||[]).concat(pt.tweeners["*"]),o=0,a=i.length;o1)},removeAttr:function(e){return this.each(function(){w.removeAttr(this,e)})}}),w.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?w.prop(e,t,n):(1===o&&w.isXMLDoc(e)||(i=w.attrHooks[t.toLowerCase()]||(w.expr.match.bool.test(t)?dt:void 0)),void 0!==n?null===n?void w.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=w.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!h.radioValue&&"radio"===t&&N(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(M);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),dt={set:function(e,t,n){return!1===t?w.removeAttr(e,n):e.setAttribute(n,n),n}},w.each(w.expr.match.bool.source.match(/\w+/g),function(e,t){var n=ht[t]||w.find.attr;ht[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=ht[a],ht[a]=i,i=null!=n(e,t,r)?a:null,ht[a]=o),i}});var gt=/^(?:input|select|textarea|button)$/i,yt=/^(?:a|area)$/i;w.fn.extend({prop:function(e,t){return z(this,w.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[w.propFix[e]||e]})}}),w.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&w.isXMLDoc(e)||(t=w.propFix[t]||t,i=w.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=w.find.attr(e,"tabindex");return t?parseInt(t,10):gt.test(e.nodeName)||yt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),h.optSelected||(w.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),w.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){w.propFix[this.toLowerCase()]=this});function vt(e){return(e.match(M)||[]).join(" ")}function mt(e){return e.getAttribute&&e.getAttribute("class")||""}function xt(e){return Array.isArray(e)?e:"string"==typeof e?e.match(M)||[]:[]}w.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,u=0;if(g(e))return this.each(function(t){w(this).addClass(e.call(this,t,mt(this)))});if((t=xt(e)).length)while(n=this[u++])if(i=mt(n),r=1===n.nodeType&&" "+vt(i)+" "){a=0;while(o=t[a++])r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=vt(r))&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,u=0;if(g(e))return this.each(function(t){w(this).removeClass(e.call(this,t,mt(this)))});if(!arguments.length)return this.attr("class","");if((t=xt(e)).length)while(n=this[u++])if(i=mt(n),r=1===n.nodeType&&" "+vt(i)+" "){a=0;while(o=t[a++])while(r.indexOf(" "+o+" ")>-1)r=r.replace(" "+o+" "," ");i!==(s=vt(r))&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e,r="string"===n||Array.isArray(e);return"boolean"==typeof t&&r?t?this.addClass(e):this.removeClass(e):g(e)?this.each(function(n){w(this).toggleClass(e.call(this,n,mt(this),t),t)}):this.each(function(){var t,i,o,a;if(r){i=0,o=w(this),a=xt(e);while(t=a[i++])o.hasClass(t)?o.removeClass(t):o.addClass(t)}else void 0!==e&&"boolean"!==n||((t=mt(this))&&J.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":J.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&(" "+vt(mt(n))+" ").indexOf(t)>-1)return!0;return!1}});var bt=/\r/g;w.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=g(e),this.each(function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,w(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=w.map(i,function(e){return null==e?"":e+""})),(t=w.valHooks[this.type]||w.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return(t=w.valHooks[i.type]||w.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(bt,""):null==n?"":n}}}),w.extend({valHooks:{option:{get:function(e){var t=w.find.attr(e,"value");return null!=t?t:vt(w.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),w.each(["radio","checkbox"],function(){w.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=w.inArray(w(e).val(),t)>-1}},h.checkOn||(w.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),h.focusin="onfocusin"in e;var wt=/^(?:focusinfocus|focusoutblur)$/,Tt=function(e){e.stopPropagation()};w.extend(w.event,{trigger:function(t,n,i,o){var a,s,u,l,c,p,d,h,v=[i||r],m=f.call(t,"type")?t.type:t,x=f.call(t,"namespace")?t.namespace.split("."):[];if(s=h=u=i=i||r,3!==i.nodeType&&8!==i.nodeType&&!wt.test(m+w.event.triggered)&&(m.indexOf(".")>-1&&(m=(x=m.split(".")).shift(),x.sort()),c=m.indexOf(":")<0&&"on"+m,t=t[w.expando]?t:new w.Event(m,"object"==typeof t&&t),t.isTrigger=o?2:3,t.namespace=x.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+x.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),n=null==n?[t]:w.makeArray(n,[t]),d=w.event.special[m]||{},o||!d.trigger||!1!==d.trigger.apply(i,n))){if(!o&&!d.noBubble&&!y(i)){for(l=d.delegateType||m,wt.test(l+m)||(s=s.parentNode);s;s=s.parentNode)v.push(s),u=s;u===(i.ownerDocument||r)&&v.push(u.defaultView||u.parentWindow||e)}a=0;while((s=v[a++])&&!t.isPropagationStopped())h=s,t.type=a>1?l:d.bindType||m,(p=(J.get(s,"events")||{})[t.type]&&J.get(s,"handle"))&&p.apply(s,n),(p=c&&s[c])&&p.apply&&Y(s)&&(t.result=p.apply(s,n),!1===t.result&&t.preventDefault());return t.type=m,o||t.isDefaultPrevented()||d._default&&!1!==d._default.apply(v.pop(),n)||!Y(i)||c&&g(i[m])&&!y(i)&&((u=i[c])&&(i[c]=null),w.event.triggered=m,t.isPropagationStopped()&&h.addEventListener(m,Tt),i[m](),t.isPropagationStopped()&&h.removeEventListener(m,Tt),w.event.triggered=void 0,u&&(i[c]=u)),t.result}},simulate:function(e,t,n){var r=w.extend(new w.Event,n,{type:e,isSimulated:!0});w.event.trigger(r,null,t)}}),w.fn.extend({trigger:function(e,t){return this.each(function(){w.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return w.event.trigger(e,t,n,!0)}}),h.focusin||w.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){w.event.simulate(t,e.target,w.event.fix(e))};w.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=J.access(r,t);i||r.addEventListener(e,n,!0),J.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=J.access(r,t)-1;i?J.access(r,t,i):(r.removeEventListener(e,n,!0),J.remove(r,t))}}});var Ct=e.location,Et=Date.now(),kt=/\?/;w.parseXML=function(t){var n;if(!t||"string"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,"text/xml")}catch(e){n=void 0}return n&&!n.getElementsByTagName("parsererror").length||w.error("Invalid XML: "+t),n};var St=/\[\]$/,Dt=/\r?\n/g,Nt=/^(?:submit|button|image|reset|file)$/i,At=/^(?:input|select|textarea|keygen)/i;function jt(e,t,n,r){var i;if(Array.isArray(t))w.each(t,function(t,i){n||St.test(e)?r(e,i):jt(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)});else if(n||"object"!==x(t))r(e,t);else for(i in t)jt(e+"["+i+"]",t[i],n,r)}w.param=function(e,t){var n,r=[],i=function(e,t){var n=g(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(e)||e.jquery&&!w.isPlainObject(e))w.each(e,function(){i(this.name,this.value)});else for(n in e)jt(n,e[n],t,i);return r.join("&")},w.fn.extend({serialize:function(){return w.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=w.prop(this,"elements");return e?w.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!w(this).is(":disabled")&&At.test(this.nodeName)&&!Nt.test(e)&&(this.checked||!pe.test(e))}).map(function(e,t){var n=w(this).val();return null==n?null:Array.isArray(n)?w.map(n,function(e){return{name:t.name,value:e.replace(Dt,"\r\n")}}):{name:t.name,value:n.replace(Dt,"\r\n")}}).get()}});var qt=/%20/g,Lt=/#.*$/,Ht=/([?&])_=[^&]*/,Ot=/^(.*?):[ \t]*([^\r\n]*)$/gm,Pt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Mt=/^(?:GET|HEAD)$/,Rt=/^\/\//,It={},Wt={},$t="*/".concat("*"),Bt=r.createElement("a");Bt.href=Ct.href;function Ft(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(M)||[];if(g(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function _t(e,t,n,r){var i={},o=e===Wt;function a(s){var u;return i[s]=!0,w.each(e[s]||[],function(e,s){var l=s(t,n,r);return"string"!=typeof l||o||i[l]?o?!(u=l):void 0:(t.dataTypes.unshift(l),a(l),!1)}),u}return a(t.dataTypes[0])||!i["*"]&&a("*")}function zt(e,t){var n,r,i=w.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&w.extend(!0,e,r),e}function Xt(e,t,n){var r,i,o,a,s=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}function Ut(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}w.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ct.href,type:"GET",isLocal:Pt.test(Ct.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":$t,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":w.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?zt(zt(e,w.ajaxSettings),t):zt(w.ajaxSettings,e)},ajaxPrefilter:Ft(It),ajaxTransport:Ft(Wt),ajax:function(t,n){"object"==typeof t&&(n=t,t=void 0),n=n||{};var i,o,a,s,u,l,c,f,p,d,h=w.ajaxSetup({},n),g=h.context||h,y=h.context&&(g.nodeType||g.jquery)?w(g):w.event,v=w.Deferred(),m=w.Callbacks("once memory"),x=h.statusCode||{},b={},T={},C="canceled",E={readyState:0,getResponseHeader:function(e){var t;if(c){if(!s){s={};while(t=Ot.exec(a))s[t[1].toLowerCase()]=t[2]}t=s[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return c?a:null},setRequestHeader:function(e,t){return null==c&&(e=T[e.toLowerCase()]=T[e.toLowerCase()]||e,b[e]=t),this},overrideMimeType:function(e){return null==c&&(h.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)E.always(e[E.status]);else for(t in e)x[t]=[x[t],e[t]];return this},abort:function(e){var t=e||C;return i&&i.abort(t),k(0,t),this}};if(v.promise(E),h.url=((t||h.url||Ct.href)+"").replace(Rt,Ct.protocol+"//"),h.type=n.method||n.type||h.method||h.type,h.dataTypes=(h.dataType||"*").toLowerCase().match(M)||[""],null==h.crossDomain){l=r.createElement("a");try{l.href=h.url,l.href=l.href,h.crossDomain=Bt.protocol+"//"+Bt.host!=l.protocol+"//"+l.host}catch(e){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=w.param(h.data,h.traditional)),_t(It,h,n,E),c)return E;(f=w.event&&h.global)&&0==w.active++&&w.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!Mt.test(h.type),o=h.url.replace(Lt,""),h.hasContent?h.data&&h.processData&&0===(h.contentType||"").indexOf("application/x-www-form-urlencoded")&&(h.data=h.data.replace(qt,"+")):(d=h.url.slice(o.length),h.data&&(h.processData||"string"==typeof h.data)&&(o+=(kt.test(o)?"&":"?")+h.data,delete h.data),!1===h.cache&&(o=o.replace(Ht,"$1"),d=(kt.test(o)?"&":"?")+"_="+Et+++d),h.url=o+d),h.ifModified&&(w.lastModified[o]&&E.setRequestHeader("If-Modified-Since",w.lastModified[o]),w.etag[o]&&E.setRequestHeader("If-None-Match",w.etag[o])),(h.data&&h.hasContent&&!1!==h.contentType||n.contentType)&&E.setRequestHeader("Content-Type",h.contentType),E.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+$t+"; q=0.01":""):h.accepts["*"]);for(p in h.headers)E.setRequestHeader(p,h.headers[p]);if(h.beforeSend&&(!1===h.beforeSend.call(g,E,h)||c))return E.abort();if(C="abort",m.add(h.complete),E.done(h.success),E.fail(h.error),i=_t(Wt,h,n,E)){if(E.readyState=1,f&&y.trigger("ajaxSend",[E,h]),c)return E;h.async&&h.timeout>0&&(u=e.setTimeout(function(){E.abort("timeout")},h.timeout));try{c=!1,i.send(b,k)}catch(e){if(c)throw e;k(-1,e)}}else k(-1,"No Transport");function k(t,n,r,s){var l,p,d,b,T,C=n;c||(c=!0,u&&e.clearTimeout(u),i=void 0,a=s||"",E.readyState=t>0?4:0,l=t>=200&&t<300||304===t,r&&(b=Xt(h,E,r)),b=Ut(h,b,E,l),l?(h.ifModified&&((T=E.getResponseHeader("Last-Modified"))&&(w.lastModified[o]=T),(T=E.getResponseHeader("etag"))&&(w.etag[o]=T)),204===t||"HEAD"===h.type?C="nocontent":304===t?C="notmodified":(C=b.state,p=b.data,l=!(d=b.error))):(d=C,!t&&C||(C="error",t<0&&(t=0))),E.status=t,E.statusText=(n||C)+"",l?v.resolveWith(g,[p,C,E]):v.rejectWith(g,[E,C,d]),E.statusCode(x),x=void 0,f&&y.trigger(l?"ajaxSuccess":"ajaxError",[E,h,l?p:d]),m.fireWith(g,[E,C]),f&&(y.trigger("ajaxComplete",[E,h]),--w.active||w.event.trigger("ajaxStop")))}return E},getJSON:function(e,t,n){return w.get(e,t,n,"json")},getScript:function(e,t){return w.get(e,void 0,t,"script")}}),w.each(["get","post"],function(e,t){w[t]=function(e,n,r,i){return g(n)&&(i=i||r,r=n,n=void 0),w.ajax(w.extend({url:e,type:t,dataType:i,data:n,success:r},w.isPlainObject(e)&&e))}}),w._evalUrl=function(e){return w.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},w.fn.extend({wrapAll:function(e){var t;return this[0]&&(g(e)&&(e=e.call(this[0])),t=w(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return g(e)?this.each(function(t){w(this).wrapInner(e.call(this,t))}):this.each(function(){var t=w(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=g(e);return this.each(function(n){w(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){w(this).replaceWith(this.childNodes)}),this}}),w.expr.pseudos.hidden=function(e){return!w.expr.pseudos.visible(e)},w.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},w.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}};var Vt={0:200,1223:204},Gt=w.ajaxSettings.xhr();h.cors=!!Gt&&"withCredentials"in Gt,h.ajax=Gt=!!Gt,w.ajaxTransport(function(t){var n,r;if(h.cors||Gt&&!t.crossDomain)return{send:function(i,o){var a,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a];t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");for(a in i)s.setRequestHeader(a,i[a]);n=function(e){return function(){n&&(n=r=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(Vt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=n(),r=s.onerror=s.ontimeout=n("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&e.setTimeout(function(){n&&r()})},n=n("abort");try{s.send(t.hasContent&&t.data||null)}catch(e){if(n)throw e}},abort:function(){n&&n()}}}),w.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),w.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return w.globalEval(e),e}}}),w.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),w.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(i,o){t=w("