文件操作 - array_join.ts
返回文件管理
返回主菜单
删除本文件
文件: /usr/share/grafana/public/app/core/directives/array_join.ts
编辑文件内容
import _ from 'lodash'; import coreModule from '../core_module'; export function arrayJoin() { 'use strict'; return { restrict: 'A', require: 'ngModel', link: (scope: any, element: any, attr: any, ngModel: any) => { function split_array(text: string) { return (text || '').split(','); } function join_array(text: string) { if (_.isArray(text)) { return ((text || '') as any).join(','); } else { return text; } } ngModel.$parsers.push(split_array); ngModel.$formatters.push(join_array); }, }; } coreModule.directive('arrayJoin', arrayJoin);
修改文件时间
将文件时间修改为当前时间的前一年
删除文件