Skip to content

Commit

Permalink
Merge pull request #38 from matomo-org/vue-manage-custom-vars
Browse files Browse the repository at this point in the history
[Vue] migrate manage-custom-vars model and directive to Vue
  • Loading branch information
diosmosis authored Apr 25, 2022
2 parents 1729512 + 98b0cd7 commit 2942767
Show file tree
Hide file tree
Showing 19 changed files with 797 additions and 183 deletions.
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
tests/System/processed/*xml
tests/System/processed/*xml
tests/System/processed/*text
/vue/dist/demo.html
/vue/dist/*.common.js
/vue/dist/*.map
/vue/dist/*.development.*
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# CHANGELOG

* 4.1.0 migrate from AngularJS to Vue.
10 changes: 1 addition & 9 deletions CustomVariables.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ class CustomVariables extends \Piwik\Plugin
public function registerEvents()
{
return array(
'AssetManager.getJavaScriptFiles' => 'getJsFiles',
'Translate.getClientSideTranslationKeys' => 'getClientSideTranslationKeys',
'AssetManager.getStylesheetFiles' => 'getStylesheetFiles',
'Dimension.addDimensions' => 'addDimensions',
Expand Down Expand Up @@ -137,14 +136,7 @@ public function getClientSideTranslationKeys(&$translationKeys)

public function getStylesheetFiles(&$stylesheets)
{
$stylesheets[] = "plugins/CustomVariables/angularjs/manage-custom-vars/manage-custom-vars.directive.less";
}

public function getJsFiles(&$jsFiles)
{
$jsFiles[] = "plugins/CustomVariables/angularjs/manage-custom-vars/manage-custom-vars.model.js";
$jsFiles[] = "plugins/CustomVariables/angularjs/manage-custom-vars/manage-custom-vars.controller.js";
$jsFiles[] = "plugins/CustomVariables/angularjs/manage-custom-vars/manage-custom-vars.directive.js";
$stylesheets[] = "plugins/CustomVariables/vue/src/ManageCustomVars/ManageCustomVars.less";
}

public function provideActionDimensionFields(&$fields, &$joins)
Expand Down
22 changes: 0 additions & 22 deletions angularjs/manage-custom-vars/manage-custom-vars.controller.js

This file was deleted.

63 changes: 0 additions & 63 deletions angularjs/manage-custom-vars/manage-custom-vars.directive.html

This file was deleted.

26 changes: 0 additions & 26 deletions angularjs/manage-custom-vars/manage-custom-vars.directive.js

This file was deleted.

59 changes: 0 additions & 59 deletions angularjs/manage-custom-vars/manage-custom-vars.model.js

This file was deleted.

4 changes: 2 additions & 2 deletions plugin.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "CustomVariables",
"description": "Categorise your visitors and actions with custom name-value pairs. Segment by these values and get more insights to draw the right conclusions.",
"version": "4.0.1",
"version": "4.1.0",
"keywords": ["custom variables"],
"license": "GPL v3+",
"homepage": "https://matomo.org",
"require": {
"matomo": ">=4.0.0-b1,<5.0.0-b1"
"matomo": ">=4.10.0-b1,<5.0.0-b1"
},
"support": {
"email": "[email protected]",
Expand Down
2 changes: 1 addition & 1 deletion templates/manage.twig
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
{% endblock %}

{% block content %}
<div piwik-manage-custom-vars>
<div vue-entry="CustomVariables.ManageCustomVars"></div>
{% endblock %}
Binary file modified tests/UI/expected-ui-screenshots/CustomVariables_manage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 2942767

Please sign in to comment.