Commit c102e2b9 authored by zhaojinghao's avatar zhaojinghao Committed by Jason Song

Support using relative path to access portal via reverse proxy or slb (#2754)

parent fe016be4
package com.ctrip.framework.apollo.portal.controller;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class PrefixPathController {
@Value("${prefixPath:}")
private String prefixPath;
@GetMapping("/prefixPath")
public String getPrefixPath(){
return prefixPath;
}
}
...@@ -271,7 +271,7 @@ public class AuthConfiguration { ...@@ -271,7 +271,7 @@ public class AuthConfiguration {
http.csrf().disable(); http.csrf().disable();
http.headers().frameOptions().sameOrigin(); http.headers().frameOptions().sameOrigin();
http.authorizeRequests() http.authorizeRequests()
.antMatchers("/prometheus/**","/metrics/**","/openapi/**", "/vendor/**", "/styles/**", "/scripts/**", "/views/**", "/img/**", "/i18n/**").permitAll() .antMatchers("/prometheus/**","/metrics/**","/openapi/**", "/vendor/**", "/styles/**", "/scripts/**", "/views/**", "/img/**", "/i18n/**", "/prefixPath").permitAll()
.antMatchers("/**").hasAnyRole(USER_ROLE); .antMatchers("/**").hasAnyRole(USER_ROLE);
http.formLogin().loginPage("/signin").defaultSuccessUrl("/", true).permitAll().failureUrl("/signin?#/error").and() http.formLogin().loginPage("/signin").defaultSuccessUrl("/", true).permitAll().failureUrl("/signin?#/error").and()
.httpBasic(); .httpBasic();
...@@ -403,7 +403,7 @@ public class AuthConfiguration { ...@@ -403,7 +403,7 @@ public class AuthConfiguration {
http.csrf().disable(); http.csrf().disable();
http.headers().frameOptions().sameOrigin(); http.headers().frameOptions().sameOrigin();
http.authorizeRequests() http.authorizeRequests()
.antMatchers("/prometheus/**","/metrics/**","/openapi/**", "/vendor/**", "/styles/**", "/scripts/**", "/views/**", "/img/**", "/i18n/**").permitAll() .antMatchers("/prometheus/**","/metrics/**","/openapi/**", "/vendor/**", "/styles/**", "/scripts/**", "/views/**", "/img/**", "/i18n/**", "/prefixPath").permitAll()
.antMatchers("/**").authenticated(); .antMatchers("/**").authenticated();
http.formLogin().loginPage("/signin").defaultSuccessUrl("/", true).permitAll().failureUrl("/signin?#/error").and() http.formLogin().loginPage("/signin").defaultSuccessUrl("/", true).permitAll().failureUrl("/signin?#/error").and()
.httpBasic(); .httpBasic();
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
</div> </div>
<div class="col-md-5 text-right"> <div class="col-md-5 text-right">
<a type="button" class="btn btn-info" data-dismiss="modal" <a type="button" class="btn btn-info" data-dismiss="modal"
href="/config.html?#appid={{pageContext.appId}}">{{'Common.ReturnToIndex' | translate }} href="{{ '/config.html' | prefixPath }}?#appid={{pageContext.appId}}">{{'Common.ReturnToIndex' | translate }}
</a> </a>
</div> </div>
</div> </div>
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<h4>{{'Cluster.CreateCluster' | translate }}</h4> <h4>{{'Cluster.CreateCluster' | translate }}</h4>
</div> </div>
<div class="col-md-6 text-right"> <div class="col-md-6 text-right">
<a type="button" class="btn btn-info" href="/config.html?#/appid={{appId}}">{{'Common.ReturnToIndex' | translate }} <a type="button" class="btn btn-info" href="config.html?#/appid={{appId}}">{{'Common.ReturnToIndex' | translate }}
</a> </a>
</div> </div>
</div> </div>
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<br> <br>
<p> <p>
<span ng-bind="pageContext.appId"></span> {{'Config.AppIdNotFound' | translate }}<a <span ng-bind="pageContext.appId"></span> {{'Config.AppIdNotFound' | translate }}<a
href="/app.html">{{'Config.ClickByCreate' | translate }}</a> href="app.html">{{'Config.ClickByCreate' | translate }}</a>
</p> </p>
</div> </div>
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
{{'Config.ProjectInfo' | translate }} {{'Config.ProjectInfo' | translate }}
<span class="pull-right"> <span class="pull-right">
<a href="/app/setting.html?#/appid={{pageContext.appId}}" <a href="app/setting.html?#/appid={{pageContext.appId}}"
style="margin-right: 5px;text-decoration:none;"> style="margin-right: 5px;text-decoration:none;">
<img src="img/edit.png" class="i-20 cursor-pointer" data-tooltip="tooltip" <img src="img/edit.png" class="i-20 cursor-pointer" data-tooltip="tooltip"
data-placement="bottom" data-placement="bottom"
...@@ -118,7 +118,7 @@ ...@@ -118,7 +118,7 @@
<section> <section>
<apolloentrance apollo-title="'Config.ProjectManage' | translate" <apolloentrance apollo-title="'Config.ProjectManage' | translate"
apollo-img-src="'project-manage'" apollo-img-src="'project-manage'"
apollo-href="'/app/setting.html?#/appid=' + pageContext.appId"></apolloentrance> apollo-href="'app/setting.html?#/appid=' + pageContext.appId"></apolloentrance>
<a class="list-group-item" ng-show="missEnvs.length > 0" ng-click="createAppInMissEnv()"> <a class="list-group-item" ng-show="missEnvs.length > 0" ng-click="createAppInMissEnv()">
<div class="row icon-text icon-plus-orange"> <div class="row icon-text icon-plus-orange">
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
<div class="pull-right back-btn"> <div class="pull-right back-btn">
<a type="button" class="btn btn-info" <a type="button" class="btn btn-info"
href="/config.html?#/appid={{pageContext.appId}}">{{'Common.ReturnToIndex' | translate }} href="{{ '/config.html' | prefixPath }}?#/appid={{pageContext.appId}}">{{'Common.ReturnToIndex' | translate }}
</a> </a>
</div> </div>
......
...@@ -3,13 +3,13 @@ ...@@ -3,13 +3,13 @@
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="icon" href="../img/config.png"> <link rel="icon" href="img/config.png">
<!-- styles --> <!-- styles -->
<link rel="stylesheet" type="text/css" href="../vendor/bootstrap/css/bootstrap.min.css"> <link rel="stylesheet" type="text/css" href="vendor/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="../vendor/angular/angular-toastr-1.4.1.min.css"> <link rel="stylesheet" type="text/css" href="vendor/angular/angular-toastr-1.4.1.min.css">
<link rel="stylesheet" type="text/css" media='all' href="../vendor/angular/loading-bar.min.css"> <link rel="stylesheet" type="text/css" media='all' href="vendor/angular/loading-bar.min.css">
<link rel="stylesheet" type="text/css" href="../styles/common-style.css"> <link rel="stylesheet" type="text/css" href="styles/common-style.css">
<link rel="stylesheet" type="text/css" href="../vendor/select2/select2.min.css"> <link rel="stylesheet" type="text/css" href="vendor/select2/select2.min.css">
<title>{{'Delete.Title' | translate }}</title> <title>{{'Delete.Title' | translate }}</title>
</head> </head>
...@@ -182,17 +182,17 @@ ...@@ -182,17 +182,17 @@
</div> </div>
</div> </div>
<div ng-include="'../views/common/footer.html'"></div> <div ng-include="'views/common/footer.html'"></div>
<!-- jquery.js --> <!-- jquery.js -->
<script src="../vendor/jquery.min.js" type="text/javascript"></script> <script src="vendor/jquery.min.js" type="text/javascript"></script>
<!--angular--> <!--angular-->
<script src="../vendor/angular/angular.min.js"></script> <script src="vendor/angular/angular.min.js"></script>
<script src="../vendor/angular/angular-route.min.js"></script> <script src="vendor/angular/angular-route.min.js"></script>
<script src="../vendor/angular/angular-resource.min.js"></script> <script src="vendor/angular/angular-resource.min.js"></script>
<script src="../vendor/angular/angular-toastr-1.4.1.tpls.min.js"></script> <script src="vendor/angular/angular-toastr-1.4.1.tpls.min.js"></script>
<script src="../vendor/angular/loading-bar.min.js"></script> <script src="vendor/angular/loading-bar.min.js"></script>
<script src="vendor/angular/angular-cookies.min.js"></script> <script src="vendor/angular/angular-cookies.min.js"></script>
<script src="vendor/angular/angular-translate.2.18.1/angular-translate.min.js"></script> <script src="vendor/angular/angular-translate.2.18.1/angular-translate.min.js"></script>
...@@ -200,33 +200,33 @@ ...@@ -200,33 +200,33 @@
<script src="vendor/angular/angular-translate.2.18.1/angular-translate-storage-cookie.min.js"></script> <script src="vendor/angular/angular-translate.2.18.1/angular-translate-storage-cookie.min.js"></script>
<!--valdr--> <!--valdr-->
<script src="../vendor/valdr/valdr.min.js" type="text/javascript"></script> <script src="vendor/valdr/valdr.min.js" type="text/javascript"></script>
<script src="../vendor/valdr/valdr-message.min.js" type="text/javascript"></script> <script src="vendor/valdr/valdr-message.min.js" type="text/javascript"></script>
<!-- bootstrap.js --> <!-- bootstrap.js -->
<script src="../vendor/bootstrap/js/bootstrap.min.js" type="text/javascript"></script> <script src="vendor/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<script src="../vendor/lodash.min.js"></script> <script src="vendor/lodash.min.js"></script>
<script src="../vendor/select2/select2.min.js" type="text/javascript"></script> <script src="vendor/select2/select2.min.js" type="text/javascript"></script>
<!--biz--> <!--biz-->
<!--must import--> <!--must import-->
<script type="application/javascript" src="../scripts/app.js"></script> <script type="application/javascript" src="scripts/app.js"></script>
<script type="application/javascript" src="../scripts/services/AppService.js"></script> <script type="application/javascript" src="scripts/services/AppService.js"></script>
<script type="application/javascript" src="../scripts/services/EnvService.js"></script> <script type="application/javascript" src="scripts/services/EnvService.js"></script>
<script type="application/javascript" src="../scripts/services/UserService.js"></script> <script type="application/javascript" src="scripts/services/UserService.js"></script>
<script type="application/javascript" src="../scripts/services/CommonService.js"></script> <script type="application/javascript" src="scripts/services/CommonService.js"></script>
<script type="application/javascript" src="../scripts/services/PermissionService.js"></script> <script type="application/javascript" src="scripts/services/PermissionService.js"></script>
<script type="application/javascript" src="../scripts/services/ClusterService.js"></script> <script type="application/javascript" src="scripts/services/ClusterService.js"></script>
<script type="application/javascript" src="../scripts/services/NamespaceService.js"></script> <script type="application/javascript" src="scripts/services/NamespaceService.js"></script>
<script type="application/javascript" src="../scripts/AppUtils.js"></script> <script type="application/javascript" src="scripts/AppUtils.js"></script>
<script type="application/javascript" src="../scripts/PageCommon.js"></script> <script type="application/javascript" src="scripts/PageCommon.js"></script>
<script type="application/javascript" src="../scripts/directive/directive.js"></script> <script type="application/javascript" src="scripts/directive/directive.js"></script>
<script type="application/javascript" src="../scripts/valdr.js"></script> <script type="application/javascript" src="scripts/valdr.js"></script>
<script type="application/javascript" src="../scripts/controller/DeleteAppClusterNamespaceController.js"></script> <script type="application/javascript" src="scripts/controller/DeleteAppClusterNamespaceController.js"></script>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -242,7 +242,7 @@ ...@@ -242,7 +242,7 @@
<div class="panel-body"> <div class="panel-body">
<div class="row"> <div class="row">
<div class="col-lg-12"> <div class="col-lg-12">
<form id="login-form" action="/signin" method="post" role="form" style="display: block;"> <form id="login-form" action="signin" method="post" role="form" style="display: block;">
<p class="text-center"><img src="img/logo-detail.png" style="width: 500px;"></p> <p class="text-center"><img src="img/logo-detail.png" style="width: 500px;"></p>
<div class="form-group"> <div class="form-group">
<input type="text" name="username" tabindex="1" class="form-control" <input type="text" name="username" tabindex="1" class="form-control"
...@@ -290,6 +290,7 @@ ...@@ -290,6 +290,7 @@
<script type="application/javascript"> <script type="application/javascript">
$(function () { $(function () {
$('#login-form-link').click(function (e) { $('#login-form-link').click(function (e) {
$("#login-form").delay(100).fadeIn(100); $("#login-form").delay(100).fadeIn(100);
...@@ -306,6 +307,10 @@ ...@@ -306,6 +307,10 @@
e.preventDefault(); e.preventDefault();
}); });
$.get("prefixPath", function(result){
window.localStorage.setItem("prefixPath",result);
});
}); });
</script> </script>
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
</div> </div>
<div class="col-md-5 text-right"> <div class="col-md-5 text-right">
<a type="button" class="btn btn-info" data-dismiss="modal" <a type="button" class="btn btn-info" data-dismiss="modal"
href="/config.html?#appid={{pageContext.appId}}">{{'Common.ReturnToIndex' | translate }} href="{{ '/config.html' | prefixPath }}?#appid={{pageContext.appId}}">{{'Common.ReturnToIndex' | translate }}
</a> </a>
</div> </div>
</div> </div>
......
appUtil.service('AppUtil', ['toastr', '$window', '$q', '$translate', function (toastr, $window, $q, $translate) { appUtil.service('AppUtil', ['toastr', '$window', '$q', '$translate', 'prefixLocation', function (toastr, $window, $q, $translate, prefixLocation) {
function parseErrorMsg(response) { function parseErrorMsg(response) {
if (response.status == -1) { if (response.status == -1) {
...@@ -43,6 +43,9 @@ appUtil.service('AppUtil', ['toastr', '$window', '$q', '$translate', function (t ...@@ -43,6 +43,9 @@ appUtil.service('AppUtil', ['toastr', '$window', '$q', '$translate', function (t
} }
return { return {
prefixPath: function(){
return prefixLocation;
},
errorMsg: parseErrorMsg, errorMsg: parseErrorMsg,
pureErrorMsg: parsePureErrorMsg, pureErrorMsg: parsePureErrorMsg,
ajax: ajax, ajax: ajax,
......
var prefixPath = window.localStorage.getItem("prefixPath") || "";
/**utils*/ /**utils*/
var appUtil = angular.module('app.util', ['toastr', 'ngCookies', 'pascalprecht.translate']) var appUtil = angular.module('app.util', ['toastr', 'ngCookies', 'pascalprecht.translate'])
.config(['$translateProvider', function ($translateProvider) { .constant("prefixLocation", prefixPath) // 前缀路径
.filter('prefixPath',['prefixLocation', function(prefixLocation) { // 前缀路径过滤器
return function(text) {
return prefixLocation + text;
}
}])
.config(['$translateProvider','prefixLocation', function ($translateProvider,prefixLocation) {
$translateProvider.useSanitizeValueStrategy(null); // disable sanitization by default $translateProvider.useSanitizeValueStrategy(null); // disable sanitization by default
$translateProvider.useCookieStorage(); $translateProvider.useCookieStorage();
$translateProvider.useStaticFilesLoader({ $translateProvider.useStaticFilesLoader({
prefix: '/i18n/', prefix: prefixLocation + '/i18n/',
suffix: '.json' suffix: '.json'
}); });
$translateProvider.registerAvailableLanguageKeys(['en', 'zh-CN'], { $translateProvider.registerAvailableLanguageKeys(['en', 'zh-CN'], {
...@@ -16,6 +24,8 @@ var appUtil = angular.module('app.util', ['toastr', 'ngCookies', 'pascalprecht.t ...@@ -16,6 +24,8 @@ var appUtil = angular.module('app.util', ['toastr', 'ngCookies', 'pascalprecht.t
}) })
$translateProvider.uniformLanguageTag('bcp47').determinePreferredLanguage(); $translateProvider.uniformLanguageTag('bcp47').determinePreferredLanguage();
}]); }]);
/**service module 定义*/ /**service module 定义*/
var appService = angular.module('app.service', ['ngResource', 'app.util']) var appService = angular.module('app.service', ['ngResource', 'app.util'])
......
...@@ -96,7 +96,7 @@ function createAppController($scope, $window, $translate, toastr, AppService, Ap ...@@ -96,7 +96,7 @@ function createAppController($scope, $window, $translate, toastr, AppService, Ap
toastr.success($translate.instant('Common.Created')); toastr.success($translate.instant('Common.Created'));
setInterval(function () { setInterval(function () {
$scope.submitBtnDisabled = false; $scope.submitBtnDisabled = false;
$window.location.href = '/config.html?#appid=' + result.appId; $window.location.href = AppUtil.prefixPath() + '/config.html?#appid=' + result.appId;
}, 1000); }, 1000);
}, function (result) { }, function (result) {
$scope.submitBtnDisabled = false; $scope.submitBtnDisabled = false;
......
...@@ -132,11 +132,11 @@ function IndexController($scope, $window, $translate, toastr, AppUtil, AppServic ...@@ -132,11 +132,11 @@ function IndexController($scope, $window, $translate, toastr, AppUtil, AppServic
} }
function goToCreateAppPage() { function goToCreateAppPage() {
$window.location.href = "/app.html"; $window.location.href = AppUtil.prefixPath() + "/app.html";
} }
function goToAppHomePage(appId) { function goToAppHomePage(appId) {
$window.location.href = "/config.html?#/appid=" + appId; $window.location.href = AppUtil.prefixPath() + "/config.html?#/appid=" + appId;
} }
function toggleOperationBtn(app) { function toggleOperationBtn(app) {
......
...@@ -114,7 +114,7 @@ namespace_module.controller("LinkNamespaceController", ...@@ -114,7 +114,7 @@ namespace_module.controller("LinkNamespaceController",
setInterval(function () { setInterval(function () {
$scope.submitBtnDisabled = false; $scope.submitBtnDisabled = false;
$window.location.href = $window.location.href =
'/namespace/role.html?#appid=' + $scope.appId AppUtil.prefixPath() + '/namespace/role.html?#appid=' + $scope.appId
+ "&namespaceName=" + $scope.namespaceName; + "&namespaceName=" + $scope.namespaceName;
}, 1000); }, 1000);
}, function (result) { }, function (result) {
...@@ -142,7 +142,7 @@ namespace_module.controller("LinkNamespaceController", ...@@ -142,7 +142,7 @@ namespace_module.controller("LinkNamespaceController",
setTimeout(function () { setTimeout(function () {
$scope.submitBtnDisabled = false; $scope.submitBtnDisabled = false;
$window.location.href = $window.location.href =
"/namespace/role.html?#/appid=" + $scope.appId AppUtil.prefixPath() + "/namespace/role.html?#/appid=" + $scope.appId
+ "&namespaceName=" + result.name; + "&namespaceName=" + result.name;
}, 1000); }, 1000);
}, function (result) { }, function (result) {
...@@ -159,7 +159,7 @@ namespace_module.controller("LinkNamespaceController", ...@@ -159,7 +159,7 @@ namespace_module.controller("LinkNamespaceController",
}; };
$scope.back = function () { $scope.back = function () {
$window.location.href = '/config.html?#appid=' + $scope.appId; $window.location.href = AppUtil.prefixPath() + '/config.html?#appid=' + $scope.appId;
}; };
$scope.switchType = function (type) { $scope.switchType = function (type) {
......
...@@ -14,7 +14,7 @@ function ConfigBaseInfoController($rootScope, $scope, $window, $location, $trans ...@@ -14,7 +14,7 @@ function ConfigBaseInfoController($rootScope, $scope, $window, $location, $trans
var appId = urlParams.appid; var appId = urlParams.appid;
if (!appId) { if (!appId) {
$window.location.href = '/index.html'; $window.location.href = AppUtil.prefixPath() + '/index.html';
return; return;
} }
...@@ -258,7 +258,7 @@ function ConfigBaseInfoController($rootScope, $scope, $window, $location, $trans ...@@ -258,7 +258,7 @@ function ConfigBaseInfoController($rootScope, $scope, $window, $location, $trans
cluster: $rootScope.pageContext.clusterName cluster: $rootScope.pageContext.clusterName
})); }));
$window.location.href = "/config.html#/appid=" $window.location.href = AppUtil.prefixPath() + "/config.html#/appid="
+ $rootScope.pageContext.appId + $rootScope.pageContext.appId
+ "&env=" + $rootScope.pageContext.env + "&env=" + $rootScope.pageContext.env
+ "&cluster=" + $rootScope.pageContext.clusterName; + "&cluster=" + $rootScope.pageContext.clusterName;
......
...@@ -352,7 +352,7 @@ function controller($rootScope, $scope, $translate, toastr, AppUtil, EventManage ...@@ -352,7 +352,7 @@ function controller($rootScope, $scope, $translate, toastr, AppUtil, EventManage
otherAppAssociatedNamespaces.forEach(function (namespace) { otherAppAssociatedNamespaces.forEach(function (namespace) {
var appId = namespace.appId; var appId = namespace.appId;
var clusterName = namespace.clusterName; var clusterName = namespace.clusterName;
var url = '/config.html?#/appid=' + appId + '&env=' + $scope.pageContext.env + '&cluster=' var url = AppUtil.prefixPath() + '/config.html?#/appid=' + appId + '&env=' + $scope.pageContext.env + '&cluster='
+ clusterName; + clusterName;
namespaceTips.push("<a target='_blank' href=\'" + url + "\'>AppId = " + appId + ", Cluster = " + clusterName namespaceTips.push("<a target='_blank' href=\'" + url + "\'>AppId = " + appId + ", Cluster = " + clusterName
......
...@@ -82,7 +82,7 @@ diff_item_module.controller("DiffItemController", ...@@ -82,7 +82,7 @@ diff_item_module.controller("DiffItemController",
} }
function backToAppHomePage() { function backToAppHomePage() {
$window.location.href = '/config.html?#appid=' + $scope.pageContext.appId; $window.location.href = AppUtil.prefixPath() + '/config.html?#appid=' + $scope.pageContext.appId;
} }
function switchSelect(o) { function switchSelect(o) {
......
...@@ -195,7 +195,7 @@ sync_item_module.controller("SyncItemController", ...@@ -195,7 +195,7 @@ sync_item_module.controller("SyncItemController",
} }
function backToAppHomePage() { function backToAppHomePage() {
$window.location.href = '/config.html?#appid=' + $scope.pageContext.appId; $window.location.href = AppUtil.prefixPath() + '/config.html?#appid=' + $scope.pageContext.appId;
} }
function switchSelect(o) { function switchSelect(o) {
......
...@@ -4,7 +4,7 @@ function deleteNamespaceModalDirective($window, $q, $translate, toastr, AppUtil, ...@@ -4,7 +4,7 @@ function deleteNamespaceModalDirective($window, $q, $translate, toastr, AppUtil,
PermissionService, UserService, NamespaceService) { PermissionService, UserService, NamespaceService) {
return { return {
restrict: 'E', restrict: 'E',
templateUrl: '../../views/component/delete-namespace-modal.html', templateUrl: AppUtil.prefixPath() + '/views/component/delete-namespace-modal.html',
transclude: true, transclude: true,
replace: true, replace: true,
scope: { scope: {
......
directive_module.directive('apollodiff', directive_module.directive('apollodiff',
function ($compile, $window) { function ($compile, $window, AppUtil) {
return { return {
restrict: 'E', restrict: 'E',
templateUrl: '../../views/component/diff.html', templateUrl: AppUtil.prefixPath() + '/views/component/diff.html',
transclude: true, transclude: true,
replace: true, replace: true,
scope: { scope: {
......
...@@ -4,7 +4,7 @@ directive_module.directive('apollonav', ...@@ -4,7 +4,7 @@ directive_module.directive('apollonav',
UserService, CommonService, PermissionService) { UserService, CommonService, PermissionService) {
return { return {
restrict: 'E', restrict: 'E',
templateUrl: '../../views/common/nav.html', templateUrl: AppUtil.prefixPath() + '/views/common/nav.html',
transclude: true, transclude: true,
replace: true, replace: true,
link: function (scope, element, attrs) { link: function (scope, element, attrs) {
...@@ -22,7 +22,7 @@ directive_module.directive('apollonav', ...@@ -22,7 +22,7 @@ directive_module.directive('apollonav',
$('#app-search-list').select2({ $('#app-search-list').select2({
placeholder: placeholderLabel, placeholder: placeholderLabel,
ajax: { ajax: {
url: "/apps/search/by-appid-or-name", url: AppUtil.prefixPath() + "/apps/search/by-appid-or-name",
dataType: 'json', dataType: 'json',
delay: 400, delay: 400,
data: function (params) { data: function (params) {
...@@ -75,7 +75,7 @@ directive_module.directive('apollonav', ...@@ -75,7 +75,7 @@ directive_module.directive('apollonav',
$window.location.hash = "appid=" + selectedAppId; $window.location.hash = "appid=" + selectedAppId;
$window.location.reload(); $window.location.reload();
} else { } else {
$window.location.href = '/config.html?#appid=' + selectedAppId; $window.location.href = AppUtil.prefixPath() + '/config.html?#appid=' + selectedAppId;
} }
}; };
...@@ -101,7 +101,7 @@ directive_module.directive('apollonav', ...@@ -101,7 +101,7 @@ directive_module.directive('apollonav',
directive_module.directive('apolloclusterselector', function ($compile, $window, AppService, AppUtil, toastr) { directive_module.directive('apolloclusterselector', function ($compile, $window, AppService, AppUtil, toastr) {
return { return {
restrict: 'E', restrict: 'E',
templateUrl: '../../views/component/env-selector.html', templateUrl: AppUtil.prefixPath() + '/views/component/env-selector.html',
transclude: true, transclude: true,
replace: true, replace: true,
scope: { scope: {
...@@ -192,10 +192,10 @@ directive_module.directive('apollorequiredfield', function ($compile, $window) { ...@@ -192,10 +192,10 @@ directive_module.directive('apollorequiredfield', function ($compile, $window) {
}); });
/** 确认框 */ /** 确认框 */
directive_module.directive('apolloconfirmdialog', function ($compile, $window, $sce,$translate) { directive_module.directive('apolloconfirmdialog', function ($compile, $window, $sce,$translate,AppUtil) {
return { return {
restrict: 'E', restrict: 'E',
templateUrl: '../../views/component/confirm-dialog.html', templateUrl: AppUtil.prefixPath() + '/views/component/confirm-dialog.html',
transclude: true, transclude: true,
replace: true, replace: true,
scope: { scope: {
...@@ -231,10 +231,10 @@ directive_module.directive('apolloconfirmdialog', function ($compile, $window, $ ...@@ -231,10 +231,10 @@ directive_module.directive('apolloconfirmdialog', function ($compile, $window, $
}); });
/** entrance */ /** entrance */
directive_module.directive('apolloentrance', function ($compile, $window) { directive_module.directive('apolloentrance', function ($compile, $window,AppUtil) {
return { return {
restrict: 'E', restrict: 'E',
templateUrl: '../../views/component/entrance.html', templateUrl: AppUtil.prefixPath() + '/views/component/entrance.html',
transclude: true, transclude: true,
replace: true, replace: true,
scope: { scope: {
...@@ -248,10 +248,10 @@ directive_module.directive('apolloentrance', function ($compile, $window) { ...@@ -248,10 +248,10 @@ directive_module.directive('apolloentrance', function ($compile, $window) {
}); });
/** entrance */ /** entrance */
directive_module.directive('apollouserselector', function ($compile, $window) { directive_module.directive('apollouserselector', function ($compile, $window,AppUtil) {
return { return {
restrict: 'E', restrict: 'E',
templateUrl: '../../views/component/user-selector.html', templateUrl: AppUtil.prefixPath() + '/views/component/user-selector.html',
transclude: true, transclude: true,
replace: true, replace: true,
scope: { scope: {
...@@ -264,7 +264,7 @@ directive_module.directive('apollouserselector', function ($compile, $window) { ...@@ -264,7 +264,7 @@ directive_module.directive('apollouserselector', function ($compile, $window) {
var select2Options = { var select2Options = {
ajax: { ajax: {
url: '/users', url: AppUtil.prefixPath() + '/users',
dataType: 'json', dataType: 'json',
delay: 250, delay: 250,
data: function (params) { data: function (params) {
...@@ -300,10 +300,10 @@ directive_module.directive('apollouserselector', function ($compile, $window) { ...@@ -300,10 +300,10 @@ directive_module.directive('apollouserselector', function ($compile, $window) {
} }
}); });
directive_module.directive('apollomultipleuserselector', function ($compile, $window) { directive_module.directive('apollomultipleuserselector', function ($compile, $window,AppUtil) {
return { return {
restrict: 'E', restrict: 'E',
templateUrl: '../../views/component/multiple-user-selector.html', templateUrl: AppUtil.prefixPath() + '/views/component/multiple-user-selector.html',
transclude: true, transclude: true,
replace: true, replace: true,
scope: { scope: {
...@@ -315,7 +315,7 @@ directive_module.directive('apollomultipleuserselector', function ($compile, $wi ...@@ -315,7 +315,7 @@ directive_module.directive('apollomultipleuserselector', function ($compile, $wi
var searchUsersAjax = { var searchUsersAjax = {
ajax: { ajax: {
url: '/users', url: AppUtil.prefixPath() + '/users',
dataType: 'json', dataType: 'json',
delay: 250, delay: 250,
data: function (params) { data: function (params) {
......
...@@ -3,7 +3,7 @@ directive_module.directive('rulesmodal', rulesModalDirective); ...@@ -3,7 +3,7 @@ directive_module.directive('rulesmodal', rulesModalDirective);
function rulesModalDirective($translate, toastr, AppUtil, EventManager, InstanceService) { function rulesModalDirective($translate, toastr, AppUtil, EventManager, InstanceService) {
return { return {
restrict: 'E', restrict: 'E',
templateUrl: '../../views/component/gray-release-rules-modal.html', templateUrl: AppUtil.prefixPath() + '/views/component/gray-release-rules-modal.html',
transclude: true, transclude: true,
replace: true, replace: true,
scope: { scope: {
......
...@@ -3,7 +3,7 @@ directive_module.directive('itemmodal', itemModalDirective); ...@@ -3,7 +3,7 @@ directive_module.directive('itemmodal', itemModalDirective);
function itemModalDirective($translate, toastr, $sce, AppUtil, EventManager, ConfigService) { function itemModalDirective($translate, toastr, $sce, AppUtil, EventManager, ConfigService) {
return { return {
restrict: 'E', restrict: 'E',
templateUrl: '../../views/component/item-modal.html', templateUrl: AppUtil.prefixPath() + '/views/component/item-modal.html',
transclude: true, transclude: true,
replace: true, replace: true,
scope: { scope: {
......
...@@ -3,7 +3,7 @@ directive_module.directive('mergeandpublishmodal', mergeAndPublishDirective); ...@@ -3,7 +3,7 @@ directive_module.directive('mergeandpublishmodal', mergeAndPublishDirective);
function mergeAndPublishDirective(AppUtil, EventManager) { function mergeAndPublishDirective(AppUtil, EventManager) {
return { return {
restrict: 'E', restrict: 'E',
templateUrl: '../../views/component/merge-and-publish-modal.html', templateUrl: AppUtil.prefixPath() + '/views/component/merge-and-publish-modal.html',
transclude: true, transclude: true,
replace: true, replace: true,
scope: { scope: {
......
...@@ -4,7 +4,7 @@ function directive($window, $translate, toastr, AppUtil, EventManager, Permissio ...@@ -4,7 +4,7 @@ function directive($window, $translate, toastr, AppUtil, EventManager, Permissio
UserService, CommitService, ReleaseService, InstanceService, NamespaceBranchService, ConfigService) { UserService, CommitService, ReleaseService, InstanceService, NamespaceBranchService, ConfigService) {
return { return {
restrict: 'E', restrict: 'E',
templateUrl: '../../views/component/namespace-panel.html', templateUrl: AppUtil.prefixPath() + '/views/component/namespace-panel.html',
transclude: true, transclude: true,
replace: true, replace: true,
scope: { scope: {
...@@ -697,7 +697,7 @@ function directive($window, $translate, toastr, AppUtil, EventManager, Permissio ...@@ -697,7 +697,7 @@ function directive($window, $translate, toastr, AppUtil, EventManager, Permissio
return false; return false;
} }
$window.location.href = $window.location.href =
"config/sync.html?#/appid=" + scope.appId + "&env=" AppUtil.prefixPath() + "/config/sync.html?#/appid=" + scope.appId + "&env="
+ scope.env + "&clusterName=" + scope.env + "&clusterName="
+ scope.cluster + scope.cluster
+ "&namespaceName=" + namespace.baseInfo.namespaceName; + "&namespaceName=" + namespace.baseInfo.namespaceName;
...@@ -705,7 +705,7 @@ function directive($window, $translate, toastr, AppUtil, EventManager, Permissio ...@@ -705,7 +705,7 @@ function directive($window, $translate, toastr, AppUtil, EventManager, Permissio
function goToDiffPage(namespace) { function goToDiffPage(namespace) {
$window.location.href = $window.location.href =
"config/diff.html?#/appid=" + scope.appId + "&env=" AppUtil.prefixPath() + "/config/diff.html?#/appid=" + scope.appId + "&env="
+ scope.env + "&clusterName=" + scope.env + "&clusterName="
+ scope.cluster + scope.cluster
+ "&namespaceName=" + namespace.baseInfo.namespaceName; + "&namespaceName=" + namespace.baseInfo.namespaceName;
...@@ -770,7 +770,7 @@ function directive($window, $translate, toastr, AppUtil, EventManager, Permissio ...@@ -770,7 +770,7 @@ function directive($window, $translate, toastr, AppUtil, EventManager, Permissio
} }
function goToParentAppConfigPage(namespace) { function goToParentAppConfigPage(namespace) {
$window.location.href = "/config.html?#/appid=" + namespace.parentAppId; $window.location.href = AppUtil.prefixPath() + "/config.html?#/appid=" + namespace.parentAppId;
$window.location.reload(); $window.location.reload();
} }
......
...@@ -3,7 +3,7 @@ directive_module.directive('publishdenymodal', publishDenyDirective); ...@@ -3,7 +3,7 @@ directive_module.directive('publishdenymodal', publishDenyDirective);
function publishDenyDirective(AppUtil, EventManager) { function publishDenyDirective(AppUtil, EventManager) {
return { return {
restrict: 'E', restrict: 'E',
templateUrl: '../../views/component/publish-deny-modal.html', templateUrl: AppUtil.prefixPath() + '/views/component/publish-deny-modal.html',
transclude: true, transclude: true,
replace: true, replace: true,
scope: { scope: {
......
...@@ -3,7 +3,7 @@ directive_module.directive('releasemodal', releaseModalDirective); ...@@ -3,7 +3,7 @@ directive_module.directive('releasemodal', releaseModalDirective);
function releaseModalDirective($translate, toastr, AppUtil, EventManager, ReleaseService, NamespaceBranchService) { function releaseModalDirective($translate, toastr, AppUtil, EventManager, ReleaseService, NamespaceBranchService) {
return { return {
restrict: 'E', restrict: 'E',
templateUrl: '../../views/component/release-modal.html', templateUrl: AppUtil.prefixPath() + '/views/component/release-modal.html',
transclude: true, transclude: true,
replace: true, replace: true,
scope: { scope: {
......
...@@ -3,7 +3,7 @@ directive_module.directive('rollbackmodal', rollbackModalDirective); ...@@ -3,7 +3,7 @@ directive_module.directive('rollbackmodal', rollbackModalDirective);
function rollbackModalDirective($translate, AppUtil, EventManager, ReleaseService, toastr) { function rollbackModalDirective($translate, AppUtil, EventManager, ReleaseService, toastr) {
return { return {
restrict: 'E', restrict: 'E',
templateUrl: '../../views/component/rollback-modal.html', templateUrl: AppUtil.prefixPath() + '/views/component/rollback-modal.html',
transclude: true, transclude: true,
replace: true, replace: true,
scope: { scope: {
......
directive_module.directive('showtextmodal', showTextModalDirective); directive_module.directive('showtextmodal', showTextModalDirective);
function showTextModalDirective() { function showTextModalDirective(AppUtil) {
return { return {
restrict: 'E', restrict: 'E',
templateUrl: '../../views/component/show-text-modal.html', templateUrl: AppUtil.prefixPath() + '/views/component/show-text-modal.html',
transclude: true, transclude: true,
replace: true, replace: true,
scope: { scope: {
......
appService.service('AppService', ['$resource', '$q', function ($resource, $q) { appService.service('AppService', ['$resource', '$q', 'AppUtil', function ($resource, $q, AppUtil) {
var app_resource = $resource('/apps/:appId', {}, { var app_resource = $resource(AppUtil.prefixPath() + '/apps/:appId', {}, {
find_apps: { find_apps: {
method: 'GET', method: 'GET',
isArray: true, isArray: true,
url: '/apps' url: AppUtil.prefixPath() + '/apps'
}, },
find_app_by_owner: { find_app_by_owner: {
method: 'GET', method: 'GET',
isArray: true, isArray: true,
url: '/apps/by-owner' url: AppUtil.prefixPath() + '/apps/by-owner'
}, },
load_navtree: { load_navtree: {
method: 'GET', method: 'GET',
isArray: false, isArray: false,
url: '/apps/:appId/navtree' url: AppUtil.prefixPath() + '/apps/:appId/navtree'
}, },
load_app: { load_app: {
method: 'GET', method: 'GET',
...@@ -21,27 +21,27 @@ appService.service('AppService', ['$resource', '$q', function ($resource, $q) { ...@@ -21,27 +21,27 @@ appService.service('AppService', ['$resource', '$q', function ($resource, $q) {
}, },
create_app: { create_app: {
method: 'POST', method: 'POST',
url: '/apps' url: AppUtil.prefixPath() + '/apps'
}, },
update_app: { update_app: {
method: 'PUT', method: 'PUT',
url: '/apps/:appId' url: AppUtil.prefixPath() + '/apps/:appId'
}, },
create_app_remote: { create_app_remote: {
method: 'POST', method: 'POST',
url: '/apps/envs/:env' url: AppUtil.prefixPath() + '/apps/envs/:env'
}, },
find_miss_envs: { find_miss_envs: {
method: 'GET', method: 'GET',
url: '/apps/:appId/miss_envs' url: AppUtil.prefixPath() + '/apps/:appId/miss_envs'
}, },
create_missing_namespaces: { create_missing_namespaces: {
method: 'POST', method: 'POST',
url: '/apps/:appId/envs/:env/clusters/:clusterName/missing-namespaces' url: AppUtil.prefixPath() + '/apps/:appId/envs/:env/clusters/:clusterName/missing-namespaces'
}, },
find_missing_namespaces: { find_missing_namespaces: {
method: 'GET', method: 'GET',
url: '/apps/:appId/envs/:env/clusters/:clusterName/missing-namespaces' url: AppUtil.prefixPath() + '/apps/:appId/envs/:env/clusters/:clusterName/missing-namespaces'
}, },
delete_app: { delete_app: {
method: 'DELETE', method: 'DELETE',
...@@ -49,15 +49,15 @@ appService.service('AppService', ['$resource', '$q', function ($resource, $q) { ...@@ -49,15 +49,15 @@ appService.service('AppService', ['$resource', '$q', function ($resource, $q) {
}, },
allow_app_master_assign_role: { allow_app_master_assign_role: {
method: 'POST', method: 'POST',
url: '/apps/:appId/system/master/:userId' url: AppUtil.prefixPath() + '/apps/:appId/system/master/:userId'
}, },
delete_app_master_assign_role: { delete_app_master_assign_role: {
method: 'DELETE', method: 'DELETE',
url: '/apps/:appId/system/master/:userId' url: AppUtil.prefixPath() + '/apps/:appId/system/master/:userId'
}, },
has_create_application_role: { has_create_application_role: {
method: 'GET', method: 'GET',
url: '/system/role/createApplication/:userId' url: AppUtil.prefixPath() + '/system/role/createApplication/:userId'
} }
}); });
return { return {
......
appService.service('CommitService', ['$resource', '$q', function ($resource, $q) { appService.service('CommitService', ['$resource', '$q','AppUtil', function ($resource, $q, AppUtil) {
var commit_resource = $resource('', {}, { var commit_resource = $resource('', {}, {
find_commits: { find_commits: {
method: 'GET', method: 'GET',
isArray: true, isArray: true,
url: '/apps/:appId/envs/:env/clusters/:clusterName/namespaces/:namespaceName/commits?page=:page' url: AppUtil.prefixPath() + '/apps/:appId/envs/:env/clusters/:clusterName/namespaces/:namespaceName/commits?page=:page'
} }
}); });
return { return {
......
...@@ -4,7 +4,7 @@ appService.service('CommonService', ['$resource', '$q', 'AppUtil', ...@@ -4,7 +4,7 @@ appService.service('CommonService', ['$resource', '$q', 'AppUtil',
page_setting: { page_setting: {
method: 'GET', method: 'GET',
isArray: false, isArray: false,
url: '/page-settings' url: AppUtil.prefixPath() + '/page-settings'
} }
}); });
......
appService.service("ConfigService", ['$resource', '$q', function ($resource, $q) { appService.service("ConfigService", ['$resource', '$q', 'AppUtil', function ($resource, $q, AppUtil) {
var config_source = $resource("", {}, { var config_source = $resource("", {}, {
load_namespace: { load_namespace: {
method: 'GET', method: 'GET',
isArray: false, isArray: false,
url: '/apps/:appId/envs/:env/clusters/:clusterName/namespaces/:namespaceName' url: AppUtil.prefixPath() + '/apps/:appId/envs/:env/clusters/:clusterName/namespaces/:namespaceName'
}, },
load_public_namespace_for_associated_namespace: { load_public_namespace_for_associated_namespace: {
method: 'GET', method: 'GET',
isArray: false, isArray: false,
url: '/envs/:env/apps/:appId/clusters/:clusterName/namespaces/:namespaceName/associated-public-namespace' url: AppUtil.prefixPath() + '/envs/:env/apps/:appId/clusters/:clusterName/namespaces/:namespaceName/associated-public-namespace'
}, },
load_all_namespaces: { load_all_namespaces: {
method: 'GET', method: 'GET',
isArray: true, isArray: true,
url: '/apps/:appId/envs/:env/clusters/:clusterName/namespaces' url: AppUtil.prefixPath() + '/apps/:appId/envs/:env/clusters/:clusterName/namespaces'
}, },
find_items: { find_items: {
method: 'GET', method: 'GET',
isArray: true, isArray: true,
url: '/apps/:appId/envs/:env/clusters/:clusterName/namespaces/:namespaceName/items' url: AppUtil.prefixPath() + '/apps/:appId/envs/:env/clusters/:clusterName/namespaces/:namespaceName/items'
}, },
modify_items: { modify_items: {
method: 'PUT', method: 'PUT',
url: '/apps/:appId/envs/:env/clusters/:clusterName/namespaces/:namespaceName/items' url: AppUtil.prefixPath() + '/apps/:appId/envs/:env/clusters/:clusterName/namespaces/:namespaceName/items'
}, },
diff: { diff: {
method: 'POST', method: 'POST',
url: '/namespaces/:namespaceName/diff', url: AppUtil.prefixPath() + '/namespaces/:namespaceName/diff',
isArray: true isArray: true
}, },
sync_item: { sync_item: {
method: 'PUT', method: 'PUT',
url: '/apps/:appId/namespaces/:namespaceName/items', url: AppUtil.prefixPath() + '/apps/:appId/namespaces/:namespaceName/items',
isArray: false isArray: false
}, },
create_item: { create_item: {
method: 'POST', method: 'POST',
url: '/apps/:appId/envs/:env/clusters/:clusterName/namespaces/:namespaceName/item' url: AppUtil.prefixPath() + '/apps/:appId/envs/:env/clusters/:clusterName/namespaces/:namespaceName/item'
}, },
update_item: { update_item: {
method: 'PUT', method: 'PUT',
url: '/apps/:appId/envs/:env/clusters/:clusterName/namespaces/:namespaceName/item' url: AppUtil.prefixPath() + '/apps/:appId/envs/:env/clusters/:clusterName/namespaces/:namespaceName/item'
}, },
delete_item: { delete_item: {
method: 'DELETE', method: 'DELETE',
url: '/apps/:appId/envs/:env/clusters/:clusterName/namespaces/:namespaceName/items/:itemId' url: AppUtil.prefixPath() + '/apps/:appId/envs/:env/clusters/:clusterName/namespaces/:namespaceName/items/:itemId'
}, },
syntax_check_text: { syntax_check_text: {
method: 'POST', method: 'POST',
url: '/apps/:appId/envs/:env/clusters/:clusterName/namespaces/:namespaceName/syntax-check' url: AppUtil.prefixPath() + '/apps/:appId/envs/:env/clusters/:clusterName/namespaces/:namespaceName/syntax-check'
} }
}); });
......
...@@ -4,17 +4,17 @@ appService.service('ConsumerService', ['$resource', '$q', 'AppUtil', ...@@ -4,17 +4,17 @@ appService.service('ConsumerService', ['$resource', '$q', 'AppUtil',
create_consumer: { create_consumer: {
method: 'POST', method: 'POST',
isArray: false, isArray: false,
url: '/consumers' url: AppUtil.prefixPath() + '/consumers'
}, },
get_consumer_token_by_appId: { get_consumer_token_by_appId: {
method: 'GET', method: 'GET',
isArray: false, isArray: false,
url: '/consumers/by-appId' url: AppUtil.prefixPath() + '/consumers/by-appId'
}, },
assign_role_to_consumer: { assign_role_to_consumer: {
method: 'POST', method: 'POST',
isArray: true, isArray: true,
url: '/consumers/:token/assign-role' url: AppUtil.prefixPath() + '/consumers/:token/assign-role'
} }
}); });
......
appService.service('EnvService', ['$resource', '$q', function ($resource, $q) { appService.service('EnvService', ['$resource', '$q', 'AppUtil', function ($resource, $q, AppUtil) {
var env_resource = $resource('/envs', {}, { var env_resource = $resource(AppUtil.prefixPath() + '/envs', {}, {
find_all_envs:{ find_all_envs:{
method: 'GET', method: 'GET',
isArray: true, isArray: true,
url:'/envs' url: AppUtil.prefixPath() + '/envs'
} }
}); });
return { return {
......
appService.service('FavoriteService', ['$resource', '$q', function ($resource, $q) { appService.service('FavoriteService', ['$resource', '$q', 'AppUtil', function ($resource, $q, AppUtil) {
var resource = $resource('', {}, { var resource = $resource('', {}, {
find_favorites: { find_favorites: {
method: 'GET', method: 'GET',
url: '/favorites', url: AppUtil.prefixPath() + '/favorites',
isArray: true isArray: true
}, },
add_favorite: { add_favorite: {
method: 'POST', method: 'POST',
url: '/favorites' url: AppUtil.prefixPath() + '/favorites'
}, },
delete_favorite: { delete_favorite: {
method: 'DELETE', method: 'DELETE',
url: '/favorites/:favoriteId' url: AppUtil.prefixPath() + '/favorites/:favoriteId'
}, },
to_top: { to_top: {
method: 'PUT', method: 'PUT',
url: '/favorites/:favoriteId' url: AppUtil.prefixPath() + '/favorites/:favoriteId'
} }
}); });
return { return {
......
appService.service('InstanceService', ['$resource', '$q', function ($resource, $q) { appService.service('InstanceService', ['$resource', '$q', 'AppUtil', function ($resource, $q, AppUtil) {
var resource = $resource('', {}, { var resource = $resource('', {}, {
find_instances_by_release: { find_instances_by_release: {
method: 'GET', method: 'GET',
url: '/envs/:env/instances/by-release' url: AppUtil.prefixPath() + '/envs/:env/instances/by-release'
}, },
find_instances_by_namespace: { find_instances_by_namespace: {
method: 'GET', method: 'GET',
isArray: false, isArray: false,
url: '/envs/:env/instances/by-namespace' url: AppUtil.prefixPath() + '/envs/:env/instances/by-namespace'
}, },
find_by_releases_not_in: { find_by_releases_not_in: {
method: 'GET', method: 'GET',
isArray: true, isArray: true,
url: '/envs/:env/instances/by-namespace-and-releases-not-in' url: AppUtil.prefixPath() + '/envs/:env/instances/by-namespace-and-releases-not-in'
}, },
get_instance_count_by_namespace: { get_instance_count_by_namespace: {
method: 'GET', method: 'GET',
isArray: false, isArray: false,
url: "envs/:env/instances/by-namespace/count" url: AppUtil.prefixPath() + "/envs/:env/instances/by-namespace/count"
} }
}); });
......
appService.service('NamespaceBranchService', ['$resource', '$q', function ($resource, $q) { appService.service('NamespaceBranchService', ['$resource', '$q', 'AppUtil', function ($resource, $q, AppUtil) {
var resource = $resource('', {}, { var resource = $resource('', {}, {
find_namespace_branch: { find_namespace_branch: {
method: 'GET', method: 'GET',
isArray: false, isArray: false,
url: '/apps/:appId/envs/:env/clusters/:clusterName/namespaces/:namespaceName/branches' url: AppUtil.prefixPath() + '/apps/:appId/envs/:env/clusters/:clusterName/namespaces/:namespaceName/branches'
}, },
create_branch: { create_branch: {
method: 'POST', method: 'POST',
isArray: false, isArray: false,
url: '/apps/:appId/envs/:env/clusters/:clusterName/namespaces/:namespaceName/branches' url: AppUtil.prefixPath() + '/apps/:appId/envs/:env/clusters/:clusterName/namespaces/:namespaceName/branches'
}, },
delete_branch: { delete_branch: {
method: 'DELETE', method: 'DELETE',
isArray: false, isArray: false,
url: '/apps/:appId/envs/:env/clusters/:clusterName/namespaces/:namespaceName/branches/:branchName' url: AppUtil.prefixPath() + '/apps/:appId/envs/:env/clusters/:clusterName/namespaces/:namespaceName/branches/:branchName'
}, },
merge_and_release_branch: { merge_and_release_branch: {
method: 'POST', method: 'POST',
isArray: false, isArray: false,
url: '/apps/:appId/envs/:env/clusters/:clusterName/namespaces/:namespaceName/branches/:branchName/merge' url: AppUtil.prefixPath() + '/apps/:appId/envs/:env/clusters/:clusterName/namespaces/:namespaceName/branches/:branchName/merge'
}, },
find_branch_gray_rules: { find_branch_gray_rules: {
method: 'GET', method: 'GET',
isArray: false, isArray: false,
url: '/apps/:appId/envs/:env/clusters/:clusterName/namespaces/:namespaceName/branches/:branchName/rules' url: AppUtil.prefixPath() + '/apps/:appId/envs/:env/clusters/:clusterName/namespaces/:namespaceName/branches/:branchName/rules'
}, },
update_branch_gray_rules: { update_branch_gray_rules: {
method: 'PUT', method: 'PUT',
isArray: false, isArray: false,
url: '/apps/:appId/envs/:env/clusters/:clusterName/namespaces/:namespaceName/branches/:branchName/rules' url: AppUtil.prefixPath() + '/apps/:appId/envs/:env/clusters/:clusterName/namespaces/:namespaceName/branches/:branchName/rules'
} }
}); });
......
appService.service("NamespaceService", ['$resource', '$q', function ($resource, $q) { appService.service("NamespaceService", ['$resource', '$q', 'AppUtil', function ($resource, $q, AppUtil) {
var namespace_source = $resource("", {}, { var namespace_source = $resource("", {}, {
find_public_namespaces: { find_public_namespaces: {
method: 'GET', method: 'GET',
isArray: true, isArray: true,
url: '/appnamespaces/public' url: AppUtil.prefixPath() + '/appnamespaces/public'
}, },
createNamespace: { createNamespace: {
method: 'POST', method: 'POST',
url: '/apps/:appId/namespaces', url: AppUtil.prefixPath() + '/apps/:appId/namespaces',
isArray: false isArray: false
}, },
createAppNamespace: { createAppNamespace: {
method: 'POST', method: 'POST',
url: '/apps/:appId/appnamespaces?appendNamespacePrefix=:appendNamespacePrefix', url: AppUtil.prefixPath() + '/apps/:appId/appnamespaces?appendNamespacePrefix=:appendNamespacePrefix',
isArray: false isArray: false
}, },
getNamespacePublishInfo: { getNamespacePublishInfo: {
method: 'GET', method: 'GET',
url: '/apps/:appId/namespaces/publish_info' url: AppUtil.prefixPath() + '/apps/:appId/namespaces/publish_info'
}, },
deleteNamespace: { deleteNamespace: {
method: 'DELETE', method: 'DELETE',
url: '/apps/:appId/envs/:env/clusters/:clusterName/namespaces/:namespaceName' url: AppUtil.prefixPath() + '/apps/:appId/envs/:env/clusters/:clusterName/namespaces/:namespaceName'
}, },
getPublicAppNamespaceAllNamespaces: { getPublicAppNamespaceAllNamespaces: {
method: 'GET', method: 'GET',
url: '/envs/:env/appnamespaces/:publicNamespaceName/namespaces', url: AppUtil.prefixPath() + '/envs/:env/appnamespaces/:publicNamespaceName/namespaces',
isArray: true isArray: true
}, },
loadAppNamespace: { loadAppNamespace: {
method: 'GET', method: 'GET',
url: '/apps/:appId/appnamespaces/:namespaceName' url: AppUtil.prefixPath() + '/apps/:appId/appnamespaces/:namespaceName'
}, },
deleteAppNamespace: { deleteAppNamespace: {
method: 'DELETE', method: 'DELETE',
url: '/apps/:appId/appnamespaces/:namespaceName' url: AppUtil.prefixPath() + '/apps/:appId/appnamespaces/:namespaceName'
} }
}); });
......
appService.service("OrganizationService", ['$resource', '$q', function ($resource, $q) { appService.service("OrganizationService", ['$resource', '$q', 'AppUtil', function ($resource, $q, AppUtil) {
var organization_source = $resource("", {}, { var organization_source = $resource("", {}, {
find_organizations: { find_organizations: {
method: 'GET', method: 'GET',
isArray: true, isArray: true,
url: '/organizations' url: AppUtil.prefixPath() + '/organizations'
} }
}); });
......
appService.service('PermissionService', ['$resource', '$q', function ($resource, $q) { appService.service('PermissionService', ['$resource', '$q', 'AppUtil', function ($resource, $q, AppUtil) {
var permission_resource = $resource('', {}, { var permission_resource = $resource('', {}, {
init_app_namespace_permission: { init_app_namespace_permission: {
method: 'POST', method: 'POST',
url: '/apps/:appId/initPermission', url: AppUtil.prefixPath() + '/apps/:appId/initPermission',
headers: { headers: {
'Content-Type': 'text/plain;charset=UTF-8' 'Content-Type': 'text/plain;charset=UTF-8'
} }
}, },
has_app_permission: { has_app_permission: {
method: 'GET', method: 'GET',
url: '/apps/:appId/permissions/:permissionType' url: AppUtil.prefixPath() + '/apps/:appId/permissions/:permissionType'
}, },
has_namespace_permission: { has_namespace_permission: {
method: 'GET', method: 'GET',
url: '/apps/:appId/namespaces/:namespaceName/permissions/:permissionType' url: AppUtil.prefixPath() + '/apps/:appId/namespaces/:namespaceName/permissions/:permissionType'
}, },
has_namespace_env_permission: { has_namespace_env_permission: {
method: 'GET', method: 'GET',
url: '/apps/:appId/envs/:env/namespaces/:namespaceName/permissions/:permissionType' url: AppUtil.prefixPath() + '/apps/:appId/envs/:env/namespaces/:namespaceName/permissions/:permissionType'
}, },
has_root_permission:{ has_root_permission:{
method: 'GET', method: 'GET',
url: '/permissions/root' url: AppUtil.prefixPath() + '/permissions/root'
}, },
get_namespace_role_users: { get_namespace_role_users: {
method: 'GET', method: 'GET',
url: '/apps/:appId/namespaces/:namespaceName/role_users' url: AppUtil.prefixPath() + '/apps/:appId/namespaces/:namespaceName/role_users'
}, },
get_namespace_env_role_users: { get_namespace_env_role_users: {
method: 'GET', method: 'GET',
url: '/apps/:appId/envs/:env/namespaces/:namespaceName/role_users' url: AppUtil.prefixPath() + '/apps/:appId/envs/:env/namespaces/:namespaceName/role_users'
}, },
assign_namespace_role_to_user: { assign_namespace_role_to_user: {
method: 'POST', method: 'POST',
url: '/apps/:appId/namespaces/:namespaceName/roles/:roleType', url: AppUtil.prefixPath() + '/apps/:appId/namespaces/:namespaceName/roles/:roleType',
headers: { headers: {
'Content-Type': 'text/plain;charset=UTF-8' 'Content-Type': 'text/plain;charset=UTF-8'
} }
}, },
assign_namespace_env_role_to_user: { assign_namespace_env_role_to_user: {
method: 'POST', method: 'POST',
url: '/apps/:appId/envs/:env/namespaces/:namespaceName/roles/:roleType', url: AppUtil.prefixPath() + '/apps/:appId/envs/:env/namespaces/:namespaceName/roles/:roleType',
headers: { headers: {
'Content-Type': 'text/plain;charset=UTF-8' 'Content-Type': 'text/plain;charset=UTF-8'
} }
}, },
remove_namespace_role_from_user: { remove_namespace_role_from_user: {
method: 'DELETE', method: 'DELETE',
url: '/apps/:appId/namespaces/:namespaceName/roles/:roleType?user=:user' url: AppUtil.prefixPath() + '/apps/:appId/namespaces/:namespaceName/roles/:roleType?user=:user'
}, },
remove_namespace_env_role_from_user: { remove_namespace_env_role_from_user: {
method: 'DELETE', method: 'DELETE',
url: '/apps/:appId/envs/:env/namespaces/:namespaceName/roles/:roleType?user=:user' url: AppUtil.prefixPath() + '/apps/:appId/envs/:env/namespaces/:namespaceName/roles/:roleType?user=:user'
}, },
get_app_role_users: { get_app_role_users: {
method: 'GET', method: 'GET',
url: '/apps/:appId/role_users' url: AppUtil.prefixPath() + '/apps/:appId/role_users'
}, },
assign_app_role_to_user: { assign_app_role_to_user: {
method: 'POST', method: 'POST',
url: '/apps/:appId/roles/:roleType', url: AppUtil.prefixPath() + '/apps/:appId/roles/:roleType',
headers: { headers: {
'Content-Type': 'text/plain;charset=UTF-8' 'Content-Type': 'text/plain;charset=UTF-8'
} }
}, },
remove_app_role_from_user: { remove_app_role_from_user: {
method: 'DELETE', method: 'DELETE',
url: '/apps/:appId/roles/:roleType?user=:user' url: AppUtil.prefixPath() + '/apps/:appId/roles/:roleType?user=:user'
}, },
has_open_manage_app_master_role_limit: { has_open_manage_app_master_role_limit: {
method: 'GET', method: 'GET',
url: '/system/role/manageAppMaster' url: AppUtil.prefixPath() + '/system/role/manageAppMaster'
} }
}); });
......
appService.service('ReleaseHistoryService', ['$resource', '$q', function ($resource, $q) { appService.service('ReleaseHistoryService', ['$resource', '$q', 'AppUtil', function ($resource, $q, AppUtil) {
var resource = $resource('', {}, { var resource = $resource('', {}, {
find_release_history_by_namespace: { find_release_history_by_namespace: {
method: 'GET', method: 'GET',
url: '/apps/:appId/envs/:env/clusters/:clusterName/namespaces/:namespaceName/releases/histories', url: AppUtil.prefixPath() + '/apps/:appId/envs/:env/clusters/:clusterName/namespaces/:namespaceName/releases/histories',
isArray: true isArray: true
} }
}); });
......
appService.service('ReleaseService', ['$resource', '$q', function ($resource, $q) { appService.service('ReleaseService', ['$resource', '$q','AppUtil', function ($resource, $q,AppUtil) {
var resource = $resource('', {}, { var resource = $resource('', {}, {
find_all_releases: { find_all_releases: {
method: 'GET', method: 'GET',
url: '/apps/:appId/envs/:env/clusters/:clusterName/namespaces/:namespaceName/releases/all', url: AppUtil.prefixPath() + '/apps/:appId/envs/:env/clusters/:clusterName/namespaces/:namespaceName/releases/all',
isArray: true isArray: true
}, },
find_active_releases: { find_active_releases: {
method: 'GET', method: 'GET',
url: '/apps/:appId/envs/:env/clusters/:clusterName/namespaces/:namespaceName/releases/active', url: AppUtil.prefixPath() + '/apps/:appId/envs/:env/clusters/:clusterName/namespaces/:namespaceName/releases/active',
isArray: true isArray: true
}, },
compare: { compare: {
method: 'GET', method: 'GET',
url: '/envs/:env/releases/compare' url: AppUtil.prefixPath() + '/envs/:env/releases/compare'
}, },
release: { release: {
method: 'POST', method: 'POST',
url: '/apps/:appId/envs/:env/clusters/:clusterName/namespaces/:namespaceName/releases' url: AppUtil.prefixPath() + '/apps/:appId/envs/:env/clusters/:clusterName/namespaces/:namespaceName/releases'
}, },
gray_release: { gray_release: {
method: 'POST', method: 'POST',
url: '/apps/:appId/envs/:env/clusters/:clusterName/namespaces/:namespaceName/branches/:branchName/releases' url: AppUtil.prefixPath() + '/apps/:appId/envs/:env/clusters/:clusterName/namespaces/:namespaceName/branches/:branchName/releases'
}, },
rollback: { rollback: {
method: 'PUT', method: 'PUT',
......
appService.service('ServerConfigService', ['$resource', '$q', function ($resource, $q) { appService.service('ServerConfigService', ['$resource', '$q', 'AppUtil', function ($resource, $q, AppUtil) {
var server_config_resource = $resource('', {}, { var server_config_resource = $resource('', {}, {
create_server_config: { create_server_config: {
method: 'POST', method: 'POST',
url: '/server/config' url: AppUtil.prefixPath() + '/server/config'
}, },
get_server_config_info: { get_server_config_info: {
method: 'GET', method: 'GET',
url: '/server/config/:key' url: AppUtil.prefixPath() + '/server/config/:key'
} }
}); });
return { return {
......
appService.service('SystemInfoService', ['$resource', '$q', function ($resource, $q) { appService.service('SystemInfoService', ['$resource', '$q', 'AppUtil', function ($resource, $q, AppUtil) {
var system_info_resource = $resource('', {}, { var system_info_resource = $resource('', {}, {
load_system_info: { load_system_info: {
method: 'GET', method: 'GET',
url: '/system-info' url: AppUtil.prefixPath() + '/system-info'
}, },
check_health: { check_health: {
method: 'GET', method: 'GET',
url: '/system-info/health' url: AppUtil.prefixPath() + '/system-info/health'
} }
}); });
return { return {
......
appService.service('SystemRoleService', ['$resource', '$q', function ($resource, $q) { appService.service('SystemRoleService', ['$resource', '$q', 'AppUtil', function ($resource, $q,AppUtil) {
var system_role_service = $resource('', {}, { var system_role_service = $resource('', {}, {
add_create_application_role: { add_create_application_role: {
method: 'POST', method: 'POST',
url: '/system/role/createApplication' url: AppUtil.prefixPath() + '/system/role/createApplication'
}, },
delete_create_application_role: { delete_create_application_role: {
method: 'DELETE', method: 'DELETE',
url: '/system/role/createApplication/:userId' url: AppUtil.prefixPath() + '/system/role/createApplication/:userId'
}, },
get_create_application_role_users: { get_create_application_role_users: {
method: 'GET', method: 'GET',
url: '/system/role/createApplication', url: AppUtil.prefixPath() + '/system/role/createApplication',
isArray: true isArray: true
}, },
has_open_manage_app_master_role_limit: { has_open_manage_app_master_role_limit: {
method: 'GET', method: 'GET',
url: '/system/role/manageAppMaster' url: AppUtil.prefixPath() + '/system/role/manageAppMaster'
} }
}); });
return { return {
......
appService.service('UserService', ['$resource', '$q', function ($resource, $q) { appService.service('UserService', ['$resource', '$q', 'AppUtil', function ($resource, $q, AppUtil) {
var user_resource = $resource('', {}, { var user_resource = $resource('', {}, {
load_user: { load_user: {
method: 'GET', method: 'GET',
url: '/user' url: AppUtil.prefixPath() + '/user'
}, },
find_users: { find_users: {
method: 'GET', method: 'GET',
url: '/users' url: AppUtil.prefixPath() + '/users'
}, },
create_or_update_user: { create_or_update_user: {
method: 'POST', method: 'POST',
url: '/users' url: AppUtil.prefixPath() + '/users'
} }
}); });
return { return {
......
...@@ -3,13 +3,13 @@ ...@@ -3,13 +3,13 @@
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="icon" href="../img/config.png"> <link rel="icon" href="img/config.png">
<!-- styles --> <!-- styles -->
<link rel="stylesheet" type="text/css" href="../vendor/bootstrap/css/bootstrap.min.css"> <link rel="stylesheet" type="text/css" href="vendor/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="../vendor/angular/angular-toastr-1.4.1.min.css"> <link rel="stylesheet" type="text/css" href="vendor/angular/angular-toastr-1.4.1.min.css">
<link rel="stylesheet" type="text/css" media='all' href="../vendor/angular/loading-bar.min.css"> <link rel="stylesheet" type="text/css" media='all' href="vendor/angular/loading-bar.min.css">
<link rel="stylesheet" type="text/css" href="../styles/common-style.css"> <link rel="stylesheet" type="text/css" href="styles/common-style.css">
<link rel="stylesheet" type="text/css" href="../vendor/select2/select2.min.css"> <link rel="stylesheet" type="text/css" href="vendor/select2/select2.min.css">
<title>{{'SystemRole.Title' | translate }}</title> <title>{{'SystemRole.Title' | translate }}</title>
</head> </head>
...@@ -131,17 +131,17 @@ ...@@ -131,17 +131,17 @@
</div> </div>
</div> </div>
<div ng-include="'../views/common/footer.html'"></div> <div ng-include="'views/common/footer.html'"></div>
<!-- jquery.js --> <!-- jquery.js -->
<script src="../vendor/jquery.min.js" type="text/javascript"></script> <script src="vendor/jquery.min.js" type="text/javascript"></script>
<!--angular--> <!--angular-->
<script src="../vendor/angular/angular.min.js"></script> <script src="vendor/angular/angular.min.js"></script>
<script src="../vendor/angular/angular-route.min.js"></script> <script src="vendor/angular/angular-route.min.js"></script>
<script src="../vendor/angular/angular-resource.min.js"></script> <script src="vendor/angular/angular-resource.min.js"></script>
<script src="../vendor/angular/angular-toastr-1.4.1.tpls.min.js"></script> <script src="vendor/angular/angular-toastr-1.4.1.tpls.min.js"></script>
<script src="../vendor/angular/loading-bar.min.js"></script> <script src="vendor/angular/loading-bar.min.js"></script>
<script src="vendor/angular/angular-cookies.min.js"></script> <script src="vendor/angular/angular-cookies.min.js"></script>
<script src="vendor/angular/angular-translate.2.18.1/angular-translate.min.js"></script> <script src="vendor/angular/angular-translate.2.18.1/angular-translate.min.js"></script>
...@@ -149,34 +149,34 @@ ...@@ -149,34 +149,34 @@
<script src="vendor/angular/angular-translate.2.18.1/angular-translate-storage-cookie.min.js"></script> <script src="vendor/angular/angular-translate.2.18.1/angular-translate-storage-cookie.min.js"></script>
<!--valdr--> <!--valdr-->
<script src="../vendor/valdr/valdr.min.js" type="text/javascript"></script> <script src="vendor/valdr/valdr.min.js" type="text/javascript"></script>
<script src="../vendor/valdr/valdr-message.min.js" type="text/javascript"></script> <script src="vendor/valdr/valdr-message.min.js" type="text/javascript"></script>
<!-- bootstrap.js --> <!-- bootstrap.js -->
<script src="../vendor/bootstrap/js/bootstrap.min.js" type="text/javascript"></script> <script src="vendor/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<script src="../vendor/lodash.min.js"></script> <script src="vendor/lodash.min.js"></script>
<script src="../vendor/select2/select2.min.js" type="text/javascript"></script> <script src="vendor/select2/select2.min.js" type="text/javascript"></script>
<!--biz--> <!--biz-->
<!--must import--> <!--must import-->
<script type="application/javascript" src="../scripts/app.js"></script> <script type="application/javascript" src="scripts/app.js"></script>
<script type="application/javascript" src="../scripts/services/AppService.js"></script> <script type="application/javascript" src="scripts/services/AppService.js"></script>
<script type="application/javascript" src="../scripts/services/EnvService.js"></script> <script type="application/javascript" src="scripts/services/EnvService.js"></script>
<script type="application/javascript" src="../scripts/services/UserService.js"></script> <script type="application/javascript" src="scripts/services/UserService.js"></script>
<script type="application/javascript" src="../scripts/services/CommonService.js"></script> <script type="application/javascript" src="scripts/services/CommonService.js"></script>
<script type="application/javascript" src="../scripts/services/PermissionService.js"></script> <script type="application/javascript" src="scripts/services/PermissionService.js"></script>
<script type="application/javascript" src="../scripts/services/ClusterService.js"></script> <script type="application/javascript" src="scripts/services/ClusterService.js"></script>
<script type="application/javascript" src="../scripts/services/NamespaceService.js"></script> <script type="application/javascript" src="scripts/services/NamespaceService.js"></script>
<script type="application/javascript" src="../scripts/services/SystemRoleService.js"></script> <script type="application/javascript" src="scripts/services/SystemRoleService.js"></script>
<script type="application/javascript" src="../scripts/AppUtils.js"></script> <script type="application/javascript" src="scripts/AppUtils.js"></script>
<script type="application/javascript" src="../scripts/PageCommon.js"></script> <script type="application/javascript" src="scripts/PageCommon.js"></script>
<script type="application/javascript" src="../scripts/directive/directive.js"></script> <script type="application/javascript" src="scripts/directive/directive.js"></script>
<script type="application/javascript" src="../scripts/valdr.js"></script> <script type="application/javascript" src="scripts/valdr.js"></script>
<script type="application/javascript" src="../scripts/controller/role/SystemRoleController.js"></script> <script type="application/javascript" src="scripts/controller/role/SystemRoleController.js"></script>
</body> </body>
</html> </html>
...@@ -3,13 +3,13 @@ ...@@ -3,13 +3,13 @@
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="icon" href="../img/config.png"> <link rel="icon" href="img/config.png">
<!-- styles --> <!-- styles -->
<link rel="stylesheet" type="text/css" href="../vendor/bootstrap/css/bootstrap.min.css"> <link rel="stylesheet" type="text/css" href="vendor/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="../vendor/angular/angular-toastr-1.4.1.min.css"> <link rel="stylesheet" type="text/css" href="vendor/angular/angular-toastr-1.4.1.min.css">
<link rel="stylesheet" type="text/css" media='all' href="../vendor/angular/loading-bar.min.css"> <link rel="stylesheet" type="text/css" media='all' href="vendor/angular/loading-bar.min.css">
<link rel="stylesheet" type="text/css" href="../styles/common-style.css"> <link rel="stylesheet" type="text/css" href="styles/common-style.css">
<link rel="stylesheet" type="text/css" href="../vendor/select2/select2.min.css"> <link rel="stylesheet" type="text/css" href="vendor/select2/select2.min.css">
<title>{{'SystemInfo.Title' | translate }}</title> <title>{{'SystemInfo.Title' | translate }}</title>
</head> </head>
...@@ -108,17 +108,17 @@ ...@@ -108,17 +108,17 @@
</div> </div>
</div> </div>
<div ng-include="'../views/common/footer.html'"></div> <div ng-include="'views/common/footer.html'"></div>
<!-- jquery.js --> <!-- jquery.js -->
<script src="../vendor/jquery.min.js" type="text/javascript"></script> <script src="vendor/jquery.min.js" type="text/javascript"></script>
<!--angular--> <!--angular-->
<script src="../vendor/angular/angular.min.js"></script> <script src="vendor/angular/angular.min.js"></script>
<script src="../vendor/angular/angular-route.min.js"></script> <script src="vendor/angular/angular-route.min.js"></script>
<script src="../vendor/angular/angular-resource.min.js"></script> <script src="vendor/angular/angular-resource.min.js"></script>
<script src="../vendor/angular/angular-toastr-1.4.1.tpls.min.js"></script> <script src="vendor/angular/angular-toastr-1.4.1.tpls.min.js"></script>
<script src="../vendor/angular/loading-bar.min.js"></script> <script src="vendor/angular/loading-bar.min.js"></script>
<script src="vendor/angular/angular-cookies.min.js"></script> <script src="vendor/angular/angular-cookies.min.js"></script>
<script src="vendor/angular/angular-translate.2.18.1/angular-translate.min.js"></script> <script src="vendor/angular/angular-translate.2.18.1/angular-translate.min.js"></script>
...@@ -126,34 +126,34 @@ ...@@ -126,34 +126,34 @@
<script src="vendor/angular/angular-translate.2.18.1/angular-translate-storage-cookie.min.js"></script> <script src="vendor/angular/angular-translate.2.18.1/angular-translate-storage-cookie.min.js"></script>
<!--valdr--> <!--valdr-->
<script src="../vendor/valdr/valdr.min.js" type="text/javascript"></script> <script src="vendor/valdr/valdr.min.js" type="text/javascript"></script>
<script src="../vendor/valdr/valdr-message.min.js" type="text/javascript"></script> <script src="vendor/valdr/valdr-message.min.js" type="text/javascript"></script>
<!-- bootstrap.js --> <!-- bootstrap.js -->
<script src="../vendor/bootstrap/js/bootstrap.min.js" type="text/javascript"></script> <script src="vendor/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<script src="../vendor/lodash.min.js"></script> <script src="vendor/lodash.min.js"></script>
<script src="../vendor/select2/select2.min.js" type="text/javascript"></script> <script src="vendor/select2/select2.min.js" type="text/javascript"></script>
<!--biz--> <!--biz-->
<!--must import--> <!--must import-->
<script type="application/javascript" src="../scripts/app.js"></script> <script type="application/javascript" src="scripts/app.js"></script>
<script type="application/javascript" src="../scripts/services/AppService.js"></script> <script type="application/javascript" src="scripts/services/AppService.js"></script>
<script type="application/javascript" src="../scripts/services/EnvService.js"></script> <script type="application/javascript" src="scripts/services/EnvService.js"></script>
<script type="application/javascript" src="../scripts/services/UserService.js"></script> <script type="application/javascript" src="scripts/services/UserService.js"></script>
<script type="application/javascript" src="../scripts/services/CommonService.js"></script> <script type="application/javascript" src="scripts/services/CommonService.js"></script>
<script type="application/javascript" src="../scripts/services/PermissionService.js"></script> <script type="application/javascript" src="scripts/services/PermissionService.js"></script>
<script type="application/javascript" src="../scripts/services/ClusterService.js"></script> <script type="application/javascript" src="scripts/services/ClusterService.js"></script>
<script type="application/javascript" src="../scripts/services/NamespaceService.js"></script> <script type="application/javascript" src="scripts/services/NamespaceService.js"></script>
<script type="application/javascript" src="../scripts/services/SystemInfoService.js"></script> <script type="application/javascript" src="scripts/services/SystemInfoService.js"></script>
<script type="application/javascript" src="../scripts/AppUtils.js"></script> <script type="application/javascript" src="scripts/AppUtils.js"></script>
<script type="application/javascript" src="../scripts/PageCommon.js"></script> <script type="application/javascript" src="scripts/PageCommon.js"></script>
<script type="application/javascript" src="../scripts/directive/directive.js"></script> <script type="application/javascript" src="scripts/directive/directive.js"></script>
<script type="application/javascript" src="../scripts/valdr.js"></script> <script type="application/javascript" src="scripts/valdr.js"></script>
<script type="application/javascript" src="../scripts/controller/SystemInfoController.js"></script> <script type="application/javascript" src="scripts/controller/SystemInfoController.js"></script>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
<p class="text-center"> <p class="text-center">
<span class="glyphicon glyphicon-copyright-mark" aria-hidden="true"></span>{{'Common.Ctrip' | translate }} {{'Common.CtripDepartment' | translate }} <span class="glyphicon glyphicon-copyright-mark" aria-hidden="true"></span>{{'Common.Ctrip' | translate }} {{'Common.CtripDepartment' | translate }}
<a href="https://github.com/ctripcorp/apollo" target="_blank"> <a href="https://github.com/ctripcorp/apollo" target="_blank">
<img src="../../img/github.png" style="width: 50px; height: 20px;"> <img src="{{ '/img/github.png' | prefixPath }}" style="width: 50px; height: 20px;">
</a> </a>
</p> </p>
</div> </div>
<iframe src="/sso_heartbeat" class="hide"></iframe> <iframe ng-src="{{ '/sso_heartbeat' | prefixPath }}" class="hide"></iframe>
<nav class="navbar navbar-default"> <nav class="navbar navbar-default">
<div class="container-fluid"> <div class="container-fluid">
<div class="navbar-header"> <div class="navbar-header">
<img class="navbar-brand side-bar-switch cursor-pointer" src="../../img/show_sidebar.png" <img class="navbar-brand side-bar-switch cursor-pointer" src="{{ '/img/show_sidebar.png' | prefixPath }}"
onMouseOver="this.style.background='#f1f2f7'" onMouseOver="this.style.background='#f1f2f7'"
onMouseOut="this.style.background='#fff'" onMouseOut="this.style.background='#fff'"
data-tooltip="tooltip" data-placement="bottom" title="{{'Common.Nav.ShowNavBar' | translate }}" data-tooltip="tooltip" data-placement="bottom" title="{{'Common.Nav.ShowNavBar' | translate }}"
ng-show="viewMode == 2 && !showSideBar" ng-show="viewMode == 2 && !showSideBar"
ng-click="showSideBar = !showSideBar"> ng-click="showSideBar = !showSideBar">
<img class="navbar-brand side-bar-switch cursor-pointer" src="../../img/hide_sidebar.png" <img class="navbar-brand side-bar-switch cursor-pointer" src="{{ '/img/hide_sidebar.png' | prefixPath }}"
onMouseOver="this.style.background='#f1f2f7'" onMouseOver="this.style.background='#f1f2f7'"
onMouseOut="this.style.background='#fff'" onMouseOut="this.style.background='#fff'"
data-tooltip="tooltip" data-placement="bottom" title="{{'Common.Nav.HideNavBar' | translate }}" data-tooltip="tooltip" data-placement="bottom" title="{{'Common.Nav.HideNavBar' | translate }}"
ng-show="viewMode == 2 && showSideBar" ng-show="viewMode == 2 && showSideBar"
ng-click="showSideBar = !showSideBar"> ng-click="showSideBar = !showSideBar">
<a class="navbar-brand logo" href="/"> <a class="navbar-brand logo" href="{{ '/' | prefixPath }}">
<img src="../../img/logo-simple.png" style="height:45px; margin-top: -13px"> <img src="{{ '/img/logo-simple.png' | prefixPath }}" style="height:45px; margin-top: -13px">
</a> </a>
</div> </div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
...@@ -39,12 +39,12 @@ ...@@ -39,12 +39,12 @@
<span class="glyphicon glyphicon-cog"></span>&nbsp;{{'Common.Nav.AdminTools' | translate }} <span class="glyphicon glyphicon-cog"></span>&nbsp;{{'Common.Nav.AdminTools' | translate }}
<span class="caret"></span></a> <span class="caret"></span></a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li><a href="/user-manage.html" target="_blank">{{'Common.Nav.UserManage' | translate }}</a></li> <li><a ng-href="{{ '/user-manage.html' | prefixPath }}" target="_blank">{{'Common.Nav.UserManage' | translate }}</a></li>
<li><a href="/system-role-manage.html" target="_blank">{{'Common.Nav.SystemRoleManage' | translate }}</a></li> <li><a href="{{ '/system-role-manage.html' | prefixPath }}" target="_blank">{{'Common.Nav.SystemRoleManage' | translate }}</a></li>
<li><a href="/open/manage.html" target="_blank">{{'Common.Nav.OpenMange' | translate }}</a></li> <li><a href="{{ '/open/manage.html' | prefixPath }}" target="_blank">{{'Common.Nav.OpenMange' | translate }}</a></li>
<li><a href="/server_config.html" target="_blank">{{'Common.Nav.SystemConfig' | translate }}</a></li> <li><a href="{{ '/server_config.html' | prefixPath }}" target="_blank">{{'Common.Nav.SystemConfig' | translate }}</a></li>
<li><a href="/delete_app_cluster_namespace.html" target="_blank">{{'Common.Nav.DeleteApp-Cluster-Namespace' | translate }}</a></li> <li><a href="{{ '/delete_app_cluster_namespace.html' | prefixPath }}" target="_blank">{{'Common.Nav.DeleteApp-Cluster-Namespace' | translate }}</a></li>
<li><a href="/system_info.html" target="_blank">{{'Common.Nav.SystemInfo' | translate }}</a></li> <li><a href="{{ '/system_info.html' | prefixPath }}" target="_blank">{{'Common.Nav.SystemInfo' | translate }}</a></li>
</ul> </ul>
</li> </li>
<li class="dropdown"> <li class="dropdown">
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
<span class="glyphicon glyphicon-user"></span>&nbsp;{{userName}} <span class="glyphicon glyphicon-user"></span>&nbsp;{{userName}}
<span class="caret"></span></a> <span class="caret"></span></a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li><a href="/user/logout">{{'Common.Nav.Logout' | translate }}</a></li> <li><a href="{{ '/user/logout' | prefixPath }}">{{'Common.Nav.Logout' | translate }}</a></li>
</ul> </ul>
</li> </li>
......
...@@ -364,7 +364,7 @@ ...@@ -364,7 +364,7 @@
<button class="btn btn-default btn-sm" data-tooltip="tooltip" data-placement="bottom" <button class="btn btn-default btn-sm" data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Branch.Instance.RefreshList' | translate }}" title="{{'Component.Namespace.Branch.Instance.RefreshList' | translate }}"
ng-click="refreshInstancesInfo(namespace.branch)"> ng-click="refreshInstancesInfo(namespace.branch)">
<img src="../../img/refresh.png" /> <img ng-src="{{ '/img/refresh.png' | prefixPath }}" />
</button> </button>
</div> </div>
<div class="panel-body"> <div class="panel-body">
...@@ -372,7 +372,7 @@ ...@@ -372,7 +372,7 @@
<div class="panel-heading"> <div class="panel-heading">
<a target="_blank" data-tooltip="tooltip" data-placement="bottom" <a target="_blank" data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Branch.Instance.ItemToSee' | translate }}" title="{{'Component.Namespace.Branch.Instance.ItemToSee' | translate }}"
href="/config/history.html?#/appid={{appId}}&env={{env}}&clusterName={{namespace.baseInfo.clusterName}}&namespaceName={{namespace.baseInfo.namespaceName}}&releaseId={{namespace.branch.latestRelease.id}}"> ng-href="{{ '/config/history.html' | prefixPath }}?#/appid={{appId}}&env={{env}}&clusterName={{namespace.baseInfo.clusterName}}&namespaceName={{namespace.baseInfo.namespaceName}}&releaseId={{namespace.branch.latestRelease.id}}">
{{namespace.branch.latestRelease.name}} {{namespace.branch.latestRelease.name}}
</a> </a>
</div> </div>
......
...@@ -54,13 +54,13 @@ ...@@ -54,13 +54,13 @@
</button> </button>
<a type="button" class="btn btn-default btn-sm" data-tooltip="tooltip" data-placement="bottom" <a type="button" class="btn btn-default btn-sm" data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Master.Items.PublishHistoryTips' | translate }}" title="{{'Component.Namespace.Master.Items.PublishHistoryTips' | translate }}"
href="/config/history.html?#/appid={{appId}}&env={{env}}&clusterName={{cluster}}&namespaceName={{namespace.baseInfo.namespaceName}}"> href="{{ '/config/history.html' | prefixPath }}?#/appid={{appId}}&env={{env}}&clusterName={{cluster}}&namespaceName={{namespace.baseInfo.namespaceName}}">
<img src="img/release-history.png"> <img src="img/release-history.png">
{{'Component.Namespace.Master.Items.PublishHistory' | translate }} {{'Component.Namespace.Master.Items.PublishHistory' | translate }}
</a> </a>
<a type="button" class="btn btn-default btn-sm" data-tooltip="tooltip" data-placement="bottom" <a type="button" class="btn btn-default btn-sm" data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Master.Items.GrantTips' | translate }}" title="{{'Component.Namespace.Master.Items.GrantTips' | translate }}"
href="/namespace/role.html?#/appid={{appId}}&namespaceName={{namespace.baseInfo.namespaceName}}" href="{{ '/namespace/role.html' | prefixPath }}?#/appid={{appId}}&namespaceName={{namespace.baseInfo.namespaceName}}"
ng-show="hasAssignUserPermission"> ng-show="hasAssignUserPermission">
<img src="img/assign.png"> <img src="img/assign.png">
{{'Component.Namespace.Master.Items.Grant' | translate }} {{'Component.Namespace.Master.Items.Grant' | translate }}
...@@ -456,7 +456,7 @@ ...@@ -456,7 +456,7 @@
<div class="row"> <div class="row">
<div class="padding-top-5 col-md-4 col-sm-4"> <div class="padding-top-5 col-md-4 col-sm-4">
{{'Component.Namespace.Master.Items.Body.Public.Title' | translate }} {{'Component.Namespace.Master.Items.Body.Public.Title' | translate }}
<a href="/config.html?#/appid={{namespace.publicNamespace.baseInfo.appId}}&env={{env}}&cluster={{namespace.publicNamespace.baseInfo.clusterName}}" <a href="{{ '/config.html' | prefixPath }}?#/appid={{namespace.publicNamespace.baseInfo.appId}}&env={{env}}&cluster={{namespace.publicNamespace.baseInfo.clusterName}}"
target="_blank"> target="_blank">
<small> <small>
({{'Common.AppId' | translate }}:{{namespace.publicNamespace.baseInfo.appId}}, ({{'Common.AppId' | translate }}:{{namespace.publicNamespace.baseInfo.appId}},
...@@ -672,7 +672,7 @@ ...@@ -672,7 +672,7 @@
</div> </div>
<div class="panel-body text-center"> <div class="panel-body text-center">
{{'Component.Namespace.Master.Items.Body.Public.NoPublicNamespaceTips1' | translate }} {{'Component.Namespace.Master.Items.Body.Public.NoPublicNamespaceTips1' | translate }}
<a href="/config.html?#/appid={{namespace.parentAppId}}" <a href="{{ '/config.html' | prefixPath }}?#/appid={{namespace.parentAppId}}"
target="_blank">{{namespace.parentAppId}}</a> target="_blank">{{namespace.parentAppId}}</a>
{{'Component.Namespace.Master.Items.Body.Public.NoPublicNamespaceTips2' | translate:this }} {{'Component.Namespace.Master.Items.Body.Public.NoPublicNamespaceTips2' | translate:this }}
</div> </div>
...@@ -861,7 +861,7 @@ ...@@ -861,7 +861,7 @@
<button class="btn btn-default btn-sm" data-tooltip="tooltip" data-placement="bottom" <button class="btn btn-default btn-sm" data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Master.Items.Body.Instance.RefreshList' | translate }}" title="{{'Component.Namespace.Master.Items.Body.Instance.RefreshList' | translate }}"
ng-click="refreshInstancesInfo(namespace)"> ng-click="refreshInstancesInfo(namespace)">
<img src="../../img/refresh.png" /> <img ng-src="{{ '/img/refresh.png' | prefixPath }}" />
</button> </button>
</div> </div>
...@@ -875,7 +875,7 @@ ...@@ -875,7 +875,7 @@
<div class="panel-heading"> <div class="panel-heading">
<a target="_blank" data-tooltip="tooltip" data-placement="bottom" <a target="_blank" data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Master.Items.Body.Instance.ToSeeItem' | translate }}" title="{{'Component.Namespace.Master.Items.Body.Instance.ToSeeItem' | translate }}"
href="/config/history.html?#/appid={{appId}}&env={{env}}&clusterName={{cluster}}&namespaceName={{namespace.baseInfo.namespaceName}}&releaseId={{namespace.latestRelease.id}}"> ng-href="{{ '/config/history.html' | prefixPath }}?#/appid={{appId}}&env={{env}}&clusterName={{cluster}}&namespaceName={{namespace.baseInfo.namespaceName}}&releaseId={{namespace.latestRelease.id}}">
{{namespace.latestRelease.name}} {{namespace.latestRelease.name}}
</a> </a>
</div> </div>
...@@ -925,7 +925,7 @@ ...@@ -925,7 +925,7 @@
<div class="panel-heading"> <div class="panel-heading">
<a target="_blank" data-tooltip="tooltip" data-placement="bottom" <a target="_blank" data-tooltip="tooltip" data-placement="bottom"
title="{{'Component.Namespace.Master.Items.Body.Instance.ToSeeItem' | translate }}" title="{{'Component.Namespace.Master.Items.Body.Instance.ToSeeItem' | translate }}"
href="/config/history.html?#/appid={{appId}}&env={{env}}&clusterName={{cluster}}&namespaceName={{namespace.baseInfo.namespaceName}}&releaseId={{release.id}}"> href="{{ '/config/history.html' | prefixPath }}?#/appid={{appId}}&env={{env}}&clusterName={{cluster}}&namespaceName={{namespace.baseInfo.namespaceName}}&releaseId={{release.id}}">
{{release.name}} {{release.name}}
</a> </a>
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<div class="alert alert-warning" role="alert"> <div class="alert alert-warning" role="alert">
{{'Component.Rollback.Tips' | translate }} {{'Component.Rollback.Tips' | translate }}
<a target="_blank" <a target="_blank"
href="/config/history.html?#/appid={{appId}}&env={{env}}&clusterName={{toRollbackNamespace.baseInfo.clusterName}}&namespaceName={{toRollbackNamespace.baseInfo.namespaceName}}">{{'Component.Rollback.ClickToView' | translate }}</a> href="{{ '/config/history.html' | prefixPath }}?#/appid={{appId}}&env={{env}}&clusterName={{toRollbackNamespace.baseInfo.clusterName}}&namespaceName={{toRollbackNamespace.baseInfo.namespaceName}}">{{'Component.Rollback.ClickToView' | translate }}</a>
</div> </div>
<div class="form-group" style="margin-top: 15px;"> <div class="form-group" style="margin-top: 15px;">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment