Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordizzy <diosmosis@users.noreply.github.com>2021-12-31 09:43:20 +0300
committerGitHub <noreply@github.com>2021-12-31 09:43:20 +0300
commita46819c6edc7d5ca213cba30eca3c4043e43ebd0 (patch)
tree8d3566380552b3b34c2757800f6ee7ee423d6758 /plugins/CoreHome/angularjs
parent28122c3b9b025ad1efd538b4dda4386f05a69906 (diff)
[Vue] migrate some smaller components in CoreHome (#18442)
* migrating reporting pages store * make store adapters more immutable * get service adapters to work * fix a UI test * another html fix * migrate most of reporting menu directive and model * Use themed font family for input forms to override materialize.css styling * rebuild vue * add a missing div * ui test fixes * update styling * get to build * get to load in the UI w/o error * clone result of functions * fix compile issue * migrate widget loader and get to load in UI * rebuild vue * migrate widgetcontainer * migrate widget bydimension container * migrate widget + add tooltips directive * quick fix * Updating version to 4.6.0 * loading in page * update expected screenshot * add wait just in case travis is slow * fix ordering bug * add another wait * rebuild vue * css tweak * fix some bugs and tests * undo screenshot changes * Menus test passing locally * [Vue] date picker viewDate property is not kept up to date (#18385) * viewDate ref is not kept up to date * rebuild corehome * reporting menu subcategory items are meant to be normal links * update some screenshots * use innerText instead of text() since angularjs maintains newlines in HTML that vue does not add * trigger angularjs digest after ajaxhelper request * rebuild vue * update screenshots, fix bug in link generation in reporting menu and allow syncing multiple screenshot regexes at a time * undo box-shadow change for UI tests * fix more issues & update more tests * update some screenshots * fix some tests * rebuild CoreHome * quick fix * built vue files * fix angularjs issue * add comment * update umd files * 4.6.1-rc1 * 4.6.1 * fix field array title * apply some pr feedback * apply more pr feedback * another fix * tweak * fix ng-change not executed before ng-model * fix another set of issues * fix another issue * rebuild vue * better ng-change/ng-model fix * update some screenshots * rebuild vue * remove some TODOs * initiate initial ng-change ONLY for site selectors where this behavior applies * emit/broadcast on correct scope in wrapper * rebuild vue * fix some issues * couple more fixes * fix another title issue * rebuild vue * do not report on ajax errors in notifications if not logged in * migrate reporting page and model * rebuild vue * create sites selector model adapter * fix siteselector vue bug, initial site is only set if there is just one site available * rebuild vue * migrate plugin settings directive * remove TODO * migrate plugin filter directive * migrate two more plugins directives * migrate save button * fix a bunch of bugs * fix another widget bug * allow change event name between angularjs and vue * rebuild vue * migrate plugin form directive * get to work * migrate select-on-focus directive and start migrating report-export directive * finish migrating report export directive & popover component + create reusable function to create vue app and add globals to it * rebuild vue * remove angularjs files and move less contents to vue dir * migrate sparkline component * migrate progressbar component * migrate content intro & content table directives * rebuild vue * built vue files * fix function signature * fix vue warning * fix ajax request race condition * rebuild vue * add new notification type "help" so the help notification is not cleared when clearing transient notifications * fix some bugs and tests * update screenshot * update screenshot & fix a test * allow using unminified jquery ui + fix bug in last fix * fix error when enrichedheadline is used in modal * add polyfill min.js * remove two todos * fix widget url logic * update some screenshots and fix sanitization/escape issue * update screenshots * rebuild vue * fix url location updating regression in MatomoUrl.updateLocation use * submodule * update screenshots and fix possible error in json parse * built vue files * Merge branch 'vue-period-selector-regression' into vue-reporting-menu * rebuild vue * use correct variable * rebuild vue * fix widget url logic * segment parameter can be undefined now for some reason * fix ngmodel binding in siteselector adapter (for last time hopefully) * the original site selector only set the first site to the first site in the initial sites query if there was only one site in the entire matomo instance * fix sitesmanager ui test failure * fix usersettings test failure * rebuild vue * more siteselector tweaks. * build CoreHome * more siteselector tweaks. * another siteselector issue * update screenshots * update screenshot and try to fix random failure * fix some issues in widget.vue when containerid is specified * fix couple tests * fix several test failures * fix string concat * fix test failure * extra change * fix last change and random failure * styling fix * fix last fix * real fix this time * fix stray request * proper fix * update build files * try to fix random failure * do not submit form * check for api errors in promise chain in ajaxhelper.ts * force a digest after a location change * use proper abortcontroller method instead of promise hack, have to add new polyfill + try to fix random test failure * some UI test fixes * fix some report export issues * several save button fixes + make replace approximation in createAngularJsAdapter better * fix sparkline * apply after manual click triggering in savebutton * css fixes and piwik-content-table was never applied by angularjs in installtion * rebuild vue * add names to divs so they can still be queried as they were in angularjs * rebuild vue * now that format_metrics checkbox works, need to check it * remove unintended changes * update screenshots * update screenshot Co-authored-by: Justin Velluppillai <justin@innocraft.com> Co-authored-by: justinvelluppillai <justinvelluppillai@users.noreply.github.com> Co-authored-by: Matthieu Aubry <mattab@users.noreply.github.com>
Diffstat (limited to 'plugins/CoreHome/angularjs')
-rw-r--r--plugins/CoreHome/angularjs/content-intro/content-intro.directive.js26
-rw-r--r--plugins/CoreHome/angularjs/content-table/content-table.directive.js30
-rw-r--r--plugins/CoreHome/angularjs/progressbar/progressbar.directive.html7
-rw-r--r--plugins/CoreHome/angularjs/progressbar/progressbar.directive.js54
-rw-r--r--plugins/CoreHome/angularjs/progressbar/progressbar.directive.less3
-rw-r--r--plugins/CoreHome/angularjs/sparkline/sparkline.component.js87
-rw-r--r--plugins/CoreHome/angularjs/sparkline/sparkline.component.less8
7 files changed, 0 insertions, 215 deletions
diff --git a/plugins/CoreHome/angularjs/content-intro/content-intro.directive.js b/plugins/CoreHome/angularjs/content-intro/content-intro.directive.js
deleted file mode 100644
index 2ee75105cf..0000000000
--- a/plugins/CoreHome/angularjs/content-intro/content-intro.directive.js
+++ /dev/null
@@ -1,26 +0,0 @@
-/*!
- * Matomo - free/libre analytics platform
- *
- * @link https://matomo.org
- * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */
-
-/**
- * Usage:
- * <div piwik-content-block>
- */
-(function () {
- angular.module('piwikApp').directive('piwikContentIntro', piwikContentIntro);
-
- piwikContentIntro.$inject = ['piwik'];
-
- function piwikContentIntro(piwik){
-
- return {
- restrict: 'A',
- compile: function (element, attrs) {
- element.addClass('piwik-content-intro');
- }
- };
- }
-})();
diff --git a/plugins/CoreHome/angularjs/content-table/content-table.directive.js b/plugins/CoreHome/angularjs/content-table/content-table.directive.js
deleted file mode 100644
index 6fefc8838c..0000000000
--- a/plugins/CoreHome/angularjs/content-table/content-table.directive.js
+++ /dev/null
@@ -1,30 +0,0 @@
-/*!
- * Matomo - free/libre analytics platform
- *
- * @link https://matomo.org
- * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */
-
-/**
- * Usage:
- * <div piwik-content-table>
- */
-(function () {
- angular.module('piwikApp').directive('piwikContentTable', piwikContentTable);
-
- piwikContentTable.$inject = ['piwik'];
-
- function piwikContentTable(piwik){
-
- return {
- restrict: 'A',
- compile: function (element, attrs) {
- element.addClass('card card-table entityTable');
-
- return function (scope, element, attrs) {
-
- };
- }
- };
- }
-})();
diff --git a/plugins/CoreHome/angularjs/progressbar/progressbar.directive.html b/plugins/CoreHome/angularjs/progressbar/progressbar.directive.html
deleted file mode 100644
index 5bbb4e4400..0000000000
--- a/plugins/CoreHome/angularjs/progressbar/progressbar.directive.html
+++ /dev/null
@@ -1,7 +0,0 @@
-<div class="progressbar">
- <div class="progress">
- <div class="determinate" style="width: 0"
- ng-style="{width: (progress + '%')}"></div>
- </div>
- <span ng-show="!!label"><img src='./plugins/Morpheus/images/loading-blue.gif'/> <span ng-bind-html="label"></span></span>
-</div> \ No newline at end of file
diff --git a/plugins/CoreHome/angularjs/progressbar/progressbar.directive.js b/plugins/CoreHome/angularjs/progressbar/progressbar.directive.js
deleted file mode 100644
index 4c5cdaa488..0000000000
--- a/plugins/CoreHome/angularjs/progressbar/progressbar.directive.js
+++ /dev/null
@@ -1,54 +0,0 @@
-/*!
- * Matomo - free/libre analytics platform
- *
- * @link https://matomo.org
- * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */
-
-/**
- * Usage:
- * <div piwik-progressbar>
- */
-(function () {
- angular.module('piwikApp').directive('piwikProgressbar', piwikProgressbar);
-
- piwikProgressbar.$inject = ['piwik'];
-
- function piwikProgressbar(piwik){
- var defaults = {
- label: '',
- progress: 0
- };
-
- return {
- restrict: 'A',
- scope: {
- progress: '=',
- label: '='
- },
- templateUrl: 'plugins/CoreHome/angularjs/progressbar/progressbar.directive.html?cb=' + piwik.cacheBuster,
- compile: function (element, attrs) {
-
- for (var index in defaults) {
- if (defaults.hasOwnProperty(index) && attrs[index] === undefined) {
- attrs[index] = defaults[index];
- }
- }
-
- return function (scope, element, attrs) {
-
- scope.$watch('progress', function (val, oldVal) {
- if (val !== oldVal) {
- if (val > 100) {
- scope.progress = 100;
- } else if (val < 0) {
- scope.progress = 0;
- }
- }
- });
-
- };
- }
- };
- }
-})(); \ No newline at end of file
diff --git a/plugins/CoreHome/angularjs/progressbar/progressbar.directive.less b/plugins/CoreHome/angularjs/progressbar/progressbar.directive.less
deleted file mode 100644
index 70a02c8247..0000000000
--- a/plugins/CoreHome/angularjs/progressbar/progressbar.directive.less
+++ /dev/null
@@ -1,3 +0,0 @@
-.progressbar {
- margin: 22px 24px;
-} \ No newline at end of file
diff --git a/plugins/CoreHome/angularjs/sparkline/sparkline.component.js b/plugins/CoreHome/angularjs/sparkline/sparkline.component.js
deleted file mode 100644
index 91b70bd3a0..0000000000
--- a/plugins/CoreHome/angularjs/sparkline/sparkline.component.js
+++ /dev/null
@@ -1,87 +0,0 @@
-/*!
- * Matomo - free/libre analytics platform
- *
- * @link https://matomo.org
- * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */
-
-/**
- * Displays a sparkline. 'module', 'action' and 'date' are required elements of the
- * params attribute.
- *
- * Usage:
- * <piwik-sparkline params="{'module': 'API', 'action': 'get', 'date': '...'}"></piwik-sparkline>
- */
-(function () {
- angular.module('piwikApp').component('piwikSparkline', {
- template: '<img />',
- bindings: {
- seriesIndices: '<',
- params: '<'
- },
- controller: SparklineController
- });
-
- SparklineController.$inject = ['$element', '$httpParamSerializer', 'piwikApi', 'piwik', 'piwikPeriods'];
-
- function SparklineController($element, $httpParamSerializer, piwikApi, piwik, piwikPeriods) {
- var vm = this;
- vm.$onChanges = $onChanges;
-
- function $onChanges() {
- // done manually due to 'random' query param. since it changes the URL on each digest, depending on angular
- // results in an infinite digest
- $element.find('img').attr('src', getSparklineUrl());
- }
-
- function getSparklineUrl() {
- var seriesIndices = vm.seriesIndices;
- var sparklineColors = piwik.getSparklineColors();
-
- if (seriesIndices) {
- sparklineColors.lineColor = sparklineColors.lineColor.filter(function (c, index) {
- return seriesIndices.indexOf(index) !== -1;
- });
- }
-
- var colors = JSON.stringify(sparklineColors);
-
- var defaultParams = {
- forceView: '1',
- viewDataTable: 'sparkline',
- widget: $element.closest('[widgetId]').length ? '1' : '0',
- showtitle: '1',
- colors: colors,
- random: Date.now(),
- date: getDefaultDate()
- };
-
- var urlParams = piwikApi.mixinDefaultGetParams($element.extend(defaultParams, vm.params));
-
- // Append the token_auth to the URL if it was set (eg. embed dashboard)
- var token_auth = piwik.broadcast.getValueFromUrl("token_auth");
- if (token_auth.length && piwik.shouldPropagateTokenAuth) {
- urlParams.token_auth = token_auth;
- }
-
- return '?' + $httpParamSerializer(urlParams);
- }
-
- function getDefaultDate() {
- if (piwik.period === 'range') {
- return piwik.startDateString + ',' + piwik.endDateString;
- }
-
- var dateRange = piwikPeriods.get('range').getLastNRange(piwik.period, 30, piwik.currentDateString).getDateRange();
-
- var piwikMinDate = new Date(piwik.minDateYear, piwik.minDateMonth - 1, piwik.minDateDay);
- if (dateRange[0] < piwikMinDate) {
- dateRange[0] = piwikMinDate;
- }
-
- var startDateStr = piwikPeriods.format(dateRange[0]);
- var endDateStr = piwikPeriods.format(dateRange[1]);
- return startDateStr + ',' + endDateStr;
- }
- }
-})();
diff --git a/plugins/CoreHome/angularjs/sparkline/sparkline.component.less b/plugins/CoreHome/angularjs/sparkline/sparkline.component.less
deleted file mode 100644
index a31d68547e..0000000000
--- a/plugins/CoreHome/angularjs/sparkline/sparkline.component.less
+++ /dev/null
@@ -1,8 +0,0 @@
-[piwik-sparkline] {
- display: inline-block;
-
- img {
- width: 100px;
- height: 25px;
- }
-} \ No newline at end of file