forked from ceph/ceph
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mgr/dashboard: About modal proposed changes
Fixes: http://tracker.ceph.com/issues/35693 Signed-off-by: Kanika Murarka <kmurarka@redhat.com>
- Loading branch information
Kanika Murarka
committed
Jan 16, 2019
1 parent
38a99f0
commit 175b83c
Showing
13 changed files
with
414 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
var replace = require('replace-in-file'); | ||
var buildDate = new Date(); | ||
var copyrightYear = buildDate.getFullYear(); | ||
const optionsNewYear = { | ||
files:[ | ||
'src/environments/environment.ts', | ||
'src/environments/environment.prod.ts' | ||
], | ||
from: /{COPYRIGHT_YEAR}/g, | ||
to: copyrightYear, | ||
allowEmptyPaths: false, | ||
}; | ||
|
||
const optionsOldYear = { | ||
files:[ | ||
'src/environments/environment.ts', | ||
'src/environments/environment.prod.ts' | ||
], | ||
from: /year: '(.*)'/g, | ||
to: "year: '{COPYRIGHT_YEAR}'", | ||
allowEmptyPaths: false, | ||
}; | ||
|
||
const optionsNewProd = { | ||
files:[ | ||
'src/environments/environment.prod.ts' | ||
], | ||
from: /'{PRODUCTION}'/g, | ||
to: true, | ||
allowEmptyPaths: false, | ||
}; | ||
|
||
const optionsNewDev = { | ||
files:[ | ||
'src/environments/environment.ts' | ||
], | ||
from: /'{PRODUCTION}'/g, | ||
to: false, | ||
allowEmptyPaths: false, | ||
}; | ||
|
||
const optionsOldProd = { | ||
files:[ | ||
'src/environments/environment.prod.ts', | ||
'src/environments/environment.ts' | ||
], | ||
from: /production: (.*)/g, | ||
to: "production: '{PRODUCTION}',", | ||
allowEmptyPaths: false, | ||
}; | ||
|
||
try { | ||
let changeOldYearFiles = replace.sync(optionsOldYear); | ||
let changeNewYearFiles = replace.sync(optionsNewYear); | ||
let changeOldProdFiles = replace.sync(optionsOldProd); | ||
let changeProdFiles = replace.sync(optionsNewProd); | ||
let changeDevFiles = replace.sync(optionsNewDev); | ||
console.log('Environement variables has been set'); | ||
} | ||
catch (error) { | ||
console.error('Error occurred:', error); | ||
throw error | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.