New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New features for csv import plugin #14330
Conversation
js/import.js
Outdated
| @@ -60,6 +60,8 @@ AJAX.registerOnload('import.js', function () { | |||
| var radioLocalImport = $('#radio_local_import_file'); | |||
| var radioImport = $('#radio_import_file'); | |||
| var fileMsg = '<div class="error"><img src="themes/dot.gif" title="" alt="" class="icon ic_s_error" /> ' + PMA_messages.strImportDialogMessage + '</div>'; | |||
| var wrongTblNameMsg = '<div class="error"><img src="themes/dot.gif" title="" alt="" class="icon ic_s_error" />Please enter a valid table name</div>'; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should make these strings translatable; see the line above for an example. Basically, we put the actual string in https://github.com/phpmyadmin/phpmyadmin/blob/master/js/messages.php and then reference it from here; that way the translators can also put it in their own language.
js/functions.js
Outdated
| data: params, | ||
| success: function (data) { | ||
| if (data.success) { | ||
| $("<h3>You can change the table structure here</h3>" + data.message).insertAfter($("#new_csv_db_name").parent()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you forgot to make this string translatable.
…csv file. Signed-Off-By: Lakshay arora <arora.lakshya123@gmail.com>
Following new features have been added in the csv import plugin: 1. For a new import, user can now directly enter the table or database name at the time of import 2. Partial import. User can enter how many rows they want to import. Signed-Off-By: Lakshay arora <arora.lakshya123@gmail.com>
1. For a new import, user can now directly enter the table or database name at the time of import 2. Partial import. User can enter how many rows they want to import. 3. Show the form to edit table structure after import(undecided). Signed-Off-By: Lakshay arora <arora.lakshya123@gmail.com>
|
Applied changes and solved merge conflicts. I'll work on tests as soon as travis finishes. |
…import Signed-Off-By: Lakshay arora <arora.lakshya123@gmail.com>
|
I think you forgot to make |
Codecov Report
@@ Coverage Diff @@
## master #14330 +/- ##
============================================
+ Coverage 49.7% 50.03% +0.33%
- Complexity 13871 14447 +576
============================================
Files 498 498
Lines 66803 67342 +539
============================================
+ Hits 33204 33696 +492
- Misses 33599 33646 +47 |
|
Done |
js/import.js
Outdated
| } | ||
| if($("#text_csv_new_db_name").length > 0) { | ||
| var newDBName = $("#text_csv_new_db_name").val(); | ||
| if(newDBName.length > 0 && $.trim(newDBName).length === 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some lines caused ESLint to fail. See: https://travis-ci.org/phpmyadmin/phpmyadmin/jobs/413992898#L742
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These linting errors are in many of my PRs, it says it can be fixed using --fix option, how can I use this, I even asked this on the mailing list but got no reply.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably ./node_modules/.bin/eslint js/import.js --fix will do what you're after. Sorry I missed your email!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And if you do not have the node_modules directory, you need to run the yarn install command
Signed-off-by: Lakshay arora <arora.lakshya123@gmail.com>
|
I've fixed lint and other tests, but I don't understand this new selenium error? |
|
Merged, thanks for your contribution! |
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com> Signed-off-by: Vincent Horváth <win9400@gmail.com>
Following new features have been added in the csv import plugin: 1. For a new import, user can now directly enter the table or database name at the time of import 2. Partial import. User can enter how many rows they want to import. Signed-Off-By: Lakshay arora <arora.lakshya123@gmail.com>
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com> Signed-off-by: Vincent Horváth <win9400@gmail.com>
Following new features have been added in the csv import plugin:
Signed-Off-By: Lakshay arora arora.lakshya123@gmail.com
Before submitting pull request, please check that every commit: