Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
0ec8b9b6
Commit
0ec8b9b6
authored
Jun 04, 2015
by
BC Broussard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused v1beta2 references from web ui
parent
15904039
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
31 additions
and
126 deletions
+31
-126
datafile.go
pkg/ui/datafile.go
+0
-0
app.js
www/app/assets/js/app.js
+15
-62
cAdvisorController.js
...ts/dashboard/js/modules/controllers/cAdvisorController.js
+1
-1
groupController.js
...nents/dashboard/js/modules/controllers/groupController.js
+1
-1
listEventsController.js
.../dashboard/js/modules/controllers/listEventsController.js
+1
-1
listMinionsController.js
...dashboard/js/modules/controllers/listMinionsController.js
+1
-1
listPodsController.js
...ts/dashboard/js/modules/controllers/listPodsController.js
+1
-1
listReplicationControllersController.js
...dules/controllers/listReplicationControllersController.js
+1
-1
listServicesController.js
...ashboard/js/modules/controllers/listServicesController.js
+1
-1
nodeController.js
...onents/dashboard/js/modules/controllers/nodeController.js
+1
-1
podController.js
...ponents/dashboard/js/modules/controllers/podController.js
+1
-1
replicationController.js
...dashboard/js/modules/controllers/replicationController.js
+1
-1
serviceController.js
...nts/dashboard/js/modules/controllers/serviceController.js
+1
-1
development.json
www/master/shared/config/development.json
+1
-2
generated-config.js
www/master/shared/config/generated-config.js
+1
-2
k8sApiService.js
www/master/shared/js/modules/services/k8sApiService.js
+3
-49
No files found.
pkg/ui/datafile.go
View file @
0ec8b9b6
This diff is collapsed.
Click to expand it.
www/app/assets/js/app.js
View file @
0ec8b9b6
...
@@ -200,8 +200,7 @@ angular.module("kubernetesApp.config", [])
...
@@ -200,8 +200,7 @@ angular.module("kubernetesApp.config", [])
.
constant
(
"ENV"
,
{
.
constant
(
"ENV"
,
{
"/"
:
{
"/"
:
{
"k8sApiServer"
:
"/api/v1beta2"
,
"k8sApiServer"
:
"/api/v1beta3"
,
"k8sApiv1beta3Server"
:
"/api/v1beta3"
,
"k8sDataServer"
:
"/cluster"
,
"k8sDataServer"
:
"/cluster"
,
"k8sDataPollMinIntervalSec"
:
10
,
"k8sDataPollMinIntervalSec"
:
10
,
"k8sDataPollMaxIntervalSec"
:
120
,
"k8sDataPollMaxIntervalSec"
:
120
,
...
@@ -572,51 +571,6 @@ app.provider('k8sApi',
...
@@ -572,51 +571,6 @@ app.provider('k8sApi',
function
()
{
function
()
{
var
urlBase
=
''
;
var
urlBase
=
''
;
this
.
setUrlBase
=
function
(
value
)
{
urlBase
=
value
;
};
var
_get
=
function
(
$http
,
baseUrl
,
query
)
{
var
_fullUrl
=
baseUrl
;
if
(
query
!==
undefined
)
{
_fullUrl
+=
'/'
+
query
;
}
return
$http
.
get
(
_fullUrl
);
};
this
.
$get
=
[
"$http"
,
"$q"
,
function
(
$http
,
$q
)
{
var
api
=
{};
api
.
getUrlBase
=
function
()
{
return
urlBase
;
};
api
.
getPods
=
function
(
query
)
{
return
_get
(
$http
,
urlBase
+
'/pods'
,
query
);
};
api
.
getMinions
=
function
(
query
)
{
return
_get
(
$http
,
urlBase
+
'/nodes'
,
query
);
};
api
.
getNodes
=
api
.
getMinions
;
api
.
getServices
=
function
(
query
)
{
return
_get
(
$http
,
urlBase
+
'/services'
,
query
);
};
api
.
getReplicationControllers
=
function
(
query
)
{
return
_get
(
$http
,
urlBase
+
'/replicationControllers'
,
query
)
};
api
.
getEvents
=
function
(
query
)
{
return
_get
(
$http
,
urlBase
+
'/events'
,
query
);
};
return
api
;
}];
})
.
config
([
"k8sApiProvider"
,
"ENV"
,
function
(
k8sApiProvider
,
ENV
)
{
if
(
ENV
&&
ENV
[
'/'
]
&&
ENV
[
'/'
][
'k8sApiServer'
])
{
var
proxy
=
ENV
[
'/'
][
'cAdvisorProxy'
]
||
''
;
k8sApiProvider
.
setUrlBase
(
proxy
+
ENV
[
'/'
][
'k8sApiServer'
]);
}
}]);
app
.
provider
(
'k8sv1Beta3Api'
,
function
()
{
var
urlBase
=
''
;
var
_namespace
=
'default'
;
var
_namespace
=
'default'
;
this
.
setUrlBase
=
function
(
value
)
{
urlBase
=
value
;
};
this
.
setUrlBase
=
function
(
value
)
{
urlBase
=
value
;
};
...
@@ -656,10 +610,9 @@ app.provider('k8sv1Beta3Api',
...
@@ -656,10 +610,9 @@ app.provider('k8sv1Beta3Api',
return
api
;
return
api
;
}];
}];
})
})
.
config
([
"k8sv1Beta3ApiProvider"
,
"ENV"
,
function
(
k8sv1Beta3ApiProvider
,
ENV
)
{
.
config
([
"k8sApiProvider"
,
"ENV"
,
function
(
k8sApiProvider
,
ENV
)
{
if
(
ENV
&&
ENV
[
'/'
]
&&
ENV
[
'/'
][
'k8sApiv1beta3Server'
])
{
if
(
ENV
&&
ENV
[
'/'
]
&&
ENV
[
'/'
][
'k8sApiServer'
])
{
var
proxy
=
ENV
[
'/'
][
'cAdvisorProxy'
]
||
''
;
k8sApiProvider
.
setUrlBase
(
ENV
[
'/'
][
'k8sApiServer'
]);
k8sv1Beta3ApiProvider
.
setUrlBase
(
proxy
+
ENV
[
'/'
][
'k8sApiv1beta3Server'
]);
}
}
}]);
}]);
...
@@ -860,7 +813,7 @@ app.provider('k8sv1Beta3Api',
...
@@ -860,7 +813,7 @@ app.provider('k8sv1Beta3Api',
app
.
controller
(
'cAdvisorController'
,
[
app
.
controller
(
'cAdvisorController'
,
[
'$scope'
,
'$scope'
,
'$routeParams'
,
'$routeParams'
,
'k8s
v1Beta3
Api'
,
'k8sApi'
,
'lodash'
,
'lodash'
,
'cAdvisorService'
,
'cAdvisorService'
,
'$q'
,
'$q'
,
...
@@ -1059,7 +1012,7 @@ app.controller('GroupCtrl', [
...
@@ -1059,7 +1012,7 @@ app.controller('GroupCtrl', [
'$route'
,
'$route'
,
'$interval'
,
'$interval'
,
'$routeParams'
,
'$routeParams'
,
'k8s
v1Beta3
Api'
,
'k8sApi'
,
'$rootScope'
,
'$rootScope'
,
'$location'
,
'$location'
,
'lodash'
,
'lodash'
,
...
@@ -1309,7 +1262,7 @@ angular.module('kubernetesApp.components.dashboard', [])
...
@@ -1309,7 +1262,7 @@ angular.module('kubernetesApp.components.dashboard', [])
app
.
controller
(
'ListEventsCtrl'
,
[
app
.
controller
(
'ListEventsCtrl'
,
[
'$scope'
,
'$scope'
,
'$routeParams'
,
'$routeParams'
,
'k8s
v1Beta3
Api'
,
'k8sApi'
,
'$location'
,
'$location'
,
'$filter'
,
'$filter'
,
function
(
$scope
,
$routeParams
,
k8sApi
,
$location
,
$filter
)
{
function
(
$scope
,
$routeParams
,
k8sApi
,
$location
,
$filter
)
{
...
@@ -1395,7 +1348,7 @@ app.controller('ListEventsCtrl', [
...
@@ -1395,7 +1348,7 @@ app.controller('ListEventsCtrl', [
app
.
controller
(
'ListMinionsCtrl'
,
[
app
.
controller
(
'ListMinionsCtrl'
,
[
'$scope'
,
'$scope'
,
'$routeParams'
,
'$routeParams'
,
'k8s
v1Beta3
Api'
,
'k8sApi'
,
'$location'
,
'$location'
,
function
(
$scope
,
$routeParams
,
k8sApi
,
$location
)
{
function
(
$scope
,
$routeParams
,
k8sApi
,
$location
)
{
'use strict'
;
'use strict'
;
...
@@ -1465,7 +1418,7 @@ app.controller('ListMinionsCtrl', [
...
@@ -1465,7 +1418,7 @@ app.controller('ListMinionsCtrl', [
app
.
controller
(
'ListPodsCtrl'
,
[
app
.
controller
(
'ListPodsCtrl'
,
[
'$scope'
,
'$scope'
,
'$routeParams'
,
'$routeParams'
,
'k8s
v1Beta3
Api'
,
'k8sApi'
,
'lodash'
,
'lodash'
,
'$location'
,
'$location'
,
function
(
$scope
,
$routeParams
,
k8sApi
,
lodash
,
$location
)
{
function
(
$scope
,
$routeParams
,
k8sApi
,
lodash
,
$location
)
{
...
@@ -1600,7 +1553,7 @@ app.controller('ListPodsCtrl', [
...
@@ -1600,7 +1553,7 @@ app.controller('ListPodsCtrl', [
app
.
controller
(
'ListReplicationControllersCtrl'
,
[
app
.
controller
(
'ListReplicationControllersCtrl'
,
[
'$scope'
,
'$scope'
,
'$routeParams'
,
'$routeParams'
,
'k8s
v1Beta3
Api'
,
'k8sApi'
,
'$location'
,
'$location'
,
function
(
$scope
,
$routeParams
,
k8sApi
,
$location
)
{
function
(
$scope
,
$routeParams
,
k8sApi
,
$location
)
{
'use strict'
;
'use strict'
;
...
@@ -1697,7 +1650,7 @@ app.controller('ListServicesCtrl', [
...
@@ -1697,7 +1650,7 @@ app.controller('ListServicesCtrl', [
'$scope'
,
'$scope'
,
'$interval'
,
'$interval'
,
'$routeParams'
,
'$routeParams'
,
'k8s
v1Beta3
Api'
,
'k8sApi'
,
'$rootScope'
,
'$rootScope'
,
'$location'
,
'$location'
,
function
(
$scope
,
$interval
,
$routeParams
,
k8sApi
,
$rootScope
,
$location
)
{
function
(
$scope
,
$interval
,
$routeParams
,
k8sApi
,
$rootScope
,
$location
)
{
...
@@ -1806,7 +1759,7 @@ app.controller('NodeCtrl', [
...
@@ -1806,7 +1759,7 @@ app.controller('NodeCtrl', [
'$scope'
,
'$scope'
,
'$interval'
,
'$interval'
,
'$routeParams'
,
'$routeParams'
,
'k8s
v1Beta3
Api'
,
'k8sApi'
,
'$rootScope'
,
'$rootScope'
,
function
(
$scope
,
$interval
,
$routeParams
,
k8sApi
,
$rootScope
)
{
function
(
$scope
,
$interval
,
$routeParams
,
k8sApi
,
$rootScope
)
{
'use strict'
;
'use strict'
;
...
@@ -1840,7 +1793,7 @@ app.controller('PodCtrl', [
...
@@ -1840,7 +1793,7 @@ app.controller('PodCtrl', [
'$scope'
,
'$scope'
,
'$interval'
,
'$interval'
,
'$routeParams'
,
'$routeParams'
,
'k8s
v1Beta3
Api'
,
'k8sApi'
,
'$rootScope'
,
'$rootScope'
,
function
(
$scope
,
$interval
,
$routeParams
,
k8sApi
,
$rootScope
)
{
function
(
$scope
,
$interval
,
$routeParams
,
k8sApi
,
$rootScope
)
{
'use strict'
;
'use strict'
;
...
@@ -1889,7 +1842,7 @@ ReplicationController.prototype.handleError = function(data, status, headers, co
...
@@ -1889,7 +1842,7 @@ ReplicationController.prototype.handleError = function(data, status, headers, co
app
.
controller
(
'ReplicationControllerCtrl'
,
[
app
.
controller
(
'ReplicationControllerCtrl'
,
[
'$scope'
,
'$scope'
,
'$routeParams'
,
'$routeParams'
,
'k8s
v1Beta3
Api'
,
'k8sApi'
,
function
(
$scope
,
$routeParams
,
k8sApi
)
{
function
(
$scope
,
$routeParams
,
k8sApi
)
{
$scope
.
controller
=
new
ReplicationController
();
$scope
.
controller
=
new
ReplicationController
();
$scope
.
controller
.
k8sApi
=
k8sApi
;
$scope
.
controller
.
k8sApi
=
k8sApi
;
...
@@ -1926,7 +1879,7 @@ ServiceController.prototype.handleError = function(data, status, headers, config
...
@@ -1926,7 +1879,7 @@ ServiceController.prototype.handleError = function(data, status, headers, config
app
.
controller
(
'ServiceCtrl'
,
[
app
.
controller
(
'ServiceCtrl'
,
[
'$scope'
,
'$scope'
,
'$routeParams'
,
'$routeParams'
,
'k8s
v1Beta3
Api'
,
'k8sApi'
,
'$location'
,
'$location'
,
function
(
$scope
,
$routeParams
,
k8sApi
,
$location
)
{
function
(
$scope
,
$routeParams
,
k8sApi
,
$location
)
{
$scope
.
controller
=
new
ServiceController
();
$scope
.
controller
=
new
ServiceController
();
...
...
www/master/components/dashboard/js/modules/controllers/cAdvisorController.js
View file @
0ec8b9b6
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
app
.
controller
(
'cAdvisorController'
,
[
app
.
controller
(
'cAdvisorController'
,
[
'$scope'
,
'$scope'
,
'$routeParams'
,
'$routeParams'
,
'k8s
v1Beta3
Api'
,
'k8sApi'
,
'lodash'
,
'lodash'
,
'cAdvisorService'
,
'cAdvisorService'
,
'$q'
,
'$q'
,
...
...
www/master/components/dashboard/js/modules/controllers/groupController.js
View file @
0ec8b9b6
...
@@ -8,7 +8,7 @@ app.controller('GroupCtrl', [
...
@@ -8,7 +8,7 @@ app.controller('GroupCtrl', [
'$route'
,
'$route'
,
'$interval'
,
'$interval'
,
'$routeParams'
,
'$routeParams'
,
'k8s
v1Beta3
Api'
,
'k8sApi'
,
'$rootScope'
,
'$rootScope'
,
'$location'
,
'$location'
,
'lodash'
,
'lodash'
,
...
...
www/master/components/dashboard/js/modules/controllers/listEventsController.js
View file @
0ec8b9b6
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
app
.
controller
(
'ListEventsCtrl'
,
[
app
.
controller
(
'ListEventsCtrl'
,
[
'$scope'
,
'$scope'
,
'$routeParams'
,
'$routeParams'
,
'k8s
v1Beta3
Api'
,
'k8sApi'
,
'$location'
,
'$location'
,
'$filter'
,
'$filter'
,
function
(
$scope
,
$routeParams
,
k8sApi
,
$location
,
$filter
)
{
function
(
$scope
,
$routeParams
,
k8sApi
,
$location
,
$filter
)
{
...
...
www/master/components/dashboard/js/modules/controllers/listMinionsController.js
View file @
0ec8b9b6
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
app
.
controller
(
'ListMinionsCtrl'
,
[
app
.
controller
(
'ListMinionsCtrl'
,
[
'$scope'
,
'$scope'
,
'$routeParams'
,
'$routeParams'
,
'k8s
v1Beta3
Api'
,
'k8sApi'
,
'$location'
,
'$location'
,
function
(
$scope
,
$routeParams
,
k8sApi
,
$location
)
{
function
(
$scope
,
$routeParams
,
k8sApi
,
$location
)
{
'use strict'
;
'use strict'
;
...
...
www/master/components/dashboard/js/modules/controllers/listPodsController.js
View file @
0ec8b9b6
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
app
.
controller
(
'ListPodsCtrl'
,
[
app
.
controller
(
'ListPodsCtrl'
,
[
'$scope'
,
'$scope'
,
'$routeParams'
,
'$routeParams'
,
'k8s
v1Beta3
Api'
,
'k8sApi'
,
'lodash'
,
'lodash'
,
'$location'
,
'$location'
,
function
(
$scope
,
$routeParams
,
k8sApi
,
lodash
,
$location
)
{
function
(
$scope
,
$routeParams
,
k8sApi
,
lodash
,
$location
)
{
...
...
www/master/components/dashboard/js/modules/controllers/listReplicationControllersController.js
View file @
0ec8b9b6
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
app
.
controller
(
'ListReplicationControllersCtrl'
,
[
app
.
controller
(
'ListReplicationControllersCtrl'
,
[
'$scope'
,
'$scope'
,
'$routeParams'
,
'$routeParams'
,
'k8s
v1Beta3
Api'
,
'k8sApi'
,
'$location'
,
'$location'
,
function
(
$scope
,
$routeParams
,
k8sApi
,
$location
)
{
function
(
$scope
,
$routeParams
,
k8sApi
,
$location
)
{
'use strict'
;
'use strict'
;
...
...
www/master/components/dashboard/js/modules/controllers/listServicesController.js
View file @
0ec8b9b6
...
@@ -7,7 +7,7 @@ app.controller('ListServicesCtrl', [
...
@@ -7,7 +7,7 @@ app.controller('ListServicesCtrl', [
'$scope'
,
'$scope'
,
'$interval'
,
'$interval'
,
'$routeParams'
,
'$routeParams'
,
'k8s
v1Beta3
Api'
,
'k8sApi'
,
'$rootScope'
,
'$rootScope'
,
'$location'
,
'$location'
,
function
(
$scope
,
$interval
,
$routeParams
,
k8sApi
,
$rootScope
,
$location
)
{
function
(
$scope
,
$interval
,
$routeParams
,
k8sApi
,
$rootScope
,
$location
)
{
...
...
www/master/components/dashboard/js/modules/controllers/nodeController.js
View file @
0ec8b9b6
...
@@ -7,7 +7,7 @@ app.controller('NodeCtrl', [
...
@@ -7,7 +7,7 @@ app.controller('NodeCtrl', [
'$scope'
,
'$scope'
,
'$interval'
,
'$interval'
,
'$routeParams'
,
'$routeParams'
,
'k8s
v1Beta3
Api'
,
'k8sApi'
,
'$rootScope'
,
'$rootScope'
,
function
(
$scope
,
$interval
,
$routeParams
,
k8sApi
,
$rootScope
)
{
function
(
$scope
,
$interval
,
$routeParams
,
k8sApi
,
$rootScope
)
{
'use strict'
;
'use strict'
;
...
...
www/master/components/dashboard/js/modules/controllers/podController.js
View file @
0ec8b9b6
...
@@ -7,7 +7,7 @@ app.controller('PodCtrl', [
...
@@ -7,7 +7,7 @@ app.controller('PodCtrl', [
'$scope'
,
'$scope'
,
'$interval'
,
'$interval'
,
'$routeParams'
,
'$routeParams'
,
'k8s
v1Beta3
Api'
,
'k8sApi'
,
'$rootScope'
,
'$rootScope'
,
function
(
$scope
,
$interval
,
$routeParams
,
k8sApi
,
$rootScope
)
{
function
(
$scope
,
$interval
,
$routeParams
,
k8sApi
,
$rootScope
)
{
'use strict'
;
'use strict'
;
...
...
www/master/components/dashboard/js/modules/controllers/replicationController.js
View file @
0ec8b9b6
...
@@ -22,7 +22,7 @@ ReplicationController.prototype.handleError = function(data, status, headers, co
...
@@ -22,7 +22,7 @@ ReplicationController.prototype.handleError = function(data, status, headers, co
app
.
controller
(
'ReplicationControllerCtrl'
,
[
app
.
controller
(
'ReplicationControllerCtrl'
,
[
'$scope'
,
'$scope'
,
'$routeParams'
,
'$routeParams'
,
'k8s
v1Beta3
Api'
,
'k8sApi'
,
function
(
$scope
,
$routeParams
,
k8sApi
)
{
function
(
$scope
,
$routeParams
,
k8sApi
)
{
$scope
.
controller
=
new
ReplicationController
();
$scope
.
controller
=
new
ReplicationController
();
$scope
.
controller
.
k8sApi
=
k8sApi
;
$scope
.
controller
.
k8sApi
=
k8sApi
;
...
...
www/master/components/dashboard/js/modules/controllers/serviceController.js
View file @
0ec8b9b6
...
@@ -22,7 +22,7 @@ ServiceController.prototype.handleError = function(data, status, headers, config
...
@@ -22,7 +22,7 @@ ServiceController.prototype.handleError = function(data, status, headers, config
app
.
controller
(
'ServiceCtrl'
,
[
app
.
controller
(
'ServiceCtrl'
,
[
'$scope'
,
'$scope'
,
'$routeParams'
,
'$routeParams'
,
'k8s
v1Beta3
Api'
,
'k8sApi'
,
'$location'
,
'$location'
,
function
(
$scope
,
$routeParams
,
k8sApi
,
$location
)
{
function
(
$scope
,
$routeParams
,
k8sApi
,
$location
)
{
$scope
.
controller
=
new
ServiceController
();
$scope
.
controller
=
new
ServiceController
();
...
...
www/master/shared/config/development.json
View file @
0ec8b9b6
{
{
"k8sApiServer"
:
"/api/v1beta2"
,
"k8sApiServer"
:
"/api/v1beta3"
,
"k8sApiv1beta3Server"
:
"/api/v1beta3"
,
"k8sDataServer"
:
"/cluster"
,
"k8sDataServer"
:
"/cluster"
,
"k8sDataPollMinIntervalSec"
:
10
,
"k8sDataPollMinIntervalSec"
:
10
,
"k8sDataPollMaxIntervalSec"
:
120
,
"k8sDataPollMaxIntervalSec"
:
120
,
...
...
www/master/shared/config/generated-config.js
View file @
0ec8b9b6
...
@@ -2,8 +2,7 @@ angular.module("kubernetesApp.config", [])
...
@@ -2,8 +2,7 @@ angular.module("kubernetesApp.config", [])
.
constant
(
"ENV"
,
{
.
constant
(
"ENV"
,
{
"/"
:
{
"/"
:
{
"k8sApiServer"
:
"/api/v1beta2"
,
"k8sApiServer"
:
"/api/v1beta3"
,
"k8sApiv1beta3Server"
:
"/api/v1beta3"
,
"k8sDataServer"
:
"/cluster"
,
"k8sDataServer"
:
"/cluster"
,
"k8sDataPollMinIntervalSec"
:
10
,
"k8sDataPollMinIntervalSec"
:
10
,
"k8sDataPollMaxIntervalSec"
:
120
,
"k8sDataPollMaxIntervalSec"
:
120
,
...
...
www/master/shared/js/modules/services/k8sApiService.js
View file @
0ec8b9b6
...
@@ -2,51 +2,6 @@ app.provider('k8sApi',
...
@@ -2,51 +2,6 @@ app.provider('k8sApi',
function
()
{
function
()
{
var
urlBase
=
''
;
var
urlBase
=
''
;
this
.
setUrlBase
=
function
(
value
)
{
urlBase
=
value
;
};
var
_get
=
function
(
$http
,
baseUrl
,
query
)
{
var
_fullUrl
=
baseUrl
;
if
(
query
!==
undefined
)
{
_fullUrl
+=
'/'
+
query
;
}
return
$http
.
get
(
_fullUrl
);
};
this
.
$get
=
function
(
$http
,
$q
)
{
var
api
=
{};
api
.
getUrlBase
=
function
()
{
return
urlBase
;
};
api
.
getPods
=
function
(
query
)
{
return
_get
(
$http
,
urlBase
+
'/pods'
,
query
);
};
api
.
getMinions
=
function
(
query
)
{
return
_get
(
$http
,
urlBase
+
'/nodes'
,
query
);
};
api
.
getNodes
=
api
.
getMinions
;
api
.
getServices
=
function
(
query
)
{
return
_get
(
$http
,
urlBase
+
'/services'
,
query
);
};
api
.
getReplicationControllers
=
function
(
query
)
{
return
_get
(
$http
,
urlBase
+
'/replicationControllers'
,
query
)
};
api
.
getEvents
=
function
(
query
)
{
return
_get
(
$http
,
urlBase
+
'/events'
,
query
);
};
return
api
;
};
})
.
config
(
function
(
k8sApiProvider
,
ENV
)
{
if
(
ENV
&&
ENV
[
'/'
]
&&
ENV
[
'/'
][
'k8sApiServer'
])
{
var
proxy
=
ENV
[
'/'
][
'cAdvisorProxy'
]
||
''
;
k8sApiProvider
.
setUrlBase
(
proxy
+
ENV
[
'/'
][
'k8sApiServer'
]);
}
});
app
.
provider
(
'k8sv1Beta3Api'
,
function
()
{
var
urlBase
=
''
;
var
_namespace
=
'default'
;
var
_namespace
=
'default'
;
this
.
setUrlBase
=
function
(
value
)
{
urlBase
=
value
;
};
this
.
setUrlBase
=
function
(
value
)
{
urlBase
=
value
;
};
...
@@ -86,9 +41,8 @@ app.provider('k8sv1Beta3Api',
...
@@ -86,9 +41,8 @@ app.provider('k8sv1Beta3Api',
return
api
;
return
api
;
};
};
})
})
.
config
(
function
(
k8sv1Beta3ApiProvider
,
ENV
)
{
.
config
(
function
(
k8sApiProvider
,
ENV
)
{
if
(
ENV
&&
ENV
[
'/'
]
&&
ENV
[
'/'
][
'k8sApiv1beta3Server'
])
{
if
(
ENV
&&
ENV
[
'/'
]
&&
ENV
[
'/'
][
'k8sApiServer'
])
{
var
proxy
=
ENV
[
'/'
][
'cAdvisorProxy'
]
||
''
;
k8sApiProvider
.
setUrlBase
(
ENV
[
'/'
][
'k8sApiServer'
]);
k8sv1Beta3ApiProvider
.
setUrlBase
(
proxy
+
ENV
[
'/'
][
'k8sApiv1beta3Server'
]);
}
}
});
});
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment