render()

in dolphinscheduler-ui/src/views/resource/components/resource/table/table-action.tsx [120:259]


  render() {
    const { t } = useI18n()
    return (
      <NSpace>
        {
          <NTooltip trigger={'hover'}>
            {{
              default: () => t('resource.file.edit'),
              trigger: () => (
                <NButton
                  size='tiny'
                  type='info'
                  disabled={this.rtDisb(this.row.name, this.row.size)}
                  tag='div'
                  onClick={() => {
                    this.handleEditFile({
                      fullName: this.row.fullName,
                      user_name: this.row.user_name,
                      alias: this.row.alias
                    })
                  }}
                  style={{ marginRight: '-5px' }}
                  circle
                  class='btn-edit'
                >
                  <NIcon>
                    <FormOutlined />
                  </NIcon>
                </NButton>
              )
            }}
          </NTooltip>
        }
        <NTooltip trigger={'hover'}>
          {{
            default: () => t('resource.file.reupload'),
            trigger: () => (
              <NButton
                size='tiny'
                type='info'
                onClick={() =>
                  this.handleReuploadFile(
                    this.row.name,
                    this.row.description,
                    this.row.fullName,
                    this.row.user_name
                  )
                }
                disabled={!!this.row?.directory}
                style={{ marginRight: '-5px' }}
                circle
                class='btn-reupload'
              >
                <NIcon>
                  <UploadOutlined />
                </NIcon>
              </NButton>
            )
          }}
        </NTooltip>
        <NTooltip trigger={'hover'}>
          {{
            default: () => t('resource.file.rename'),
            trigger: () => (
              <NButton
                size='tiny'
                type='info'
                onClick={() => {
                  this.handleRenameFile(
                    this.row.name,
                    this.row.description,
                    this.row.fullName,
                    this.row.user_name
                  )
                }}
                style={{ marginRight: '-5px' }}
                circle
                class='btn-rename'
              >
                <NIcon>
                  <EditOutlined />
                </NIcon>
              </NButton>
            )
          }}
        </NTooltip>
        <NTooltip trigger={'hover'}>
          {{
            default: () => t('resource.file.download'),
            trigger: () => (
              <NButton
                size='tiny'
                type='info'
                disabled={!!this.row?.directory}
                tag='div'
                circle
                style={{ marginRight: '-5px' }}
                onClick={() =>
                  downloadResource({ fullName: this.row.fullName })
                }
                class='btn-download'
              >
                <NIcon>
                  <DownloadOutlined />
                </NIcon>
              </NButton>
            )
          }}
        </NTooltip>
        <NTooltip trigger={'hover'}>
          {{
            default: () => t('resource.file.delete'),
            trigger: () => (
              <NPopconfirm
                positive-text={t('resource.file.confirm')}
                negative-text={t('resource.file.cancel')}
                onPositiveClick={() => {
                  this.handleDeleteFile({
                    fullName: this.row.fullName,
                    tenantCode: this.row.user_name
                  })
                }}
              >
                {{
                  default: () => t('resource.file.delete_confirm'),
                  trigger: () => (
                    <NButton size='tiny' type='error' circle class='btn-delete'>
                      <NIcon>
                        <DeleteOutlined />
                      </NIcon>
                    </NButton>
                  )
                }}
              </NPopconfirm>
            )
          }}
        </NTooltip>
      </NSpace>
    )
  }