[feat #1839]: Make dashboard support deploying under subpath (#1851)

This commit is contained in:
Brent 2020-11-23 10:48:44 +08:00 committed by GitHub
parent 8c4f251922
commit 699532efe3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 2 deletions

View File

@ -38,6 +38,9 @@ angular
return response;
},
'request' : function(config) {
// Resolved resource loading failure after configuring ContextPath
var baseUrl = $window.document.getElementsByTagName('base')[0].href;
config.url = baseUrl + config.url;
return config;
},
'requestError' : function(config){

View File

@ -1,6 +1,6 @@
<div class="container">
<div class="row" style="margin: 200px auto 15px auto; text-align: center;">
<img src="../../assets/img/sentinel-logo.png" alt="Sentinel Logo"
<img src="./assets/img/sentinel-logo.png" alt="Sentinel Logo"
style="max-height: 25%; max-width: 25%;">
<!-- <h1 id='login_title'>Sentinel 控制台</h1> -->
</div>

File diff suppressed because one or more lines are too long

View File

@ -10,6 +10,7 @@
<link rel="stylesheet" href="./lib/css/bootstrap.min.css" />
<link rel="stylesheet" href="./lib/css/font-awesome.min.css">
<link rel="stylesheet" href="./dist/css/app.css">
<base href="./">
</head>
<body>

View File

@ -10,6 +10,7 @@
<link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.0.3/css/bootstrap.min.css" />
<link rel="stylesheet" href="//cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="http://localhost:1234/css/app.css">
<base href="./">
</head>
<body>