Skip to content

Commit

Permalink
feature(inputs): editing new input modal with new data from template
Browse files Browse the repository at this point in the history
  • Loading branch information
MarioStratio authored and alexrchies committed Aug 26, 2015
1 parent 97e5764 commit 6550800
Show file tree
Hide file tree
Showing 7 changed files with 267 additions and 161 deletions.
310 changes: 156 additions & 154 deletions web/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<properties>
<nodeVer>v0.12.2</nodeVer>
<npmVer>2.7.4</npmVer>
<nodeURL>http://sodio.stratio.com/nexus/content/repositories/thirdparty/node</nodeURL>
<!--<nodeURL>http://sodio.stratio.com/nexus/content/repositories/thirdparty/node</nodeURL>-->
</properties>

<build>
Expand All @@ -34,8 +34,10 @@
<configuration>
<nodeVersion>${nodeVer}</nodeVersion>
<npmVersion>${npmVer}</npmVersion>
<!--
<nodeDownloadRoot>${nodeURL}/node/</nodeDownloadRoot>
<npmDownloadRoot>${nodeURL}/npm/2.7.4/</npmDownloadRoot>
-->
<skip.installnodenpm>${skip.installnodenpm}</skip.installnodenpm>
</configuration>
</execution>
Expand Down Expand Up @@ -72,7 +74,7 @@
<skip.grunt>${skip.grunt}</skip.grunt>
</configuration>
</execution>
<execution>
<!--<execution>
<id>karma test</id>
<goals>
<goal>karma</goal>
Expand All @@ -82,160 +84,160 @@
<arguments>test</arguments>
<skipTests>${skipUTs}</skipTests>
</configuration>
</execution>
</execution>-->
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.4.0</version>
<executions>
<execution>
<id>mkdir node</id>
<phase>generate-sources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>
mkdir
</executable>
<arguments>
<argument>-p</argument>
<argument>${user.home}/sparkta/node</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>mkdir node_modules</id>
<phase>generate-sources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>
mkdir
</executable>
<arguments>
<argument>-p</argument>
<argument>${user.home}/sparkta/node_modules</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>mkdir bower_components</id>
<phase>generate-sources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>
mkdir
</executable>
<arguments>
<argument>-p</argument>
<argument>${user.home}/sparkta/bower_components</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>rm ln node</id>
<phase>generate-sources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>
rm
</executable>
<arguments>
<argument>-rf</argument>
<argument>node</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>rm ln node_modules</id>
<phase>generate-sources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>
rm
</executable>
<arguments>
<argument>-rf</argument>
<argument>node_modules</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>rm ln bower_components</id>
<phase>generate-sources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>
rm
</executable>
<arguments>
<argument>-rf</argument>
<argument>bower_components</argument>
</arguments>
</configuration>
</execution>
<!--<execution>
<id>ln node</id>
<phase>generate-sources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>
ln
</executable>
<arguments>
<argument>-s</argument>
<argument>${user.home}/sparkta/node</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>ln node_modules</id>
<phase>generate-sources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>
ln
</executable>
<arguments>
<argument>-s</argument>
<argument>${user.home}/sparkta/node_modules</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>ln bower_components</id>
<phase>generate-sources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>
ln
</executable>
<arguments>
<argument>-s</argument>
<argument>${user.home}/sparkta/bower_components</argument>
</arguments>
</configuration>
</execution>-->
</executions>
</plugin>
<!-- <plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.4.0</version>
<executions>
<execution>
<id>mkdir node</id>
<phase>generate-sources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>
mkdir
</executable>
<arguments>
<argument>-p</argument>
<argument>${user.home}/sparkta/node</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>mkdir node_modules</id>
<phase>generate-sources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>
mkdir
</executable>
<arguments>
<argument>-p</argument>
<argument>${user.home}/sparkta/node_modules</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>mkdir bower_components</id>
<phase>generate-sources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>
mkdir
</executable>
<arguments>
<argument>-p</argument>
<argument>${user.home}/sparkta/bower_components</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>rm ln node</id>
<phase>generate-sources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>
rm
</executable>
<arguments>
<argument>-rf</argument>
<argument>node</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>rm ln node_modules</id>
<phase>generate-sources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>
rm
</executable>
<arguments>
<argument>-rf</argument>
<argument>node_modules</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>rm ln bower_components</id>
<phase>generate-sources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>
rm
</executable>
<arguments>
<argument>-rf</argument>
<argument>bower_components</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>ln node</id>
<phase>generate-sources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>
ln
</executable>
<arguments>
<argument>-s</argument>
<argument>${user.home}/sparkta/node</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>ln node_modules</id>
<phase>generate-sources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>
ln
</executable>
<arguments>
<argument>-s</argument>
<argument>${user.home}/sparkta/node_modules</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>ln bower_components</id>
<phase>generate-sources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>
ln
</executable>
<arguments>
<argument>-s</argument>
<argument>${user.home}/sparkta/bower_components</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin> -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
Expand Down
1 change: 1 addition & 0 deletions web/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
<!-- Form directives -->
<script src="stratio-ui/script/directives/forms/datasource-form-field-directive.js"></script>
<script src="stratio-ui/script/directives/forms/form-field-input-directive.js"></script>
<script src="stratio-ui/script/directives/forms/form-field-select-directive.js"></script>
<!-- Factories ----------------------------------- -->
<script src="scripts/services/fragment-factory.js"></script>
<script src="scripts/services/template-factory.js"></script>
Expand Down
7 changes: 5 additions & 2 deletions web/src/scripts/controllers/inputs.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
'button_icon': 'icon-circle-check'
}
};

vm.editInputModal(editInputData);
},
function (error) {
Expand Down Expand Up @@ -385,6 +385,8 @@
vm.createTypeModels(vm.templateInputsData);
vm.selectedIndex = 0;
}

console.log(vm.dataSource);
};

function setTexts(texts) {
Expand Down Expand Up @@ -415,7 +417,8 @@
vm.properties[fragmentData[i].name] = {};

for (var j=0; j<fragmentData[i].properties.length; j++) {
if (fragmentData[i].properties[j].propertyId !== 'name' && fragmentData[i].properties[j].propertyId !== 'type'){
/*if (fragmentData[i].properties[j].propertyId !== 'name' && fragmentData[i].properties[j].propertyId !== 'type'){*/
if (fragmentData[i].properties[j].propertyId !== 'name'){
vm.properties[fragmentData[i].name][fragmentData[i].properties[j].propertyId] = '';
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
if (scope.field && scope.field.hasOwnProperty('visible')) {
for (var i=0; i<scope.field.visible.length; i++) {
var actual = scope.field.visible[i];
if (actual.value === scope.model[actual.propertyId].value) {
if (actual.value === scope.model[actual[0].propertyId].value) {
if(scope.field.visible[i].hasOwnProperty('overrideProps')){
for (var f = 0; f < scope.field.visible[i].overrideProps.length ; f++ ){
var overrideProps = scope.field.visible[i].overrideProps[f];
Expand Down
Loading

0 comments on commit 6550800

Please sign in to comment.