mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-15 14:24:39 +00:00
feat: modify asset permission default expired from settings
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
const moment = require('moment')
|
||||
import { getLangCode } from '@/i18n/utils'
|
||||
import store from '@/store'
|
||||
|
||||
function getTimeUnits(u) {
|
||||
const units = {
|
||||
@@ -124,3 +125,8 @@ export function formatDate(inputTime) {
|
||||
// return y + '-' + m + '-' + d + ' ' + h + ':' + minute + ':' + second
|
||||
return y + '-' + m + '-' + d + 'T' + h + ':' + minute + ':' + second
|
||||
}
|
||||
|
||||
export function getDefaultExpiredDays() {
|
||||
const years = store.getters.publicSettings.DEFAULT_EXPIRED_YEARS
|
||||
return getDayFuture(years * 365, new Date()).toISOString()
|
||||
}
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
<script>
|
||||
import { GenericCreateUpdatePage } from '@/layout/components'
|
||||
import AssetSelect from '@/components/Apps/AssetSelect'
|
||||
import { getDayFuture } from '@/utils/time'
|
||||
import AccountFormatter from './components/AccountFormatter'
|
||||
import { AllAccount } from '../const'
|
||||
import ProtocolsSelect from '@/components/Form/FormFields/AllOrSpec.vue'
|
||||
@@ -32,9 +31,6 @@ export default {
|
||||
}
|
||||
return {
|
||||
initial: {
|
||||
is_active: true,
|
||||
date_start: new Date().toISOString(),
|
||||
date_expired: getDayFuture(25550, new Date()).toISOString(),
|
||||
nodes: nodesInitial,
|
||||
assets: assetsInitial,
|
||||
accounts: [AllAccount]
|
||||
|
||||
Reference in New Issue
Block a user