File tree Expand file tree Collapse file tree 7 files changed +361
-4
lines changed
backOffice/AnalyticsTree/controllers
Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/controllers Expand file tree Collapse file tree 7 files changed +361
-4
lines changed Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change 1
-
1
+ {
2
+ "Id": "4113171",
3
+ "Name": "www.nibble.be",
4
+ "Created": "2008-04-13T14:26:12+02:00",
5
+ "Updated": "2011-07-20T00:58:59.981+02:00"
6
+ }
Original file line number Diff line number Diff line change 45
45
//Only load/fetch if showAuth is true
46
46
if ( hasUserAuthd === true ) {
47
47
48
+ console . log ( "get accounts" ) ;
48
49
//Get all accounts via settingsResource - does WebAPI GET call
49
50
settingsResource . getaccounts ( ) . then ( function ( response ) {
50
51
$scope . accounts = response . data ;
52
+
53
+ if ( $scope . selectedaccount != null ) {
54
+ $scope . selectedaccount = _ . where ( $scope . accounts , { Id : $scope . selectedaccount . Id } ) [ 0 ] ;
55
+
56
+ settingsResource . getprofiles ( $scope . selectedaccount . Id ) . then ( function ( response ) {
57
+ $scope . profiles = response . data ;
58
+ if ( $scope . selectedprofile != null ) {
59
+ $scope . selectedprofile = _ . where ( $scope . profiles , { Id : $scope . selectedprofile . Id } ) [ 0 ] ;
60
+ }
61
+ } ) ;
62
+ }
51
63
} ) ;
52
64
65
+
53
66
//When an account is selected
54
67
$scope . accountSelected = function ( selectedAccount ) {
55
68
console . log ( selectedAccount ) ;
Original file line number Diff line number Diff line change 1
-
1
+ {
2
+ "Id": "8245037",
3
+ "AccountId": "4113171",
4
+ "WebPropertyId": "UA-4113171-1",
5
+ "InternalWebPropertyId": "7923617",
6
+ "Name": "www.nibble.be",
7
+ "Currency": "USD",
8
+ "Timezone": "Europe/Brussels",
9
+ "WebsiteUrl": "www.nibble.be",
10
+ "Type": "WEB",
11
+ "Created": "2008-04-13T14:26:12+02:00",
12
+ "Updated": "2011-09-20T09:34:04.996+02:00"
13
+ }
Original file line number Diff line number Diff line change 1
- <?xml version =" 1.0" encoding =" utf-8" ?>
1
+ <?xml version =" 1.0" encoding =" utf-8" ?>
2
2
<Analytics >
3
3
<ClientId label =" Client ID" description =" This is the Client ID key from the Google API" >206456221167-1a6npdlit92260gfaekomgon8cm0ratg</ClientId >
4
4
<ClientSecret label =" Client Secret" description =" This is the Client Secret from the Google API" >_LklwvmJC0EIkEprcRB4keQ_</ClientSecret >
5
- <RefreshToken label =" Refresh Token" description =" The refresh token used to acquire new access tokens. This is sensitive information." ></RefreshToken >
5
+ <RefreshToken label =" Refresh Token" description =" The refresh token used to acquire new access tokens. This is sensitive information." >1/8T0O1zrI2lVG7exZzmvUMlhNQPbN7NL2Tp6ijimsCvo </RefreshToken >
6
6
</Analytics >
Original file line number Diff line number Diff line change 45
45
//Only load/fetch if showAuth is true
46
46
if ( hasUserAuthd === true ) {
47
47
48
+ console . log ( "get accounts" ) ;
48
49
//Get all accounts via settingsResource - does WebAPI GET call
49
50
settingsResource . getaccounts ( ) . then ( function ( response ) {
50
51
$scope . accounts = response . data ;
52
+
53
+ if ( $scope . selectedaccount != null ) {
54
+ $scope . selectedaccount = _ . where ( $scope . accounts , { Id : $scope . selectedaccount . Id } ) [ 0 ] ;
55
+
56
+ settingsResource . getprofiles ( $scope . selectedaccount . Id ) . then ( function ( response ) {
57
+ $scope . profiles = response . data ;
58
+ if ( $scope . selectedprofile != null ) {
59
+ $scope . selectedprofile = _ . where ( $scope . profiles , { Id : $scope . selectedprofile . Id } ) [ 0 ] ;
60
+ }
61
+ } ) ;
62
+ }
51
63
} ) ;
52
64
65
+
53
66
//When an account is selected
54
67
$scope . accountSelected = function ( selectedAccount ) {
55
68
console . log ( selectedAccount ) ;
You can’t perform that action at this time.
0 commit comments