54 Commits

Author SHA1 Message Date
Rohit Yadav
db31e67d51 Merge remote-tracking branch 'origin/4.15' into main
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

 Conflicts:
	ui/src/utils/plugins.js
	ui/src/views/AutogenView.vue
	ui/tests/mockData/ActionButton.mock.json
	ui/tests/unit/views/compute/MigrateWizard.spec.js
2021-07-30 15:00:09 +05:30
Hoang Nguyen
1ccd61cb26
[TEST] - Test unit - Fix failing UI unit test 4.15 branch (#5219)
* fix error test unit on MigrateWizard

* fix error test unit on AutogenView, ActionButton

* fix error lint

* fix error pollJob originalPage.starWith undefined

* Update ui/src/utils/plugins.js

Co-authored-by: davidjumani <dj.davidjumani1994@gmail.com>

* Update ui/src/utils/plugins.js

Co-authored-by: davidjumani <dj.davidjumani1994@gmail.com>

* uses a substitution variable if the originalPage is null with queryAsyncJob have jobstatus = 1

* remove argument null

Co-authored-by: davidjumani <dj.davidjumani1994@gmail.com>
2021-07-30 12:58:53 +05:30
Hoang Nguyen
8efc3ea0f5
UI: Submit the form when press CTRL + ENTER (#4766)
* fixes: submit the form when press enter

* add Enter submit for component missing

* add ctrl+enter event key for submitting form

* add directive.js check keyup event

* fix build test failure

* using directive in main.js

* fix warning show in the test unit

* fix multiple submits

* fix travis run test failures

* fix filter button style

* fix the problem of ctrl+enter keyup on firefox browser

* removed computed function not using

* remove space errror

* add ref for ctrl+enter submit

* resolve conflit and fix build

* add missing directive

* add missing directive & ref button

* fixes errors

* fixes errors

* add preventDefault()

* fix ctrl keypress not support on firefox
2021-07-26 08:29:19 -03:00
Abhishek Kumar
5ac184edd6 Merge remote-tracking branch 'apache/4.15' into main 2021-07-15 14:02:49 +05:30
Abhishek Kumar
0406e27af3
ui: refactor get api params in forms (#5064)
* ui: refactor get api params in forms

Refactor code getting api params for APIs in UI forms.
Added a new util plugin in plugins.js

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* fix

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* fix

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2021-07-15 12:46:54 +05:30
Rohit Yadav
d4635e3442 Merge remote-tracking branch 'origin/4.15'
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2021-04-01 14:35:01 +05:30
Abhishek Kumar
251368361e
ui: allow docHelp override using config.json (#4745)
config.json can have a property named 'docHelpMappings' which can be used to override docHelp suffixes.
In config.json admin can add mappings as follows:

"docHelpMappings": {
  "virtual_machine.html": "some.html",
  "some_string": "override_string"
}

UI will use these mappings and will make appropriate replacements in the documentation links for different sections and forms.

Addresses #4731

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2021-04-01 13:10:00 +05:30
Hoang Nguyen
90885730ad
ui: Fix UI unit test failures in master (#4719) 2021-02-24 14:42:50 +05:30
Hoang Nguyen
ba43825a9b
ui: Fix npm unit test failures in 4.15 (#4718)
* Edit the test to match the latest code

* fix travis build failures

* correct wrong comparison conditions

* fix travis build
2021-02-24 14:39:55 +05:30
Rohit Yadav
b07816b730 ui: travis fix post apache/cloudstack-primate merge
This fixes Travis to run basic UI checks for job #1

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2021-01-20 07:27:07 +05:30
Hoang Nguyen
338de72665 Explore Test Automation (#320)
* config jest and add setup for unittest

* config jest coverage

* example of unit testing a Status widget/component

* add license for test file

* add test/run command in the .travis.yml

* add mock store and i18n for vue jest

* add mock file missing

* add mock router

* add lincence to mock file & decodeHtml to setup file

* add mock axios instance & fix eslint on tests folder

* add test components > views > ActionButton component

* fix for test coverage success

* refactor test file

* add test Views > Autogenview.vue (Navigation Guard, Watchers, Computed)

* history mode mockRouter, refactor test code, test Autogenview > fetchData (routeName)

* test Views > AutogenView.vue (processing 31%)

* add mock router exception & test Views > AutogenView.vue (processing 43%)

* test Views > AutogenView (processing 65%), add test onSearch, closeAction, execAction, listUuidOpts

* refactor and add comment test files

* test Views > AutogenView (processing 91%)

* add comment file AutogenView.spec.js

* test Views > AutogenView.vue (handleSubmit method)

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2021-01-20 07:06:24 +05:30
Rohit Yadav
db7265a1f7 src: add apache v2.0 license header to files
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2021-01-20 07:06:14 +05:30
Rohit Yadav
b72fd5b509 primate: initial UI v0.1
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2021-01-20 07:06:11 +05:30
Rohit Yadav
02f80d3370
ui: deprecate old UI and move to legacy to be served at /client/legacy (#4518)
As notified in the 4.14.0.0 release notes, this deprecates the legacy UI
and moves it under the ui/legacy directory which will be served at
/client/legacy URL path. This will also ensure that users upgrading or
installing 4.15.0.0 will get the new UI by default. This will also make
it simpler to remove the old UI for future 4.16/master releases.

Co-authored-by: Daan Hoogland <daan.hoogland@shapeblue.com>
2020-12-05 20:36:59 +05:30
Philipp Bankonier
093ab722b3 Update jquery and related libraries (#3069)
* Update jquery, jquery ui, jquery validate and flot to current versions

update jquery to 3.3.1
update jqueryui to 1.12.1
update jquery validate to 1.17.0
update jquery flot to 0.8.3

* Replace deprecated removed jquery functions

* Fix initial tab content loading in detailView

* Fix logout for new jquery version

* Fix tooltip detail displaying for new JQuery version

* Fix view all trigger in detailView for new JQuery version

* Fix breadcrumb click event handler for JQuery update

* Fix displaying of preselected zone in instanceWizard for new jQuery verion
2019-01-16 14:22:22 -02:00
Brian Federle
3ac181e396 List view: tests for filter dropdown 2014-01-28 15:48:44 -08:00
Brian Federle
ebcf6a1da8 List view: tests for field pre-filter 2014-01-28 15:48:44 -08:00
Brian Federle
08d124d6b6 Add listView async tests 2014-01-28 11:24:20 -08:00
Brian Federle
ab4294666e List view: tests for field rendering 2014-01-14 14:44:07 -08:00
Brian Federle
3ed605dc90 Add basic list view test 2014-01-14 13:38:05 -08:00
Brian Federle
2893120f2a Remove old/obsolete UI qunit tests 2014-01-14 12:56:52 -08:00
Chip Childers
7998362b18 License header updates for the UI folder 2012-08-03 12:45:47 -04:00
David Nalley
9687520712 applying Chip Childer's patches for license headers in the ui directory 2012-06-26 10:46:53 -04:00
Brian Federle
711551e34f UI: detail view
Support dynamically updating context on detail view load, to support cases
where certain context items are required by other elements loaded, but may not
be present in the browser history.
2012-04-05 15:44:08 -07:00
Brian Federle
703523fd64 Detail view UI test: test action filter after refresh 2012-04-03 15:20:52 -07:00
Brian Federle
551020609d Detail view UI test: test pre-action context 2012-04-03 15:14:19 -07:00
Brian Federle
5e82bfc13d Test update detail view data via async action 2012-04-03 14:42:52 -07:00
Brian Federle
db610a7e7a Detail view UI tests
-Test pre-actions

-Test update data from list view row, via sync action
2012-04-03 14:36:57 -07:00
frank
2f634c0913 Switch to Apache license 2012-04-03 04:50:05 -07:00
Brian Federle
ac00c64dc0 Add more basic multi-edit tests 2012-03-26 15:04:39 -07:00
Brian Federle
56e8e0673c Add basic multi-edit widget test 2012-03-26 14:09:49 -07:00
Brian Federle
5998eb84c7 Detail view: 'View all' action tests 2012-03-23 15:39:53 -07:00
Brian Federle
44f7fd4f97 Add detail view action filter tests 2012-03-23 14:08:44 -07:00
Brian Federle
17d179535b Cleanup mock functions 2012-03-23 14:02:13 -07:00
Brian Federle
2b0923540c Add detail view refresh action tests 2012-03-23 13:48:13 -07:00
Brian Federle
cedfd5ed5c Add detail view tests 2012-03-23 13:26:28 -07:00
Brian Federle
7e9d535156 Add UI browser tests 2012-03-22 11:53:01 -07:00
bfederle
d08f1296e8 List view UI: action filter tests 2012-03-09 14:03:51 -08:00
bfederle
9f6230490e Add list view async action test 2012-03-09 11:27:39 -08:00
bfederle
10c8b05c1a WIP: List view async tests 2012-03-09 11:11:24 -08:00
Brian Federle
6ff0a475d7 Add basic sync list view action tests 2012-03-08 15:11:40 -08:00
Brian Federle
dd3707b630 Add initial list view action tests 2012-03-08 14:44:25 -08:00
Brian Federle
30f84eec48 Add list view section selector tests 2012-03-08 14:24:40 -08:00
Brian Federle
f0b12e0d7d Add tests for list view widget:
-Data provider

-Column pre-filter
2012-03-08 13:47:01 -08:00
Brian Federle
e1a3a6f2d9 Add list view tests 2012-03-06 14:58:19 -08:00
Brian Federle
426cb84f94 UI: Add notification tests 2012-03-05 15:54:37 -08:00
bfederle
c7f299f3e9 Add base notification tests 2012-03-05 12:20:39 -08:00
bfederle
da714da6e2 Add more browser tests 2012-03-02 13:04:24 -08:00
bfederle
4b7a56cd23 Reorganize core UI widgets 2012-03-01 16:14:10 -08:00
bfederle
f91763ce84 Add browser UI widget tests 2012-03-01 16:09:11 -08:00